Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
090a0bc
update name from idaes to fi or flowsheet inspector
CopyDemon Jun 9, 2026
c840409
Run fi-steps via the selected Python interpreter; rename IDAES->fi
CopyDemon Jun 9, 2026
d3fc302
build
CopyDemon Jun 10, 2026
13c23bb
style new python interpretor
CopyDemon Jun 10, 2026
5d71a94
Add Python env listing, switching, and broadcasting to webviews
CopyDemon Jun 10, 2026
a07aefe
Add Current Python selector to the tree view
CopyDemon Jun 10, 2026
e0f5dc2
Expand docstrings on env check and fi-steps runner
CopyDemon Jun 10, 2026
2558036
update file path resolver make it robust
CopyDemon Jun 10, 2026
2ae0df9
Replace sqlite3 CLI dependency with node-sqlite3-wasm
CopyDemon Jun 10, 2026
a4a448e
build html
CopyDemon Jun 11, 2026
f9762ae
build
CopyDemon Jun 11, 2026
dec08d8
add python interpretor full path and copy button
CopyDemon Jun 11, 2026
1484cf1
add new function to help user to check current python interpretor has…
CopyDemon Jun 11, 2026
957c733
update extension treeview initial logic, to make sure if actived file…
CopyDemon Jun 11, 2026
7111051
move warning component below interpretor component
CopyDemon Jun 11, 2026
f063d31
build
CopyDemon Jun 11, 2026
3d0d752
revert warning and caution color
CopyDemon Jun 11, 2026
ce3d877
remove the blue dot from webview nav on the right side of ipopt
CopyDemon Jun 11, 2026
77097ad
Migrate fi-run to use VS Code Python interpreter directly (no shell)
CopyDemon Jun 11, 2026
785ffba
Switch fi-steps and fi-run to python -m module invocation
CopyDemon Jun 11, 2026
49dfb25
update version number
CopyDemon Jun 11, 2026
21b5259
build 0.0.6vsix
CopyDemon Jun 11, 2026
95fe1a6
update ignore remove vsix file
CopyDemon Jun 11, 2026
e2acf8a
buikd
CopyDemon Jun 11, 2026
9b9947b
fix timing issue, which on windows when first time load extension tre…
CopyDemon Jun 11, 2026
ab4e925
build extension
CopyDemon Jun 11, 2026
97da836
format
CopyDemon Jun 11, 2026
95db508
fix warning badge font color
CopyDemon Jun 11, 2026
aa6c3b3
fix warning badge font color
CopyDemon Jun 11, 2026
f208040
build
CopyDemon Jun 11, 2026
c9cfdaa
build vsix
CopyDemon Jun 11, 2026
46b4fcc
Only trigger Python env refresh on startup when no envs are discovered
CopyDemon Jun 11, 2026
4a82d01
Remove extensionConfig shell/conda system
CopyDemon Jun 11, 2026
daf6963
build
CopyDemon Jun 11, 2026
f982978
Simplify Python env: read-only display + VS Code picker
CopyDemon Jun 12, 2026
be79c24
fix template import
CopyDemon Jun 23, 2026
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
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,6 @@ __pycache__/

# CI build output
ci_extension_package/
*.vsix

