pi-ui-extend 1.0.8 → 1.0.11
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/app/constants.d.ts +1 -1
- package/dist/app/constants.js +1 -1
- package/dist/app/extensions/extension-ui-controller.js +11 -12
- package/dist/app/rendering/extension-entry-renderer.js +2 -0
- package/dist/app/rendering/tool-block-renderer.js +55 -4
- package/dist/app/screen/screen-styler.js +1 -1
- package/dist/bundled-extensions/question/index.js +1 -1
- package/dist/bundled-extensions/question/tui.d.ts +1 -1
- package/dist/bundled-extensions/question/types.d.ts +1 -1
- package/dist/markdown-format.d.ts +2 -0
- package/dist/markdown-format.js +17 -2
- package/dist/syntax-highlight.d.ts +12 -0
- package/dist/syntax-highlight.js +20 -0
- package/external/pi-tools-suite/README.md +9 -9
- package/external/pi-tools-suite/package.json +3 -3
- package/external/pi-tools-suite/src/async-subagents/async-subagents.sample.jsonc +24 -24
- package/external/pi-tools-suite/src/async-subagents/core/config.ts +5 -5
- package/external/pi-tools-suite/src/dcp/auto-compress.ts +1 -1
- package/external/pi-tools-suite/src/default-pi-tools-suite-config.ts +25 -25
- package/package.json +4 -4
package/dist/app/constants.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ResolvedToolRule } from "../config.js";
|
|
2
2
|
export declare const THINKING_LEVELS: readonly ["off", "minimal", "low", "medium", "high", "xhigh", "max"];
|
|
3
3
|
export declare const THINKING_MENU_MAX_ROWS: number;
|
|
4
|
-
export declare const PI_FAVORITE_MODEL_REFS: readonly ["amazon-bedrock/us.anthropic.claude-opus-4-6-v1", "anthropic/claude-opus-4-8", "openai/gpt-5.4", "azure-openai-responses/gpt-5.4", "openai-codex/gpt-5.6-sol", "deepseek/deepseek-v4-pro", "google/gemini-3.1-pro-preview", "google-vertex/gemini-3.1-pro-preview", "github-copilot/gpt-5.4", "openrouter/moonshotai/kimi-k2.6", "vercel-ai-gateway/zai/glm-5.2", "xai/grok-4.5", "groq/openai/gpt-oss-120b", "cerebras/zai-glm-4.7", "zai/glm-5.
|
|
4
|
+
export declare const PI_FAVORITE_MODEL_REFS: readonly ["amazon-bedrock/us.anthropic.claude-opus-4-6-v1", "anthropic/claude-opus-4-8", "openai/gpt-5.4", "azure-openai-responses/gpt-5.4", "openai-codex/gpt-5.6-sol", "deepseek/deepseek-v4-pro", "google/gemini-3.1-pro-preview", "google-vertex/gemini-3.1-pro-preview", "github-copilot/gpt-5.4", "openrouter/moonshotai/kimi-k2.6", "vercel-ai-gateway/zai/glm-5.2", "xai/grok-4.5", "groq/openai/gpt-oss-120b", "cerebras/zai-glm-4.7", "zai/glm-5.3", "mistral/devstral-medium-latest", "minimax/MiniMax-M2.7", "minimax-cn/MiniMax-M2.7", "moonshotai/kimi-k2.6", "moonshotai-cn/kimi-k2.6", "huggingface/moonshotai/Kimi-K2.6", "fireworks/accounts/fireworks/models/kimi-k2p6", "together/moonshotai/Kimi-K2.6", "opencode/kimi-k2.6", "opencode-go/kimi-k2.6", "kimi-coding/kimi-for-coding", "cloudflare-workers-ai/@cf/moonshotai/kimi-k2.6", "cloudflare-ai-gateway/workers-ai/@cf/moonshotai/kimi-k2.6", "xiaomi/mimo-v2.5-pro", "xiaomi-token-plan-cn/mimo-v2.5-pro", "xiaomi-token-plan-ams/mimo-v2.5-pro", "xiaomi-token-plan-sgp/mimo-v2.5-pro"];
|
|
5
5
|
export declare const SLASH_COMMAND_MENU_MAX_ROWS = 6;
|
|
6
6
|
export declare const RESUME_MENU_MAX_ROWS = 20;
|
|
7
7
|
export declare const RESUME_MENU_INITIAL_SESSION_ROWS = 30;
|
package/dist/app/constants.js
CHANGED
|
@@ -394,16 +394,14 @@ export class ExtensionUiController {
|
|
|
394
394
|
if (!this.host.isRunning())
|
|
395
395
|
return undefined;
|
|
396
396
|
const scopeKey = this.normalizeScopeKey(options.scopeKey);
|
|
397
|
-
if (!this.isScopeActive(scopeKey))
|
|
398
|
-
return undefined;
|
|
399
397
|
if (this.activeCustomUis.has(scopeKey))
|
|
400
398
|
throw new Error("Another extension custom UI is already active.");
|
|
401
|
-
const savedInput = options.savedInput ?? this.host.getInput();
|
|
399
|
+
const savedInput = options.savedInput ?? (this.isScopeActive(scopeKey) ? this.host.getInput() : undefined);
|
|
402
400
|
return await new Promise((resolve, reject) => {
|
|
403
401
|
const active = {
|
|
404
402
|
key: CUSTOM_UI_WIDGET_KEY,
|
|
405
403
|
scopeKey,
|
|
406
|
-
savedInput,
|
|
404
|
+
...(savedInput === undefined ? {} : { savedInput }),
|
|
407
405
|
settled: false,
|
|
408
406
|
resolve: (value) => resolve(value),
|
|
409
407
|
reject,
|
|
@@ -414,20 +412,17 @@ export class ExtensionUiController {
|
|
|
414
412
|
const done = (value) => {
|
|
415
413
|
if (active.settled || this.activeCustomUis.get(scopeKey) !== active)
|
|
416
414
|
return;
|
|
417
|
-
this.finishActiveCustomUi(active,
|
|
415
|
+
this.finishActiveCustomUi(active, value, { resolve: true });
|
|
418
416
|
};
|
|
419
417
|
void (async () => {
|
|
420
418
|
try {
|
|
421
419
|
const component = await factory(this.widgetTuiHandle(scopeKey), this.createExtensionTheme(), {}, done);
|
|
422
|
-
if (active.settled || this.activeCustomUis.get(scopeKey) !== active
|
|
420
|
+
if (active.settled || this.activeCustomUis.get(scopeKey) !== active) {
|
|
423
421
|
component.dispose?.();
|
|
424
|
-
if (!active.settled && this.activeCustomUis.get(scopeKey) === active) {
|
|
425
|
-
this.finishActiveCustomUi(active, undefined, { resolve: true });
|
|
426
|
-
}
|
|
427
422
|
return;
|
|
428
423
|
}
|
|
429
424
|
active.component = component;
|
|
430
|
-
if (this.host.isRunning())
|
|
425
|
+
if (this.host.isRunning() && this.isScopeActive(scopeKey))
|
|
431
426
|
this.host.render();
|
|
432
427
|
}
|
|
433
428
|
catch (error) {
|
|
@@ -454,8 +449,9 @@ export class ExtensionUiController {
|
|
|
454
449
|
return;
|
|
455
450
|
active.settled = true;
|
|
456
451
|
this.activeCustomUis.delete(active.scopeKey);
|
|
457
|
-
if (this.isScopeActive(active.scopeKey) && this.host.getInput() !== active.savedInput)
|
|
452
|
+
if (this.isScopeActive(active.scopeKey) && active.savedInput !== undefined && this.host.getInput() !== active.savedInput) {
|
|
458
453
|
this.host.setInput(active.savedInput);
|
|
454
|
+
}
|
|
459
455
|
try {
|
|
460
456
|
active.component?.dispose?.();
|
|
461
457
|
}
|
|
@@ -479,7 +475,10 @@ export class ExtensionUiController {
|
|
|
479
475
|
const scopeKey = this.activeScopeKey();
|
|
480
476
|
if (!this.isScopeActive(scopeKey))
|
|
481
477
|
return undefined;
|
|
482
|
-
|
|
478
|
+
const active = this.activeCustomUis.get(scopeKey);
|
|
479
|
+
if (active && active.savedInput === undefined)
|
|
480
|
+
active.savedInput = this.host.getInput();
|
|
481
|
+
return active;
|
|
483
482
|
}
|
|
484
483
|
isScopeActive(scopeKey) {
|
|
485
484
|
return this.host.isExtensionUiScopeActive?.(scopeKey) ?? this.activeScopeKey() === scopeKey;
|
|
@@ -50,6 +50,7 @@ function extensionRendererTheme(theme) {
|
|
|
50
50
|
dim: colors.muted,
|
|
51
51
|
text: colors.foreground,
|
|
52
52
|
thinkingText: colors.thinkingForeground,
|
|
53
|
+
searchMatchText: colors.popupSelectedForeground,
|
|
53
54
|
userMessageText: colors.userForeground,
|
|
54
55
|
customMessageText: colors.foreground,
|
|
55
56
|
customMessageLabel: colors.accent,
|
|
@@ -88,6 +89,7 @@ function extensionRendererTheme(theme) {
|
|
|
88
89
|
};
|
|
89
90
|
const backgrounds = {
|
|
90
91
|
selectedBg: colors.popupSelectedBackground,
|
|
92
|
+
searchMatchBg: colors.popupSelectedBackground,
|
|
91
93
|
userMessageBg: colors.userMessageBackground || colors.background,
|
|
92
94
|
customMessageBg: colors.assistantMessageBackground || colors.background,
|
|
93
95
|
toolPendingBg: colors.thinkingMessageBackground || colors.background,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { resolveColor } from "../../config.js";
|
|
2
|
+
import { renderMarkdownLine } from "../../markdown-format.js";
|
|
2
3
|
import { expandTabs, sliceByDisplayWidth, stringDisplayWidth, wrapDisplayLineByWords } from "../../terminal-width.js";
|
|
3
4
|
import { alertIconPrefixLength, hasToolLspDiagnosticsAfterMutation, lspDiagnosticSeverityForLine, sanitizeText, toolStatusIcon, toolStatusIconColor, wrapLine } from "./render-text.js";
|
|
4
5
|
import { APP_ICONS } from "../icons.js";
|
|
@@ -234,9 +235,16 @@ function renderToolBodyLines(text, width, target, color, style, colors, syntaxHi
|
|
|
234
235
|
const lspDiagnosticStyle = hasLspDiagnostics ? lspDiagnosticLineStyle(displayLine, colors) : undefined;
|
|
235
236
|
const bodyLineStyle = bodyLineStyleForLine(bodyLineStyles, absoluteRawLineIndex, colors);
|
|
236
237
|
const lineSyntaxHighlight = syntaxHighlightForLine(syntaxHighlight, absoluteRawLineIndex);
|
|
238
|
+
const markdownLine = lineSyntaxHighlight?.language === "markdown"
|
|
239
|
+
? renderMarkdownLine(displayLine, lineSyntaxHighlight.startColumn ?? 0)
|
|
240
|
+
: undefined;
|
|
241
|
+
const syntaxDisplayLine = markdownLine?.text ?? displayLine;
|
|
237
242
|
const wrappedLines = ansiLine && !diffStyle && !lspDiagnosticStyle && !bodyLineStyle && !lineSyntaxHighlight
|
|
238
243
|
? wrapAnsiStyledDisplayLine(ansiLine, bodyWidth)
|
|
239
|
-
: wrapBodyLine(
|
|
244
|
+
: wrapBodyLine(syntaxDisplayLine, bodyWidth).map((wrapped) => ({ text: wrapped, segments: [] }));
|
|
245
|
+
const wrappedSourceRanges = lineSyntaxHighlight && wrappedLines.length > 1
|
|
246
|
+
? sourceRangesForWrappedLines(syntaxDisplayLine, wrappedLines.map((line) => line.text))
|
|
247
|
+
: [];
|
|
240
248
|
for (const [wrapIndex, wrapped] of wrappedLines.entries()) {
|
|
241
249
|
const line = {
|
|
242
250
|
text: `${displayPrefix}${wrapped.text}`,
|
|
@@ -271,9 +279,33 @@ function renderToolBodyLines(text, width, target, color, style, colors, syntaxHi
|
|
|
271
279
|
}
|
|
272
280
|
else if (lineSyntaxHighlight) {
|
|
273
281
|
const rawStart = wrapIndex === 0 ? lineSyntaxHighlight.startColumn ?? 0 : 0;
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
282
|
+
const sourceRange = wrappedSourceRanges[wrapIndex];
|
|
283
|
+
const markdownSegments = sourceRange
|
|
284
|
+
? markdownLine?.segments.flatMap((segment) => shiftStyledSegmentToRange(segment, sourceRange)) ?? []
|
|
285
|
+
: markdownLine?.segments ?? [];
|
|
286
|
+
line.syntaxHighlight = {
|
|
287
|
+
language: lineSyntaxHighlight.language,
|
|
288
|
+
start: Math.min(line.text.length, displayPrefix.length + rawStart),
|
|
289
|
+
...(sourceRange ? {
|
|
290
|
+
context: {
|
|
291
|
+
text: syntaxDisplayLine,
|
|
292
|
+
rangeStart: sourceRange.start,
|
|
293
|
+
rangeEnd: sourceRange.end,
|
|
294
|
+
renderStart: displayPrefix.length,
|
|
295
|
+
syntaxStart: lineSyntaxHighlight.startColumn ?? 0,
|
|
296
|
+
},
|
|
297
|
+
} : {}),
|
|
298
|
+
};
|
|
299
|
+
const syntaxSegments = [
|
|
300
|
+
...(gutterSegment ? [gutterSegment] : []),
|
|
301
|
+
...markdownSegments.map((segment) => ({
|
|
302
|
+
...segment,
|
|
303
|
+
start: segment.start + displayPrefix.length,
|
|
304
|
+
end: segment.end + displayPrefix.length,
|
|
305
|
+
})),
|
|
306
|
+
];
|
|
307
|
+
if (syntaxSegments.length > 0)
|
|
308
|
+
line.segments = syntaxSegments;
|
|
277
309
|
}
|
|
278
310
|
else if (wrapped.segments.length > 0) {
|
|
279
311
|
line.segments = [
|
|
@@ -302,6 +334,25 @@ function renderToolBodyLines(text, width, target, color, style, colors, syntaxHi
|
|
|
302
334
|
}
|
|
303
335
|
return lines;
|
|
304
336
|
}
|
|
337
|
+
function shiftStyledSegmentToRange(segment, range) {
|
|
338
|
+
const start = Math.max(segment.start, range.start);
|
|
339
|
+
const end = Math.min(segment.end, range.end);
|
|
340
|
+
if (end <= start)
|
|
341
|
+
return [];
|
|
342
|
+
return [{ ...segment, start: start - range.start, end: end - range.start }];
|
|
343
|
+
}
|
|
344
|
+
function sourceRangesForWrappedLines(text, wrappedLines) {
|
|
345
|
+
const ranges = [];
|
|
346
|
+
let cursor = 0;
|
|
347
|
+
for (const wrapped of wrappedLines) {
|
|
348
|
+
const found = text.indexOf(wrapped, cursor);
|
|
349
|
+
const start = found === -1 ? cursor : found;
|
|
350
|
+
const end = Math.min(text.length, start + wrapped.length);
|
|
351
|
+
ranges.push({ start, end });
|
|
352
|
+
cursor = end;
|
|
353
|
+
}
|
|
354
|
+
return ranges;
|
|
355
|
+
}
|
|
305
356
|
const ANSI_STANDARD_COLORS = ["#000000", "#cd3131", "#0dbc79", "#e5e510", "#2472c8", "#bc3fbc", "#11a8cd", "#e5e5e5"];
|
|
306
357
|
const ANSI_BRIGHT_COLORS = ["#666666", "#f14c4c", "#23d18b", "#f5f543", "#3b8eea", "#d670d6", "#29b8db", "#e5e5e5"];
|
|
307
358
|
function sanitizeToolBodyText(text, preserveAnsi) {
|
|
@@ -16,7 +16,7 @@ export class ScreenStyler {
|
|
|
16
16
|
...(line?.backgroundOverride === undefined ? {} : { background: line.backgroundOverride }),
|
|
17
17
|
};
|
|
18
18
|
const colors = this.host.theme.colors;
|
|
19
|
-
const markdownLine = line?.syntaxHighlight?.language === "markdown"
|
|
19
|
+
const markdownLine = line?.syntaxHighlight?.language === "markdown" && !line.syntaxHighlight.context
|
|
20
20
|
? renderMarkdownDisplayLine(line.text, width, line.syntaxHighlight.start)
|
|
21
21
|
: undefined;
|
|
22
22
|
const text = markdownLine?.text ?? line?.text ?? "";
|
|
@@ -18,7 +18,7 @@ export default function questionExtension(pi) {
|
|
|
18
18
|
if (!ctx.hasUI)
|
|
19
19
|
return createQuestionToolResult(createCanceledQuestionResult("ui_unavailable", questions), questions);
|
|
20
20
|
const selections = await runQuestionnaire(questions, ctx);
|
|
21
|
-
if (selections
|
|
21
|
+
if (selections == null)
|
|
22
22
|
return createQuestionToolResult(createCanceledQuestionResult("user_canceled"), questions);
|
|
23
23
|
return createQuestionToolResult(createSuccessfulQuestionResult(questions, selections), questions);
|
|
24
24
|
},
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { NormalizedQuestion, QuestionSelection, QuestionUiContext } from "./types.js";
|
|
2
|
-
export declare function runQuestionnaire(questions: NormalizedQuestion[], ctx: QuestionUiContext): Promise<QuestionSelection[] | null>;
|
|
2
|
+
export declare function runQuestionnaire(questions: NormalizedQuestion[], ctx: QuestionUiContext): Promise<QuestionSelection[] | null | undefined>;
|
|
@@ -61,7 +61,7 @@ export interface QuestionToolResult {
|
|
|
61
61
|
export interface QuestionUiContext {
|
|
62
62
|
hasUI?: boolean;
|
|
63
63
|
ui: {
|
|
64
|
-
custom<T>(factory: (tui: QuestionTui, theme: QuestionTheme, keybindings: unknown, done: (value: T) => void) => QuestionComponent): Promise<T>;
|
|
64
|
+
custom<T>(factory: (tui: QuestionTui, theme: QuestionTheme, keybindings: unknown, done: (value: T) => void) => QuestionComponent): Promise<T | undefined>;
|
|
65
65
|
setEditorText?(text: string): void;
|
|
66
66
|
getEditorText?(): string;
|
|
67
67
|
notify?(message: string, level: "info" | "warning" | "error"): void;
|
package/dist/markdown-format.js
CHANGED
|
@@ -84,13 +84,26 @@ export function renderMarkdownTextLines(text, width, start = 0, options = {}) {
|
|
|
84
84
|
const syntaxHighlight = markdownLineSyntaxHighlight(fence, Boolean(opensFence || closesFence), start);
|
|
85
85
|
const isHeadingLine = !fence && /^\s{0,3}#{1,6}\s/.test(rawLine);
|
|
86
86
|
const markdownLine = syntaxHighlight?.language === "markdown" || isHeadingLine ? renderMarkdownLine(rawLine) : undefined;
|
|
87
|
-
|
|
87
|
+
const logicalLine = markdownLine ?? { text: rawLine, segments: [] };
|
|
88
|
+
for (const wrapped of wrapRenderedMarkdownLine(logicalLine, width, options)) {
|
|
89
|
+
const wrappedSyntaxHighlight = syntaxHighlight && wrapped.sourceStart !== undefined && wrapped.sourceEnd !== undefined
|
|
90
|
+
? {
|
|
91
|
+
...syntaxHighlight,
|
|
92
|
+
context: {
|
|
93
|
+
text: logicalLine.text,
|
|
94
|
+
rangeStart: wrapped.sourceStart,
|
|
95
|
+
rangeEnd: wrapped.sourceEnd,
|
|
96
|
+
renderStart: start,
|
|
97
|
+
syntaxStart: 0,
|
|
98
|
+
},
|
|
99
|
+
}
|
|
100
|
+
: syntaxHighlight;
|
|
88
101
|
lines.push({
|
|
89
102
|
text: wrapped.text,
|
|
90
103
|
...(wrapped.copyText === undefined ? {} : { copyText: wrapped.copyText }),
|
|
91
104
|
...(wrapped.continuesOnNextLine ? { continuesOnNextLine: true } : {}),
|
|
92
105
|
...(wrapped.segments.length > 0 ? { segments: wrapped.segments } : {}),
|
|
93
|
-
...(
|
|
106
|
+
...(wrappedSyntaxHighlight ? { syntaxHighlight: wrappedSyntaxHighlight } : {}),
|
|
94
107
|
...(isHeadingLine ? { heading: true } : {}),
|
|
95
108
|
});
|
|
96
109
|
}
|
|
@@ -133,6 +146,8 @@ function wrapRenderedMarkdownLine(line, width, options) {
|
|
|
133
146
|
copyText: line.text.slice(range.start, ranges[index + 1]?.start ?? range.end),
|
|
134
147
|
...(index < ranges.length - 1 ? { continuesOnNextLine: true } : {}),
|
|
135
148
|
segments: line.segments.flatMap((segment) => shiftSegmentToRange(segment, range.start, range.end)),
|
|
149
|
+
sourceStart: range.start,
|
|
150
|
+
sourceEnd: range.end,
|
|
136
151
|
}));
|
|
137
152
|
}
|
|
138
153
|
function wrapDisplayLineByWordsWithRanges(text, width, options) {
|
|
@@ -3,6 +3,18 @@ export type SyntaxHighlightLanguage = "c" | "cpp" | "csharp" | "css" | "go" | "h
|
|
|
3
3
|
export type SyntaxLineHighlight = {
|
|
4
4
|
language: SyntaxHighlightLanguage;
|
|
5
5
|
start: number;
|
|
6
|
+
context?: SyntaxHighlightContext;
|
|
7
|
+
};
|
|
8
|
+
export type SyntaxHighlightContext = {
|
|
9
|
+
/** Complete logical line, before it was soft-wrapped for display. */
|
|
10
|
+
text: string;
|
|
11
|
+
/** Source range represented by this visual line. */
|
|
12
|
+
rangeStart: number;
|
|
13
|
+
rangeEnd: number;
|
|
14
|
+
/** Visual column where rangeStart is rendered. */
|
|
15
|
+
renderStart: number;
|
|
16
|
+
/** Source column where syntax parsing begins. */
|
|
17
|
+
syntaxStart: number;
|
|
6
18
|
};
|
|
7
19
|
export type ToolBodySyntaxHighlight = {
|
|
8
20
|
language: SyntaxHighlightLanguage;
|
package/dist/syntax-highlight.js
CHANGED
|
@@ -112,12 +112,32 @@ export function syntaxHighlightLanguageForMarkdownFence(info) {
|
|
|
112
112
|
return MARKDOWN_FENCE_LANGUAGES[token];
|
|
113
113
|
}
|
|
114
114
|
export function syntaxHighlightSegmentsForLine(text, highlight, colors) {
|
|
115
|
+
if (highlight.context)
|
|
116
|
+
return contextualSyntaxSegments(highlight.language, highlight.context, colors);
|
|
115
117
|
const start = Math.max(0, Math.min(text.length, highlight.start));
|
|
116
118
|
if (start >= text.length)
|
|
117
119
|
return [];
|
|
118
120
|
const segments = localSyntaxSegments(text.slice(start), highlight.language, colors);
|
|
119
121
|
return segments.map((segment) => ({ ...segment, start: segment.start + start, end: segment.end + start }));
|
|
120
122
|
}
|
|
123
|
+
function contextualSyntaxSegments(language, context, colors) {
|
|
124
|
+
const syntaxStart = Math.max(0, Math.min(context.text.length, context.syntaxStart));
|
|
125
|
+
const rangeStart = Math.max(0, Math.min(context.text.length, context.rangeStart));
|
|
126
|
+
const rangeEnd = Math.max(rangeStart, Math.min(context.text.length, context.rangeEnd));
|
|
127
|
+
const segments = localSyntaxSegments(context.text.slice(syntaxStart), language, colors)
|
|
128
|
+
.map((segment) => ({ ...segment, start: segment.start + syntaxStart, end: segment.end + syntaxStart }));
|
|
129
|
+
return segments.flatMap((segment) => {
|
|
130
|
+
const start = Math.max(segment.start, rangeStart);
|
|
131
|
+
const end = Math.min(segment.end, rangeEnd);
|
|
132
|
+
if (end <= start)
|
|
133
|
+
return [];
|
|
134
|
+
return [{
|
|
135
|
+
...segment,
|
|
136
|
+
start: context.renderStart + start - rangeStart,
|
|
137
|
+
end: context.renderStart + end - rangeStart,
|
|
138
|
+
}];
|
|
139
|
+
});
|
|
140
|
+
}
|
|
121
141
|
function localSyntaxSegments(code, language, colors) {
|
|
122
142
|
switch (language) {
|
|
123
143
|
case "css":
|
|
@@ -253,9 +253,9 @@ Example shared async-subagents config section:
|
|
|
253
253
|
"cheap": {
|
|
254
254
|
"description": "Use GLM for text/code roles.",
|
|
255
255
|
"types": {
|
|
256
|
-
"quick": { "model": "zai/glm-5.
|
|
257
|
-
"frontend": { "model": "antigravity/gemini-3-flash-preview", "fallbackModels": ["zai/glm-5.
|
|
258
|
-
"review": { "model": "zai/glm-5.
|
|
256
|
+
"quick": { "model": "zai/glm-5.3", "thinking": "off" },
|
|
257
|
+
"frontend": { "model": "antigravity/gemini-3-flash-preview", "fallbackModels": ["zai/glm-5.3"], "thinking": "medium" },
|
|
258
|
+
"review": { "model": "zai/glm-5.3", "thinking": "high" }
|
|
259
259
|
}
|
|
260
260
|
}
|
|
261
261
|
},
|
|
@@ -283,18 +283,18 @@ The canonical use case is an **`oracle`** role that consults a flagship model fr
|
|
|
283
283
|
"oracle": {
|
|
284
284
|
"description": "Cross-provider second opinion: consult a flagship from a different provider than the parent to pressure-test a hard decision. Read-only; advise, do not edit.",
|
|
285
285
|
"model": "openai-codex/gpt-5.6-sol",
|
|
286
|
-
"fallbackModels": ["zai/glm-5.
|
|
286
|
+
"fallbackModels": ["zai/glm-5.3"],
|
|
287
287
|
"thinking": "xhigh",
|
|
288
288
|
"modelByParent": {
|
|
289
|
-
"zai/*": { "model": "openai-codex/gpt-5.6-sol", "fallbackModels": ["zai/glm-5.
|
|
290
|
-
"openai-codex/*": "zai/glm-5.
|
|
291
|
-
"antigravity/*": { "model": "zai/glm-5.
|
|
292
|
-
"anthropic/*": { "model": "openai-codex/gpt-5.6-sol", "fallbackModels": ["zai/glm-5.
|
|
289
|
+
"zai/*": { "model": "openai-codex/gpt-5.6-sol", "fallbackModels": ["zai/glm-5.3"] },
|
|
290
|
+
"openai-codex/*": "zai/glm-5.3",
|
|
291
|
+
"antigravity/*": { "model": "zai/glm-5.3", "fallbackModels": ["openai-codex/gpt-5.6-sol"] },
|
|
292
|
+
"anthropic/*": { "model": "openai-codex/gpt-5.6-sol", "fallbackModels": ["zai/glm-5.3"] }
|
|
293
293
|
}
|
|
294
294
|
}
|
|
295
295
|
```
|
|
296
296
|
|
|
297
|
-
With this config a GLM parent (`zai/*`) spawns the oracle on `gpt-5.6-sol`, a GPT parent (`openai-codex/*`) spawns it on `glm-5.
|
|
297
|
+
With this config a GLM parent (`zai/*`) spawns the oracle on `gpt-5.6-sol`, a GPT parent (`openai-codex/*`) spawns it on `glm-5.3`, and so on — automatically, at spawn time, with no `task.model` needed. The parent model ref is read from the spawn context (`ctx.model`) and passed into resolution. Pattern matching is case-insensitive `*` glob (same engine as `vision.blindModelPatterns`). When no key matches (or no parent model is known), the role falls back to its static `model` + `fallbackModels`. An explicit `task.model` or `ASYNC_SUBAGENTS_FORCE_CURRENT_MODEL=1` still overrides the match.
|
|
298
298
|
|
|
299
299
|
Sub-agents run with `--no-session` by default to avoid writing duplicate Pi session JSONL files for fire-and-forget background work. Set `ASYNC_SUBAGENTS_ENABLE_SESSIONS=1` to restore persisted per-agent sessions under each agent's `sessions/` directory; this also registers the session-navigation slash commands (`/sub-open`, `/sub-back`, `/sub-where`) needed for switching and deeper post-mortem navigation.
|
|
300
300
|
|
|
@@ -43,9 +43,9 @@
|
|
|
43
43
|
"vscode-languageserver-protocol": "^3.17.5"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
46
|
-
"@earendil-works/pi-ai": "0.84.
|
|
47
|
-
"@earendil-works/pi-coding-agent": "0.84.
|
|
48
|
-
"@earendil-works/pi-tui": "0.84.
|
|
46
|
+
"@earendil-works/pi-ai": "0.84.2",
|
|
47
|
+
"@earendil-works/pi-coding-agent": "0.84.2",
|
|
48
|
+
"@earendil-works/pi-tui": "0.84.2",
|
|
49
49
|
"typebox": "*"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
@@ -56,9 +56,9 @@
|
|
|
56
56
|
// profile model, so a role like an "oracle" can always pick a flagship from a
|
|
57
57
|
// DIFFERENT provider than the parent. Example:
|
|
58
58
|
// "modelByParent": {
|
|
59
|
-
// "zai/*": { "model": "openai-codex/gpt-5.6-sol", "fallbackModels": ["zai/glm-5.
|
|
60
|
-
// "openai-codex/*": "zai/glm-5.
|
|
61
|
-
// "antigravity/*": { "model": "zai/glm-5.
|
|
59
|
+
// "zai/*": { "model": "openai-codex/gpt-5.6-sol", "fallbackModels": ["zai/glm-5.3"] },
|
|
60
|
+
// "openai-codex/*": "zai/glm-5.3",
|
|
61
|
+
// "antigravity/*": { "model": "zai/glm-5.3", "fallbackModels": ["openai-codex/gpt-5.6-sol"] }
|
|
62
62
|
// }
|
|
63
63
|
|
|
64
64
|
// Role auto-selection when subagentType is omitted is handled by a small LLM
|
|
@@ -115,11 +115,11 @@
|
|
|
115
115
|
"scan": { "model": "zai/glm-4.5-air", "thinking": "off" },
|
|
116
116
|
"research": { "model": "zai/glm-5-turbo", "thinking": "low" },
|
|
117
117
|
"docs": { "model": "zai/glm-4.5-air", "thinking": "low" },
|
|
118
|
-
"frontend": { "model": "antigravity/gemini-3-flash-preview", "fallbackModels": ["zai/glm-5.
|
|
118
|
+
"frontend": { "model": "antigravity/gemini-3-flash-preview", "fallbackModels": ["zai/glm-5.3"], "thinking": "medium" },
|
|
119
119
|
"tests": { "model": "zai/glm-5-turbo", "thinking": "medium" },
|
|
120
|
-
"review": { "model": "zai/glm-5.
|
|
121
|
-
"implement": { "model": "zai/glm-5.
|
|
122
|
-
"deep": { "model": "zai/glm-5.
|
|
120
|
+
"review": { "model": "zai/glm-5.3", "thinking": "high" },
|
|
121
|
+
"implement": { "model": "zai/glm-5.3", "thinking": "high" },
|
|
122
|
+
"deep": { "model": "zai/glm-5.3", "thinking": "high" }
|
|
123
123
|
}
|
|
124
124
|
},
|
|
125
125
|
|
|
@@ -130,11 +130,11 @@
|
|
|
130
130
|
"scan": { "model": "openai-codex/gpt-5.6-luna", "fallbackModels": ["zai/glm-4.5-air"], "thinking": "off" },
|
|
131
131
|
"research": { "model": "openai-codex/gpt-5.6-terra", "fallbackModels": ["zai/glm-5-turbo"], "thinking": "low" },
|
|
132
132
|
"docs": { "model": "openai-codex/gpt-5.6-luna", "fallbackModels": ["zai/glm-4.5-air"], "thinking": "low" },
|
|
133
|
-
"frontend": { "model": "openai-codex/gpt-5.6-terra", "fallbackModels": ["antigravity/gemini-3-flash-preview", "zai/glm-5.
|
|
133
|
+
"frontend": { "model": "openai-codex/gpt-5.6-terra", "fallbackModels": ["antigravity/gemini-3-flash-preview", "zai/glm-5.3"], "thinking": "medium" },
|
|
134
134
|
"tests": { "model": "openai-codex/gpt-5.6-terra", "fallbackModels": ["zai/glm-5-turbo"], "thinking": "medium" },
|
|
135
|
-
"review": { "model": "openai-codex/gpt-5.6-sol", "fallbackModels": ["zai/glm-5.
|
|
136
|
-
"implement": { "model": "openai-codex/gpt-5.6-sol", "fallbackModels": ["zai/glm-5.
|
|
137
|
-
"deep": { "model": "openai-codex/gpt-5.6-sol", "fallbackModels": ["zai/glm-5.
|
|
135
|
+
"review": { "model": "openai-codex/gpt-5.6-sol", "fallbackModels": ["zai/glm-5.3"], "thinking": "high" },
|
|
136
|
+
"implement": { "model": "openai-codex/gpt-5.6-sol", "fallbackModels": ["zai/glm-5.3"], "thinking": "high" },
|
|
137
|
+
"deep": { "model": "openai-codex/gpt-5.6-sol", "fallbackModels": ["zai/glm-5.3"], "thinking": "high" }
|
|
138
138
|
}
|
|
139
139
|
},
|
|
140
140
|
|
|
@@ -145,11 +145,11 @@
|
|
|
145
145
|
"scan": { "model": "antigravity/gemini-3-flash-preview", "fallbackModels": ["openai-codex/gpt-5.3-codex-spark", "zai/glm-4.5-air"], "thinking": "off" },
|
|
146
146
|
"research": { "model": "antigravity/gemini-3.1-pro-preview", "fallbackModels": ["openai-codex/gpt-5.4-mini", "zai/glm-5-turbo"], "thinking": "medium" },
|
|
147
147
|
"docs": { "model": "antigravity/gemini-2.5-flash", "fallbackModels": ["openai-codex/gpt-5.3-codex-spark", "zai/glm-4.5-air"], "thinking": "medium" },
|
|
148
|
-
"frontend": { "model": "antigravity/gemini-3.1-pro-preview-customtools", "fallbackModels": ["openai-codex/gpt-5.4-mini", "zai/glm-5.
|
|
148
|
+
"frontend": { "model": "antigravity/gemini-3.1-pro-preview-customtools", "fallbackModels": ["openai-codex/gpt-5.4-mini", "zai/glm-5.3"], "thinking": "low" },
|
|
149
149
|
"tests": { "model": "antigravity/antigravity-claude-sonnet-4-6", "fallbackModels": ["openai-codex/gpt-5.4-mini", "zai/glm-5-turbo"], "thinking": "high" },
|
|
150
|
-
"review": { "model": "antigravity/antigravity-claude-sonnet-4-6", "fallbackModels": ["openai-codex/gpt-5.6-sol", "zai/glm-5.
|
|
151
|
-
"implement": { "model": "openai-codex/gpt-5.6-sol", "fallbackModels": ["zai/glm-5.
|
|
152
|
-
"deep": { "model": "antigravity/antigravity-claude-opus-4-6-thinking", "fallbackModels": ["openai-codex/gpt-5.6-sol", "zai/glm-5.
|
|
150
|
+
"review": { "model": "antigravity/antigravity-claude-sonnet-4-6", "fallbackModels": ["openai-codex/gpt-5.6-sol", "zai/glm-5.3"], "thinking": "high" },
|
|
151
|
+
"implement": { "model": "openai-codex/gpt-5.6-sol", "fallbackModels": ["zai/glm-5.3"], "thinking": "high" },
|
|
152
|
+
"deep": { "model": "antigravity/antigravity-claude-opus-4-6-thinking", "fallbackModels": ["openai-codex/gpt-5.6-sol", "zai/glm-5.3"], "thinking": "high" }
|
|
153
153
|
}
|
|
154
154
|
}
|
|
155
155
|
},
|
|
@@ -184,7 +184,7 @@
|
|
|
184
184
|
"frontend": {
|
|
185
185
|
"description": "Use for frontend UI/UX visual work: styling, layout, typography, animation, responsive states, component polish, accessibility. Avoid backend/business logic unless needed for UI behavior.",
|
|
186
186
|
"model": "antigravity/gemini-3-flash-preview",
|
|
187
|
-
"fallbackModels": ["openai-codex/gpt-5.4-mini", "zai/glm-5.
|
|
187
|
+
"fallbackModels": ["openai-codex/gpt-5.4-mini", "zai/glm-5.3"],
|
|
188
188
|
"thinking": "medium",
|
|
189
189
|
"promptAppend": [
|
|
190
190
|
"Act as a frontend UI/UX engineer for visual and product-facing work.",
|
|
@@ -204,7 +204,7 @@
|
|
|
204
204
|
"review": {
|
|
205
205
|
"description": "Use for review/audit of existing code or changes: correctness, security, performance, maintainability, API risks, quality. Do not implement new code.",
|
|
206
206
|
"model": "openai-codex/gpt-5.6-sol",
|
|
207
|
-
"fallbackModels": ["zai/glm-5.
|
|
207
|
+
"fallbackModels": ["zai/glm-5.3"],
|
|
208
208
|
"thinking": "high",
|
|
209
209
|
"tools": ["read", "grep"]
|
|
210
210
|
},
|
|
@@ -212,28 +212,28 @@
|
|
|
212
212
|
"implement": {
|
|
213
213
|
"description": "Use when the sub-agent should make or plan code changes for a feature, bug fix, or refactor.",
|
|
214
214
|
"model": "openai-codex/gpt-5.6-sol",
|
|
215
|
-
"fallbackModels": ["zai/glm-5.
|
|
215
|
+
"fallbackModels": ["zai/glm-5.3"],
|
|
216
216
|
"thinking": "high"
|
|
217
217
|
},
|
|
218
218
|
|
|
219
219
|
"deep": {
|
|
220
220
|
"description": "Use for broad hard reasoning: architecture, system design, cross-module impact, complex tradeoffs.",
|
|
221
221
|
"model": "openai-codex/gpt-5.6-sol",
|
|
222
|
-
"fallbackModels": ["zai/glm-5.
|
|
222
|
+
"fallbackModels": ["zai/glm-5.3"],
|
|
223
223
|
"thinking": "high"
|
|
224
224
|
},
|
|
225
225
|
|
|
226
226
|
"oracle": {
|
|
227
227
|
"description": "Oracle: cross-provider flagship second opinion for hard or high-stakes uncertainty. Use sparingly to pressure-test architecture, plans, root-cause hypotheses, risk/security calls, or final recommendations when independent disagreement is valuable. Read-only; advise, do not edit.",
|
|
228
228
|
"model": "openai-codex/gpt-5.6-sol",
|
|
229
|
-
"fallbackModels": ["zai/glm-5.
|
|
229
|
+
"fallbackModels": ["zai/glm-5.3"],
|
|
230
230
|
"thinking": "xhigh",
|
|
231
231
|
"tools": ["read", "grep", "bash"],
|
|
232
232
|
"modelByParent": {
|
|
233
|
-
"zai/*": { "model": "openai-codex/gpt-5.6-sol", "fallbackModels": ["zai/glm-5.
|
|
234
|
-
"openai-codex/*": { "model": "zai/glm-5.
|
|
235
|
-
"antigravity/*": { "model": "zai/glm-5.
|
|
236
|
-
"anthropic/*": { "model": "openai-codex/gpt-5.6-sol", "fallbackModels": ["zai/glm-5.
|
|
233
|
+
"zai/*": { "model": "openai-codex/gpt-5.6-sol", "fallbackModels": ["zai/glm-5.3"] },
|
|
234
|
+
"openai-codex/*": { "model": "zai/glm-5.3", "fallbackModels": ["openai-codex/gpt-5.6-sol"] },
|
|
235
|
+
"antigravity/*": { "model": "zai/glm-5.3", "fallbackModels": ["openai-codex/gpt-5.6-sol"] },
|
|
236
|
+
"anthropic/*": { "model": "openai-codex/gpt-5.6-sol", "fallbackModels": ["zai/glm-5.3"] }
|
|
237
237
|
},
|
|
238
238
|
"promptAppend": "You are an oracle: a flagship model from a different provider giving a second opinion to the parent agent. Give a concise, decisive recommendation with key tradeoffs and risks. Disagree when warranted; do not rubber-stamp. Do not edit unless explicitly asked."
|
|
239
239
|
}
|
|
@@ -220,12 +220,12 @@ const BUILTIN_CONFIG: SubagentConfig = {
|
|
|
220
220
|
oracle: {
|
|
221
221
|
description: "Oracle: cross-provider flagship second opinion for hard or high-stakes uncertainty. Use sparingly to pressure-test architecture, plans, root-cause hypotheses, risk/security calls, or final recommendations when independent disagreement is valuable. Read-only; advise, do not edit.",
|
|
222
222
|
model: "openai-codex/gpt-5.6-sol",
|
|
223
|
-
fallbackModels: ["zai/glm-5.
|
|
223
|
+
fallbackModels: ["zai/glm-5.3"],
|
|
224
224
|
modelByParent: {
|
|
225
|
-
"zai/*": { model: "openai-codex/gpt-5.6-sol", fallbackModels: ["zai/glm-5.
|
|
226
|
-
"openai-codex/*": { model: "zai/glm-5.
|
|
227
|
-
"antigravity/*": { model: "zai/glm-5.
|
|
228
|
-
"anthropic/*": { model: "openai-codex/gpt-5.6-sol", fallbackModels: ["zai/glm-5.
|
|
225
|
+
"zai/*": { model: "openai-codex/gpt-5.6-sol", fallbackModels: ["zai/glm-5.3"] },
|
|
226
|
+
"openai-codex/*": { model: "zai/glm-5.3", fallbackModels: ["openai-codex/gpt-5.6-sol"] },
|
|
227
|
+
"antigravity/*": { model: "zai/glm-5.3", fallbackModels: ["openai-codex/gpt-5.6-sol"] },
|
|
228
|
+
"anthropic/*": { model: "openai-codex/gpt-5.6-sol", fallbackModels: ["zai/glm-5.3"] },
|
|
229
229
|
},
|
|
230
230
|
thinking: "xhigh",
|
|
231
231
|
tools: ["read", "grep", "bash"],
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
// Lossy and irreversible within a session; disabled by default and gated by a
|
|
10
10
|
// patience counter + the emergency threshold. The summary can be produced
|
|
11
11
|
// either by a deterministic programmatic digest (default) or by a configured
|
|
12
|
-
// list of summarizer models (e.g. a cheap model like zai/glm-5.
|
|
12
|
+
// list of summarizer models (e.g. a cheap model like zai/glm-5.3), with
|
|
13
13
|
// automatic fallback to the programmatic digest on any failure/timeout.
|
|
14
14
|
// ---------------------------------------------------------------------------
|
|
15
15
|
|
|
@@ -72,13 +72,13 @@ export const DEFAULT_PI_TOOLS_SUITE_CONFIG_JSONC = String.raw`{
|
|
|
72
72
|
"maxContextPercent": "30%"
|
|
73
73
|
}
|
|
74
74
|
},
|
|
75
|
-
// glm-5.
|
|
75
|
+
// glm-5.3 reports a ~1M-token window. Even zai/* 16%/30% = 160K/300K is
|
|
76
76
|
// above the ~15% (~150K) point where long sessions degrade, and an
|
|
77
|
-
// observed 14h/273K-token session never crossed 16%. Lower ONLY glm-5.
|
|
77
|
+
// observed 14h/273K-token session never crossed 16%. Lower ONLY glm-5.3
|
|
78
78
|
// within the zai family: 8%/15% (~80K/150K) so nudging starts early and
|
|
79
79
|
// auto-compress fires at the observed degradation point. Other zai/*
|
|
80
80
|
// models keep 16%/30%.
|
|
81
|
-
"zai/glm-5.
|
|
81
|
+
"zai/glm-5.3": {
|
|
82
82
|
"compress": {
|
|
83
83
|
"minContextPercent": "8%",
|
|
84
84
|
"maxContextPercent": "15%",
|
|
@@ -128,7 +128,7 @@ export const DEFAULT_PI_TOOLS_SUITE_CONFIG_JSONC = String.raw`{
|
|
|
128
128
|
"autoCompress": {
|
|
129
129
|
"enabled": false,
|
|
130
130
|
"patience": 2,
|
|
131
|
-
"summarizerModel": ["zai/glm-5.
|
|
131
|
+
"summarizerModel": ["zai/glm-5.3", "zai/glm-4.5-air"],
|
|
132
132
|
"timeoutMs": 20000
|
|
133
133
|
}
|
|
134
134
|
}
|
|
@@ -146,13 +146,13 @@ export const DEFAULT_PI_TOOLS_SUITE_CONFIG_JSONC = String.raw`{
|
|
|
146
146
|
"docs": { "model": "zai/glm-4.5-air", "thinking": "low" },
|
|
147
147
|
"frontend": {
|
|
148
148
|
"model": "antigravity/gemini-3-flash-preview",
|
|
149
|
-
"fallbackModels": ["zai/glm-5.
|
|
149
|
+
"fallbackModels": ["zai/glm-5.3"],
|
|
150
150
|
"thinking": "medium"
|
|
151
151
|
},
|
|
152
152
|
"tests": { "model": "zai/glm-5-turbo", "thinking": "medium" },
|
|
153
|
-
"review": { "model": "zai/glm-5.
|
|
154
|
-
"implement": { "model": "zai/glm-5.
|
|
155
|
-
"deep": { "model": "zai/glm-5.
|
|
153
|
+
"review": { "model": "zai/glm-5.3", "thinking": "high" },
|
|
154
|
+
"implement": { "model": "zai/glm-5.3", "thinking": "high" },
|
|
155
|
+
"deep": { "model": "zai/glm-5.3", "thinking": "high" }
|
|
156
156
|
}
|
|
157
157
|
},
|
|
158
158
|
"gpt": {
|
|
@@ -180,7 +180,7 @@ export const DEFAULT_PI_TOOLS_SUITE_CONFIG_JSONC = String.raw`{
|
|
|
180
180
|
},
|
|
181
181
|
"frontend": {
|
|
182
182
|
"model": "openai-codex/gpt-5.6-terra",
|
|
183
|
-
"fallbackModels": ["antigravity/gemini-3-flash-preview", "zai/glm-5.
|
|
183
|
+
"fallbackModels": ["antigravity/gemini-3-flash-preview", "zai/glm-5.3"],
|
|
184
184
|
"thinking": "medium"
|
|
185
185
|
},
|
|
186
186
|
"tests": {
|
|
@@ -190,17 +190,17 @@ export const DEFAULT_PI_TOOLS_SUITE_CONFIG_JSONC = String.raw`{
|
|
|
190
190
|
},
|
|
191
191
|
"review": {
|
|
192
192
|
"model": "openai-codex/gpt-5.6-sol",
|
|
193
|
-
"fallbackModels": ["zai/glm-5.
|
|
193
|
+
"fallbackModels": ["zai/glm-5.3"],
|
|
194
194
|
"thinking": "high"
|
|
195
195
|
},
|
|
196
196
|
"implement": {
|
|
197
197
|
"model": "openai-codex/gpt-5.6-sol",
|
|
198
|
-
"fallbackModels": ["zai/glm-5.
|
|
198
|
+
"fallbackModels": ["zai/glm-5.3"],
|
|
199
199
|
"thinking": "high"
|
|
200
200
|
},
|
|
201
201
|
"deep": {
|
|
202
202
|
"model": "openai-codex/gpt-5.6-sol",
|
|
203
|
-
"fallbackModels": ["zai/glm-5.
|
|
203
|
+
"fallbackModels": ["zai/glm-5.3"],
|
|
204
204
|
"thinking": "high"
|
|
205
205
|
}
|
|
206
206
|
}
|
|
@@ -230,7 +230,7 @@ export const DEFAULT_PI_TOOLS_SUITE_CONFIG_JSONC = String.raw`{
|
|
|
230
230
|
},
|
|
231
231
|
"frontend": {
|
|
232
232
|
"model": "antigravity/gemini-3.1-pro-preview-customtools",
|
|
233
|
-
"fallbackModels": ["zai/glm-5.
|
|
233
|
+
"fallbackModels": ["zai/glm-5.3"],
|
|
234
234
|
"thinking": "low"
|
|
235
235
|
},
|
|
236
236
|
"tests": {
|
|
@@ -240,17 +240,17 @@ export const DEFAULT_PI_TOOLS_SUITE_CONFIG_JSONC = String.raw`{
|
|
|
240
240
|
},
|
|
241
241
|
"review": {
|
|
242
242
|
"model": "antigravity/antigravity-claude-sonnet-4-6",
|
|
243
|
-
"fallbackModels": ["openai-codex/gpt-5.6-sol", "zai/glm-5.
|
|
243
|
+
"fallbackModels": ["openai-codex/gpt-5.6-sol", "zai/glm-5.3"],
|
|
244
244
|
"thinking": "high"
|
|
245
245
|
},
|
|
246
246
|
"implement": {
|
|
247
247
|
"model": "openai-codex/gpt-5.6-sol",
|
|
248
|
-
"fallbackModels": ["zai/glm-5.
|
|
248
|
+
"fallbackModels": ["zai/glm-5.3"],
|
|
249
249
|
"thinking": "high"
|
|
250
250
|
},
|
|
251
251
|
"deep": {
|
|
252
252
|
"model": "antigravity/antigravity-claude-opus-4-6-thinking",
|
|
253
|
-
"fallbackModels": ["openai-codex/gpt-5.6-sol", "zai/glm-5.
|
|
253
|
+
"fallbackModels": ["openai-codex/gpt-5.6-sol", "zai/glm-5.3"],
|
|
254
254
|
"thinking": "high"
|
|
255
255
|
}
|
|
256
256
|
}
|
|
@@ -278,7 +278,7 @@ export const DEFAULT_PI_TOOLS_SUITE_CONFIG_JSONC = String.raw`{
|
|
|
278
278
|
"frontend": {
|
|
279
279
|
"description": "Use for frontend UI/UX visual work: styling, layout, typography, animation, responsive states, component polish, accessibility. Avoid backend/business logic unless needed for UI behavior.",
|
|
280
280
|
"model": "antigravity/gemini-3-flash-preview",
|
|
281
|
-
"fallbackModels": ["openai-codex/gpt-5.4-mini", "zai/glm-5.
|
|
281
|
+
"fallbackModels": ["openai-codex/gpt-5.4-mini", "zai/glm-5.3"],
|
|
282
282
|
"thinking": "medium",
|
|
283
283
|
"promptAppend": [
|
|
284
284
|
"Act as a frontend UI/UX engineer for visual and product-facing work.",
|
|
@@ -296,33 +296,33 @@ export const DEFAULT_PI_TOOLS_SUITE_CONFIG_JSONC = String.raw`{
|
|
|
296
296
|
"review": {
|
|
297
297
|
"description": "Use for review/audit of existing code or changes: correctness, security, performance, maintainability, API risks, quality. Do not implement new code.",
|
|
298
298
|
"model": "openai-codex/gpt-5.6-sol",
|
|
299
|
-
"fallbackModels": ["zai/glm-5.
|
|
299
|
+
"fallbackModels": ["zai/glm-5.3"],
|
|
300
300
|
"thinking": "high",
|
|
301
301
|
"tools": ["read", "grep"]
|
|
302
302
|
},
|
|
303
303
|
"implement": {
|
|
304
304
|
"description": "Use when the sub-agent should make or plan code changes for a feature, bug fix, or refactor.",
|
|
305
305
|
"model": "openai-codex/gpt-5.6-sol",
|
|
306
|
-
"fallbackModels": ["zai/glm-5.
|
|
306
|
+
"fallbackModels": ["zai/glm-5.3"],
|
|
307
307
|
"thinking": "high"
|
|
308
308
|
},
|
|
309
309
|
"deep": {
|
|
310
310
|
"description": "Use for broad hard reasoning: architecture, system design, cross-module impact, complex tradeoffs.",
|
|
311
311
|
"model": "openai-codex/gpt-5.6-sol",
|
|
312
|
-
"fallbackModels": ["zai/glm-5.
|
|
312
|
+
"fallbackModels": ["zai/glm-5.3"],
|
|
313
313
|
"thinking": "high"
|
|
314
314
|
},
|
|
315
315
|
"oracle": {
|
|
316
316
|
"description": "Oracle: cross-provider flagship second opinion for hard or high-stakes uncertainty. Use sparingly to pressure-test architecture, plans, root-cause hypotheses, risk/security calls, or final recommendations when independent disagreement is valuable. Read-only; advise, do not edit.",
|
|
317
317
|
"model": "openai-codex/gpt-5.6-sol",
|
|
318
|
-
"fallbackModels": ["zai/glm-5.
|
|
318
|
+
"fallbackModels": ["zai/glm-5.3"],
|
|
319
319
|
"thinking": "xhigh",
|
|
320
320
|
"tools": ["read", "grep", "bash"],
|
|
321
321
|
"modelByParent": {
|
|
322
|
-
"zai/*": { "model": "openai-codex/gpt-5.6-sol", "fallbackModels": ["zai/glm-5.
|
|
323
|
-
"openai-codex/*": { "model": "zai/glm-5.
|
|
324
|
-
"antigravity/*": { "model": "zai/glm-5.
|
|
325
|
-
"anthropic/*": { "model": "openai-codex/gpt-5.6-sol", "fallbackModels": ["zai/glm-5.
|
|
322
|
+
"zai/*": { "model": "openai-codex/gpt-5.6-sol", "fallbackModels": ["zai/glm-5.3"] },
|
|
323
|
+
"openai-codex/*": { "model": "zai/glm-5.3", "fallbackModels": ["openai-codex/gpt-5.6-sol"] },
|
|
324
|
+
"antigravity/*": { "model": "zai/glm-5.3", "fallbackModels": ["openai-codex/gpt-5.6-sol"] },
|
|
325
|
+
"anthropic/*": { "model": "openai-codex/gpt-5.6-sol", "fallbackModels": ["zai/glm-5.3"] }
|
|
326
326
|
},
|
|
327
327
|
"promptAppend": "You are an oracle: a flagship model from a different provider giving a second opinion to the parent agent. Give a concise, decisive recommendation with key tradeoffs and risks. Disagree when warranted; do not rubber-stamp. Do not edit unless explicitly asked."
|
|
328
328
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-ui-extend",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.11",
|
|
4
4
|
"description": "Pix: a workspace-first terminal UI for Pi with tabs, readable tool activity, voice input, and bundled agent tools.",
|
|
5
5
|
"private": false,
|
|
6
6
|
"repository": {
|
|
@@ -75,9 +75,9 @@
|
|
|
75
75
|
"prepublishOnly": "npm run check && npm run build:pix && npm run generate-schemas"
|
|
76
76
|
},
|
|
77
77
|
"dependencies": {
|
|
78
|
-
"@earendil-works/pi-ai": "0.84.
|
|
79
|
-
"@earendil-works/pi-coding-agent": "0.84.
|
|
80
|
-
"@earendil-works/pi-tui": "0.84.
|
|
78
|
+
"@earendil-works/pi-ai": "0.84.2",
|
|
79
|
+
"@earendil-works/pi-coding-agent": "0.84.2",
|
|
80
|
+
"@earendil-works/pi-tui": "0.84.2",
|
|
81
81
|
"@mariozechner/clipboard": "^0.3.9",
|
|
82
82
|
"jsonc-parser": "3.3.1",
|
|
83
83
|
"typebox": "1.1.38",
|