Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 52 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,79 @@ name: CI

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
checks:
name: Lint & type-check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 22.15

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Install npm dependencies
run: npm install

- name: Install Python tools
run: pip install ruff mypy

- name: Prettier
run: npx prettier --check "src/**/*.ts" "webviews/viewer/src/**/*.{ts,svelte}" "webviews/export/**/*.{js,css,html}"

- name: ESLint
run: npx eslint --max-warnings=0 src/ webviews/export/

- name: TypeScript
run: npx tsc --noEmit

- name: svelte-check
run: npx svelte-check --tsconfig webviews/viewer/tsconfig.json --fail-on-warnings

- name: Ruff lint
run: python3 -m ruff check python/lsp/ python/med2obj.py

- name: Ruff format
run: python3 -m ruff format --check python/lsp/ python/med2obj.py

- name: mypy
run: python3 -m mypy

build:
name: Package
runs-on: ubuntu-latest
needs: checks
steps:
- uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 22.15

- name: Install Python
run: sudo apt-get update && sudo apt-get install -y python3 python3-pip python3-nox python3-venv

- name: Install npm dependencies
run: npm install

- name: Install vsce
run: npm install -g @vscode/vsce

- name: Build and package
run: python3 -m nox -s package -v --no-error-on-missing-interpreters

- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: vsix-package
path: "*.vsix"
retention-days: 30
retention-days: 30
11 changes: 4 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Node modules
node_modules/

# Webview build output
webviews/viewer/dist/

# Build output
dist/

Expand Down Expand Up @@ -47,6 +50,7 @@ yarn.lock
vsc-extension-quickstart.md

**/__pycache__/

# Fichiers temporaires ou backup
*.tmp
*.swp
Expand All @@ -59,14 +63,7 @@ vsc-extension-quickstart.md

*.js.map

node_modules/
dist/

yarn.lock
*.vsix

# Exclude extension package
vs-code-aster-*.vsix
.vscode-test
out/

Expand Down
9 changes: 9 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/sh
set -e

