@volter/supercode-frontend-vscode 0.1.24 → 0.1.25

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/view.d.ts CHANGED
@@ -173,4 +173,6 @@ export declare function projectReplayTurns(events: readonly FrontendEvent[], gra
173
173
  * The attach snapshot's canonical history as chat turns. Bounded: when older
174
174
  * turns are omitted the view says so, the way the browser observer does.
175
175
  */
176
- export declare function projectHistory(history: readonly ChatMessage[], granted: ReadonlySet<string>, pendingToolNames?: ReadonlySet<string>): ProjectedTurn[];
176
+ export declare function projectHistory(history: readonly (ChatMessage & {
177
+ metadata?: Record<string, string>;
178
+ })[], granted: ReadonlySet<string>, pendingToolNames?: ReadonlySet<string>): ProjectedTurn[];
package/dist/view.js CHANGED
@@ -642,8 +642,31 @@ export function projectHistory(history, granted, pendingToolNames = new Set()) {
642
642
  turns.push({ role: 'assistant', parts });
643
643
  };
644
644
  for (const message of history) {
645
- const body = messageText(message);
645
+ let body = messageText(message);
646
646
  if (message.role === 'user') {
647
+ // The codec preserves typed UserMessage content separately from prepared
648
+ // model input. Native provenance, not wrapper-shaped text, selects it.
649
+ const typed = message.metadata?.codex_typed_user;
650
+ if (typed) {
651
+ try {
652
+ const input = JSON.parse(typed);
653
+ if (input?.role === 'user')
654
+ body = messageText(input);
655
+ }
656
+ catch { /* A bounded/corrupt metadata field must not break history. */ }
657
+ }
658
+ // A host may restore the SDK's full normalized session, which retains
659
+ // model context. Codex's codec classifies native fragments before they
660
+ // are flattened; never infer context from the person's displayed text.
661
+ const contextual = message.metadata?.codex_contextual_kind;
662
+ if (contextual === 'hidden')
663
+ continue;
664
+ if (contextual === 'hook_prompt') {
665
+ const text = message.metadata?.codex_hook_prompt_text;
666
+ if (text)
667
+ pushAssistant([{ part: 'markdown', value: clamp(stripControls(text), VSCODE_CHAT_LIMITS.partCharacters) }]);
668
+ continue;
669
+ }
647
670
  toolRows.clear();
648
671
  turns.push({ role: 'user', prompt: clamp(stripControls(body), VSCODE_CHAT_LIMITS.partCharacters) });
649
672
  continue;
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.24",
4
+ "version": "0.1.25",
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",