# test
test-results/
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// This file is the vscode debug configuration used for debugging the extension in VS Code.
// docs: https://code.visualstudio.com/docs/debugtest/debugging-configuration
{
"version": "0.0.5",
"version": "0.0.6",
"configurations": [
{
"name": "Run Extension",
Expand Down
2 changes: 1 addition & 1 deletion extension/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import typescriptEslint from "typescript-eslint";

export default [{
ignores: ["out/**", "node_modules/**"],
ignores: ["out/**", "node_modules/**", "src/webview_template/**"],
}, {
files: ["src/**/*.ts"],
}, {
Expand Down
9 changes: 9 additions & 0 deletions extension/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 21 additions & 11 deletions extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"publisher": "idaes-team",
"displayName": "Flowsheet-inspector",
"description": "",
"version": "0.0.5",
"version": "0.0.6",
"engines": {
"vscode": "^1.106.0"
},
Expand All @@ -16,25 +16,32 @@
"url": "https://github.com/prommis/flowsheet-inspector"
},
"activationEvents": [
"onView:idaes.treeView",
"onView:idaes.webView"
"onView:fi.treeView",
"onView:fi.webView"
],
"extensionDependencies": [
"ms-python.python"
],
"main": "./out/extension.js",
"contributes": {
"commands": [
{
"command": "flowsheet-inspector.start",
"title": "IDAES Start"
"title": "Flowsheet Inspector: Start"
},
{
"command": "flowsheet-inspector.openWebView",
"title": "Open IDAES Flowsheet Inspector",
"title": "Open Flowsheet Inspector",
"icon": "$(open-preview)"
},
{
"command": "flowsheet-inspector.reloadWebview",
"title": "IDAES: Reload Webview (Dev)",
"title": "Flowsheet Inspector: Reload Webview (Dev)",
"icon": "$(refresh)"
},
{
"command": "flowsheet-inspector.logPythonEnv",
"title": "Flowsheet Inspector: Log Active Python Env (Dev)"
}
],
"keybindings": [
Expand All @@ -59,16 +66,16 @@
"viewsContainers": {
"activitybar": [
{
"id": "idaes-activity-bar",
"title": "IDAES Control",
"id": "fi-activity-bar",
"title": "Flowsheet Inspector",
"icon": "resources/prommis_icon.svg"
}
]
},
"views": {
"idaes-activity-bar": [
"fi-activity-bar": [
{
"id": "idaes.treeView",
"id": "fi.treeView",
"name": "Run Control",
"icon": "resources/prommis_icon.svg",
"type": "webview"
Expand Down Expand Up @@ -97,5 +104,8 @@
"eslint": "^9.39.1",
"typescript": "^5.9.3",
"typescript-eslint": "^8.48.1"
},
"dependencies": {
"node-sqlite3-wasm": "^0.8.58"
}
}
}
8 changes: 4 additions & 4 deletions extension/src/e2e/run_VSCode_in_electron.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,11 @@ test('extension loads in VS Code', async () => {
);
await page.screenshot({ path: 'test-results/vscodeStart.png' });

// click the IDAES Control icon in the activity bar (always directly visible
// because --extensions-dir isolates us from other extensions)
await page.locator('[aria-label="IDAES Control"]').first().click({ timeout: 15000 });
// click the Flowsheet Inspector icon in the activity bar (always directly
// visible because --extensions-dir isolates us from other extensions)
await page.locator('[aria-label="Flowsheet Inspector"]').first().click({ timeout: 15000 });

// verify the IDAES view container opened: its sidebar title shows the
// verify the view container opened: its sidebar title shows the
// contributed view name "Run Control".
await expect(page.locator('.part.sidebar .composite.title'))
.toContainText('Run Control', { timeout: 15000 });
Expand Down
24 changes: 18 additions & 6 deletions extension/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
import * as vscode from 'vscode';
import { reloadCurrentWebview } from './util/reload_window';
import { brodcastMessage } from './util/webview_handler';
import { setDefaultConfig } from './util/setDefaultExtensionConfig';
import openWebView from './web_view/web_view_panel';
import treeview from './tree_view/treeview';
import activateTabListener from './util/activate_tab_handler';
import { startHistoryPolling } from './util/flowsheet_history_polling';
import { getActivePythonEnv } from './util/python_env';

// This method is called when your extension is activated
// Your extension is activated the very first time the command is executed
Expand Down Expand Up @@ -39,8 +39,6 @@ export function activate(context: vscode.ExtensionContext) {
* This command is used to setup and check the default config for the extension.
* It will load when extension is activated.
*/
setDefaultConfig(context);

/**
* This command is used to listen to the tab change event.
* It will load when extension is activated.
Expand Down Expand Up @@ -76,9 +74,9 @@ export function activate(context: vscode.ExtensionContext) {
vscode.window.showInformationMessage('Flowsheet-inspector is started!');
});

// Register the IDAES Tree View in the sidebar
// Register the Flowsheet Inspector Tree View in the sidebar
const treeView = vscode.window.registerWebviewViewProvider(
'idaes.treeView',
'fi.treeView',
treeview(context),
{
webviewOptions: { retainContextWhenHidden: true }
Expand Down Expand Up @@ -110,8 +108,22 @@ export function activate(context: vscode.ExtensionContext) {
vscode.window.showInformationMessage('🔄 Webview reloaded!');
});

/**
* PoC / debug: log the Python environment VS Code currently has selected.
* Verifies we can resolve the user's interpreter without conda activate.
*/
const logPythonEnvCommand = vscode.commands.registerCommand('flowsheet-inspector.logPythonEnv', async () => {
const env = await getActivePythonEnv();
if (!env) {
vscode.window.showWarningMessage('No active Python environment (is the Python extension installed and an interpreter selected?)');
return;
}
console.log('[python_env] resolved active env:', JSON.stringify(env, null, 2));
vscode.window.showInformationMessage(`Python env: ${env.type ?? 'unknown'} — ${env.interpreterPath}`);
});


context.subscriptions.push(initialExtensionCommand, registerWebView, treeView, reloadWebviewCommand);
context.subscriptions.push(initialExtensionCommand, registerWebView, treeView, reloadWebviewCommand, logPythonEnvCommand);
}

// This method is called when your extension is deactivated
Expand Down
6 changes: 0 additions & 6 deletions extension/src/interface.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
export interface IExtensionConfig {
activate_command: string;
sorce_treminal: string;
shell: string;
}

export interface IFrontendMessage {
frontendInstruction: string;
fromPanel: string;
Expand Down
14 changes: 14 additions & 0 deletions extension/src/required_package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[
{
"name": "idaes-pse",
"install_command": "pip install idaes-pse && idaes get-extensions"
},
{
"name": "idaes-connectivity",
"install_command": "pip install idaes-connectivity"
},
{
"name": "idaes-fi",
"install_command": "pip install git+https://github.com/prommis/flowsheet-inspector-lib.git"
}
]
4 changes: 2 additions & 2 deletions extension/src/test/extension.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ suite('Extension', () => {
assert.strictEqual(ext!.isActive, true);
});

test('registers idaes commands', async () => {
test('registers flowsheet-inspector commands', async () => {
const commands = await vscode.commands.getCommands(true);
assert.ok(commands.some(cmd => cmd.startsWith('idaes.')));
assert.ok(commands.some(cmd => cmd.startsWith('flowsheet-inspector.')));
});
});

Expand Down
Loading
Loading