@ashx-j/lunr 0.2.5 → 0.2.8
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/builtin-extensions/pi-subagents/src/extension/control-notices.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/control-notices.js +2 -2
- package/dist/builtin-extensions/pi-subagents/src/extension/control-notices.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/index.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/index.js +1 -7
- package/dist/builtin-extensions/pi-subagents/src/extension/index.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/execution.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/execution.js +21 -0
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/execution.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/shared/types.d.ts +1 -0
- package/dist/builtin-extensions/pi-subagents/src/shared/types.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/shared/types.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/tui/render.d.ts +3 -0
- package/dist/builtin-extensions/pi-subagents/src/tui/render.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/tui/render.js +9 -11
- package/dist/builtin-extensions/pi-subagents/src/tui/render.js.map +1 -1
- package/dist/catalog/models.json +1 -1
- package/dist/catalog/providers/github-copilot.json +1 -1
- package/dist/catalog/providers/google-vertex.json +1 -1
- package/dist/catalog/providers/google.json +1 -1
- package/dist/catalog/providers/nvidia.json +1 -1
- package/dist/catalog/providers/opencode-go.json +1 -1
- package/dist/catalog/providers/opencode.json +1 -1
- package/dist/catalog/providers/openrouter.json +1 -1
- package/dist/catalog/providers/vercel-ai-gateway.json +1 -1
- package/dist/catalog/providers/xai.json +1 -1
- package/dist/catalog/publication.json +3 -3
- package/dist/core/agent-session.d.ts +4 -1
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +26 -4
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/catalog-merge.d.ts +1 -1
- package/dist/core/catalog-merge.d.ts.map +1 -1
- package/dist/core/catalog-merge.js +2 -1
- package/dist/core/catalog-merge.js.map +1 -1
- package/dist/core/rollback.d.ts +1 -1
- package/dist/core/rollback.d.ts.map +1 -1
- package/dist/core/rollback.js +1 -1
- package/dist/core/rollback.js.map +1 -1
- package/dist/core/slash-commands.d.ts.map +1 -1
- package/dist/core/slash-commands.js +2 -1
- package/dist/core/slash-commands.js.map +1 -1
- package/dist/modes/interactive/components/assistant-message.d.ts +6 -1
- package/dist/modes/interactive/components/assistant-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/assistant-message.js +92 -64
- package/dist/modes/interactive/components/assistant-message.js.map +1 -1
- package/dist/modes/interactive/components/thinking-summary.d.ts +4 -4
- package/dist/modes/interactive/components/thinking-summary.d.ts.map +1 -1
- package/dist/modes/interactive/components/thinking-summary.js +7 -5
- package/dist/modes/interactive/components/thinking-summary.js.map +1 -1
- package/dist/modes/interactive/components/thinking-tail.d.ts.map +1 -1
- package/dist/modes/interactive/components/thinking-tail.js +5 -3
- package/dist/modes/interactive/components/thinking-tail.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +2 -0
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +43 -40
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/docs/providers.md +2 -0
- package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
- package/examples/extensions/custom-provider-anthropic/package.json +1 -1
- package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
- package/examples/extensions/gondolin/package-lock.json +2 -2
- package/examples/extensions/gondolin/package.json +1 -1
- package/examples/extensions/sandbox/package-lock.json +2 -2
- package/examples/extensions/sandbox/package.json +1 -1
- package/examples/extensions/with-deps/package-lock.json +2 -2
- package/examples/extensions/with-deps/package.json +1 -1
- package/package.json +4 -4
|
@@ -350,7 +350,7 @@ export class InteractiveMode {
|
|
|
350
350
|
resetPermissions(this.settingsManager.getDefaultPermissionMode());
|
|
351
351
|
// lunr: clear process registry and rollback state
|
|
352
352
|
processRegistry.clearRegistry();
|
|
353
|
-
// lunr: on fork (/rollback,
|
|
353
|
+
// lunr: on fork (/rollback, tree navigation) the snapshots SURVIVE —
|
|
354
354
|
// the caller migrates them to the forked session id (migrateRollbackSession).
|
|
355
355
|
// Any other replacement wipes only the session being torn down.
|
|
356
356
|
if (reason !== "fork") {
|
|
@@ -366,11 +366,6 @@ export class InteractiveMode {
|
|
|
366
366
|
this.version = VERSION;
|
|
367
367
|
this.ui = new TUI(new ProcessTerminal(), this.settingsManager.getShowHardwareCursor());
|
|
368
368
|
this.ui.setClearOnShrink(this.settingsManager.getClearOnShrink());
|
|
369
|
-
this.ui.onTextSelected = (text) => {
|
|
370
|
-
void copyToClipboard(text)
|
|
371
|
-
.then(() => this.showStatus("Copied."))
|
|
372
|
-
.catch((error) => this.showError(error instanceof Error ? error.message : String(error)));
|
|
373
|
-
};
|
|
374
369
|
// lunr: register the permission-mode footer bridge (provider-side: InteractiveMode owns the state).
|
|
375
370
|
registerPermissionModeBridge(() => getPermissionMode());
|
|
376
371
|
registerPermissionModeControlBridge({
|
|
@@ -2300,6 +2295,11 @@ export class InteractiveMode {
|
|
|
2300
2295
|
await this.handleUndoCommand();
|
|
2301
2296
|
return;
|
|
2302
2297
|
}
|
|
2298
|
+
if (text === "/edit") {
|
|
2299
|
+
this.editor.setText("");
|
|
2300
|
+
await this.handleEditCommand();
|
|
2301
|
+
return;
|
|
2302
|
+
}
|
|
2303
2303
|
if (text === "/redo") {
|
|
2304
2304
|
this.editor.setText("");
|
|
2305
2305
|
await this.handleRedoCommand();
|
|
@@ -2475,7 +2475,7 @@ export class InteractiveMode {
|
|
|
2475
2475
|
return;
|
|
2476
2476
|
const opts = this.getSmoothStreamingOptions();
|
|
2477
2477
|
const revealed = sliceMessageContent(target, this.streamingDisplayedLength, opts);
|
|
2478
|
-
this.streamingComponent.updateContent(revealed);
|
|
2478
|
+
this.streamingComponent.updateContent(revealed, { thinkingSource: target });
|
|
2479
2479
|
this.syncRevealedStreamingTools(revealed, target);
|
|
2480
2480
|
this.ui.requestRender();
|
|
2481
2481
|
}
|
|
@@ -2635,7 +2635,7 @@ export class InteractiveMode {
|
|
|
2635
2635
|
this.streamingDisplayedLength = 0;
|
|
2636
2636
|
this.chatContainer.addChild(this.streamingComponent);
|
|
2637
2637
|
if (this.settingsManager.getSmoothStreaming()) {
|
|
2638
|
-
this.streamingComponent.updateContent(sliceMessageContent(this.streamingMessage, 0, this.getSmoothStreamingOptions()));
|
|
2638
|
+
this.streamingComponent.updateContent(sliceMessageContent(this.streamingMessage, 0, this.getSmoothStreamingOptions()), { thinkingSource: this.streamingMessage });
|
|
2639
2639
|
}
|
|
2640
2640
|
else {
|
|
2641
2641
|
this.streamingComponent.updateContent(this.streamingMessage);
|
|
@@ -2721,9 +2721,7 @@ export class InteractiveMode {
|
|
|
2721
2721
|
case "tool_execution_start": {
|
|
2722
2722
|
// If smooth streaming still has leading text unrevealed, flush through
|
|
2723
2723
|
// this tool so the running card is not hidden behind the typewriter.
|
|
2724
|
-
if (this.settingsManager.getSmoothStreaming() &&
|
|
2725
|
-
this.streamingTargetMessage &&
|
|
2726
|
-
this.streamingComponent) {
|
|
2724
|
+
if (this.settingsManager.getSmoothStreaming() && this.streamingTargetMessage && this.streamingComponent) {
|
|
2727
2725
|
const opts = this.getSmoothStreamingOptions();
|
|
2728
2726
|
const needed = countGraphemesBeforeToolCall(this.streamingTargetMessage, event.toolCallId, opts);
|
|
2729
2727
|
if (this.streamingDisplayedLength < needed) {
|
|
@@ -4136,6 +4134,7 @@ export class InteractiveMode {
|
|
|
4136
4134
|
ollama = `ollama-cloud refresh failed: ${error instanceof Error ? error.message : String(error)}`;
|
|
4137
4135
|
}
|
|
4138
4136
|
}
|
|
4137
|
+
this.session.refreshModelFromRegistry();
|
|
4139
4138
|
this.showStatus(formatCatalogRefreshSummary({
|
|
4140
4139
|
official: result.official
|
|
4141
4140
|
? {
|
|
@@ -5477,16 +5476,15 @@ export class InteractiveMode {
|
|
|
5477
5476
|
this.setExtensionStatus("research", "research ● active");
|
|
5478
5477
|
await this.sendUserMessageAfterDeferredBuiltins(buildResearchPrompt(question, depth, breadth));
|
|
5479
5478
|
}
|
|
5480
|
-
// lunr: /undo
|
|
5481
|
-
//
|
|
5482
|
-
//
|
|
5483
|
-
|
|
5484
|
-
async handleUndoCommand() {
|
|
5479
|
+
// lunr: /undo and /edit rewind the same session via navigateTree (no fork).
|
|
5480
|
+
// /undo leaves the editor alone; /edit pastes the undone user text. /redo
|
|
5481
|
+
// pops the previous leaf and navigates back.
|
|
5482
|
+
async rewindLastTurn(command) {
|
|
5485
5483
|
if (this.session.isStreaming) {
|
|
5486
|
-
this.showWarning(
|
|
5487
|
-
return;
|
|
5484
|
+
this.showWarning(`Wait for the current response to finish before running /${command}.`);
|
|
5485
|
+
return undefined;
|
|
5488
5486
|
}
|
|
5489
|
-
|
|
5487
|
+
const nothingLabel = command === "undo" ? "Nothing to undo" : "Nothing to edit";
|
|
5490
5488
|
const branch = this.sessionManager.getBranch();
|
|
5491
5489
|
let lastUserIndex = -1;
|
|
5492
5490
|
for (let i = branch.length - 1; i >= 0; i--) {
|
|
@@ -5497,17 +5495,16 @@ export class InteractiveMode {
|
|
|
5497
5495
|
}
|
|
5498
5496
|
}
|
|
5499
5497
|
if (lastUserIndex === -1) {
|
|
5500
|
-
this.showStatus(
|
|
5501
|
-
return;
|
|
5498
|
+
this.showStatus(nothingLabel);
|
|
5499
|
+
return undefined;
|
|
5502
5500
|
}
|
|
5503
5501
|
const lastUser = branch[lastUserIndex];
|
|
5504
5502
|
const leafId = this.sessionManager.getLeafId();
|
|
5505
5503
|
let targetId;
|
|
5506
5504
|
if (lastUser.id === leafId) {
|
|
5507
|
-
// User message with no response yet (e.g. aborted stream) — undo to its parent.
|
|
5508
5505
|
if (!lastUser.parentId) {
|
|
5509
|
-
this.showStatus(
|
|
5510
|
-
return;
|
|
5506
|
+
this.showStatus(nothingLabel);
|
|
5507
|
+
return undefined;
|
|
5511
5508
|
}
|
|
5512
5509
|
targetId = lastUser.parentId;
|
|
5513
5510
|
}
|
|
@@ -5515,31 +5512,37 @@ export class InteractiveMode {
|
|
|
5515
5512
|
targetId = lastUser.id;
|
|
5516
5513
|
}
|
|
5517
5514
|
try {
|
|
5518
|
-
|
|
5519
|
-
|
|
5520
|
-
|
|
5521
|
-
|
|
5522
|
-
|
|
5523
|
-
|
|
5524
|
-
|
|
5525
|
-
this.showStatus("Undo cancelled");
|
|
5526
|
-
return;
|
|
5515
|
+
const result = await this.session.navigateTree(targetId, {});
|
|
5516
|
+
if (result.cancelled) {
|
|
5517
|
+
this.showStatus(command === "undo" ? "Undo cancelled" : "Edit cancelled");
|
|
5518
|
+
return undefined;
|
|
5519
|
+
}
|
|
5520
|
+
if (leafId) {
|
|
5521
|
+
this.redoStack.push(leafId);
|
|
5527
5522
|
}
|
|
5528
|
-
migrateRollbackSession(oldSid, this.sessionManager.getSessionId());
|
|
5529
|
-
// /redo cannot redo across a fork — clear the ephemeral redo stack.
|
|
5530
|
-
this.redoStack.length = 0;
|
|
5531
5523
|
this.chatContainer.clear();
|
|
5532
5524
|
this.renderInitialMessages();
|
|
5533
|
-
if (forkResult.selectedText && !this.editor.getText().trim()) {
|
|
5534
|
-
this.editor.setText(forkResult.selectedText);
|
|
5535
|
-
}
|
|
5536
|
-
this.showStatus("Undone — branched session created (persistent). /redo unavailable after a fork.");
|
|
5537
5525
|
void this.flushCompactionQueue({ willRetry: false });
|
|
5526
|
+
return { editorText: result.editorText };
|
|
5538
5527
|
}
|
|
5539
5528
|
catch (error) {
|
|
5540
5529
|
this.showError(error instanceof Error ? error.message : String(error));
|
|
5530
|
+
return undefined;
|
|
5541
5531
|
}
|
|
5542
5532
|
}
|
|
5533
|
+
async handleUndoCommand() {
|
|
5534
|
+
const result = await this.rewindLastTurn("undo");
|
|
5535
|
+
if (!result)
|
|
5536
|
+
return;
|
|
5537
|
+
this.showStatus("Undone. /redo to restore.");
|
|
5538
|
+
}
|
|
5539
|
+
async handleEditCommand() {
|
|
5540
|
+
const result = await this.rewindLastTurn("edit");
|
|
5541
|
+
if (!result)
|
|
5542
|
+
return;
|
|
5543
|
+
this.editor.setText(result.editorText ?? "");
|
|
5544
|
+
this.showStatus("Editing last message. /redo to restore.");
|
|
5545
|
+
}
|
|
5543
5546
|
async handleRedoCommand() {
|
|
5544
5547
|
if (this.session.isStreaming) {
|
|
5545
5548
|
this.showWarning("Wait for the current response to finish before running /redo.");
|