@oh-my-pi/pi-coding-agent 15.11.8 → 15.12.1
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 +46 -2
- package/dist/cli.js +8095 -7704
- package/dist/types/collab/crypto.d.ts +1 -6
- package/dist/types/collab/guest.d.ts +2 -0
- package/dist/types/collab/host.d.ts +16 -0
- package/dist/types/collab/protocol.d.ts +14 -1
- package/dist/types/config/settings-schema.d.ts +52 -6
- package/dist/types/export/custom-share.d.ts +1 -2
- package/dist/types/export/html/index.d.ts +39 -1
- package/dist/types/export/share.d.ts +43 -0
- package/dist/types/main.d.ts +2 -0
- package/dist/types/modes/components/agent-hub.d.ts +19 -1
- package/dist/types/modes/components/status-line/component.d.ts +6 -1
- package/dist/types/modes/components/status-line/types.d.ts +2 -0
- package/dist/types/modes/controllers/event-controller.d.ts +7 -0
- package/dist/types/modes/controllers/input-controller.d.ts +1 -1
- package/dist/types/modes/controllers/session-focus-controller.d.ts +31 -0
- package/dist/types/modes/interactive-mode.d.ts +9 -0
- package/dist/types/modes/session-observer-registry.d.ts +7 -0
- package/dist/types/modes/theme/theme.d.ts +2 -1
- package/dist/types/modes/types.d.ts +12 -0
- package/dist/types/session/agent-session.d.ts +2 -0
- package/dist/types/session/codex-auto-reset.d.ts +8 -4
- package/dist/types/task/executor.d.ts +7 -0
- package/dist/types/task/types.d.ts +9 -0
- package/dist/types/tools/tool-result.d.ts +2 -0
- package/package.json +13 -14
- package/scripts/build-binary.ts +4 -0
- package/scripts/bundle-dist.ts +4 -0
- package/scripts/generate-share-viewer.ts +34 -0
- package/src/collab/crypto.ts +10 -4
- package/src/collab/guest.ts +31 -2
- package/src/collab/host.ts +73 -11
- package/src/collab/protocol.ts +48 -7
- package/src/commands/join.ts +1 -1
- package/src/config/settings-schema.ts +54 -5
- package/src/config/settings.ts +12 -0
- package/src/export/custom-share.ts +1 -1
- package/src/export/html/index.ts +122 -17
- package/src/export/html/share-loader.js +102 -0
- package/src/export/html/template.css +745 -459
- package/src/export/html/template.html +6 -3
- package/src/export/html/template.js +240 -915
- package/src/export/html/tool-views.generated.js +38 -0
- package/src/export/share.ts +268 -0
- package/src/internal-urls/docs-index.generated.ts +73 -73
- package/src/lsp/index.ts +11 -0
- package/src/main.ts +22 -9
- package/src/modes/components/agent-hub.ts +541 -410
- package/src/modes/components/status-line/component.ts +38 -5
- package/src/modes/components/status-line/segments.ts +5 -1
- package/src/modes/components/status-line/types.ts +2 -0
- package/src/modes/components/tips.txt +3 -1
- package/src/modes/controllers/command-controller.ts +55 -96
- package/src/modes/controllers/event-controller.ts +45 -16
- package/src/modes/controllers/input-controller.ts +104 -4
- package/src/modes/controllers/selector-controller.ts +11 -15
- package/src/modes/controllers/session-focus-controller.ts +112 -0
- package/src/modes/interactive-mode.ts +44 -2
- package/src/modes/session-observer-registry.ts +11 -0
- package/src/modes/theme/theme.ts +6 -0
- package/src/modes/types.ts +12 -0
- package/src/modes/utils/ui-helpers.ts +16 -13
- package/src/prompts/tools/job.md +1 -1
- package/src/session/agent-session.ts +87 -19
- package/src/session/codex-auto-reset.ts +23 -11
- package/src/slash-commands/builtin-registry.ts +62 -35
- package/src/task/executor.ts +14 -0
- package/src/task/index.ts +5 -1
- package/src/task/render.ts +76 -5
- package/src/task/types.ts +9 -0
- package/src/tiny/worker.ts +17 -95
- package/src/tools/ast-grep.ts +3 -1
- package/src/tools/find.ts +3 -1
- package/src/tools/gh.ts +20 -6
- package/src/tools/irc.ts +4 -0
- package/src/tools/job.ts +18 -13
- package/src/tools/memory-recall.ts +2 -0
- package/src/tools/search.ts +3 -1
- package/src/tools/tool-result.ts +8 -0
- package/dist/tokenizers.linux-x64-gnu-xcjh3jwk.node +0 -0
- package/dist/types/export/html/template.generated.d.ts +0 -1
- package/dist/types/export/html/template.macro.d.ts +0 -5
- package/dist/types/tiny/compiled-runtime.d.ts +0 -35
- package/scripts/generate-template.ts +0 -33
- package/src/bun-imports.d.ts +0 -28
- package/src/export/html/template.generated.ts +0 -2
- package/src/export/html/template.macro.ts +0 -25
- package/src/tiny/compiled-runtime.ts +0 -179
package/src/lsp/index.ts
CHANGED
|
@@ -2132,6 +2132,11 @@ export class LspTool implements AgentTool<typeof lspSchema, LspToolDetails, Them
|
|
|
2132
2132
|
const position = { line: resolvedLine - 1, character: resolvedCharacter };
|
|
2133
2133
|
|
|
2134
2134
|
let output: string;
|
|
2135
|
+
// Set on bare empty-lookup outcomes (no definition/references/…): the
|
|
2136
|
+
// result carries no information once consumed, so compaction may elide
|
|
2137
|
+
// it. Clean diagnostics runs are NOT useless — they are verification
|
|
2138
|
+
// evidence.
|
|
2139
|
+
let useless = false;
|
|
2135
2140
|
|
|
2136
2141
|
if (needsProjectIndex && !isRustAnalyzerServer) {
|
|
2137
2142
|
await waitForProjectLoaded(client, signal);
|
|
@@ -2157,6 +2162,7 @@ export class LspTool implements AgentTool<typeof lspSchema, LspToolDetails, Them
|
|
|
2157
2162
|
|
|
2158
2163
|
if (locations.length === 0) {
|
|
2159
2164
|
output = "No definition found";
|
|
2165
|
+
useless = true;
|
|
2160
2166
|
} else {
|
|
2161
2167
|
const lines = await Promise.all(
|
|
2162
2168
|
locations.map(location => formatLocationWithContext(location, this.session.cwd)),
|
|
@@ -2181,6 +2187,7 @@ export class LspTool implements AgentTool<typeof lspSchema, LspToolDetails, Them
|
|
|
2181
2187
|
|
|
2182
2188
|
if (locations.length === 0) {
|
|
2183
2189
|
output = "No type definition found";
|
|
2190
|
+
useless = true;
|
|
2184
2191
|
} else {
|
|
2185
2192
|
const lines = await Promise.all(
|
|
2186
2193
|
locations.map(location => formatLocationWithContext(location, this.session.cwd)),
|
|
@@ -2205,6 +2212,7 @@ export class LspTool implements AgentTool<typeof lspSchema, LspToolDetails, Them
|
|
|
2205
2212
|
|
|
2206
2213
|
if (locations.length === 0) {
|
|
2207
2214
|
output = "No implementation found";
|
|
2215
|
+
useless = true;
|
|
2208
2216
|
} else {
|
|
2209
2217
|
const lines = await Promise.all(
|
|
2210
2218
|
locations.map(location => formatLocationWithContext(location, this.session.cwd)),
|
|
@@ -2242,6 +2250,7 @@ export class LspTool implements AgentTool<typeof lspSchema, LspToolDetails, Them
|
|
|
2242
2250
|
|
|
2243
2251
|
if (!result || result.length === 0) {
|
|
2244
2252
|
output = "No references found";
|
|
2253
|
+
useless = true;
|
|
2245
2254
|
} else {
|
|
2246
2255
|
const contextualReferences = result.slice(0, REFERENCE_CONTEXT_LIMIT);
|
|
2247
2256
|
const plainReferences = result.slice(REFERENCE_CONTEXT_LIMIT);
|
|
@@ -2381,6 +2390,7 @@ export class LspTool implements AgentTool<typeof lspSchema, LspToolDetails, Them
|
|
|
2381
2390
|
|
|
2382
2391
|
if (!result || result.length === 0) {
|
|
2383
2392
|
output = "No symbols found";
|
|
2393
|
+
useless = true;
|
|
2384
2394
|
} else {
|
|
2385
2395
|
const relPath = formatPathRelativeToCwd(targetFile, this.session.cwd);
|
|
2386
2396
|
if ("selectionRange" in result[0]) {
|
|
@@ -2444,6 +2454,7 @@ export class LspTool implements AgentTool<typeof lspSchema, LspToolDetails, Them
|
|
|
2444
2454
|
return {
|
|
2445
2455
|
content: [{ type: "text", text: output }],
|
|
2446
2456
|
details: { serverName, action, success: true, request: params },
|
|
2457
|
+
...(useless ? { useless: true } : {}),
|
|
2447
2458
|
};
|
|
2448
2459
|
} catch (err) {
|
|
2449
2460
|
if (err instanceof ToolError) throw err;
|
package/src/main.ts
CHANGED
|
@@ -244,6 +244,22 @@ export interface InteractiveModeNotify {
|
|
|
244
244
|
message: string;
|
|
245
245
|
}
|
|
246
246
|
|
|
247
|
+
export function buildModelScopeNotification(
|
|
248
|
+
scopedModelsForDisplay: readonly Pick<ScopedModel, "model" | "thinkingLevel" | "explicitThinkingLevel">[],
|
|
249
|
+
startupQuiet: boolean,
|
|
250
|
+
): InteractiveModeNotify | null {
|
|
251
|
+
if (startupQuiet || scopedModelsForDisplay.length === 0) {
|
|
252
|
+
return null;
|
|
253
|
+
}
|
|
254
|
+
const modelList = scopedModelsForDisplay
|
|
255
|
+
.map(scopedModel => {
|
|
256
|
+
const thinkingStr =
|
|
257
|
+
scopedModel.explicitThinkingLevel && scopedModel.thinkingLevel ? `:${scopedModel.thinkingLevel}` : "";
|
|
258
|
+
return `${scopedModel.model.id}${thinkingStr}`;
|
|
259
|
+
})
|
|
260
|
+
.join(", ");
|
|
261
|
+
return { kind: "info", message: `Model scope: ${modelList} (Ctrl+P to cycle)` };
|
|
262
|
+
}
|
|
247
263
|
export async function submitInteractiveInput(
|
|
248
264
|
mode: Pick<
|
|
249
265
|
InteractiveMode,
|
|
@@ -1267,18 +1283,15 @@ export async function runRootCommand(
|
|
|
1267
1283
|
const versionCheckPromise = checkForNewVersion(VERSION).catch(() => undefined);
|
|
1268
1284
|
const changelogMarkdown = await logger.time("main:getChangelogForDisplay", getChangelogForDisplay, parsedArgs);
|
|
1269
1285
|
|
|
1270
|
-
const
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
return `${scopedModel.model.id}${thinkingStr}`;
|
|
1276
|
-
})
|
|
1277
|
-
.join(", ");
|
|
1286
|
+
const modelScopeNotification = buildModelScopeNotification(
|
|
1287
|
+
scopedModels,
|
|
1288
|
+
settingsInstance.get("startup.quiet"),
|
|
1289
|
+
);
|
|
1290
|
+
if (modelScopeNotification) {
|
|
1278
1291
|
// Routed through the TUI (not stdout): the startup capture owns the
|
|
1279
1292
|
// terminal in raw mode here, and the TUI's first clearScrollback paint
|
|
1280
1293
|
// would wipe a pre-TUI line anyway.
|
|
1281
|
-
notifs.push(
|
|
1294
|
+
notifs.push(modelScopeNotification);
|
|
1282
1295
|
}
|
|
1283
1296
|
|
|
1284
1297
|
if ($env.PI_TIMING) {
|