@pellux/goodvibes-tui 0.18.20 → 0.19.0
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/CHANGELOG.md +154 -0
- package/README.md +1 -1
- package/docs/foundation-artifacts/operator-contract.json +1 -1
- package/package.json +7 -3
- package/src/core/conversation-rendering.ts +22 -6
- package/src/core/orchestrator.ts +1 -1
- package/src/input/commands/diff-runtime.ts +6 -5
- package/src/input/commands/guidance-runtime.ts +1 -1
- package/src/input/commands/health-runtime.ts +2 -2
- package/src/input/commands/local-setup-review.ts +1 -1
- package/src/input/commands/session-content.ts +1 -1
- package/src/input/commands/session.ts +0 -1
- package/src/input/commands/shell-core.ts +3 -2
- package/src/input/commands/skills-runtime.ts +2 -2
- package/src/input/commands/subscription-runtime.ts +4 -4
- package/src/input/feed-context-factory.ts +236 -0
- package/src/input/handler-feed.ts +44 -6
- package/src/input/handler-shortcuts.ts +138 -125
- package/src/input/handler.ts +119 -119
- package/src/input/keybindings.ts +30 -0
- package/src/input/panel-integration-actions.ts +2 -1
- package/src/input/settings-modal-types.ts +60 -0
- package/src/input/settings-modal.ts +83 -65
- package/src/panels/agent-inspector-panel.ts +10 -9
- package/src/panels/agent-logs-panel.ts +26 -6
- package/src/panels/approval-panel.ts +55 -82
- package/src/panels/automation-control-panel.ts +120 -161
- package/src/panels/base-panel.ts +108 -3
- package/src/panels/communication-panel.ts +69 -107
- package/src/panels/context-visualizer-panel.ts +2 -0
- package/src/panels/control-plane-panel.ts +117 -172
- package/src/panels/diff-panel.ts +2 -0
- package/src/panels/file-explorer-panel.ts +51 -31
- package/src/panels/file-preview-panel.ts +57 -35
- package/src/panels/git-panel.ts +12 -13
- package/src/panels/hooks-panel.ts +103 -138
- package/src/panels/incident-review-panel.ts +59 -109
- package/src/panels/knowledge-panel.ts +75 -107
- package/src/panels/local-auth-panel.ts +77 -93
- package/src/panels/marketplace-panel.ts +51 -69
- package/src/panels/mcp-panel.ts +110 -155
- package/src/panels/memory-panel.ts +90 -158
- package/src/panels/ops-control-panel.ts +51 -85
- package/src/panels/orchestration-panel.ts +70 -51
- package/src/panels/panel-list-panel.ts +5 -4
- package/src/panels/panel-manager.ts +25 -2
- package/src/panels/plan-dashboard-panel.ts +2 -0
- package/src/panels/plugins-panel.ts +37 -60
- package/src/panels/polish.ts +51 -2
- package/src/panels/provider-accounts-panel.ts +1 -0
- package/src/panels/provider-health-panel.ts +6 -8
- package/src/panels/routes-panel.ts +91 -141
- package/src/panels/schedule-panel.ts +7 -6
- package/src/panels/scrollable-list-panel.ts +64 -16
- package/src/panels/security-panel.ts +118 -152
- package/src/panels/services-panel.ts +63 -105
- package/src/panels/session-browser-panel.ts +19 -18
- package/src/panels/settings-sync-panel.ts +79 -123
- package/src/panels/skills-panel.ts +114 -230
- package/src/panels/subscription-panel.ts +64 -86
- package/src/panels/system-messages-panel.ts +147 -141
- package/src/panels/tasks-panel.ts +130 -179
- package/src/panels/token-budget-panel.ts +2 -0
- package/src/panels/watchers-panel.ts +89 -137
- package/src/panels/worktree-panel.ts +1 -0
- package/src/panels/wrfc-panel.ts +2 -0
- package/src/renderer/agent-detail-modal.ts +2 -2
- package/src/renderer/ansi-sanitize.ts +76 -0
- package/src/renderer/buffer.ts +23 -1
- package/src/renderer/diff.ts +8 -0
- package/src/renderer/help-overlay.ts +48 -28
- package/src/renderer/markdown.ts +3 -145
- package/src/renderer/settings-modal-helpers.ts +27 -0
- package/src/renderer/settings-modal.ts +18 -1
- package/src/renderer/status-glyphs.ts +21 -0
- package/src/renderer/status-token.ts +4 -8
- package/src/renderer/tool-call.ts +4 -3
- package/src/runtime/bootstrap-core.ts +1 -1
- package/src/runtime/bootstrap-hook-bridge.ts +1 -1
- package/src/runtime/bootstrap.ts +7 -8
- package/src/runtime/diagnostics/panels/policy.ts +2 -1
- package/src/shell/ui-openers.ts +1 -1
- package/src/version.ts +1 -1
package/src/renderer/markdown.ts
CHANGED
|
@@ -30,153 +30,11 @@ function isLikelyTableHeaderRow(row: string): boolean {
|
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
/**
|
|
33
|
-
* renderMarkdown - Parse markdown text into styled Line[]
|
|
34
|
-
*
|
|
33
|
+
* renderMarkdown - Parse markdown text into styled Line[].
|
|
34
|
+
* Thin wrapper over renderMarkdownTracked for callers that don't need code-block metadata.
|
|
35
35
|
*/
|
|
36
36
|
export function renderMarkdown(text: string, width: number, options: MarkdownRenderOptions = {}): Line[] {
|
|
37
|
-
|
|
38
|
-
const rawLines = text.split('\n');
|
|
39
|
-
|
|
40
|
-
let inCodeBlock = false;
|
|
41
|
-
let codeBlockLang = '';
|
|
42
|
-
let codeBlockLines: string[] = [];
|
|
43
|
-
const indent = LAYOUT.LEFT_MARGIN;
|
|
44
|
-
const contentWidth = LAYOUT.contentWidth(width);
|
|
45
|
-
|
|
46
|
-
for (let i = 0; i < rawLines.length; i++) {
|
|
47
|
-
const raw = rawLines[i];
|
|
48
|
-
|
|
49
|
-
// --- Code block fence ---
|
|
50
|
-
const fenceMatch = raw.match(/^```(\w*)/);
|
|
51
|
-
if (fenceMatch && !inCodeBlock) {
|
|
52
|
-
inCodeBlock = true;
|
|
53
|
-
codeBlockLang = fenceMatch[1] || '';
|
|
54
|
-
codeBlockLines = [];
|
|
55
|
-
continue;
|
|
56
|
-
}
|
|
57
|
-
if (inCodeBlock) {
|
|
58
|
-
if (raw.trimStart().startsWith('```')) {
|
|
59
|
-
// End of code block - delegate to code block renderer
|
|
60
|
-
const rendered = renderCodeBlock(codeBlockLines, codeBlockLang, width, {
|
|
61
|
-
showLineNumbers: options.codeBlockLineNumbers ?? true,
|
|
62
|
-
});
|
|
63
|
-
lines.push(...rendered);
|
|
64
|
-
inCodeBlock = false;
|
|
65
|
-
codeBlockLang = '';
|
|
66
|
-
codeBlockLines = [];
|
|
67
|
-
} else {
|
|
68
|
-
codeBlockLines.push(raw);
|
|
69
|
-
}
|
|
70
|
-
continue;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
// --- Empty line ---
|
|
74
|
-
if (raw.trim() === '') {
|
|
75
|
-
lines.push(UIFactory.stringToLine('', width));
|
|
76
|
-
continue;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
// --- Heading ---
|
|
80
|
-
const h3 = raw.match(/^### (.+)/);
|
|
81
|
-
const h2 = raw.match(/^## (.+)/);
|
|
82
|
-
const h1 = raw.match(/^# (.+)/);
|
|
83
|
-
if (h1) {
|
|
84
|
-
lines.push(UIFactory.stringToLine(' '.repeat(indent) + h1[1].toUpperCase(), width, { fg: '#00ffff', bold: true }));
|
|
85
|
-
lines.push(UIFactory.stringToLine(' '.repeat(indent) + '━'.repeat(Math.min(getDisplayWidth(h1[1]), contentWidth)), width, { fg: '244' }));
|
|
86
|
-
continue;
|
|
87
|
-
}
|
|
88
|
-
if (h2) {
|
|
89
|
-
lines.push(UIFactory.stringToLine(' '.repeat(indent) + h2[1], width, { fg: '#00ffff', bold: true }));
|
|
90
|
-
lines.push(UIFactory.stringToLine(' '.repeat(indent) + '─'.repeat(Math.min(getDisplayWidth(h2[1]), contentWidth)), width, { fg: '240' }));
|
|
91
|
-
continue;
|
|
92
|
-
}
|
|
93
|
-
if (h3) {
|
|
94
|
-
lines.push(UIFactory.stringToLine(' '.repeat(indent) + h3[1], width, { fg: '111', bold: true }));
|
|
95
|
-
continue;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
// --- Task list ---
|
|
99
|
-
const taskMatch = raw.match(/^(\s*)[-*] \[([ xX])\] (.+)/);
|
|
100
|
-
if (taskMatch) {
|
|
101
|
-
const listIndent = Math.floor(taskMatch[1].length / 2);
|
|
102
|
-
const checked = taskMatch[2] !== ' ';
|
|
103
|
-
const bulletX = indent + listIndent * 2;
|
|
104
|
-
const textStartX = bulletX + 4;
|
|
105
|
-
const checkbox = checked ? '\u2611 ' : '\u2610 '; // ☑ or ☐
|
|
106
|
-
const rendered = renderInlineMarkdown(taskMatch[3]);
|
|
107
|
-
const prefix = ' '.repeat(bulletX) + checkbox;
|
|
108
|
-
const style = checked ? { fg: '244', strikethrough: true } : {};
|
|
109
|
-
lines.push(...compositeInlineLine(prefix, rendered, width, { fg: checked ? '#22c55e' : '252', ...style }, textStartX));
|
|
110
|
-
continue;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
// --- Unordered list ---
|
|
114
|
-
const ulMatch = raw.match(/^(\s*)[-*] (.+)/);
|
|
115
|
-
if (ulMatch) {
|
|
116
|
-
const listIndent = Math.floor(ulMatch[1].length / 2);
|
|
117
|
-
const bulletX = indent + listIndent * 2;
|
|
118
|
-
const textStartX = bulletX + 2;
|
|
119
|
-
const rendered = renderInlineMarkdown(ulMatch[2]);
|
|
120
|
-
const prefix = ' '.repeat(bulletX) + '• ';
|
|
121
|
-
lines.push(...compositeInlineLine(prefix, rendered, width, { fg: '135', bold: false }, textStartX));
|
|
122
|
-
continue;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
// --- Ordered list ---
|
|
126
|
-
const olMatch = raw.match(/^(\s*)(\d+)\. (.+)/);
|
|
127
|
-
if (olMatch) {
|
|
128
|
-
const listIndent = Math.floor(olMatch[1].length / 2);
|
|
129
|
-
const numStr = olMatch[2] + '. ';
|
|
130
|
-
const bulletX = indent + listIndent * 2;
|
|
131
|
-
const textStartX = bulletX + numStr.length;
|
|
132
|
-
const rendered = renderInlineMarkdown(olMatch[3]);
|
|
133
|
-
const prefix = ' '.repeat(bulletX) + numStr;
|
|
134
|
-
lines.push(...compositeInlineLine(prefix, rendered, width, { fg: '135', bold: false }, textStartX));
|
|
135
|
-
continue;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
// --- Horizontal rule ---
|
|
139
|
-
if (/^[-*_]{3,}$/.test(raw.trim())) {
|
|
140
|
-
lines.push(UIFactory.stringToLine(' '.repeat(indent) + '─'.repeat(contentWidth), width, { fg: '240' }));
|
|
141
|
-
continue;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
// --- Blockquote ---
|
|
145
|
-
const bqMatch = raw.match(/^> (.*)/);
|
|
146
|
-
if (bqMatch) {
|
|
147
|
-
const rendered = renderInlineMarkdown(bqMatch[1]);
|
|
148
|
-
const prefix = ' '.repeat(indent) + '┃ ';
|
|
149
|
-
lines.push(...compositeInlineLine(prefix, rendered, width, { fg: '244', italic: true }, indent + 3));
|
|
150
|
-
continue;
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
// --- Table ---
|
|
154
|
-
if (raw.includes('|') && i + 1 < rawLines.length && isLikelyTableHeaderRow(raw) && isLikelyTableSeparatorRow(rawLines[i + 1])) {
|
|
155
|
-
const tableRows: string[] = [];
|
|
156
|
-
let j = i;
|
|
157
|
-
while (j < rawLines.length && rawLines[j].includes('|')) {
|
|
158
|
-
tableRows.push(rawLines[j]);
|
|
159
|
-
j++;
|
|
160
|
-
}
|
|
161
|
-
i = j - 1;
|
|
162
|
-
lines.push(...renderTable(tableRows, width, indent));
|
|
163
|
-
continue;
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
// --- Normal paragraph ---
|
|
167
|
-
const rendered = renderInlineMarkdown(raw);
|
|
168
|
-
lines.push(...compositeInlineLine(' '.repeat(indent), rendered, width, {}, indent));
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
// Handle unclosed code block
|
|
172
|
-
if (inCodeBlock && codeBlockLines.length > 0) {
|
|
173
|
-
const rendered = renderCodeBlock(codeBlockLines, codeBlockLang, width, {
|
|
174
|
-
showLineNumbers: options.codeBlockLineNumbers ?? true,
|
|
175
|
-
});
|
|
176
|
-
lines.push(...rendered);
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
return lines;
|
|
37
|
+
return renderMarkdownTracked(text, width, options).lines;
|
|
180
38
|
}
|
|
181
39
|
|
|
182
40
|
export interface CodeBlockSpan {
|
|
@@ -78,6 +78,7 @@ export const CATEGORY_LABELS: Record<(typeof SETTINGS_CATEGORIES)[number], strin
|
|
|
78
78
|
danger: 'Danger',
|
|
79
79
|
tools: 'Tools',
|
|
80
80
|
flags: 'Flags',
|
|
81
|
+
network: 'Network',
|
|
81
82
|
};
|
|
82
83
|
|
|
83
84
|
export const SETTING_LABELS: Partial<Record<string, string>> = {
|
|
@@ -102,6 +103,32 @@ export const SETTING_LABELS: Partial<Record<string, string>> = {
|
|
|
102
103
|
'helper.enabled': 'Helper Enabled',
|
|
103
104
|
'helper.globalProvider': 'Helper Provider',
|
|
104
105
|
'helper.globalModel': 'Helper Model',
|
|
106
|
+
// Control Plane
|
|
107
|
+
'controlPlane.enabled': 'CP Enabled',
|
|
108
|
+
'controlPlane.hostMode': 'CP Host Mode',
|
|
109
|
+
'controlPlane.host': 'CP Host',
|
|
110
|
+
'controlPlane.port': 'CP Port',
|
|
111
|
+
'controlPlane.baseUrl': 'CP Base URL',
|
|
112
|
+
'controlPlane.streamMode': 'CP Stream Mode',
|
|
113
|
+
'controlPlane.allowRemote': 'CP Allow Remote',
|
|
114
|
+
'controlPlane.trustProxy': 'CP Trust Proxy',
|
|
115
|
+
'controlPlane.tls.mode': 'CP TLS Mode',
|
|
116
|
+
'controlPlane.tls.certFile': 'CP TLS Cert',
|
|
117
|
+
'controlPlane.tls.keyFile': 'CP TLS Key',
|
|
118
|
+
// HTTP Listener
|
|
119
|
+
'httpListener.hostMode': 'HTTP Host Mode',
|
|
120
|
+
'httpListener.host': 'HTTP Host',
|
|
121
|
+
'httpListener.port': 'HTTP Port',
|
|
122
|
+
'httpListener.trustProxy': 'HTTP Trust Proxy',
|
|
123
|
+
'httpListener.tls.mode': 'HTTP TLS Mode',
|
|
124
|
+
'httpListener.tls.certFile': 'HTTP TLS Cert',
|
|
125
|
+
// Web Server
|
|
126
|
+
'web.enabled': 'Web Enabled',
|
|
127
|
+
'web.hostMode': 'Web Host Mode',
|
|
128
|
+
'web.host': 'Web Host',
|
|
129
|
+
'web.port': 'Web Port',
|
|
130
|
+
'web.publicBaseUrl': 'Web Public Base URL',
|
|
131
|
+
'web.staticAssetsDir': 'Web Static Assets Dir',
|
|
105
132
|
};
|
|
106
133
|
|
|
107
134
|
export function getSettingLabel(entry: SettingEntry): string {
|
|
@@ -63,6 +63,7 @@ export function renderSettingsModal(
|
|
|
63
63
|
const isFlagsTab = SETTINGS_CATEGORIES[modal.categoryIndex] === 'flags';
|
|
64
64
|
const isUiTab = SETTINGS_CATEGORIES[modal.categoryIndex] === 'ui';
|
|
65
65
|
const isToolsTab = SETTINGS_CATEGORIES[modal.categoryIndex] === 'tools';
|
|
66
|
+
const isNetworkTab = SETTINGS_CATEGORIES[modal.categoryIndex] === 'network';
|
|
66
67
|
let persistentHelpers: import('./modal-factory.ts').ModalHelperRow[] | undefined;
|
|
67
68
|
sections.push({
|
|
68
69
|
type: 'text',
|
|
@@ -78,12 +79,28 @@ export function renderSettingsModal(
|
|
|
78
79
|
? 'Feature flags control staged or experimental behavior. Some changes may require restart.'
|
|
79
80
|
: isToolsTab
|
|
80
81
|
? 'Configure tool LLM routing and helper model. Provider and model fields are optional — empty means use the active provider.'
|
|
81
|
-
:
|
|
82
|
+
: isNetworkTab
|
|
83
|
+
? 'Configure control-plane and HTTP-listener binding. hostMode local/network use preset hosts; custom enables the host field. Changes trigger auto-restart.'
|
|
84
|
+
: 'Browse and adjust operator-facing runtime settings by category.',
|
|
82
85
|
style: { fg: '246', dim: true },
|
|
83
86
|
});
|
|
84
87
|
|
|
85
88
|
sections.push({ type: 'separator' });
|
|
86
89
|
|
|
90
|
+
// ── Network tab restart notice ─────────────────────────────────
|
|
91
|
+
if (isNetworkTab && modal.lastSaveTriggeredRestart !== null) {
|
|
92
|
+
const restartTarget = modal.lastSaveTriggeredRestart === 'control-plane'
|
|
93
|
+
? 'control-plane server'
|
|
94
|
+
: modal.lastSaveTriggeredRestart === 'http-listener'
|
|
95
|
+
? 'HTTP listener'
|
|
96
|
+
: 'web server';
|
|
97
|
+
sections.push({
|
|
98
|
+
type: 'text',
|
|
99
|
+
content: truncateDisplay(`Restarting ${restartTarget}… server will reconnect momentarily.`, contentW),
|
|
100
|
+
style: { fg: '#38bdf8' },
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
|
|
87
104
|
// ── Flags tab ──────────────────────────────────────────────────
|
|
88
105
|
if (isFlagsTab) {
|
|
89
106
|
const flagEntries: FlagEntry[] = modal.flagEntries;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// ---------------------------------------------------------------------------
|
|
2
|
+
// status-glyphs.ts — canonical glyph map for status states.
|
|
3
|
+
//
|
|
4
|
+
// Extracted as a neutral module so both status-token.ts and polish.ts can
|
|
5
|
+
// import from here without creating a circular ESM dependency.
|
|
6
|
+
//
|
|
7
|
+
// Glyphs:
|
|
8
|
+
// good ✓ (CHECK MARK U+2713)
|
|
9
|
+
// warn ⚠ (WARNING SIGN U+26A0)
|
|
10
|
+
// bad ✕ (MULTIPLICATION X U+2715)
|
|
11
|
+
// info ○ (WHITE CIRCLE U+25CB)
|
|
12
|
+
// ---------------------------------------------------------------------------
|
|
13
|
+
|
|
14
|
+
export type StatusState = 'good' | 'warn' | 'bad' | 'info';
|
|
15
|
+
|
|
16
|
+
export const STATE_GLYPHS: Record<StatusState, string> = {
|
|
17
|
+
good: '\u2713', // ✓
|
|
18
|
+
warn: '\u26a0', // ⚠
|
|
19
|
+
bad: '\u2715', // ✕
|
|
20
|
+
info: '\u25cb', // ○
|
|
21
|
+
};
|
|
@@ -13,15 +13,11 @@
|
|
|
13
13
|
|
|
14
14
|
import type { Cell } from '../types/grid.ts';
|
|
15
15
|
import { DEFAULT_PANEL_PALETTE } from '../panels/polish.ts';
|
|
16
|
+
import { type StatusState, STATE_GLYPHS } from './status-glyphs.ts';
|
|
16
17
|
|
|
17
|
-
export
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
good: '\u2713', // ✓
|
|
21
|
-
warn: '\u26a0', // ⚠
|
|
22
|
-
bad: '\u2715', // ✕
|
|
23
|
-
info: '\u25cb', // ○
|
|
24
|
-
};
|
|
18
|
+
// Re-export for downstream consumers that import from this module.
|
|
19
|
+
export type { StatusState } from './status-glyphs.ts';
|
|
20
|
+
export { STATE_GLYPHS } from './status-glyphs.ts';
|
|
25
21
|
|
|
26
22
|
const STATE_COLORS: Record<StatusState, string> = {
|
|
27
23
|
good: DEFAULT_PANEL_PALETTE.good,
|
|
@@ -2,6 +2,7 @@ import { type Line, createStyledCell, createEmptyLine } from '../types/grid.ts';
|
|
|
2
2
|
import { LAYOUT, TOOL_STATUS } from './layout.ts';
|
|
3
3
|
import { getDisplayWidth, truncateDisplay } from '../utils/terminal-width.ts';
|
|
4
4
|
import type { ToolCall } from '@pellux/goodvibes-sdk/platform/types/tools';
|
|
5
|
+
import { stripDangerousAnsi } from './ansi-sanitize.ts';
|
|
5
6
|
|
|
6
7
|
const TOOL_NAME_MIN_WIDTH = 8;
|
|
7
8
|
const TOOL_NAME_MAX_WIDTH = 20;
|
|
@@ -194,11 +195,11 @@ export function renderToolCallBlock(
|
|
|
194
195
|
const rawName = toolCall.name.includes('__')
|
|
195
196
|
? toolCall.name.split('__').pop()!
|
|
196
197
|
: toolCall.name;
|
|
197
|
-
const keyArg = extractKeyArg(toolCall);
|
|
198
|
+
const keyArg = stripDangerousAnsi(extractKeyArg(toolCall));
|
|
198
199
|
const suffixText = status === 'error' && errorMsg
|
|
199
|
-
? `- ${errorMsg.slice(0, 40)}`
|
|
200
|
+
? `- ${stripDangerousAnsi(errorMsg).slice(0, 40)}`
|
|
200
201
|
: status === 'done' && resultSummary
|
|
201
|
-
? `(${resultSummary})`
|
|
202
|
+
? `(${stripDangerousAnsi(resultSummary)})`
|
|
202
203
|
: '';
|
|
203
204
|
const leftBudget = Math.max(0, leftEndExclusive - col);
|
|
204
205
|
const leftSegments = buildLeftSegments(rawName, keyArg, suffixText, leftBudget);
|
|
@@ -362,7 +362,7 @@ export async function initializeBootstrapCore(
|
|
|
362
362
|
displayName: 'Terminal UI',
|
|
363
363
|
lastSeenAt: Date.now(),
|
|
364
364
|
},
|
|
365
|
-
}).catch(() => {});
|
|
365
|
+
}).catch((err) => { logger.debug('session broker create session failed at bootstrap', { err }); });
|
|
366
366
|
|
|
367
367
|
domainDispatch.syncSessionState({
|
|
368
368
|
id: userSessionId,
|
|
@@ -51,7 +51,7 @@ export function createResumeSessionHandler(options: ResumeSessionOptions): (sess
|
|
|
51
51
|
if (meta?.model) options.runtime.model = meta.model;
|
|
52
52
|
if (meta?.provider) options.runtime.provider = meta.provider;
|
|
53
53
|
options.writeLastSessionPointer(sessionId);
|
|
54
|
-
void options.sharedSessionBroker.reopenSession(sessionId).catch(() => {});
|
|
54
|
+
void options.sharedSessionBroker.reopenSession(sessionId).catch((err) => { logger.debug('session broker reopen session failed', { err }); });
|
|
55
55
|
options.conversation.log(`Resumed session: ${sessionId}`, { fg: '135' });
|
|
56
56
|
const reopenedPanels: string[] = [];
|
|
57
57
|
if (meta.returnContext?.openPanels?.length) {
|
package/src/runtime/bootstrap.ts
CHANGED
|
@@ -177,13 +177,13 @@ export async function bootstrapRuntime(
|
|
|
177
177
|
requestRender: (): void => { requestRender(); },
|
|
178
178
|
};
|
|
179
179
|
|
|
180
|
-
const orchestrator = new Orchestrator(
|
|
180
|
+
const orchestrator = new Orchestrator({
|
|
181
181
|
conversation,
|
|
182
|
-
() => orchestratorRefs.getViewportHeight(),
|
|
183
|
-
(vHeight: number) => orchestratorRefs.scrollToEnd(vHeight),
|
|
182
|
+
getViewportHeight: () => orchestratorRefs.getViewportHeight(),
|
|
183
|
+
scrollToEnd: (vHeight: number) => orchestratorRefs.scrollToEnd(vHeight),
|
|
184
184
|
toolRegistry,
|
|
185
185
|
permissionManager,
|
|
186
|
-
() => {
|
|
186
|
+
getSystemPrompt: () => {
|
|
187
187
|
const currentModel = providerRegistry.getCurrentModel();
|
|
188
188
|
const contextWindow = providerRegistry.getContextWindowForModel(currentModel);
|
|
189
189
|
const tier = getTierForContextWindow(contextWindow);
|
|
@@ -191,14 +191,13 @@ export async function bootstrapRuntime(
|
|
|
191
191
|
return supplement ? runtime.systemPrompt + '\n\n' + supplement : runtime.systemPrompt;
|
|
192
192
|
},
|
|
193
193
|
hookDispatcher,
|
|
194
|
-
|
|
195
|
-
() => orchestratorRefs.requestRender(),
|
|
194
|
+
requestRender: () => orchestratorRefs.requestRender(),
|
|
196
195
|
runtimeBus,
|
|
197
|
-
{
|
|
196
|
+
services: {
|
|
198
197
|
agentManager: services.agentManager,
|
|
199
198
|
wrfcController: services.wrfcController,
|
|
200
199
|
},
|
|
201
|
-
);
|
|
200
|
+
});
|
|
202
201
|
conversationFollowUpRef.value = (item) => orchestrator.enqueueConversationFollowUp(item);
|
|
203
202
|
orchestrator.setCoreServices({
|
|
204
203
|
configManager,
|
|
@@ -19,6 +19,7 @@ import type { PermissionAuditEntry } from '@pellux/goodvibes-sdk/platform/runtim
|
|
|
19
19
|
import type { PolicyLintFinding } from '@pellux/goodvibes-sdk/platform/runtime/permissions/lint';
|
|
20
20
|
import type { PolicySimulationSummary } from '@pellux/goodvibes-sdk/platform/runtime/permissions/simulation-scenarios';
|
|
21
21
|
import type { PolicyPreflightReview } from '@pellux/goodvibes-sdk/platform/runtime/permissions/preflight';
|
|
22
|
+
import { logger } from '@pellux/goodvibes-sdk/platform/utils/logger';
|
|
22
23
|
|
|
23
24
|
/**
|
|
24
25
|
* A point-in-time snapshot of policy state for diagnostics rendering.
|
|
@@ -169,7 +170,7 @@ export class PolicyPanel {
|
|
|
169
170
|
try {
|
|
170
171
|
cb();
|
|
171
172
|
} catch (err) {
|
|
172
|
-
|
|
173
|
+
logger.warn(`[PolicyPanel] subscriber error: ${err}`);
|
|
173
174
|
}
|
|
174
175
|
}
|
|
175
176
|
}
|
package/src/shell/ui-openers.ts
CHANGED
|
@@ -51,7 +51,7 @@ export function wireShellUiOpeners(options: WireShellUiOpenersOptions): void {
|
|
|
51
51
|
void getPinned().then((pinned) => {
|
|
52
52
|
input.modelPicker.pinnedIds = new Set(pinned);
|
|
53
53
|
});
|
|
54
|
-
void input.modelPicker.loadRecentModels().catch(() => {});
|
|
54
|
+
void input.modelPicker.loadRecentModels().catch(() => {}); // best-effort: prefetch for UI, failure is non-visible
|
|
55
55
|
input.modalOpened('modelPicker');
|
|
56
56
|
input.modelPicker.openAllModels(models, runtime.model);
|
|
57
57
|
render();
|
package/src/version.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { join } from 'node:path';
|
|
|
6
6
|
// The prebuild script updates the fallback value before compilation.
|
|
7
7
|
// Uses import.meta.dir (Bun) to locate package.json relative to this file,
|
|
8
8
|
// which is correct regardless of the process working directory.
|
|
9
|
-
let _version = '0.
|
|
9
|
+
let _version = '0.19.0';
|
|
10
10
|
try {
|
|
11
11
|
const pkg = JSON.parse(readFileSync(join(import.meta.dir, '..', 'package.json'), 'utf-8'));
|
|
12
12
|
_version = pkg.version ?? _version;
|