mini-coder 0.5.13 → 0.5.14
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/PROGRESS.md +3 -2
- package/README.md +2 -1
- package/package.json +1 -1
- package/src/agent.ts +506 -13
- package/src/assistant-output.ts +73 -0
- package/src/delegation.ts +238 -0
- package/src/headless.ts +12 -39
- package/src/index.ts +191 -11
- package/src/prompt.ts +9 -1
- package/src/session-message.ts +57 -65
- package/src/session.ts +389 -42
- package/src/submit.ts +7 -2
- package/src/tool-delegate.ts +125 -0
- package/src/tool-shell.ts +52 -2
- package/src/tools.ts +331 -6
- package/src/ui/agent.ts +3 -0
- package/src/ui/commands.test.ts +50 -6
- package/src/ui/commands.ts +14 -0
package/src/ui/commands.ts
CHANGED
|
@@ -21,6 +21,8 @@ import { COMMANDS, SKILL_COMMAND } from "../input.ts";
|
|
|
21
21
|
import { connectMcpServer, disconnectMcpServer } from "../mcp.ts";
|
|
22
22
|
import {
|
|
23
23
|
clearConversationState,
|
|
24
|
+
computeSessionContextTokens,
|
|
25
|
+
computeSessionStats,
|
|
24
26
|
forkSession,
|
|
25
27
|
listPromptHistory,
|
|
26
28
|
listSessions,
|
|
@@ -546,6 +548,11 @@ export function createCommandController(
|
|
|
546
548
|
if (picked) {
|
|
547
549
|
state.session = picked;
|
|
548
550
|
replaceConversationState(state, loadMessages(state.db, picked.id));
|
|
551
|
+
state.stats = computeSessionStats(state.db, picked.id);
|
|
552
|
+
state.contextTokens = computeSessionContextTokens(
|
|
553
|
+
state.db,
|
|
554
|
+
picked.id,
|
|
555
|
+
);
|
|
549
556
|
runtime.scrollConversationToBottom();
|
|
550
557
|
}
|
|
551
558
|
}
|
|
@@ -574,6 +581,8 @@ export function createCommandController(
|
|
|
574
581
|
const forked = forkSession(state.db, state.session.id);
|
|
575
582
|
state.session = forked;
|
|
576
583
|
replaceConversationState(state, loadMessages(state.db, forked.id));
|
|
584
|
+
state.stats = computeSessionStats(state.db, forked.id);
|
|
585
|
+
state.contextTokens = computeSessionContextTokens(state.db, forked.id);
|
|
577
586
|
runtime.appendInfoMessage("Forked session.", state);
|
|
578
587
|
};
|
|
579
588
|
|
|
@@ -594,6 +603,11 @@ export function createCommandController(
|
|
|
594
603
|
const removed = undoLastTurn(state.db, state.session.id);
|
|
595
604
|
if (removed) {
|
|
596
605
|
replaceConversationState(state, loadMessages(state.db, state.session.id));
|
|
606
|
+
state.stats = computeSessionStats(state.db, state.session.id);
|
|
607
|
+
state.contextTokens = computeSessionContextTokens(
|
|
608
|
+
state.db,
|
|
609
|
+
state.session.id,
|
|
610
|
+
);
|
|
597
611
|
runtime.scrollConversationToBottom();
|
|
598
612
|
runtime.requestRender("normal");
|
|
599
613
|
}
|