npx prettier --write "src/**/*.ts" "webviews/viewer/src/**/*.{ts,svelte}" "webviews/export/**/*.{js,css,html}"
git add -u
npx eslint --max-warnings=0 src/ webviews/export/
npx svelte-check --tsconfig webviews/viewer/tsconfig.json --fail-on-warnings
python3 -m ruff check python/lsp/ python/med2obj.py
python3 -m ruff format --check python/lsp/ python/med2obj.py
5 changes: 5 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
dist/
node_modules/
python/
*.min.js
*.min.css
16 changes: 16 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"plugins": ["prettier-plugin-svelte"],
"overrides": [
{
"files": "*.svelte",
"options": {
"parser": "svelte"
}
}
],
"singleQuote": true,
"semi": true,
"printWidth": 100,
"tabWidth": 2,
"trailingComma": "es5"
}
23 changes: 22 additions & 1 deletion .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"label": "watch",
"dependsOn": [
"npm: watch:tsc",
"npm: watch:esbuild"
"npm: watch:esbuild",
"npm: watch:webview"
],
"presentation": {
"reveal": "never"
Expand All @@ -17,6 +18,26 @@
"isDefault": true
}
},
{
"type": "npm",
"script": "watch:webview",
"group": "build",
"isBackground": true,
"label": "npm: watch:webview",
"presentation": {
"group": "watch",
"reveal": "never"
},
"problemMatcher": {
"owner": "vite-watch",
"pattern": { "regexp": "^$" },
"background": {
"activeOnStart": false,
"beginsPattern": "watching for file changes",
"endsPattern": "built in \\d"
}
}
},
{
"type": "npm",
"script": "watch:esbuild",
Expand Down
11 changes: 9 additions & 2 deletions .vscodeignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,14 @@ vsc-extension-quickstart.md
**/.vscode-test.*
.venv
noxfile.py
requirements.txt
requirements.txt
python/data
python/lsp/.venv
python/.venv
python/.venv
webviews/viewer/src/**
webviews/viewer/vite.config.ts
webviews/viewer/svelte.config.js
webviews/viewer/tsconfig.json
webviews/viewer/tailwind.css
webviews/viewer/styles.css
webviews/viewer/index.js
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,25 @@ All notable changes to the **VS Code Aster** extension will be documented in thi
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.5.0] - 2026-03-13

Rewrote the mesh viewer UI with Svelte, and added new viewer features.

### Added
- Migrated the mesh viewer frontend from vanilla JS/HTML to Svelte with TypeScript
- Mesh viewer UI now follows the VS Code user theme
- Object file names are shown in the webview tab titles
- Focusing a `.comm` file now focuses its corresponding mesh viewer webview
- Revamped help popup with tabs and more tips
- New settings popup with various settings
- Edge rendering settings
- Object visibility settings
- UI settings
- Improved various UI components in the mesh viewer
- Show/hide toggle button per object in the sidebar
- Per-object color display
- Zoom widget in the mesh viewer

## [1.4.3] - 2026-03-03

Updated dependencies.
Expand Down
2 changes: 1 addition & 1 deletion CITATION.cff
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cff-version: 1.4.3
cff-version: 1.5.0
title: VS Code Aster
message: >-
If you use this software, please cite it using the
Expand Down
40 changes: 32 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<p align="center"><img src="https://raw.githubusercontent.com/simvia-tech/vs-code-aster/main/resources/images/simvia.png" alt="Simvia Logo" width="50%" /></p>
<p align="center"><img src="https://raw.githubusercontent.com/simvia-tech/vs-code-aster/main/media/images/simvia.png" alt="Simvia Logo" width="50%" /></p>

<p align="center">
<a href="/"><img src="https://img.shields.io/badge/version-1.4.3-blue" alt="Version" /></a>
<a href="/"><img src="https://img.shields.io/badge/version-1.5.0-blue" alt="Version" /></a>
<a href="./LICENSE"><img src="https://img.shields.io/badge/license-GPL%203.0-green" alt="License" /></a>
</p>

Expand Down Expand Up @@ -253,17 +253,41 @@ git clone https://github.com/simvia-tech/vs-code-aster.git
npm install
```

3. Compile extension :
### 3. Architecture overview

The extension consists of two independently compiled parts :

- **Extension host** (`src/`) — TypeScript compiled with esbuild, runs in Node.js inside VS Code
- **Webview** (`webviews/viewer/`) — Svelte 5 + Vite app that powers the 3D visualizer; built separately into `webviews/viewer/dist/`

### 4. Running the extension locally

Press `F5` (or go to `Run > Start Debugging`) to launch a new VS Code window running the extension.

This starts three background watch tasks automatically (defined in `.vscode/tasks.json`) :

| Task | What it does |
|---|---|
| `npm: watch:esbuild` | Recompiles the extension host on every save |
| `npm: watch:tsc` | Type-checks the extension host continuously |
| `npm: watch:webview` | Rebuilds the Svelte webview on every save |

After making changes to the **extension host** (`src/`), reload the debug window with `Ctrl + R`.

After making changes to the **webview** (`webviews/viewer/src/`), wait for the `watch:webview` task to finish rebuilding, then run `Developer: Reload Webviews` from the Command Palette.

### 5. Building manually

To build everything from scratch without starting the debug session :

```bash
# Build the webview
npm run build:webview

# Compile and type-check the extension host
npm run compile
```

### 3. Running the extension locally

You can press `F5` or go to `Run > Start Debugging` to launch a new VS Code window running this extension.
After making changes, you can reload the new window using `Ctrl` + `R`.

## Telemetry

**VS Code Aster** includes optional telemetry features to help improve the tool by collecting anonymous usage data.
Expand Down
2 changes: 1 addition & 1 deletion ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

The extension aims to reduce friction between modeling, validation, execution, and analysis by bringing **code_aster** native workflows into the editor.

## Current Capabilities (v1.4.3)
## Current Capabilities (v1.5.0)

- `.export` file generator
- 3D mesh viewer
Expand Down
2 changes: 1 addition & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import typescriptEslint from "@typescript-eslint/eslint-plugin";
import tsParser from "@typescript-eslint/parser";

export default [{
files: ["**/*.ts"],
files: ["**/*.ts", "webviews/export/**/*.js"],
}, {
plugins: {
"@typescript-eslint": typescriptEslint,
Expand Down
File renamed without changes
1 change: 1 addition & 0 deletions media/icons/3d_light.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
Loading
Loading