@volter/supercode-frontend-vscode 0.1.49 → 0.1.50
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/extension.js +9 -11
- package/dist/host-controls.d.ts +0 -2
- package/dist/host-controls.js +0 -2
- package/dist/session.js +2 -1
- package/dist/view.js +7 -5
- package/package.json +1 -1
package/dist/extension.js
CHANGED
|
@@ -515,12 +515,6 @@ export async function activate(context) {
|
|
|
515
515
|
const picked = selection.model ? controls?.state.modelsByHarness?.[selection.harness]?.find(model => model.id === selection.model) : undefined;
|
|
516
516
|
return { model: selection.model || configured.model, modelName: selection.model ? picked?.name ?? selection.model : configured.modelName, effort: selection.effort || configured.effort };
|
|
517
517
|
};
|
|
518
|
-
const effectiveNow = () => {
|
|
519
|
-
if (focusedAttached)
|
|
520
|
-
return null;
|
|
521
|
-
const selection = draftSelection();
|
|
522
|
-
return selection ? draftEffective(selection) : controls?.state.effective ?? null;
|
|
523
|
-
};
|
|
524
518
|
const identity = () => {
|
|
525
519
|
if (focusedAttached)
|
|
526
520
|
return runtimeIdentity(focusedAttached.session.descriptor?.source_harness, focusedAttached.session.descriptor?.model);
|
|
@@ -1204,8 +1198,15 @@ export async function activate(context) {
|
|
|
1204
1198
|
const connection = connectionId ? frontends.get(connectionId) : managed();
|
|
1205
1199
|
if (!connection)
|
|
1206
1200
|
return { stopped: false, reason: 'no conversation' };
|
|
1207
|
-
|
|
1208
|
-
|
|
1201
|
+
try {
|
|
1202
|
+
await stopConnection(connection);
|
|
1203
|
+
return { stopped: true, connectionId: connection.id };
|
|
1204
|
+
}
|
|
1205
|
+
catch (error) {
|
|
1206
|
+
const reason = String(error?.message ?? error);
|
|
1207
|
+
log.warn(`Stop could not interrupt: ${reason}`);
|
|
1208
|
+
return { stopped: false, connectionId: connection.id, reason };
|
|
1209
|
+
}
|
|
1209
1210
|
}));
|
|
1210
1211
|
const outsideTurns = setInterval(answerOutsideTurns, 2_000);
|
|
1211
1212
|
context.subscriptions.push({ dispose: () => clearInterval(outsideTurns) });
|
|
@@ -1394,9 +1395,6 @@ export async function activate(context) {
|
|
|
1394
1395
|
stream.markdown(unavailableMarkdown(frontends.unavailable));
|
|
1395
1396
|
return {};
|
|
1396
1397
|
}
|
|
1397
|
-
// While a request is pending, a typed message is its answer — this is the
|
|
1398
|
-
// path for the answers no button can carry (`allow for session`, `cancel`,
|
|
1399
|
-
// and an elicitation's free-text content).
|
|
1400
1398
|
const pending = pendingRequestOf(connection);
|
|
1401
1399
|
// A message is never taken as an approval: one sent while an approval waits would otherwise allow the tool and
|
|
1402
1400
|
// never reach the agent. It is refused, with what to do, like a send during any running turn.
|
package/dist/host-controls.d.ts
CHANGED
|
@@ -102,7 +102,5 @@ export declare function runtimeIdentity(harness: string | null | undefined, mode
|
|
|
102
102
|
name: string;
|
|
103
103
|
provider: string | undefined;
|
|
104
104
|
};
|
|
105
|
-
/** The approval mode as the Chat names it. */
|
|
106
|
-
export declare function permissionName(value: 'ask' | 'autoApprove'): string;
|
|
107
105
|
/** Native pickers need a nonempty id; the host uses an empty model for its default. */
|
|
108
106
|
export declare function modelSelection(value: string): string;
|
package/dist/host-controls.js
CHANGED
|
@@ -76,7 +76,5 @@ export function runtimeIdentity(harness, model, effective) {
|
|
|
76
76
|
const effort = effective?.effort ? ` · ${effective.effort}` : '';
|
|
77
77
|
return { name: modelName ? `${modelName}${effort}` : `Model chosen by ${harnessName}`, provider };
|
|
78
78
|
}
|
|
79
|
-
/** The approval mode as the Chat names it. */
|
|
80
|
-
export function permissionName(value) { return value === 'autoApprove' ? 'Auto approve' : 'Ask for approval'; }
|
|
81
79
|
/** Native pickers need a nonempty id; the host uses an empty model for its default. */
|
|
82
80
|
export function modelSelection(value) { return value === "__default__" ? "" : value; }
|
package/dist/session.js
CHANGED
|
@@ -133,7 +133,8 @@ export class VscodeFrontendSession {
|
|
|
133
133
|
// forever with nothing to answer it (2026-10-07). Compaction happens only at a turn boundary, so a request raised
|
|
134
134
|
// AFTER the replay's last boundary and not resolved since is still open, idle or not; only older ones are dropped.
|
|
135
135
|
if (staged.descriptor?.turn_state !== 'busy' && staged.descriptor?.source_harness !== 'codex') {
|
|
136
|
-
|
|
136
|
+
// A turn's END, not `turn_completed`: that one is a model round-trip and fires mid-turn.
|
|
137
|
+
const BOUNDARIES = new Set(['turn_succeeded', 'turn_failed', 'turn_interrupted']);
|
|
137
138
|
let lastBoundary = -1;
|
|
138
139
|
const raisedAt = new Map();
|
|
139
140
|
for (const event of snapshot.replay) {
|
package/dist/view.js
CHANGED
|
@@ -99,6 +99,8 @@ export function toolSubject(argumentsText) {
|
|
|
99
99
|
return undefined;
|
|
100
100
|
}
|
|
101
101
|
const code = (value) => `\`${value.replace(/`/g, "'")}\``;
|
|
102
|
+
/** Free text in a title, which the Chat renders as Markdown: its own `*`, `_`, `[` and the like stay characters. */
|
|
103
|
+
const plain = (value) => value.replace(/[\\`*_{}[\]()<>#+!|~]/g, '\\$&');
|
|
102
104
|
const basename = (path) => path.split(/[\\/]/).filter(Boolean).pop() ?? path;
|
|
103
105
|
/**
|
|
104
106
|
* A tool row's titles the way VS Code's own agent writes them: what the call does, in the present while it runs
|
|
@@ -130,7 +132,7 @@ export function toolTitles(toolName, argumentsText) {
|
|
|
130
132
|
if (['bash', 'shell', 'exec_command', 'local_shell', 'powershell'].includes(name)) {
|
|
131
133
|
const description = field('description');
|
|
132
134
|
if (description)
|
|
133
|
-
return both(description, description);
|
|
135
|
+
return both(plain(description), plain(description));
|
|
134
136
|
const command = field('command', 'cmd');
|
|
135
137
|
return command ? both(`Running ${code(command)}`, `Ran ${code(command)}`) : both(`Running a command`, `Ran a command`);
|
|
136
138
|
}
|
|
@@ -157,7 +159,7 @@ export function toolTitles(toolName, argumentsText) {
|
|
|
157
159
|
if (name === 'webfetch') {
|
|
158
160
|
const url = field('url');
|
|
159
161
|
if (url)
|
|
160
|
-
return both(`Fetching ${url}`, `Fetched ${url}`);
|
|
162
|
+
return both(`Fetching ${plain(url)}`, `Fetched ${plain(url)}`);
|
|
161
163
|
}
|
|
162
164
|
if (name === 'websearch' || name === 'web_search') {
|
|
163
165
|
const query = field('query');
|
|
@@ -167,16 +169,16 @@ export function toolTitles(toolName, argumentsText) {
|
|
|
167
169
|
if (['task', 'agent'].includes(name)) {
|
|
168
170
|
const description = field('description');
|
|
169
171
|
if (description)
|
|
170
|
-
return both(`Running a subagent: ${description}`, `Ran a subagent: ${description}`);
|
|
172
|
+
return both(`Running a subagent: ${plain(description)}`, `Ran a subagent: ${plain(description)}`);
|
|
171
173
|
}
|
|
172
174
|
if (name === 'todowrite' || name === 'update_plan')
|
|
173
175
|
return both('Updating the plan', 'Updated the plan');
|
|
174
176
|
// Claude Code names an MCP tool `mcp__<server>__<tool>`; VS Code writes "Ran `tool` – server".
|
|
175
177
|
const mcp = /^mcp__(.+?)__(.+)$/.exec(toolName);
|
|
176
178
|
if (mcp)
|
|
177
|
-
return both(`Running ${code(mcp[2])} – ${mcp[1]}`, `Ran ${code(mcp[2])} – ${mcp[1]}`);
|
|
179
|
+
return both(`Running ${code(mcp[2])} – ${plain(mcp[1])}`, `Ran ${code(mcp[2])} – ${plain(mcp[1])}`);
|
|
178
180
|
const subject = toolSubject(argumentsText);
|
|
179
|
-
return subject ? both(`Running ${code(toolName)} · ${subject}`, `Ran ${code(toolName)} · ${subject}`) : both(`Running ${code(toolName)}`, `Ran ${code(toolName)}`);
|
|
181
|
+
return subject ? both(`Running ${code(toolName)} · ${plain(subject)}`, `Ran ${code(toolName)} · ${plain(subject)}`) : both(`Running ${code(toolName)}`, `Ran ${code(toolName)}`);
|
|
180
182
|
}
|
|
181
183
|
/** The command line of a shell tool call, read from its own arguments; undefined for any other tool. */
|
|
182
184
|
export function shellCommand(toolName, argumentsText) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@volter/supercode-frontend-vscode",
|
|
3
3
|
"displayName": "Volter Harness",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.50",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "VS Code chat-view frontend for an existing Volter Harness SDK runtime",
|
|
7
7
|
"publisher": "volter-ai-dev",
|