minicode-ai 0.11.1 → 0.13.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 +89 -0
- package/LICENSE +21 -21
- package/README.md +4 -4
- package/cli/args.ts +46 -0
- package/cli/commands/acp.ts +163 -10
- package/cli/commands/config.ts +33 -18
- package/cli/commands/daemon.ts +515 -0
- package/cli/commands/exec.ts +145 -53
- package/cli/commands/openwork.ts +986 -0
- package/cli/commands/sessions.ts +4 -1
- package/cli/commands/stats.ts +34 -4
- package/cli/commands.ts +217 -2
- package/cli/index.ts +146 -14
- package/cli/recovery-warning.ts +115 -0
- package/cli/router.ts +32 -1
- package/cli/setup.ts +2332 -171
- package/cli/tui.ts +113 -7
- package/docs/OUTPUT_ARCHITECTURE_AUDIT.md +489 -0
- package/docs/OUTPUT_EVENT_MODEL.md +289 -0
- package/docs/OUTPUT_IMPLEMENTATION_PLAN.md +391 -0
- package/docs/OUTPUT_PROTOCOL_SPEC.md +285 -0
- package/docs/OUTPUT_RENDERING_SPEC.md +248 -0
- package/docs/OUTPUT_UX_RULES.md +449 -0
- package/docs/PLAN_UIUX_V6.md +2 -2
- package/docs/README.md +4 -3
- package/docs/TERMINAL_CONTRACT.md +278 -71
- package/docs/architecture.md +89 -7
- package/docs/changelog.md +1 -1
- package/docs/choosing-mode.md +2 -2
- package/docs/cli.md +9 -5
- package/docs/concepts.md +1 -1
- package/docs/contributing.md +9 -2
- package/docs/environment.md +6 -2
- package/docs/exec.md +46 -5
- package/docs/memory-sessions.md +2 -0
- package/docs/policy-sandbox.md +1 -1
- package/docs/pricing-budget.md +1 -1
- package/docs/quickstart.md +2 -2
- package/docs/repl.md +6 -2
- package/docs/security-model.md +1 -1
- package/docs/security.md +1 -1
- package/docs/skills.md +2 -2
- package/docs/terminal.md +9 -5
- package/docs/tools.md +1 -1
- package/package.json +35 -5
- package/src/app/session.ts +261 -15
- package/src/app/tool-layer.ts +94 -7
- package/src/daemon/approvals.ts +361 -0
- package/src/daemon/capability.ts +145 -0
- package/src/daemon/children.ts +142 -0
- package/src/daemon/client.ts +267 -0
- package/src/daemon/control.ts +350 -0
- package/src/daemon/discovery.ts +234 -0
- package/src/daemon/feed.ts +155 -0
- package/src/daemon/framing.ts +94 -0
- package/src/daemon/host.ts +316 -0
- package/src/daemon/protocol.ts +217 -0
- package/src/daemon/resource.ts +170 -0
- package/src/daemon/sanitize.ts +57 -0
- package/src/daemon/server.ts +627 -0
- package/src/daemon/store.ts +317 -0
- package/src/daemon/subscription.ts +270 -0
- package/src/daemon/telemetry.ts +81 -0
- package/src/hooks/run.ts +12 -1
- package/src/lib/atomic-write.ts +29 -3
- package/src/lib/db-path.ts +26 -0
- package/src/lib/keystore.ts +544 -42
- package/src/lib/net.ts +43 -1
- package/src/lib/safe-open.ts +116 -1
- package/src/lib/session-id.ts +15 -0
- package/src/lsp/client.ts +123 -5
- package/src/mcp/client.ts +139 -17
- package/src/mcp/server.ts +177 -50
- package/src/mcp/transport.ts +16 -19
- package/src/memory/vector.ts +770 -55
- package/src/policy/allowlist.ts +14 -2
- package/src/policy/bash-guard.ts +105 -10
- package/src/policy/compaction.ts +82 -5
- package/src/policy/consequence-engine.ts +220 -0
- package/src/policy/context.ts +132 -0
- package/src/policy/executor.ts +187 -121
- package/src/policy/no-progress.ts +559 -0
- package/src/policy/permission.ts +4 -8
- package/src/policy/pricing.ts +17 -3
- package/src/policy/scrub.ts +69 -2
- package/src/policy/tool-contract.ts +515 -0
- package/src/policy/usage.ts +310 -24
- package/src/policy/verifier.ts +6 -3
- package/src/policy/work-mode.ts +182 -0
- package/src/presentation/adapter.ts +533 -26
- package/src/presentation/events.ts +151 -0
- package/src/presentation/model.ts +180 -27
- package/src/presentation/projection.ts +858 -0
- package/src/presentation/reducer.ts +645 -310
- package/src/presentation/store.ts +12 -7
- package/src/providers/anthropic.ts +18 -10
- package/src/providers/responses.ts +2 -2
- package/src/runtime/capability.ts +409 -0
- package/src/runtime/child-execution.ts +274 -0
- package/src/runtime/composition.ts +958 -0
- package/src/runtime/dispatch.ts +591 -0
- package/src/runtime/execution-backend.ts +632 -0
- package/src/runtime/execution-events.ts +272 -0
- package/src/runtime/execution-id.ts +230 -0
- package/src/runtime/execution-journal.ts +926 -0
- package/src/runtime/execution-kernel.ts +456 -0
- package/src/runtime/execution-registry.ts +379 -0
- package/src/runtime/process-supervision.ts +276 -0
- package/src/runtime/production-execution.ts +551 -0
- package/src/runtime/production-runtime.ts +217 -0
- package/src/runtime/recovery-safety.ts +70 -0
- package/src/runtime/recovery.ts +477 -0
- package/src/runtime/runtime-capabilities.ts +179 -0
- package/src/runtime/runtime-diagnostics.ts +141 -0
- package/src/runtime/runtime-host.ts +365 -0
- package/src/runtime/runtime-status-facts.ts +222 -0
- package/src/runtime/runtime-status-provider.ts +74 -0
- package/src/runtime/runtime-status.ts +459 -0
- package/src/runtime/runtime-task-admission.ts +101 -0
- package/src/runtime/supervisor.ts +444 -0
- package/src/session/authority.ts +168 -0
- package/src/session/checkpoint.ts +88 -1
- package/src/session/context-adapter.ts +251 -0
- package/src/session/context-assembly.ts +242 -0
- package/src/session/context-identity.ts +389 -0
- package/src/session/context-projection.ts +248 -0
- package/src/session/context-selector.ts +500 -0
- package/src/session/cross-session-adoption.ts +249 -0
- package/src/session/full-history-fold.ts +171 -0
- package/src/session/identity.ts +192 -0
- package/src/session/journal.ts +805 -102
- package/src/session/open-work-intent.ts +732 -0
- package/src/session/open-work.ts +767 -0
- package/src/session/pending-tools.ts +94 -0
- package/src/session/persistence.ts +3569 -127
- package/src/session/runtime-header.ts +208 -0
- package/src/session/shadow-git.ts +13 -5
- package/src/session/verification.ts +1623 -0
- package/src/task/assignment.ts +136 -0
- package/src/task/autonomous-adapter.ts +168 -0
- package/src/task/autonomous-context.ts +630 -0
- package/src/task/autonomous-policy.ts +490 -0
- package/src/task/continuity.ts +179 -0
- package/src/task/execution-cancellation.ts +165 -0
- package/src/task/graph-validate.ts +379 -0
- package/src/task/graph.ts +305 -0
- package/src/task/identity.ts +230 -0
- package/src/task/model.ts +417 -0
- package/src/task/production-scheduler.ts +293 -0
- package/src/task/readiness.ts +229 -0
- package/src/task/scheduler-observability.ts +387 -0
- package/src/task/scheduler.ts +1197 -0
- package/src/task/scheduling-policy.ts +165 -0
- package/src/task/session-authority.ts +148 -0
- package/src/task/session-ownership.ts +211 -0
- package/src/task/store.ts +2887 -0
- package/src/task/sync.ts +343 -0
- package/src/task/trigger.ts +260 -0
- package/src/tools/bash.ts +377 -211
- package/src/tools/code_run.ts +1 -1
- package/src/tools/delete_file.ts +1 -1
- package/src/tools/edit.ts +33 -6
- package/src/tools/evidence.ts +30 -0
- package/src/tools/git.ts +4 -4
- package/src/tools/glob.ts +12 -3
- package/src/tools/grep.ts +1 -1
- package/src/tools/lsp.ts +4 -4
- package/src/tools/mcp_call.ts +11 -4
- package/src/tools/memory.ts +153 -18
- package/src/tools/move_file.ts +1 -1
- package/src/tools/patch.ts +1 -1
- package/src/tools/read_file.ts +1 -1
- package/src/tools/read_image.ts +1 -1
- package/src/tools/submit_result.ts +1 -1
- package/src/tools/task.ts +437 -41
- package/src/tools/todo.ts +662 -35
- package/src/tools/web_fetch.ts +4 -2
- package/src/tools/web_search.ts +9 -3
- package/src/tools/write_file.ts +1 -1
- package/src/ui/assistant/simple.ts +123 -50
- package/src/ui/assistant/turn-status.ts +17 -3
- package/src/ui/contract.ts +184 -0
- package/src/ui/footer.ts +52 -19
- package/src/ui/i18n/en.ts +58 -6
- package/src/ui/i18n/id.ts +58 -6
- package/src/ui/input/prompt-engine.ts +120 -25
- package/src/ui/render/errors.ts +39 -1
- package/src/ui/render/markdown-table.ts +455 -0
- package/src/ui/render/markdown.ts +22 -1
- package/src/ui/render/table-grid.ts +184 -0
- package/src/ui/render/table.ts +15 -76
- package/src/ui/runtime/screen.ts +7 -2
- package/src/ui/runtime/statusline.ts +25 -6
- package/src/ui/tui/app.ts +507 -169
- package/src/ui/tui/transcript.ts +531 -89
- package/vendor/minicore/VENDOR.md +1 -1
- package/vendor/minicore/src/core/budget.ts +25 -25
- package/vendor/minicore/src/core/compact.ts +75 -75
- package/vendor/minicore/src/core/errors.ts +59 -59
- package/vendor/minicore/src/core/events.ts +73 -73
- package/vendor/minicore/src/core/executor.ts +139 -139
- package/vendor/minicore/src/core/history.ts +31 -31
- package/vendor/minicore/src/core/index.ts +41 -41
- package/vendor/minicore/src/core/loop.ts +355 -355
- package/vendor/minicore/src/core/permission.ts +22 -22
- package/vendor/minicore/src/core/provider.ts +39 -39
- package/vendor/minicore/src/core/recovery.ts +35 -35
- package/vendor/minicore/src/core/session.ts +327 -327
- package/vendor/minicore/src/core/snapshot.ts +146 -146
- package/vendor/minicore/src/core/tokens.ts +107 -107
- package/vendor/minicore/src/core/tool.ts +115 -115
- package/vendor/minicore/src/core/types.ts +50 -50
- package/vendor/minicore/src/providers/openai-compat.ts +417 -417
- package/AGENTS.md +0 -45
- package/PLAN.md +0 -491
- package/docs/ARCHITECTURE.html +0 -1248
- package/docs/CONTROL-PLANE-MAP.md +0 -139
- package/docs/HARNESS.md +0 -150
- package/docs/SUMMARY.md +0 -52
- package/docs/UI_RENDER_PIPELINE.md +0 -169
- package/docs/USAGE.md +0 -11
package/cli/tui.ts
CHANGED
|
@@ -14,12 +14,21 @@
|
|
|
14
14
|
// modal) — transkrip fullscreen SUDAH permukaan baca; modal untuk info
|
|
15
15
|
// statis hanya menambah langkah. /model & /provider & /sessions = popup
|
|
16
16
|
// komposit (butuh interaksi pilih).
|
|
17
|
-
// - busy = input beku total kecuali abort (Esc
|
|
17
|
+
// - busy = input beku total kecuali abort (Esc) dan scroll.
|
|
18
18
|
import { expandMentions } from "../src/app/mentions.ts"
|
|
19
19
|
import { budgetStatus } from "../src/policy/usage.ts"
|
|
20
|
+
import {
|
|
21
|
+
describeActivity,
|
|
22
|
+
elapsedVisible,
|
|
23
|
+
matchTurnBySummary,
|
|
24
|
+
} from "../src/presentation/projection.ts"
|
|
20
25
|
import { redoLastCheckpoint, undoLastCheckpoint } from "../src/session/checkpoint.ts"
|
|
21
26
|
import { renderSkill } from "../src/skills/loader.ts"
|
|
22
|
-
import {
|
|
27
|
+
import {
|
|
28
|
+
getLastTurnTexts,
|
|
29
|
+
MAX_COPY_TURNS,
|
|
30
|
+
writeClipboardOsc52,
|
|
31
|
+
} from "../src/ui/assistant/simple.ts"
|
|
23
32
|
import type { UiBus } from "../src/ui/contract.ts"
|
|
24
33
|
import { t } from "../src/ui/i18n/locale.ts"
|
|
25
34
|
import { loadHistory } from "../src/ui/input/input.ts"
|
|
@@ -35,6 +44,7 @@ import { setReasoningVisible } from "../src/ui/render/reasoning.ts"
|
|
|
35
44
|
import { c } from "../src/ui/render/theme.ts"
|
|
36
45
|
import { TuiApp, type TuiHost } from "../src/ui/tui/app.ts"
|
|
37
46
|
import { Transcript } from "../src/ui/tui/transcript.ts"
|
|
47
|
+
import { parseWorkModeValue } from "./args.ts"
|
|
38
48
|
import {
|
|
39
49
|
BUILTIN_COMMANDS,
|
|
40
50
|
type CommandContext,
|
|
@@ -99,6 +109,7 @@ export async function runTui(ctx: CliSession): Promise<void> {
|
|
|
99
109
|
modelRef,
|
|
100
110
|
permissionMode,
|
|
101
111
|
permissions,
|
|
112
|
+
workModeControl,
|
|
102
113
|
sessionTools,
|
|
103
114
|
allLoadedSkills,
|
|
104
115
|
allowLocalConfig,
|
|
@@ -108,6 +119,8 @@ export async function runTui(ctx: CliSession): Promise<void> {
|
|
|
108
119
|
persistCurrent,
|
|
109
120
|
runPromptWithVerify,
|
|
110
121
|
close,
|
|
122
|
+
productionScheduler,
|
|
123
|
+
schedulerObservability,
|
|
111
124
|
} = ctx
|
|
112
125
|
const { session } = ctx
|
|
113
126
|
const getPresentationSnapshot = () =>
|
|
@@ -128,15 +141,40 @@ export async function runTui(ctx: CliSession): Promise<void> {
|
|
|
128
141
|
setConfigLocale((await loadLang().catch(() => undefined)) ?? null)
|
|
129
142
|
} catch {}
|
|
130
143
|
|
|
144
|
+
// Kebijakan proyeksi kanonik di-inject di sini (batas lapisan: src/ui
|
|
145
|
+
// tidak boleh impor src/presentation).
|
|
131
146
|
const transcript = new Transcript(session.events as unknown as UiBus, {
|
|
132
147
|
getSnapshot: getPresentationSnapshot,
|
|
133
148
|
onPresentationEvent: ctx.onPresentationEvent,
|
|
149
|
+
policy: {
|
|
150
|
+
describeActivity,
|
|
151
|
+
matchTurn: matchTurnBySummary,
|
|
152
|
+
elapsedVisible,
|
|
153
|
+
},
|
|
134
154
|
})
|
|
135
155
|
|
|
136
156
|
const commandCtx: CommandContext = {
|
|
137
157
|
cwd,
|
|
138
158
|
sessionId,
|
|
139
159
|
allowLocalConfig,
|
|
160
|
+
// [P1 Hygiene F1b] Mode runtime sesi ini — diteruskan ke proses popup-resume
|
|
161
|
+
// agar owned/constructed tidak turun diam-diam menjadi off.
|
|
162
|
+
runtimeMode: ctx.runtimeMode,
|
|
163
|
+
// [PHASE 6AB] THE operator control surface. `/scheduler` is the single
|
|
164
|
+
// production-reachable path to `fire()` and to `stop()`; 6AA proved nothing
|
|
165
|
+
// else could reach either. Both objects belong to THIS session, so the command
|
|
166
|
+
// cannot address another session's Scheduler (section 12).
|
|
167
|
+
//
|
|
168
|
+
// Omitted entirely when absent, so the command reports "unavailable" - a
|
|
169
|
+
// different and more honest answer than "off".
|
|
170
|
+
...(productionScheduler && schedulerObservability
|
|
171
|
+
? {
|
|
172
|
+
scheduler: {
|
|
173
|
+
handle: productionScheduler,
|
|
174
|
+
observability: schedulerObservability,
|
|
175
|
+
},
|
|
176
|
+
}
|
|
177
|
+
: {}),
|
|
140
178
|
get currentModel() {
|
|
141
179
|
return modelRef.current ?? cfg.providers[0]?.models[0]
|
|
142
180
|
},
|
|
@@ -159,6 +197,25 @@ export async function runTui(ctx: CliSession): Promise<void> {
|
|
|
159
197
|
},
|
|
160
198
|
}
|
|
161
199
|
|
|
200
|
+
// [PHASE 6AB] Live scheduler notices -> transcript as SYSTEM entries.
|
|
201
|
+
//
|
|
202
|
+
// [DESIGN DECISION] `pushInfo` appends with `kind: "system"`, which is a
|
|
203
|
+
// distinct transcript kind from `user`/`assistant`/`activity`/`approval`. That
|
|
204
|
+
// is exactly the separation §8 asks for: a scheduler lifecycle line is NOT a
|
|
205
|
+
// user turn, NOT assistant prose, and NOT tool output. Nothing here synthesises
|
|
206
|
+
// a model message, and no tool result is duplicated — these lines originate in
|
|
207
|
+
// `Scheduler.emit`/`TriggerCoordinator.emit` and are passed through verbatim.
|
|
208
|
+
//
|
|
209
|
+
// [DESIGN DECISION] Attached HERE, after the Transcript exists, rather than in
|
|
210
|
+
// `createCliSession`. See `SchedulerObservability.onSchedulerNotice`: anything
|
|
211
|
+
// emitted before this line still reaches `/scheduler status` through the bounded
|
|
212
|
+
// log, so the delay loses no information.
|
|
213
|
+
//
|
|
214
|
+
// [DESIGN DECISION] Guarded. `runTui` is also driven by test fixtures that build
|
|
215
|
+
// a partial CliSession, and a projection that is absent must degrade to "no live
|
|
216
|
+
// notices" rather than take the whole TUI down on the first scheduler event.
|
|
217
|
+
schedulerObservability?.onSchedulerNotice((line) => transcript.pushInfo([`[scheduler] ${line}`]))
|
|
218
|
+
|
|
162
219
|
const suggestions = (line: string): string[] => {
|
|
163
220
|
if (!line.startsWith("/")) return []
|
|
164
221
|
const all = [
|
|
@@ -261,6 +318,8 @@ export async function runTui(ctx: CliSession): Promise<void> {
|
|
|
261
318
|
}
|
|
262
319
|
const u = usage.get(modelRef.current)
|
|
263
320
|
await persistCurrent(u)
|
|
321
|
+
// P2.2: histori yang tak durable = error transkrip eksplisit (bukan diam).
|
|
322
|
+
if (ctx.isWriterStale()) transcript.pushError(`[writer] ${ctx.writerStaleNote()}`)
|
|
264
323
|
usage.reset()
|
|
265
324
|
const sess = usage.getSession(modelRef.current)
|
|
266
325
|
if (
|
|
@@ -295,14 +354,26 @@ export async function runTui(ctx: CliSession): Promise<void> {
|
|
|
295
354
|
])
|
|
296
355
|
}
|
|
297
356
|
|
|
298
|
-
|
|
299
|
-
|
|
357
|
+
function parseCopyCount(raw: string): number | null {
|
|
358
|
+
if (!raw) return 1
|
|
359
|
+
if (!/^\d+$/.test(raw)) return null
|
|
360
|
+
const count = Number(raw)
|
|
361
|
+
return count >= 1 && count <= MAX_COPY_TURNS ? count : null
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
async function copyLastTurn(count: number): Promise<void> {
|
|
365
|
+
const turns = getLastTurnTexts(count)
|
|
366
|
+
.map((turn) => turn.trim())
|
|
367
|
+
.filter(Boolean)
|
|
368
|
+
const txt = turns.join("\n\n").trim()
|
|
300
369
|
if (!txt) {
|
|
301
370
|
transcript.pushInfo([c.muted(t("tui.copyNone"))])
|
|
302
371
|
return
|
|
303
372
|
}
|
|
304
|
-
if (writeClipboardOsc52(txt))
|
|
305
|
-
|
|
373
|
+
if (writeClipboardOsc52(txt)) {
|
|
374
|
+
const key = turns.length > 1 ? "tui.copyOkMany" : "tui.copyOk"
|
|
375
|
+
transcript.pushInfo([c.muted(t(key, { n: txt.length, turns: turns.length }))])
|
|
376
|
+
} else transcript.pushInfo([c.muted(t("tui.copyNeedTty"))])
|
|
306
377
|
}
|
|
307
378
|
|
|
308
379
|
async function submit(line: string): Promise<{ quit?: boolean } | undefined> {
|
|
@@ -343,6 +414,32 @@ export async function runTui(ctx: CliSession): Promise<void> {
|
|
|
343
414
|
transcript.pushInfo([c.muted(t("tui.modeLine", { m: mode }))])
|
|
344
415
|
return
|
|
345
416
|
}
|
|
417
|
+
// P12 S2.2 Slice 5 - WorkMode (lapis intent di ATAS permission mode).
|
|
418
|
+
// Aksi operator EKSPLISIT: hanya command ini yang menggeser WorkMode.
|
|
419
|
+
// Tab/Shift+Tab dan `/mode` tetap khusus permission mode.
|
|
420
|
+
if (name === "work-mode") {
|
|
421
|
+
const current = workModeControl?.getWorkMode() ?? "EXECUTE"
|
|
422
|
+
if (!args) {
|
|
423
|
+
transcript.pushInfo([c.muted(t("tui.workModeUsage", { m: current }))])
|
|
424
|
+
return
|
|
425
|
+
}
|
|
426
|
+
const next = parseWorkModeValue(args)
|
|
427
|
+
if (!next) {
|
|
428
|
+
transcript.pushInfo([
|
|
429
|
+
c.muted(t("tui.workModeUnknown", { a: args, modes: "DISCUSS, PLAN, EXECUTE" })),
|
|
430
|
+
])
|
|
431
|
+
return
|
|
432
|
+
}
|
|
433
|
+
if (!workModeControl) {
|
|
434
|
+
// Sesi tanpa kontrol WorkMode (handler izin terinjeksi = policy, bukan
|
|
435
|
+
// mode) - tolak, jangan diam-diam tampak berubah.
|
|
436
|
+
transcript.pushInfo([c.muted(t("tui.workModeUnavailable"))])
|
|
437
|
+
return
|
|
438
|
+
}
|
|
439
|
+
workModeControl.setWorkMode(next)
|
|
440
|
+
transcript.pushInfo([c.muted(t("tui.workModeLine", { m: next }))])
|
|
441
|
+
return
|
|
442
|
+
}
|
|
346
443
|
if (name === "lang") {
|
|
347
444
|
const { currentLocale, setSessionLocale } = await import("../src/ui/i18n/locale.ts")
|
|
348
445
|
if (!args) {
|
|
@@ -427,7 +524,12 @@ export async function runTui(ctx: CliSession): Promise<void> {
|
|
|
427
524
|
return
|
|
428
525
|
}
|
|
429
526
|
if (name === "copy") {
|
|
430
|
-
|
|
527
|
+
const count = parseCopyCount(args)
|
|
528
|
+
if (count === null) {
|
|
529
|
+
transcript.pushInfo([c.muted(t("tui.copyInvalid", { n: args, max: MAX_COPY_TURNS }))])
|
|
530
|
+
return
|
|
531
|
+
}
|
|
532
|
+
await copyLastTurn(count)
|
|
431
533
|
return
|
|
432
534
|
}
|
|
433
535
|
if (name === "cost" || name === "usage") return delegateBuiltin("/status")
|
|
@@ -484,6 +586,9 @@ export async function runTui(ctx: CliSession): Promise<void> {
|
|
|
484
586
|
const status = {
|
|
485
587
|
footer: {
|
|
486
588
|
mode,
|
|
589
|
+
// P12 S2.2 Slice 5 - WorkMode LIVE (bukan snapshot boot): footer
|
|
590
|
+
// mencerminkan mode aktif saat frame digambar.
|
|
591
|
+
workMode: workModeControl?.getWorkMode() ?? "EXECUTE",
|
|
487
592
|
model: modelRef.current ?? cfg.providers[0]?.models[0] ?? t("tui.noModel"),
|
|
488
593
|
cwd: cwd ?? process.cwd(),
|
|
489
594
|
context: fmtCtx(session.contextTokens),
|
|
@@ -502,6 +607,7 @@ export async function runTui(ctx: CliSession): Promise<void> {
|
|
|
502
607
|
},
|
|
503
608
|
listCommands: (prefix) => suggestions(prefix),
|
|
504
609
|
submit,
|
|
610
|
+
copySelection: (text) => writeClipboardOsc52(text),
|
|
505
611
|
abort: () => {
|
|
506
612
|
abort?.abort()
|
|
507
613
|
},
|