fix(run): target the selected configuration's run or debug session from the toolbar (#326)

With several sessions running, the toolbar's Rerun and Stop could act on a different configuration than the selected one: when the selected configuration had no matching run session, the widget fell back to the most recently started session of another configuration; and debug sessions did not record the configuration they were started from, so a configuration being debugged never matched and a running npm session took over the buttons.

The widget, Run (Shift+F10) and Stop (Cmd+F2) now target the selected configuration's session, whether it was started with Run or Debug (the most recent when both exist); Rerun of a debug session reruns it in debug. When the selected configuration is not running, the widget offers Run / Debug for it, and Stop remains available for the other running sessions (with a chooser when several are running). Debug sessions keep their originating run configuration. In a focused Run or Debug tool window, Stop still stops the selected tab's process.

Fixes #318
Цей коміт міститься в:
l0ng-ai authored and GitHub committed 2026-10-30 10:51:37 +08:00
1 джерело e85ffa2ae8
коміт a7b5758f5a
13 files changed
+385 -87

No files matched your search

+1
Переглянути файл
@@ -77,6 +77,7 @@ export async function debugWithAgent(config: RunConfig): Promise<boolean> {
hostName: "127.0.0.1",
port,
process: runId,
runConfig: config,
});
};
const session = await startRun(config, undefined, undefined, {