@cortexkit/opencode-magic-context 0.42.5 → 0.43.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/README.md +6 -7
- package/dist/agents/dreamer.d.ts +7 -9
- package/dist/agents/dreamer.d.ts.map +1 -1
- package/dist/agents/hidden-agent-registrations.d.ts.map +1 -1
- package/dist/agents/magic-context-prompt.d.ts.map +1 -1
- package/dist/config/index.d.ts +10 -1
- package/dist/config/index.d.ts.map +1 -1
- package/dist/config/live-run-config.d.ts +12 -0
- package/dist/config/live-run-config.d.ts.map +1 -0
- package/dist/config/live-snapshot.d.ts +32 -0
- package/dist/config/live-snapshot.d.ts.map +1 -0
- package/dist/config/schema/magic-context.d.ts +13 -2
- package/dist/config/schema/magic-context.d.ts.map +1 -1
- package/dist/{conflict-warning-hook-jyj54gbe.js → conflict-warning-hook-t2vb0wnx.js} +3 -3
- package/dist/{derive-budgets-v1fkhjjr.js → derive-budgets-0sg5vp61.js} +5 -2
- package/dist/features/builtin-commands/commands.d.ts +0 -4
- package/dist/features/builtin-commands/commands.d.ts.map +1 -1
- package/dist/features/magic-context/compaction-marker.d.ts +6 -0
- package/dist/features/magic-context/compaction-marker.d.ts.map +1 -1
- package/dist/features/magic-context/compartment-chunk-embedding.d.ts +4 -1
- package/dist/features/magic-context/compartment-chunk-embedding.d.ts.map +1 -1
- package/dist/features/magic-context/compartment-lease.d.ts +8 -0
- package/dist/features/magic-context/compartment-lease.d.ts.map +1 -1
- package/dist/features/magic-context/compartment-storage.d.ts +21 -0
- package/dist/features/magic-context/compartment-storage.d.ts.map +1 -1
- package/dist/features/magic-context/context-authority.d.ts +37 -3
- package/dist/features/magic-context/context-authority.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/classify.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/docs-proposals.d.ts +23 -0
- package/dist/features/magic-context/dreamer/docs-proposals.d.ts.map +1 -0
- package/dist/features/magic-context/dreamer/evaluate-smart-notes.d.ts +5 -1
- package/dist/features/magic-context/dreamer/evaluate-smart-notes.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/hidden-single-shot.d.ts +48 -0
- package/dist/features/magic-context/dreamer/hidden-single-shot.d.ts.map +1 -0
- package/dist/features/magic-context/dreamer/manual-summary.d.ts +7 -0
- package/dist/features/magic-context/dreamer/manual-summary.d.ts.map +1 -0
- package/dist/features/magic-context/dreamer/map-memories.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/open-opencode-db.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/promote-primers.d.ts +8 -1
- package/dist/features/magic-context/dreamer/promote-primers.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/refresh-primers.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/retrospective-orphan-sweep.d.ts +5 -2
- package/dist/features/magic-context/dreamer/retrospective-orphan-sweep.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/retrospective-raw-provider.d.ts +22 -13
- package/dist/features/magic-context/dreamer/retrospective-raw-provider.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/storage-task-schedule.d.ts +9 -0
- package/dist/features/magic-context/dreamer/storage-task-schedule.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/task-config.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/task-executor.d.ts +3 -0
- package/dist/features/magic-context/dreamer/task-executor.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/task-prompts.d.ts +7 -4
- package/dist/features/magic-context/dreamer/task-prompts.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/task-registry.d.ts +53 -2
- package/dist/features/magic-context/dreamer/task-registry.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/task-scheduler.d.ts +3 -0
- package/dist/features/magic-context/dreamer/task-scheduler.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/tick-failure.d.ts +38 -0
- package/dist/features/magic-context/dreamer/tick-failure.d.ts.map +1 -0
- package/dist/features/magic-context/dreamer/verify.d.ts.map +1 -1
- package/dist/features/magic-context/git-commits/search-git-commits.d.ts +2 -0
- package/dist/features/magic-context/git-commits/search-git-commits.d.ts.map +1 -1
- package/dist/features/magic-context/memory/embedding-identity.d.ts +1 -0
- package/dist/features/magic-context/memory/embedding-identity.d.ts.map +1 -1
- package/dist/features/magic-context/memory/embedding-local.d.ts +1 -0
- package/dist/features/magic-context/memory/embedding-local.d.ts.map +1 -1
- package/dist/features/magic-context/memory/embedding.d.ts +1 -1
- package/dist/features/magic-context/memory/embedding.d.ts.map +1 -1
- package/dist/features/magic-context/memory/memory-diagnostics.d.ts +6 -0
- package/dist/features/magic-context/memory/memory-diagnostics.d.ts.map +1 -0
- package/dist/features/magic-context/memory/memory-selection.d.ts +12 -0
- package/dist/features/magic-context/memory/memory-selection.d.ts.map +1 -0
- package/dist/features/magic-context/memory/memory-visibility.d.ts +46 -0
- package/dist/features/magic-context/memory/memory-visibility.d.ts.map +1 -0
- package/dist/features/magic-context/memory/mirror-reembed.d.ts +22 -0
- package/dist/features/magic-context/memory/mirror-reembed.d.ts.map +1 -0
- package/dist/features/magic-context/memory/project-identity.d.ts +9 -0
- package/dist/features/magic-context/memory/project-identity.d.ts.map +1 -1
- package/dist/features/magic-context/memory/storage-memory-fts.d.ts +6 -2
- package/dist/features/magic-context/memory/storage-memory-fts.d.ts.map +1 -1
- package/dist/features/magic-context/memory/storage-memory.d.ts.map +1 -1
- package/dist/features/magic-context/memory/transformers-remote-host.d.ts +6 -0
- package/dist/features/magic-context/memory/transformers-remote-host.d.ts.map +1 -0
- package/dist/features/magic-context/memory/transformers-web-entry.d.ts.map +1 -1
- package/dist/features/magic-context/message-fts-rowid-map.d.ts +3 -1
- package/dist/features/magic-context/message-fts-rowid-map.d.ts.map +1 -1
- package/dist/features/magic-context/message-index-async.d.ts +8 -3
- package/dist/features/magic-context/message-index-async.d.ts.map +1 -1
- package/dist/features/magic-context/message-index.d.ts +7 -1
- package/dist/features/magic-context/message-index.d.ts.map +1 -1
- package/dist/features/magic-context/message-time-backfill.d.ts +19 -0
- package/dist/features/magic-context/message-time-backfill.d.ts.map +1 -0
- package/dist/features/magic-context/migrations.d.ts +16 -0
- package/dist/features/magic-context/migrations.d.ts.map +1 -1
- package/dist/features/magic-context/mural/compress-cues.d.ts.map +1 -1
- package/dist/features/magic-context/mural/storage-mural.d.ts +5 -0
- package/dist/features/magic-context/mural/storage-mural.d.ts.map +1 -1
- package/dist/features/magic-context/opencode2-relabel.d.ts +132 -0
- package/dist/features/magic-context/opencode2-relabel.d.ts.map +1 -0
- package/dist/features/magic-context/overflow-detection.d.ts +3 -0
- package/dist/features/magic-context/overflow-detection.d.ts.map +1 -1
- package/dist/features/magic-context/project-embedding-registry.d.ts +1 -0
- package/dist/features/magic-context/project-embedding-registry.d.ts.map +1 -1
- package/dist/features/magic-context/protection-window.d.ts +1 -1
- package/dist/features/magic-context/protection-window.d.ts.map +1 -1
- package/dist/features/magic-context/search.d.ts +6 -0
- package/dist/features/magic-context/search.d.ts.map +1 -1
- package/dist/features/magic-context/session-decision-calibration.d.ts +31 -0
- package/dist/features/magic-context/session-decision-calibration.d.ts.map +1 -0
- package/dist/features/magic-context/session-project-backfill.d.ts.map +1 -1
- package/dist/features/magic-context/shadow-backfill-state.d.ts +1 -1
- package/dist/features/magic-context/shadow-backfill-state.d.ts.map +1 -1
- package/dist/features/magic-context/smart-notes/compiler.d.ts +5 -1
- package/dist/features/magic-context/smart-notes/compiler.d.ts.map +1 -1
- package/dist/features/magic-context/storage-clone.d.ts.map +1 -1
- package/dist/features/magic-context/storage-db.d.ts +1 -1
- package/dist/features/magic-context/storage-db.d.ts.map +1 -1
- package/dist/features/magic-context/storage-historian-runs.d.ts +4 -2
- package/dist/features/magic-context/storage-historian-runs.d.ts.map +1 -1
- package/dist/features/magic-context/storage-meta-persisted.d.ts +16 -2
- package/dist/features/magic-context/storage-meta-persisted.d.ts.map +1 -1
- package/dist/features/magic-context/storage-meta-shared.d.ts +1 -1
- package/dist/features/magic-context/storage-meta-shared.d.ts.map +1 -1
- package/dist/features/magic-context/storage-meta.d.ts +1 -1
- package/dist/features/magic-context/storage-meta.d.ts.map +1 -1
- package/dist/features/magic-context/storage-notes.d.ts +1 -0
- package/dist/features/magic-context/storage-notes.d.ts.map +1 -1
- package/dist/features/magic-context/storage-replay-document.d.ts +2 -0
- package/dist/features/magic-context/storage-replay-document.d.ts.map +1 -1
- package/dist/features/magic-context/storage-subagent-invocations.d.ts +1 -1
- package/dist/features/magic-context/storage-subagent-invocations.d.ts.map +1 -1
- package/dist/features/magic-context/storage-tags.d.ts +42 -4
- package/dist/features/magic-context/storage-tags.d.ts.map +1 -1
- package/dist/features/magic-context/storage.d.ts +2 -2
- package/dist/features/magic-context/storage.d.ts.map +1 -1
- package/dist/features/magic-context/store-generation-rebase.d.ts +95 -0
- package/dist/features/magic-context/store-generation-rebase.d.ts.map +1 -0
- package/dist/features/magic-context/subagent-token-capture.d.ts +1 -0
- package/dist/features/magic-context/subagent-token-capture.d.ts.map +1 -1
- package/dist/features/magic-context/tagger.d.ts +2 -0
- package/dist/features/magic-context/tagger.d.ts.map +1 -1
- package/dist/features/magic-context/tool-definition-tokens.d.ts +1 -0
- package/dist/features/magic-context/tool-definition-tokens.d.ts.map +1 -1
- package/dist/features/magic-context/tool-owner-backfill.d.ts.map +1 -1
- package/dist/features/magic-context/user-memory/review-user-memories.d.ts +5 -1
- package/dist/features/magic-context/user-memory/review-user-memories.d.ts.map +1 -1
- package/dist/hooks/auto-update-checker/index.d.ts.map +1 -1
- package/dist/hooks/magic-context/apply-operations.d.ts +10 -1
- package/dist/hooks/magic-context/apply-operations.d.ts.map +1 -1
- package/dist/hooks/magic-context/cache-busting-signals.d.ts +19 -4
- package/dist/hooks/magic-context/cache-busting-signals.d.ts.map +1 -1
- package/dist/hooks/magic-context/channel2-delivery.d.ts +8 -0
- package/dist/hooks/magic-context/channel2-delivery.d.ts.map +1 -1
- package/dist/hooks/magic-context/command-handler.d.ts +5 -4
- package/dist/hooks/magic-context/command-handler.d.ts.map +1 -1
- package/dist/hooks/magic-context/compaction-marker-manager.d.ts.map +1 -1
- package/dist/hooks/magic-context/compaction-off-transition.d.ts +1 -0
- package/dist/hooks/magic-context/compaction-off-transition.d.ts.map +1 -1
- package/dist/hooks/magic-context/compartment-prompt.d.ts +1 -1
- package/dist/hooks/magic-context/compartment-prompt.d.ts.map +1 -1
- package/dist/hooks/magic-context/compartment-render-epoch.d.ts +3 -1
- package/dist/hooks/magic-context/compartment-render-epoch.d.ts.map +1 -1
- package/dist/hooks/magic-context/compartment-runner-drop-queue.d.ts +1 -1
- package/dist/hooks/magic-context/compartment-runner-drop-queue.d.ts.map +1 -1
- package/dist/hooks/magic-context/compartment-runner-historian.d.ts +1 -0
- package/dist/hooks/magic-context/compartment-runner-historian.d.ts.map +1 -1
- package/dist/hooks/magic-context/compartment-runner-incremental.d.ts +19 -0
- package/dist/hooks/magic-context/compartment-runner-incremental.d.ts.map +1 -1
- package/dist/hooks/magic-context/compartment-runner-recomp.d.ts.map +1 -1
- package/dist/hooks/magic-context/compartment-runner-types.d.ts +19 -11
- package/dist/hooks/magic-context/compartment-runner-types.d.ts.map +1 -1
- package/dist/hooks/magic-context/compartment-runner-validation.d.ts +4 -1
- package/dist/hooks/magic-context/compartment-runner-validation.d.ts.map +1 -1
- package/dist/hooks/magic-context/compartment-runner.d.ts.map +1 -1
- package/dist/hooks/magic-context/compartment-trigger.d.ts.map +1 -1
- package/dist/hooks/magic-context/decay-render.d.ts +1 -0
- package/dist/hooks/magic-context/decay-render.d.ts.map +1 -1
- package/dist/hooks/magic-context/decision-calibration.d.ts +24 -0
- package/dist/hooks/magic-context/decision-calibration.d.ts.map +1 -0
- package/dist/hooks/magic-context/derive-budgets.d.ts +2 -0
- package/dist/hooks/magic-context/derive-budgets.d.ts.map +1 -1
- package/dist/hooks/magic-context/dropped-input-guard.d.ts +50 -4
- package/dist/hooks/magic-context/dropped-input-guard.d.ts.map +1 -1
- package/dist/hooks/magic-context/embed-history-runner.d.ts +30 -0
- package/dist/hooks/magic-context/embed-history-runner.d.ts.map +1 -0
- package/dist/hooks/magic-context/emergency-drop.d.ts +13 -8
- package/dist/hooks/magic-context/emergency-drop.d.ts.map +1 -1
- package/dist/hooks/magic-context/event-handler.d.ts.map +1 -1
- package/dist/hooks/magic-context/event-payloads.d.ts +2 -1
- package/dist/hooks/magic-context/event-payloads.d.ts.map +1 -1
- package/dist/hooks/magic-context/execute-status.d.ts +2 -1
- package/dist/hooks/magic-context/execute-status.d.ts.map +1 -1
- package/dist/hooks/magic-context/final-wire-token-estimate.d.ts +12 -4
- package/dist/hooks/magic-context/final-wire-token-estimate.d.ts.map +1 -1
- package/dist/hooks/magic-context/heuristic-cleanup.d.ts.map +1 -1
- package/dist/hooks/magic-context/historian-no-fire-cause.d.ts +5 -0
- package/dist/hooks/magic-context/historian-no-fire-cause.d.ts.map +1 -0
- package/dist/hooks/magic-context/historian-publish-stage-logger.d.ts +3 -0
- package/dist/hooks/magic-context/historian-publish-stage-logger.d.ts.map +1 -0
- package/dist/hooks/magic-context/hook-handlers.d.ts +0 -3
- package/dist/hooks/magic-context/hook-handlers.d.ts.map +1 -1
- package/dist/hooks/magic-context/hook.d.ts +4 -4
- package/dist/hooks/magic-context/hook.d.ts.map +1 -1
- package/dist/hooks/magic-context/host-served-rows.d.ts +58 -0
- package/dist/hooks/magic-context/host-served-rows.d.ts.map +1 -0
- package/dist/hooks/magic-context/inject-compartments.d.ts +38 -0
- package/dist/hooks/magic-context/inject-compartments.d.ts.map +1 -1
- package/dist/hooks/magic-context/legacy-compartments.d.ts +20 -0
- package/dist/hooks/magic-context/legacy-compartments.d.ts.map +1 -0
- package/dist/hooks/magic-context/live-session-state.d.ts +7 -7
- package/dist/hooks/magic-context/m0-token-breakdown.d.ts +6 -0
- package/dist/hooks/magic-context/m0-token-breakdown.d.ts.map +1 -1
- package/dist/hooks/magic-context/maintenance-authority.d.ts +0 -1
- package/dist/hooks/magic-context/maintenance-authority.d.ts.map +1 -1
- package/dist/hooks/magic-context/module-state-sync.d.ts +4 -1
- package/dist/hooks/magic-context/module-state-sync.d.ts.map +1 -1
- package/dist/hooks/magic-context/module-transport.d.ts +24 -2
- package/dist/hooks/magic-context/module-transport.d.ts.map +1 -1
- package/dist/hooks/magic-context/module-wire.d.ts +43 -1
- package/dist/hooks/magic-context/module-wire.d.ts.map +1 -1
- package/dist/hooks/magic-context/note-nudger.d.ts.map +1 -1
- package/dist/hooks/magic-context/postprocess-read-cache.d.ts +8 -0
- package/dist/hooks/magic-context/postprocess-read-cache.d.ts.map +1 -0
- package/dist/hooks/magic-context/producer-window-guard.d.ts +47 -1
- package/dist/hooks/magic-context/producer-window-guard.d.ts.map +1 -1
- package/dist/hooks/magic-context/producer-window-test-support.d.ts +14 -0
- package/dist/hooks/magic-context/producer-window-test-support.d.ts.map +1 -0
- package/dist/hooks/magic-context/protected-tail-boundary.d.ts +2 -0
- package/dist/hooks/magic-context/protected-tail-boundary.d.ts.map +1 -1
- package/dist/hooks/magic-context/read-session-chunk.d.ts +51 -10
- package/dist/hooks/magic-context/read-session-chunk.d.ts.map +1 -1
- package/dist/hooks/magic-context/read-session-db.d.ts +8 -0
- package/dist/hooks/magic-context/read-session-db.d.ts.map +1 -1
- package/dist/hooks/magic-context/read-session-formatting.d.ts +6 -0
- package/dist/hooks/magic-context/read-session-formatting.d.ts.map +1 -1
- package/dist/hooks/magic-context/read-session-raw.d.ts +4 -0
- package/dist/hooks/magic-context/read-session-raw.d.ts.map +1 -1
- package/dist/hooks/magic-context/read-session-true-raw-tokens.d.ts +6 -0
- package/dist/hooks/magic-context/read-session-true-raw-tokens.d.ts.map +1 -1
- package/dist/hooks/magic-context/recomp-orchestrator.d.ts +17 -39
- package/dist/hooks/magic-context/recomp-orchestrator.d.ts.map +1 -1
- package/dist/hooks/magic-context/rust-mode-transform.d.ts +51 -0
- package/dist/hooks/magic-context/rust-mode-transform.d.ts.map +1 -1
- package/dist/hooks/magic-context/rust-refusal-recovery.d.ts +28 -0
- package/dist/hooks/magic-context/rust-refusal-recovery.d.ts.map +1 -0
- package/dist/hooks/magic-context/sentinel.d.ts.map +1 -1
- package/dist/hooks/magic-context/system-prompt-hash.d.ts +6 -7
- package/dist/hooks/magic-context/system-prompt-hash.d.ts.map +1 -1
- package/dist/hooks/magic-context/tag-messages.d.ts +21 -1
- package/dist/hooks/magic-context/tag-messages.d.ts.map +1 -1
- package/dist/hooks/magic-context/tail-hygiene-walk.d.ts +63 -0
- package/dist/hooks/magic-context/tail-hygiene-walk.d.ts.map +1 -1
- package/dist/hooks/magic-context/tokenizer-calibration.d.ts +19 -12
- package/dist/hooks/magic-context/tokenizer-calibration.d.ts.map +1 -1
- package/dist/hooks/magic-context/tool-drop-target.d.ts +52 -1
- package/dist/hooks/magic-context/tool-drop-target.d.ts.map +1 -1
- package/dist/hooks/magic-context/tool-sweep-policy.d.ts +50 -0
- package/dist/hooks/magic-context/tool-sweep-policy.d.ts.map +1 -0
- package/dist/hooks/magic-context/transform-compartment-phase.d.ts +20 -1
- package/dist/hooks/magic-context/transform-compartment-phase.d.ts.map +1 -1
- package/dist/hooks/magic-context/transform-context-state.d.ts +9 -0
- package/dist/hooks/magic-context/transform-context-state.d.ts.map +1 -1
- package/dist/hooks/magic-context/transform-postprocess-phase.d.ts +5 -3
- package/dist/hooks/magic-context/transform-postprocess-phase.d.ts.map +1 -1
- package/dist/hooks/magic-context/transform.d.ts +44 -4
- package/dist/hooks/magic-context/transform.d.ts.map +1 -1
- package/dist/hooks/magic-context/wrapup-orchestrator.d.ts.map +1 -1
- package/dist/{index-f9gem5cr.js → index-8w1skpnm.js} +85 -5
- package/dist/index-99sfbrrf.js +170 -0
- package/dist/index-9skq8m9y.js +16 -0
- package/dist/{index-3wbd8sdq.js → index-d0dh7v0f.js} +28107 -29850
- package/dist/{index-d8mgqezq.js → index-rpz2me0v.js} +133 -78
- package/dist/{index-p474rw9p.js → index-rvwvdq59.js} +1 -1
- package/dist/index-w2ety11c.js +393 -0
- package/dist/index-y5145x8k.js +619 -0
- package/dist/index-ygwdyntq.js +5407 -0
- package/dist/{index-jkrqhc7y.js → index-ykg9sdzz.js} +147 -28
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7065 -3197
- package/dist/message-time-backfill-gzjer78y.js +108 -0
- package/dist/plugin/dream-timer.d.ts +13 -0
- package/dist/plugin/dream-timer.d.ts.map +1 -1
- package/dist/plugin/embedding-bootstrap.d.ts.map +1 -1
- package/dist/plugin/hooks/create-session-hooks.d.ts +5 -2
- package/dist/plugin/hooks/create-session-hooks.d.ts.map +1 -1
- package/dist/plugin/memory-id-translation.d.ts +109 -0
- package/dist/plugin/memory-id-translation.d.ts.map +1 -0
- package/dist/plugin/messages-transform.d.ts.map +1 -1
- package/dist/plugin/rpc-handlers.d.ts +10 -0
- package/dist/plugin/rpc-handlers.d.ts.map +1 -1
- package/dist/plugin/rust-note-backend.d.ts +84 -0
- package/dist/plugin/rust-note-backend.d.ts.map +1 -0
- package/dist/plugin/rust-tool-backends.d.ts +1 -1
- package/dist/plugin/rust-tool-backends.d.ts.map +1 -1
- package/dist/plugin/tool-registry.d.ts +1 -0
- package/dist/plugin/tool-registry.d.ts.map +1 -1
- package/dist/read-session-chunk-ec3jkvhg.js +61 -0
- package/dist/{recomp-orchestrator-k20sfpm2.js → recomp-orchestrator-6akjp11f.js} +8 -8
- package/dist/{send-session-notification-xnypkxpx.js → send-session-notification-f6gwkesy.js} +2 -2
- package/dist/shared/assistant-message-extractor.d.ts +6 -0
- package/dist/shared/assistant-message-extractor.d.ts.map +1 -1
- package/dist/shared/auto-update-provenance.d.ts +9 -0
- package/dist/shared/auto-update-provenance.d.ts.map +1 -0
- package/dist/shared/conflict-detector.d.ts +14 -5
- package/dist/shared/conflict-detector.d.ts.map +1 -1
- package/dist/shared/hidden-variant-warnings.d.ts +5 -0
- package/dist/shared/hidden-variant-warnings.d.ts.map +1 -0
- package/dist/shared/host-limitations.d.ts +14 -0
- package/dist/shared/host-limitations.d.ts.map +1 -0
- package/dist/shared/keep-subagents.d.ts +1 -1
- package/dist/shared/keep-subagents.d.ts.map +1 -1
- package/dist/shared/model-suggestion-retry.d.ts.map +1 -1
- package/dist/shared/models-dev-cache.d.ts +1 -0
- package/dist/shared/models-dev-cache.d.ts.map +1 -1
- package/dist/shared/opencode-config-dir.d.ts +52 -0
- package/dist/shared/opencode-config-dir.d.ts.map +1 -1
- package/dist/shared/opencode-db-path.d.ts +46 -2
- package/dist/shared/opencode-db-path.d.ts.map +1 -1
- package/dist/shared/prompt-surface-runtime.d.ts +6 -6
- package/dist/shared/prompt-surface-runtime.d.ts.map +1 -1
- package/dist/shared/rpc-server.d.ts +10 -0
- package/dist/shared/rpc-server.d.ts.map +1 -1
- package/dist/shared/rpc-types.d.ts +64 -5
- package/dist/shared/rpc-types.d.ts.map +1 -1
- package/dist/shared/status-detail-text.d.ts +1 -3
- package/dist/shared/status-detail-text.d.ts.map +1 -1
- package/dist/shared/status-summary.d.ts +7 -0
- package/dist/shared/status-summary.d.ts.map +1 -1
- package/dist/shared/status-view.d.ts +229 -0
- package/dist/shared/status-view.d.ts.map +1 -0
- package/dist/shared/tag-transcript.d.ts.map +1 -1
- package/dist/shared/tail-hygiene-status.d.ts +8 -0
- package/dist/shared/tail-hygiene-status.d.ts.map +1 -1
- package/dist/shared/user-facing-codes.d.ts +32 -7
- package/dist/shared/user-facing-codes.d.ts.map +1 -1
- package/dist/shared/window-geometry.d.ts +3 -0
- package/dist/shared/window-geometry.d.ts.map +1 -1
- package/dist/{task-config-cv8k9y8r.js → task-config-ex4nt0q0.js} +1 -1
- package/dist/tools/ctx-expand/constants.d.ts +1 -1
- package/dist/tools/ctx-expand/constants.d.ts.map +1 -1
- package/dist/tools/ctx-expand/mode.d.ts +31 -0
- package/dist/tools/ctx-expand/mode.d.ts.map +1 -0
- package/dist/tools/ctx-expand/render.d.ts.map +1 -1
- package/dist/tools/ctx-expand/tools.d.ts.map +1 -1
- package/dist/tools/ctx-memory/constants.d.ts +3 -1
- package/dist/tools/ctx-memory/constants.d.ts.map +1 -1
- package/dist/tools/ctx-memory/tools.d.ts +1 -0
- package/dist/tools/ctx-memory/tools.d.ts.map +1 -1
- package/dist/tools/ctx-memory/types.d.ts +2 -2
- package/dist/tools/ctx-note/constants.d.ts +1 -1
- package/dist/tools/ctx-note/constants.d.ts.map +1 -1
- package/dist/tools/ctx-note/render.d.ts +88 -0
- package/dist/tools/ctx-note/render.d.ts.map +1 -0
- package/dist/tools/ctx-note/tools.d.ts.map +1 -1
- package/dist/tools/ctx-note/types.d.ts +1 -1
- package/dist/tools/ctx-note/types.d.ts.map +1 -1
- package/dist/tools/ctx-reduce/constants.d.ts +1 -1
- package/dist/tools/ctx-reduce/constants.d.ts.map +1 -1
- package/dist/tools/ctx-search/constants.d.ts +1 -1
- package/dist/tools/ctx-search/constants.d.ts.map +1 -1
- package/dist/tools/ctx-search/date-range.d.ts +9 -0
- package/dist/tools/ctx-search/date-range.d.ts.map +1 -0
- package/dist/tools/ctx-search/tools.d.ts.map +1 -1
- package/dist/tools/ctx-search/types.d.ts +3 -1
- package/dist/tools/ctx-search/types.d.ts.map +1 -1
- package/dist/tools/light-descriptions.d.ts +5 -5
- package/dist/tools/light-descriptions.d.ts.map +1 -1
- package/dist/tools/parameter-descriptions.d.ts +75 -0
- package/dist/tools/parameter-descriptions.d.ts.map +1 -0
- package/dist/transformers-node-wasm.js +1918 -826
- package/dist/transformers-web.js +1736 -636
- package/dist/{transformers.node-dpmf3wpx.js → transformers.node-3zqr6k1w.js} +4087 -2898
- package/dist/tui/data/context-db.d.ts +19 -7
- package/dist/tui/data/context-db.d.ts.map +1 -1
- package/dist/tui-compiled/data/context-db.d.ts +19 -7
- package/dist/tui-compiled/data/context-db.d.ts.map +1 -1
- package/dist/v2/fold/host-media.d.ts +36 -0
- package/dist/v2/fold/host-media.d.ts.map +1 -0
- package/dist/v2/fold/restore.d.ts +21 -1
- package/dist/v2/fold/restore.d.ts.map +1 -1
- package/dist/v2/hidden-completion.d.ts +114 -14
- package/dist/v2/hidden-completion.d.ts.map +1 -1
- package/dist/v2/hooks/commands.d.ts +29 -0
- package/dist/v2/hooks/commands.d.ts.map +1 -0
- package/dist/v2/hooks/context.d.ts +58 -2
- package/dist/v2/hooks/context.d.ts.map +1 -1
- package/dist/v2/hooks/deleted-session-tombstones.d.ts +10 -0
- package/dist/v2/hooks/deleted-session-tombstones.d.ts.map +1 -0
- package/dist/v2/hooks/dream-manual.d.ts +43 -0
- package/dist/v2/hooks/dream-manual.d.ts.map +1 -0
- package/dist/v2/hooks/dream-trigger.d.ts +7 -0
- package/dist/v2/hooks/dream-trigger.d.ts.map +1 -1
- package/dist/v2/hooks/hidden-child.d.ts +32 -0
- package/dist/v2/hooks/hidden-child.d.ts.map +1 -0
- package/dist/v2/hooks/model-limit-cache.d.ts +19 -0
- package/dist/v2/hooks/model-limit-cache.d.ts.map +1 -0
- package/dist/v2/hooks/payload.d.ts.map +1 -1
- package/dist/v2/hooks/provider-admission.d.ts +22 -0
- package/dist/v2/hooks/provider-admission.d.ts.map +1 -0
- package/dist/v2/hooks/rpc-live-state.d.ts +9 -0
- package/dist/v2/hooks/rpc-live-state.d.ts.map +1 -0
- package/dist/v2/hooks/store.d.ts +38 -2
- package/dist/v2/hooks/store.d.ts.map +1 -1
- package/dist/v2/hooks/tools.d.ts +8 -0
- package/dist/v2/hooks/tools.d.ts.map +1 -0
- package/dist/v2/hooks/types.d.ts +157 -19
- package/dist/v2/hooks/types.d.ts.map +1 -1
- package/dist/v2/hooks/usage-reading.d.ts +42 -0
- package/dist/v2/hooks/usage-reading.d.ts.map +1 -0
- package/dist/v2/host-service.d.ts +65 -0
- package/dist/v2/host-service.d.ts.map +1 -0
- package/dist/v2/server.d.ts +19 -0
- package/dist/v2/server.d.ts.map +1 -1
- package/dist/v2/server.js +141849 -110533
- package/dist/v2/store-reader.d.ts +78 -6
- package/dist/v2/store-reader.d.ts.map +1 -1
- package/dist/v2/tui/events.d.ts +7 -0
- package/dist/v2/tui/events.d.ts.map +1 -0
- package/dist/v2/tui/index.d.ts +33 -0
- package/dist/v2/tui/index.d.ts.map +1 -0
- package/dist/v2/tui/sidebar-mount.d.ts +40 -0
- package/dist/v2/tui/sidebar-mount.d.ts.map +1 -0
- package/dist/v2/tui/status-dialog-mount.d.ts +29 -0
- package/dist/v2/tui/status-dialog-mount.d.ts.map +1 -0
- package/dist/v2/tui/types.d.ts +148 -0
- package/dist/v2/tui/types.d.ts.map +1 -0
- package/dist/wrapup-orchestrator-5akc87gr.js +16 -0
- package/package.json +9 -7
- package/src/agents/dreamer.ts +7 -16
- package/src/agents/hidden-agent-registrations.ts +10 -22
- package/src/agents/magic-context-prompt.test.ts +29 -39
- package/src/agents/magic-context-prompt.ts +99 -122
- package/src/agents/permissions.test.ts +17 -21
- package/src/config/index.ts +39 -4
- package/src/config/live-run-config.test.ts +237 -0
- package/src/config/live-run-config.ts +80 -0
- package/src/config/live-schema-drift.test.ts +67 -0
- package/src/config/live-snapshot.test.ts +85 -0
- package/src/config/live-snapshot.ts +191 -0
- package/src/config/protected-tokens.test.ts +40 -0
- package/src/config/raw-loader.test.ts +1 -0
- package/src/config/schema/magic-context.test.ts +13 -5
- package/src/config/schema/magic-context.ts +109 -13
- package/src/features/magic-context/dreamer/task-registry.ts +137 -13
- package/src/shared/assistant-message-extractor.test.ts +21 -0
- package/src/shared/assistant-message-extractor.ts +43 -8
- package/src/shared/auto-update-provenance.ts +42 -0
- package/src/shared/child-session-teardown.test.ts +38 -3
- package/src/shared/child-session-teardown.ts +3 -3
- package/src/shared/conflict-detector.test.ts +277 -7
- package/src/shared/conflict-detector.ts +221 -80
- package/src/shared/hidden-variant-warnings.ts +21 -0
- package/src/shared/host-limitations.ts +43 -0
- package/src/shared/keep-subagents.ts +6 -6
- package/src/shared/model-suggestion-retry.test.ts +43 -0
- package/src/shared/model-suggestion-retry.ts +12 -0
- package/src/shared/models-dev-cache.test.ts +25 -0
- package/src/shared/models-dev-cache.ts +5 -0
- package/src/shared/opencode-config-dir.ts +80 -7
- package/src/shared/opencode-db-path.test.ts +174 -0
- package/src/shared/opencode-db-path.ts +193 -15
- package/src/shared/opencode-host-generation.test.ts +29 -0
- package/src/shared/prompt-surface-a1-golden.md +142 -215
- package/src/shared/prompt-surface-runtime.test.ts +20 -0
- package/src/shared/prompt-surface-runtime.ts +7 -5
- package/src/shared/rpc-server.ts +18 -0
- package/src/shared/rpc-types.ts +63 -4
- package/src/shared/status-detail-text.test.ts +52 -18
- package/src/shared/status-detail-text.ts +1 -90
- package/src/shared/status-summary.ts +37 -2
- package/src/shared/status-view.test.ts +441 -0
- package/src/shared/status-view.ts +707 -0
- package/src/shared/tag-transcript.ts +115 -16
- package/src/shared/tail-hygiene-status.ts +9 -1
- package/src/shared/user-facing-codes.test.ts +3 -4
- package/src/shared/user-facing-codes.ts +33 -8
- package/src/shared/window-geometry.test.ts +23 -5
- package/src/shared/window-geometry.ts +13 -3
- package/src/tui/data/context-db.ts +50 -15
- package/src/tui/dialogs/status-dialog-colors.test.ts +58 -0
- package/src/tui/dialogs/status-dialog.tsx +288 -0
- package/src/tui/entry.mjs +11 -1
- package/src/tui/index.tsx +7 -464
- package/src/tui/slots/sidebar-content.tsx +21 -5
- package/src/tui-compiled/data/context-db.ts +50 -15
- package/src/tui-compiled/dialogs/status-dialog.tsx +552 -0
- package/src/tui-compiled/index.tsx +43 -1025
- package/src/tui-compiled/slots/sidebar-content.tsx +173 -152
- package/src/v2/tui/__fixtures__/ga-host-theme.json +160 -0
- package/src/v2/tui/events.ts +23 -0
- package/src/v2/tui/host-contract.test.ts +251 -0
- package/src/v2/tui/index.ts +526 -0
- package/src/v2/tui/load-compiled-sidebar.d.mts +59 -0
- package/src/v2/tui/load-compiled-sidebar.mjs +24 -0
- package/src/v2/tui/load-compiled-status-dialog.d.mts +17 -0
- package/src/v2/tui/load-compiled-status-dialog.mjs +16 -0
- package/src/v2/tui/sidebar-fallback.test.ts +100 -0
- package/src/v2/tui/sidebar-mount.ts +164 -0
- package/src/v2/tui/sidebar-text.test.ts +70 -0
- package/src/v2/tui/status-dialog-fallback.test.ts +97 -0
- package/src/v2/tui/status-dialog-mount.ts +76 -0
- package/src/v2/tui/theme-mapping.test.ts +57 -0
- package/src/v2/tui/types.ts +132 -0
- package/tui.js +1 -0
- package/dist/features/magic-context/memory/memory-migration.d.ts +0 -129
- package/dist/features/magic-context/memory/memory-migration.d.ts.map +0 -1
- package/dist/hooks/magic-context/upgrade-reminder.d.ts +0 -76
- package/dist/hooks/magic-context/upgrade-reminder.d.ts.map +0 -1
- package/dist/index-1ar7b3e9.js +0 -637
- package/dist/index-4wwr6cz0.js +0 -112
- package/dist/index-avwt563y.js +0 -62
- package/dist/storage-meta-session-x3j0q9qy.js +0 -20
|
@@ -1,27 +1,18 @@
|
|
|
1
|
-
import { memo as _$memo } from "opentui:runtime-module:%40opentui%2Fsolid";
|
|
2
|
-
import { createTextNode as _$createTextNode } from "opentui:runtime-module:%40opentui%2Fsolid";
|
|
3
1
|
import { effect as _$effect } from "opentui:runtime-module:%40opentui%2Fsolid";
|
|
4
|
-
import { insertNode as _$insertNode } from "opentui:runtime-module:%40opentui%2Fsolid";
|
|
5
2
|
import { insert as _$insert } from "opentui:runtime-module:%40opentui%2Fsolid";
|
|
3
|
+
import { createTextNode as _$createTextNode } from "opentui:runtime-module:%40opentui%2Fsolid";
|
|
4
|
+
import { insertNode as _$insertNode } from "opentui:runtime-module:%40opentui%2Fsolid";
|
|
6
5
|
import { setProp as _$setProp } from "opentui:runtime-module:%40opentui%2Fsolid";
|
|
7
6
|
import { createElement as _$createElement } from "opentui:runtime-module:%40opentui%2Fsolid";
|
|
8
7
|
import { createComponent as _$createComponent } from "opentui:runtime-module:%40opentui%2Fsolid";
|
|
9
8
|
/** @jsxImportSource @opentui/solid */
|
|
10
9
|
// @ts-nocheck
|
|
11
|
-
import { createMemo
|
|
12
|
-
import {
|
|
10
|
+
import { createMemo } from "opentui:runtime-module:solid-js";
|
|
11
|
+
import { StatusDialog } from "./dialogs/status-dialog";
|
|
13
12
|
import { renderUserFacingFailure, userFacingFailureCode } from "../shared/user-facing-codes";
|
|
14
13
|
import { createSidebarContentSlot, kickRecompProgressRefresh, refreshSidebarSnapshot } from "./slots/sidebar-content";
|
|
15
|
-
import
|
|
16
|
-
import { closeRpc, dismissUpgradeReminder, getAnnouncement, getCompartmentCount, getRpcGeneration, initRpcClient, loadEmbedDetail, loadStatusDetail, loadToastDurationMs, markAnnounced, requestRecomp, requestUpgrade } from "./data/context-db";
|
|
14
|
+
import { closeRpc, getAnnouncement, getCompartmentCount, getRpcGeneration, initRpcClient, loadEmbedDetail, loadStatusDetail, loadToastDurationMs, markAnnounced, requestRecomp } from "./data/context-db";
|
|
17
15
|
import { startNotificationSocket, stopNotificationSocket } from "./data/notification-socket";
|
|
18
|
-
import { formatCacheTtlDisplay } from "../shared/cache-ttl-display";
|
|
19
|
-
import { formatConfigParseStatusLine } from "../shared/config-diagnostics";
|
|
20
|
-
import { formatThresholdPercent } from "../shared/format-threshold";
|
|
21
|
-
import { formatTailHygiene } from "../shared/tail-hygiene-status";
|
|
22
|
-
import { RUST_MODE_HOST_PATHS_LINE } from "../shared/rust-mode-status";
|
|
23
|
-
import { formatWindowDerivationLine } from "../shared/window-geometry";
|
|
24
|
-
import { compactionOffSidebarRows, nativeCompactionContextLabel } from "./compaction-off";
|
|
25
16
|
import { isCompactionEnabled } from "../config/agent-disable";
|
|
26
17
|
import { loadPluginConfig } from "../config";
|
|
27
18
|
import { detectConflicts } from "../shared/conflict-detector";
|
|
@@ -115,925 +106,6 @@ function getSessionId(api) {
|
|
|
115
106
|
}
|
|
116
107
|
return null;
|
|
117
108
|
}
|
|
118
|
-
const R = props => (() => {
|
|
119
|
-
var _el$ = _$createElement("box"),
|
|
120
|
-
_el$2 = _$createElement("text"),
|
|
121
|
-
_el$3 = _$createElement("text");
|
|
122
|
-
_$insertNode(_el$, _el$2);
|
|
123
|
-
_$insertNode(_el$, _el$3);
|
|
124
|
-
_$setProp(_el$, "width", "100%");
|
|
125
|
-
_$setProp(_el$, "flexDirection", "row");
|
|
126
|
-
_$setProp(_el$, "justifyContent", "space-between");
|
|
127
|
-
_$insert(_el$2, () => props.l);
|
|
128
|
-
_$insert(_el$3, () => props.v);
|
|
129
|
-
_$effect(_p$ => {
|
|
130
|
-
var _v$ = props.t.textMuted,
|
|
131
|
-
_v$2 = props.fg ?? props.t.text;
|
|
132
|
-
_v$ !== _p$.e && (_p$.e = _$setProp(_el$2, "fg", _v$, _p$.e));
|
|
133
|
-
_v$2 !== _p$.t && (_p$.t = _$setProp(_el$3, "fg", _v$2, _p$.t));
|
|
134
|
-
return _p$;
|
|
135
|
-
}, {
|
|
136
|
-
e: undefined,
|
|
137
|
-
t: undefined
|
|
138
|
-
});
|
|
139
|
-
return _el$;
|
|
140
|
-
})();
|
|
141
|
-
const StatusDialog = props => {
|
|
142
|
-
const theme = createMemo(() => props.api.theme.current);
|
|
143
|
-
const [diagnostics, setDiagnostics] = createSignal(props.diagnostics === true);
|
|
144
|
-
const t = () => theme();
|
|
145
|
-
const s = () => props.s;
|
|
146
|
-
const summaryLines = () => renderUserStatusSummary(statusSummaryFromDetail(s()), "plain").split("\n").slice(1);
|
|
147
|
-
const compactionOff = () => s().compaction_enabled === false;
|
|
148
|
-
|
|
149
|
-
// Prefer the RPC-provided model context limit (what the sidebar shows) so the
|
|
150
|
-
// two surfaces never disagree. Fall back to deriving from usage% only when the
|
|
151
|
-
// RPC limit is absent (0) — and that derivation is itself undefined at 0%, so
|
|
152
|
-
// it stays "?" rather than showing a number inconsistent with the sidebar.
|
|
153
|
-
const contextLimit = () => s().contextLimit > 0 ? s().contextLimit : s().usagePercentage > 0 ? Math.round(s().inputTokens / (s().usagePercentage / 100)) : 0;
|
|
154
|
-
const elapsed = () => s().lastResponseTime > 0 ? Date.now() - s().lastResponseTime : 0;
|
|
155
|
-
|
|
156
|
-
// Token breakdown segments — same colors as sidebar. Kept in sync with
|
|
157
|
-
// slots/sidebar-content.tsx so the status dialog and sidebar read identically.
|
|
158
|
-
const COLORS = {
|
|
159
|
-
// Cool / structured — injected by the plugin into message[0]
|
|
160
|
-
system: "#c084fc",
|
|
161
|
-
docs: "#22d3ee",
|
|
162
|
-
compartments: "#60a5fa",
|
|
163
|
-
facts: "#fbbf24",
|
|
164
|
-
memories: "#34d399",
|
|
165
|
-
profile: "#a3e635",
|
|
166
|
-
// Warm / user-facing — chat and tool traffic
|
|
167
|
-
conversation: "#f87171",
|
|
168
|
-
toolCalls: "#fb923c",
|
|
169
|
-
toolDefs: "#f472b6"
|
|
170
|
-
};
|
|
171
|
-
const breakdownSegments = () => {
|
|
172
|
-
const d = s();
|
|
173
|
-
const total = d.inputTokens || 1;
|
|
174
|
-
const segs = [];
|
|
175
|
-
if (d.systemPromptTokens > 0) segs.push({
|
|
176
|
-
label: "System",
|
|
177
|
-
tokens: d.systemPromptTokens,
|
|
178
|
-
color: COLORS.system
|
|
179
|
-
});
|
|
180
|
-
if (d.docsTokens > 0) segs.push({
|
|
181
|
-
label: "Docs",
|
|
182
|
-
tokens: d.docsTokens,
|
|
183
|
-
color: COLORS.docs
|
|
184
|
-
});
|
|
185
|
-
if (!compactionOff() && d.compartmentTokens > 0) segs.push({
|
|
186
|
-
label: "Compartments",
|
|
187
|
-
tokens: d.compartmentTokens,
|
|
188
|
-
color: COLORS.compartments,
|
|
189
|
-
detail: `(${d.compartmentCount})`
|
|
190
|
-
});
|
|
191
|
-
if (d.factTokens > 0) segs.push({
|
|
192
|
-
label: "Facts",
|
|
193
|
-
tokens: d.factTokens,
|
|
194
|
-
color: COLORS.facts
|
|
195
|
-
});
|
|
196
|
-
if (d.memoryTokens > 0) segs.push({
|
|
197
|
-
label: "Memories",
|
|
198
|
-
tokens: d.memoryTokens,
|
|
199
|
-
color: COLORS.memories,
|
|
200
|
-
detail: `(${d.memoryBlockCount})`
|
|
201
|
-
});
|
|
202
|
-
if (d.profileTokens > 0) segs.push({
|
|
203
|
-
label: "User Profile",
|
|
204
|
-
tokens: d.profileTokens,
|
|
205
|
-
color: COLORS.profile
|
|
206
|
-
});
|
|
207
|
-
if (d.conversationTokens > 0) segs.push({
|
|
208
|
-
label: "Conversation",
|
|
209
|
-
tokens: d.conversationTokens,
|
|
210
|
-
color: COLORS.conversation
|
|
211
|
-
});
|
|
212
|
-
if (d.toolCallTokens > 0) segs.push({
|
|
213
|
-
label: "Tool Calls",
|
|
214
|
-
tokens: d.toolCallTokens,
|
|
215
|
-
color: COLORS.toolCalls
|
|
216
|
-
});
|
|
217
|
-
if (d.toolDefinitionTokens > 0) segs.push({
|
|
218
|
-
label: "Tool Defs",
|
|
219
|
-
tokens: d.toolDefinitionTokens,
|
|
220
|
-
color: COLORS.toolDefs
|
|
221
|
-
});
|
|
222
|
-
return {
|
|
223
|
-
segs,
|
|
224
|
-
total
|
|
225
|
-
};
|
|
226
|
-
};
|
|
227
|
-
|
|
228
|
-
// The status-dialog breakdown bar uses flex layout (same approach as the
|
|
229
|
-
// sidebar breakdown). Each segment becomes a colored box with
|
|
230
|
-
// flexGrow=tokens and flexBasis=0, parent has width="100%", so opentui
|
|
231
|
-
// distributes the dialog's full width proportionally regardless of the
|
|
232
|
-
// dialog's actual rendered width.
|
|
233
|
-
const barSegments = () => breakdownSegments().segs.filter(seg => seg.tokens > 0);
|
|
234
|
-
return (() => {
|
|
235
|
-
var _el$4 = _$createElement("box"),
|
|
236
|
-
_el$5 = _$createElement("box"),
|
|
237
|
-
_el$6 = _$createElement("text"),
|
|
238
|
-
_el$7 = _$createElement("b"),
|
|
239
|
-
_el$9 = _$createElement("text"),
|
|
240
|
-
_el$0 = _$createTextNode(`v`),
|
|
241
|
-
_el$1 = _$createElement("box"),
|
|
242
|
-
_el$10 = _$createElement("text"),
|
|
243
|
-
_el$11 = _$createTextNode(` Diagnostics`),
|
|
244
|
-
_el$12 = _$createElement("box"),
|
|
245
|
-
_el$13 = _$createElement("text");
|
|
246
|
-
_$insertNode(_el$4, _el$5);
|
|
247
|
-
_$insertNode(_el$4, _el$1);
|
|
248
|
-
_$insertNode(_el$4, _el$12);
|
|
249
|
-
_$setProp(_el$4, "flexDirection", "column");
|
|
250
|
-
_$setProp(_el$4, "width", "100%");
|
|
251
|
-
_$setProp(_el$4, "paddingLeft", 2);
|
|
252
|
-
_$setProp(_el$4, "paddingRight", 2);
|
|
253
|
-
_$setProp(_el$4, "paddingTop", 1);
|
|
254
|
-
_$setProp(_el$4, "paddingBottom", 1);
|
|
255
|
-
_$insertNode(_el$5, _el$6);
|
|
256
|
-
_$insertNode(_el$5, _el$9);
|
|
257
|
-
_$setProp(_el$5, "justifyContent", "center");
|
|
258
|
-
_$setProp(_el$5, "width", "100%");
|
|
259
|
-
_$setProp(_el$5, "marginBottom", 1);
|
|
260
|
-
_$setProp(_el$5, "flexDirection", "row");
|
|
261
|
-
_$setProp(_el$5, "gap", 2);
|
|
262
|
-
_$insertNode(_el$6, _el$7);
|
|
263
|
-
_$insertNode(_el$7, _$createTextNode(`⚡ Magic Context Status`));
|
|
264
|
-
_$insertNode(_el$9, _el$0);
|
|
265
|
-
_$insert(_el$9, () => packageJson.version, null);
|
|
266
|
-
_$insertNode(_el$1, _el$10);
|
|
267
|
-
_$setProp(_el$1, "width", "100%");
|
|
268
|
-
_$setProp(_el$1, "justifyContent", "flex-end");
|
|
269
|
-
_$setProp(_el$1, "onMouseDown", () => setDiagnostics(!diagnostics()));
|
|
270
|
-
_$insertNode(_el$10, _el$11);
|
|
271
|
-
_$insert(_el$10, () => diagnostics() ? "[x]" : "[ ]", _el$11);
|
|
272
|
-
_$insert(_el$4, (() => {
|
|
273
|
-
var _c$ = _$memo(() => !!!diagnostics());
|
|
274
|
-
return () => _c$() ? (() => {
|
|
275
|
-
var _el$15 = _$createElement("box");
|
|
276
|
-
_$setProp(_el$15, "flexDirection", "column");
|
|
277
|
-
_$setProp(_el$15, "width", "100%");
|
|
278
|
-
_$insert(_el$15, () => summaryLines().map(line => (() => {
|
|
279
|
-
var _el$16 = _$createElement("text");
|
|
280
|
-
_$insert(_el$16, line);
|
|
281
|
-
return _el$16;
|
|
282
|
-
})()));
|
|
283
|
-
return _el$15;
|
|
284
|
-
})() : [_$memo(() => s().configParseFailures.map(failure => (() => {
|
|
285
|
-
var _el$30 = _$createElement("text");
|
|
286
|
-
_$insert(_el$30, () => formatConfigParseStatusLine(failure));
|
|
287
|
-
_$effect(_$p => _$setProp(_el$30, "fg", t().error, _$p));
|
|
288
|
-
return _el$30;
|
|
289
|
-
})())), (() => {
|
|
290
|
-
var _el$17 = _$createElement("box"),
|
|
291
|
-
_el$18 = _$createElement("text"),
|
|
292
|
-
_el$19 = _$createTextNode(` / `),
|
|
293
|
-
_el$20 = _$createTextNode(` tokens`);
|
|
294
|
-
_$insertNode(_el$17, _el$18);
|
|
295
|
-
_$setProp(_el$17, "flexDirection", "row");
|
|
296
|
-
_$setProp(_el$17, "justifyContent", "space-between");
|
|
297
|
-
_$setProp(_el$17, "width", "100%");
|
|
298
|
-
_$insert(_el$17, (() => {
|
|
299
|
-
var _c$2 = _$memo(() => !!compactionOff());
|
|
300
|
-
return () => _c$2() ? (() => {
|
|
301
|
-
var _el$31 = _$createElement("text"),
|
|
302
|
-
_el$32 = _$createElement("b");
|
|
303
|
-
_$insertNode(_el$31, _el$32);
|
|
304
|
-
_$insert(_el$32, () => nativeCompactionContextLabel(s()));
|
|
305
|
-
_$effect(_$p => _$setProp(_el$31, "fg", t().accent, _$p));
|
|
306
|
-
return _el$31;
|
|
307
|
-
})() : (() => {
|
|
308
|
-
var _el$33 = _$createElement("text"),
|
|
309
|
-
_el$34 = _$createElement("b"),
|
|
310
|
-
_el$35 = _$createTextNode(`%`),
|
|
311
|
-
_el$36 = _$createTextNode(` / `),
|
|
312
|
-
_el$37 = _$createTextNode(`%`);
|
|
313
|
-
_$insertNode(_el$33, _el$34);
|
|
314
|
-
_$insertNode(_el$33, _el$36);
|
|
315
|
-
_$insertNode(_el$33, _el$37);
|
|
316
|
-
_$insertNode(_el$34, _el$35);
|
|
317
|
-
_$insert(_el$34, () => s().usagePercentage.toFixed(1), _el$35);
|
|
318
|
-
_$insert(_el$33, () => formatThresholdPercent(s().executeThreshold), _el$37);
|
|
319
|
-
_$insert(_el$33, () => s().executeThresholdClamped ? "*" : "", null);
|
|
320
|
-
_$effect(_$p => _$setProp(_el$33, "fg", s().usagePercentage >= 80 ? t().error : s().usagePercentage >= 65 ? t().warning : t().accent, _$p));
|
|
321
|
-
return _el$33;
|
|
322
|
-
})();
|
|
323
|
-
})(), _el$18);
|
|
324
|
-
_$insertNode(_el$18, _el$19);
|
|
325
|
-
_$insertNode(_el$18, _el$20);
|
|
326
|
-
_$insert(_el$18, () => fmt(s().inputTokens), _el$19);
|
|
327
|
-
_$insert(_el$18, (() => {
|
|
328
|
-
var _c$3 = _$memo(() => contextLimit() > 0);
|
|
329
|
-
return () => _c$3() ? fmt(contextLimit()) : "?";
|
|
330
|
-
})(), _el$20);
|
|
331
|
-
_$effect(_$p => _$setProp(_el$18, "fg", compactionOff() ? t().accent : s().usagePercentage >= 80 ? t().error : s().usagePercentage >= 65 ? t().warning : t().accent, _$p));
|
|
332
|
-
return _el$17;
|
|
333
|
-
})(), _$memo(() => _$memo(() => !!s().windowGeometry)() && (() => {
|
|
334
|
-
var _el$38 = _$createElement("text");
|
|
335
|
-
_$insert(_el$38, () => formatWindowDerivationLine(s().inputTokens, s().windowGeometry));
|
|
336
|
-
_$effect(_$p => _$setProp(_el$38, "fg", t().textMuted, _$p));
|
|
337
|
-
return _el$38;
|
|
338
|
-
})()), (() => {
|
|
339
|
-
var _el$21 = _$createElement("box");
|
|
340
|
-
_$setProp(_el$21, "width", "100%");
|
|
341
|
-
_$setProp(_el$21, "flexDirection", "row");
|
|
342
|
-
_$setProp(_el$21, "height", 1);
|
|
343
|
-
_$insert(_el$21, () => barSegments().map(seg => (() => {
|
|
344
|
-
var _el$39 = _$createElement("box");
|
|
345
|
-
_$setProp(_el$39, "flexBasis", 0);
|
|
346
|
-
_$setProp(_el$39, "height", 1);
|
|
347
|
-
_$effect(_p$ => {
|
|
348
|
-
var _v$7 = seg.label,
|
|
349
|
-
_v$8 = Math.max(1, seg.tokens),
|
|
350
|
-
_v$9 = seg.color;
|
|
351
|
-
_v$7 !== _p$.e && (_p$.e = _$setProp(_el$39, "key", _v$7, _p$.e));
|
|
352
|
-
_v$8 !== _p$.t && (_p$.t = _$setProp(_el$39, "flexGrow", _v$8, _p$.t));
|
|
353
|
-
_v$9 !== _p$.a && (_p$.a = _$setProp(_el$39, "backgroundColor", _v$9, _p$.a));
|
|
354
|
-
return _p$;
|
|
355
|
-
}, {
|
|
356
|
-
e: undefined,
|
|
357
|
-
t: undefined,
|
|
358
|
-
a: undefined
|
|
359
|
-
});
|
|
360
|
-
return _el$39;
|
|
361
|
-
})()));
|
|
362
|
-
return _el$21;
|
|
363
|
-
})(), (() => {
|
|
364
|
-
var _el$22 = _$createElement("box"),
|
|
365
|
-
_el$23 = _$createElement("text");
|
|
366
|
-
_$insertNode(_el$22, _el$23);
|
|
367
|
-
_$setProp(_el$22, "flexDirection", "column");
|
|
368
|
-
_$insert(_el$22, () => breakdownSegments().segs.map(seg => {
|
|
369
|
-
const pct = (seg.tokens / breakdownSegments().total * 100).toFixed(1);
|
|
370
|
-
return (() => {
|
|
371
|
-
var _el$40 = _$createElement("box"),
|
|
372
|
-
_el$41 = _$createElement("text"),
|
|
373
|
-
_el$42 = _$createTextNode(` `),
|
|
374
|
-
_el$43 = _$createElement("text"),
|
|
375
|
-
_el$44 = _$createTextNode(` (`),
|
|
376
|
-
_el$45 = _$createTextNode(`%)`);
|
|
377
|
-
_$insertNode(_el$40, _el$41);
|
|
378
|
-
_$insertNode(_el$40, _el$43);
|
|
379
|
-
_$setProp(_el$40, "width", "100%");
|
|
380
|
-
_$setProp(_el$40, "flexDirection", "row");
|
|
381
|
-
_$setProp(_el$40, "justifyContent", "space-between");
|
|
382
|
-
_$insertNode(_el$41, _el$42);
|
|
383
|
-
_$insert(_el$41, () => seg.label, _el$42);
|
|
384
|
-
_$insert(_el$41, () => seg.detail ?? "", null);
|
|
385
|
-
_$insertNode(_el$43, _el$44);
|
|
386
|
-
_$insertNode(_el$43, _el$45);
|
|
387
|
-
_$insert(_el$43, () => fmt(seg.tokens), _el$44);
|
|
388
|
-
_$insert(_el$43, pct, _el$45);
|
|
389
|
-
_$effect(_p$ => {
|
|
390
|
-
var _v$0 = seg.label,
|
|
391
|
-
_v$1 = seg.color,
|
|
392
|
-
_v$10 = t().textMuted;
|
|
393
|
-
_v$0 !== _p$.e && (_p$.e = _$setProp(_el$40, "key", _v$0, _p$.e));
|
|
394
|
-
_v$1 !== _p$.t && (_p$.t = _$setProp(_el$41, "fg", _v$1, _p$.t));
|
|
395
|
-
_v$10 !== _p$.a && (_p$.a = _$setProp(_el$43, "fg", _v$10, _p$.a));
|
|
396
|
-
return _p$;
|
|
397
|
-
}, {
|
|
398
|
-
e: undefined,
|
|
399
|
-
t: undefined,
|
|
400
|
-
a: undefined
|
|
401
|
-
});
|
|
402
|
-
return _el$40;
|
|
403
|
-
})();
|
|
404
|
-
}), _el$23);
|
|
405
|
-
_$insertNode(_el$23, _$createTextNode(`Conversation includes reasoning; hygiene excludes it`));
|
|
406
|
-
_$insert(_el$22, (() => {
|
|
407
|
-
var _c$4 = _$memo(() => s().tailHygiene !== undefined);
|
|
408
|
-
return () => _c$4() && _$createComponent(R, {
|
|
409
|
-
get t() {
|
|
410
|
-
return t();
|
|
411
|
-
},
|
|
412
|
-
l: "Hygiene",
|
|
413
|
-
get v() {
|
|
414
|
-
return formatTailHygiene(s().tailHygiene);
|
|
415
|
-
},
|
|
416
|
-
get fg() {
|
|
417
|
-
return _$memo(() => !!s().tailHygiene.evaluable)() ? t().accent : t().warning;
|
|
418
|
-
}
|
|
419
|
-
});
|
|
420
|
-
})(), null);
|
|
421
|
-
_$effect(_$p => _$setProp(_el$23, "fg", t().textMuted, _$p));
|
|
422
|
-
return _el$22;
|
|
423
|
-
})(), _$memo(() => _$memo(() => !!(!compactionOff() && s().recompProgress))() && (() => {
|
|
424
|
-
const p = s().recompProgress;
|
|
425
|
-
// Label follows the flow that started the run, so a plain
|
|
426
|
-
// /ctx-recomp never reads as an "Upgrade" (dogfood 2026-06-04).
|
|
427
|
-
const verb = p.kind === "upgrade" ? "Upgrade" : p.kind === "embed" ? "Embed" : "Recomp";
|
|
428
|
-
return (() => {
|
|
429
|
-
var _el$46 = _$createElement("box"),
|
|
430
|
-
_el$47 = _$createElement("text"),
|
|
431
|
-
_el$48 = _$createElement("b");
|
|
432
|
-
_$insertNode(_el$46, _el$47);
|
|
433
|
-
_$setProp(_el$46, "marginTop", 1);
|
|
434
|
-
_$setProp(_el$46, "width", "100%");
|
|
435
|
-
_$setProp(_el$46, "flexDirection", "column");
|
|
436
|
-
_$insertNode(_el$47, _el$48);
|
|
437
|
-
_$insert(_el$48, verb);
|
|
438
|
-
_$insert(_el$46, () => {
|
|
439
|
-
if (p.phase === "recomp") {
|
|
440
|
-
const frac = p.totalMessages > 0 ? p.processedMessages / p.totalMessages : 0;
|
|
441
|
-
const width = 24;
|
|
442
|
-
const filled = Math.round(Math.max(0, Math.min(1, frac)) * width);
|
|
443
|
-
const bar = p.totalMessages > 0 ? `[${"█".repeat(filled)}${"░".repeat(width - filled)}]` : "(starting…)";
|
|
444
|
-
const activeLabel = p.kind === "upgrade" ? "upgrading" : p.kind === "embed" ? "embedding" : "comparting";
|
|
445
|
-
return [_$createComponent(R, {
|
|
446
|
-
get t() {
|
|
447
|
-
return t();
|
|
448
|
-
},
|
|
449
|
-
l: activeLabel,
|
|
450
|
-
get v() {
|
|
451
|
-
return _$memo(() => p.totalMessages > 0)() ? `${bar} ${Math.round(frac * 100)}%` : bar;
|
|
452
|
-
},
|
|
453
|
-
get fg() {
|
|
454
|
-
return t().warning;
|
|
455
|
-
}
|
|
456
|
-
}), _$memo(() => _$memo(() => !!p.note)() ? _$createComponent(R, {
|
|
457
|
-
get t() {
|
|
458
|
-
return t();
|
|
459
|
-
},
|
|
460
|
-
l: "Status",
|
|
461
|
-
get v() {
|
|
462
|
-
return p.note;
|
|
463
|
-
},
|
|
464
|
-
get fg() {
|
|
465
|
-
return t().textMuted;
|
|
466
|
-
}
|
|
467
|
-
}) : null), _$memo(() => _$memo(() => p.kind === "embed")() ? _$createComponent(R, {
|
|
468
|
-
get t() {
|
|
469
|
-
return t();
|
|
470
|
-
},
|
|
471
|
-
l: "Compartments",
|
|
472
|
-
get v() {
|
|
473
|
-
return `${p.processedMessages}/${p.totalMessages} embedded`;
|
|
474
|
-
},
|
|
475
|
-
get fg() {
|
|
476
|
-
return t().textMuted;
|
|
477
|
-
}
|
|
478
|
-
}) : _$createComponent(R, {
|
|
479
|
-
get t() {
|
|
480
|
-
return t();
|
|
481
|
-
},
|
|
482
|
-
l: "Compartments",
|
|
483
|
-
get v() {
|
|
484
|
-
return `${p.compartmentsCreated} (${p.passCount} pass${p.passCount === 1 ? "" : "es"})`;
|
|
485
|
-
},
|
|
486
|
-
get fg() {
|
|
487
|
-
return t().textMuted;
|
|
488
|
-
}
|
|
489
|
-
}))];
|
|
490
|
-
}
|
|
491
|
-
if (p.phase === "migration") return _$createComponent(R, {
|
|
492
|
-
get t() {
|
|
493
|
-
return t();
|
|
494
|
-
},
|
|
495
|
-
l: "Status",
|
|
496
|
-
get v() {
|
|
497
|
-
return p.note ?? "Migrating memories ⟳";
|
|
498
|
-
},
|
|
499
|
-
get fg() {
|
|
500
|
-
return t().warning;
|
|
501
|
-
}
|
|
502
|
-
});
|
|
503
|
-
if (p.phase === "done") return _$createComponent(R, {
|
|
504
|
-
get t() {
|
|
505
|
-
return t();
|
|
506
|
-
},
|
|
507
|
-
l: "Status",
|
|
508
|
-
v: `✓ ${verb} complete`,
|
|
509
|
-
get fg() {
|
|
510
|
-
return t().accent;
|
|
511
|
-
}
|
|
512
|
-
});
|
|
513
|
-
if (p.phase === "skipped") return _$createComponent(R, {
|
|
514
|
-
get t() {
|
|
515
|
-
return t();
|
|
516
|
-
},
|
|
517
|
-
l: "Status",
|
|
518
|
-
get v() {
|
|
519
|
-
return p.message ?? `${verb} stopped early`;
|
|
520
|
-
},
|
|
521
|
-
get fg() {
|
|
522
|
-
return t().textMuted;
|
|
523
|
-
}
|
|
524
|
-
});
|
|
525
|
-
return _$createComponent(R, {
|
|
526
|
-
get t() {
|
|
527
|
-
return t();
|
|
528
|
-
},
|
|
529
|
-
l: "Status",
|
|
530
|
-
get v() {
|
|
531
|
-
return `✗ ${verb} failed${p.message ? `: ${p.message}` : ""}`;
|
|
532
|
-
},
|
|
533
|
-
get fg() {
|
|
534
|
-
return t().error;
|
|
535
|
-
}
|
|
536
|
-
});
|
|
537
|
-
}, null);
|
|
538
|
-
_$effect(_$p => _$setProp(_el$47, "fg", t().text, _$p));
|
|
539
|
-
return _el$46;
|
|
540
|
-
})();
|
|
541
|
-
})()), _$memo(() => _$memo(() => !!s().hostBackendsModuleSide)() && (() => {
|
|
542
|
-
var _el$49 = _$createElement("box"),
|
|
543
|
-
_el$50 = _$createElement("text"),
|
|
544
|
-
_el$51 = _$createElement("b"),
|
|
545
|
-
_el$53 = _$createElement("text");
|
|
546
|
-
_$insertNode(_el$49, _el$50);
|
|
547
|
-
_$insertNode(_el$49, _el$53);
|
|
548
|
-
_$setProp(_el$49, "marginTop", 1);
|
|
549
|
-
_$setProp(_el$49, "width", "100%");
|
|
550
|
-
_$setProp(_el$49, "flexDirection", "column");
|
|
551
|
-
_$insertNode(_el$50, _el$51);
|
|
552
|
-
_$insertNode(_el$51, _$createTextNode(`Rust Mode`));
|
|
553
|
-
_$insert(_el$53, RUST_MODE_HOST_PATHS_LINE);
|
|
554
|
-
_$effect(_p$ => {
|
|
555
|
-
var _v$11 = t().text,
|
|
556
|
-
_v$12 = t().textMuted;
|
|
557
|
-
_v$11 !== _p$.e && (_p$.e = _$setProp(_el$50, "fg", _v$11, _p$.e));
|
|
558
|
-
_v$12 !== _p$.t && (_p$.t = _$setProp(_el$53, "fg", _v$12, _p$.t));
|
|
559
|
-
return _p$;
|
|
560
|
-
}, {
|
|
561
|
-
e: undefined,
|
|
562
|
-
t: undefined
|
|
563
|
-
});
|
|
564
|
-
return _el$49;
|
|
565
|
-
})()), (() => {
|
|
566
|
-
var _el$25 = _$createElement("box");
|
|
567
|
-
_$setProp(_el$25, "flexDirection", "row");
|
|
568
|
-
_$setProp(_el$25, "width", "100%");
|
|
569
|
-
_$setProp(_el$25, "marginTop", 1);
|
|
570
|
-
_$setProp(_el$25, "gap", 4);
|
|
571
|
-
_$insert(_el$25, (() => {
|
|
572
|
-
var _c$5 = _$memo(() => !!compactionOff());
|
|
573
|
-
return () => _c$5() ? (() => {
|
|
574
|
-
var _el$54 = _$createElement("box"),
|
|
575
|
-
_el$55 = _$createElement("text"),
|
|
576
|
-
_el$56 = _$createElement("b");
|
|
577
|
-
_$insertNode(_el$54, _el$55);
|
|
578
|
-
_$setProp(_el$54, "flexDirection", "column");
|
|
579
|
-
_$setProp(_el$54, "flexGrow", 1);
|
|
580
|
-
_$setProp(_el$54, "flexBasis", 0);
|
|
581
|
-
_$insertNode(_el$55, _el$56);
|
|
582
|
-
_$insertNode(_el$56, _$createTextNode(`Knowledge`));
|
|
583
|
-
_$insert(_el$54, () => compactionOffSidebarRows(s()).map(row => _$createComponent(R, {
|
|
584
|
-
get t() {
|
|
585
|
-
return t();
|
|
586
|
-
},
|
|
587
|
-
get l() {
|
|
588
|
-
return row.label;
|
|
589
|
-
},
|
|
590
|
-
get v() {
|
|
591
|
-
return row.value;
|
|
592
|
-
},
|
|
593
|
-
get fg() {
|
|
594
|
-
return _$memo(() => row.label === "Memories")() ? t().accent : t().textMuted;
|
|
595
|
-
}
|
|
596
|
-
})), null);
|
|
597
|
-
_$insert(_el$54, (() => {
|
|
598
|
-
var _c$8 = _$memo(() => s().readySmartNoteCount > 0);
|
|
599
|
-
return () => _c$8() && _$createComponent(R, {
|
|
600
|
-
get t() {
|
|
601
|
-
return t();
|
|
602
|
-
},
|
|
603
|
-
l: "Smart Notes",
|
|
604
|
-
get v() {
|
|
605
|
-
return `${s().readySmartNoteCount} ready`;
|
|
606
|
-
},
|
|
607
|
-
get fg() {
|
|
608
|
-
return t().accent;
|
|
609
|
-
}
|
|
610
|
-
});
|
|
611
|
-
})(), null);
|
|
612
|
-
_$insert(_el$54, (() => {
|
|
613
|
-
var _c$9 = _$memo(() => !!s().lastDreamerRunAt);
|
|
614
|
-
return () => _c$9() && _$createComponent(R, {
|
|
615
|
-
get t() {
|
|
616
|
-
return t();
|
|
617
|
-
},
|
|
618
|
-
l: "Dreamer",
|
|
619
|
-
get v() {
|
|
620
|
-
return `last ${relTime(s().lastDreamerRunAt)}`;
|
|
621
|
-
},
|
|
622
|
-
get fg() {
|
|
623
|
-
return t().textMuted;
|
|
624
|
-
}
|
|
625
|
-
});
|
|
626
|
-
})(), null);
|
|
627
|
-
_$effect(_$p => _$setProp(_el$55, "fg", t().text, _$p));
|
|
628
|
-
return _el$54;
|
|
629
|
-
})() : [(() => {
|
|
630
|
-
var _el$58 = _$createElement("box"),
|
|
631
|
-
_el$59 = _$createElement("text"),
|
|
632
|
-
_el$60 = _$createElement("b"),
|
|
633
|
-
_el$62 = _$createElement("box"),
|
|
634
|
-
_el$63 = _$createElement("text"),
|
|
635
|
-
_el$64 = _$createElement("b"),
|
|
636
|
-
_el$66 = _$createElement("box"),
|
|
637
|
-
_el$67 = _$createElement("text"),
|
|
638
|
-
_el$68 = _$createElement("b"),
|
|
639
|
-
_el$70 = _$createElement("box"),
|
|
640
|
-
_el$71 = _$createElement("text"),
|
|
641
|
-
_el$72 = _$createElement("b");
|
|
642
|
-
_$insertNode(_el$58, _el$59);
|
|
643
|
-
_$insertNode(_el$58, _el$62);
|
|
644
|
-
_$insertNode(_el$58, _el$66);
|
|
645
|
-
_$insertNode(_el$58, _el$70);
|
|
646
|
-
_$setProp(_el$58, "flexDirection", "column");
|
|
647
|
-
_$setProp(_el$58, "flexGrow", 1);
|
|
648
|
-
_$setProp(_el$58, "flexBasis", 0);
|
|
649
|
-
_$insertNode(_el$59, _el$60);
|
|
650
|
-
_$insertNode(_el$60, _$createTextNode(`Tags`));
|
|
651
|
-
_$insert(_el$58, _$createComponent(R, {
|
|
652
|
-
get t() {
|
|
653
|
-
return t();
|
|
654
|
-
},
|
|
655
|
-
l: "Active",
|
|
656
|
-
get v() {
|
|
657
|
-
return _$memo(() => s().tagCountsAuthoritative === false)() ? "n/a (module total only)" : `${s().activeTags} (~${fmtBytes(s().activeBytes)})`;
|
|
658
|
-
}
|
|
659
|
-
}), _el$62);
|
|
660
|
-
_$insert(_el$58, _$createComponent(R, {
|
|
661
|
-
get t() {
|
|
662
|
-
return t();
|
|
663
|
-
},
|
|
664
|
-
l: "Dropped",
|
|
665
|
-
get v() {
|
|
666
|
-
return _$memo(() => s().tagCountsAuthoritative === false)() ? "n/a (module total only)" : String(s().droppedTags);
|
|
667
|
-
}
|
|
668
|
-
}), _el$62);
|
|
669
|
-
_$insert(_el$58, _$createComponent(R, {
|
|
670
|
-
get t() {
|
|
671
|
-
return t();
|
|
672
|
-
},
|
|
673
|
-
l: "Total",
|
|
674
|
-
get v() {
|
|
675
|
-
return String(s().totalTags);
|
|
676
|
-
},
|
|
677
|
-
get fg() {
|
|
678
|
-
return t().textMuted;
|
|
679
|
-
}
|
|
680
|
-
}), _el$62);
|
|
681
|
-
_$insertNode(_el$62, _el$63);
|
|
682
|
-
_$setProp(_el$62, "marginTop", 1);
|
|
683
|
-
_$insertNode(_el$63, _el$64);
|
|
684
|
-
_$insertNode(_el$64, _$createTextNode(`Pending Queue`));
|
|
685
|
-
_$insert(_el$58, _$createComponent(R, {
|
|
686
|
-
get t() {
|
|
687
|
-
return t();
|
|
688
|
-
},
|
|
689
|
-
l: "Drops",
|
|
690
|
-
get v() {
|
|
691
|
-
return String(s().pendingOpsCount);
|
|
692
|
-
},
|
|
693
|
-
get fg() {
|
|
694
|
-
return _$memo(() => s().pendingOpsCount > 0)() ? t().warning : t().textMuted;
|
|
695
|
-
}
|
|
696
|
-
}), _el$66);
|
|
697
|
-
_$insertNode(_el$66, _el$67);
|
|
698
|
-
_$setProp(_el$66, "marginTop", 1);
|
|
699
|
-
_$insertNode(_el$67, _el$68);
|
|
700
|
-
_$insertNode(_el$68, _$createTextNode(`Cache TTL`));
|
|
701
|
-
_$insert(_el$58, _$createComponent(R, {
|
|
702
|
-
get t() {
|
|
703
|
-
return t();
|
|
704
|
-
},
|
|
705
|
-
l: "Configured",
|
|
706
|
-
get v() {
|
|
707
|
-
return formatCacheTtlDisplay({
|
|
708
|
-
value: s().cacheTtl,
|
|
709
|
-
source: s().cacheTtlSource,
|
|
710
|
-
modelKey: s().cacheTtlModelKey
|
|
711
|
-
}).replace(/^Cache TTL: /, "");
|
|
712
|
-
}
|
|
713
|
-
}), _el$70);
|
|
714
|
-
_$insert(_el$58, _$createComponent(R, {
|
|
715
|
-
get t() {
|
|
716
|
-
return t();
|
|
717
|
-
},
|
|
718
|
-
l: "Last response",
|
|
719
|
-
get v() {
|
|
720
|
-
return _$memo(() => s().lastResponseTime > 0)() ? `${Math.round(elapsed() / 1000)}s ago` : "never";
|
|
721
|
-
}
|
|
722
|
-
}), _el$70);
|
|
723
|
-
_$insert(_el$58, _$createComponent(R, {
|
|
724
|
-
get t() {
|
|
725
|
-
return t();
|
|
726
|
-
},
|
|
727
|
-
l: "Remaining",
|
|
728
|
-
get v() {
|
|
729
|
-
return _$memo(() => !!s().cacheExpired)() ? "expired" : _$memo(() => !!s().cacheNeverExpires)() ? "never (MC never assumes expiry — external cache-keep)" : `${Math.round(s().cacheRemainingMs / 1000)}s`;
|
|
730
|
-
},
|
|
731
|
-
get fg() {
|
|
732
|
-
return _$memo(() => !!s().cacheExpired)() ? t().warning : t().textMuted;
|
|
733
|
-
}
|
|
734
|
-
}), _el$70);
|
|
735
|
-
_$insert(_el$58, _$createComponent(R, {
|
|
736
|
-
get t() {
|
|
737
|
-
return t();
|
|
738
|
-
},
|
|
739
|
-
l: "Auto-execute",
|
|
740
|
-
get v() {
|
|
741
|
-
return _$memo(() => !!s().cacheExpired)() ? "yes (expired)" : _$memo(() => !!s().cacheNeverExpires)() ? `at ≥${formatThresholdPercent(s().executeThreshold)}%` : `at TTL or ≥${formatThresholdPercent(s().executeThreshold)}%`;
|
|
742
|
-
},
|
|
743
|
-
get fg() {
|
|
744
|
-
return t().textMuted;
|
|
745
|
-
}
|
|
746
|
-
}), _el$70);
|
|
747
|
-
_$insertNode(_el$70, _el$71);
|
|
748
|
-
_$setProp(_el$70, "marginTop", 1);
|
|
749
|
-
_$insertNode(_el$71, _el$72);
|
|
750
|
-
_$insertNode(_el$72, _$createTextNode(`Memory`));
|
|
751
|
-
_$insert(_el$58, _$createComponent(R, {
|
|
752
|
-
get t() {
|
|
753
|
-
return t();
|
|
754
|
-
},
|
|
755
|
-
l: "Active",
|
|
756
|
-
get v() {
|
|
757
|
-
return String(s().memoryCount);
|
|
758
|
-
},
|
|
759
|
-
get fg() {
|
|
760
|
-
return t().accent;
|
|
761
|
-
}
|
|
762
|
-
}), null);
|
|
763
|
-
_$insert(_el$58, _$createComponent(R, {
|
|
764
|
-
get t() {
|
|
765
|
-
return t();
|
|
766
|
-
},
|
|
767
|
-
l: "Injected",
|
|
768
|
-
get v() {
|
|
769
|
-
return String(s().memoryBlockCount);
|
|
770
|
-
},
|
|
771
|
-
get fg() {
|
|
772
|
-
return t().textMuted;
|
|
773
|
-
}
|
|
774
|
-
}), null);
|
|
775
|
-
_$effect(_p$ => {
|
|
776
|
-
var _v$13 = t().text,
|
|
777
|
-
_v$14 = t().text,
|
|
778
|
-
_v$15 = t().text,
|
|
779
|
-
_v$16 = t().text;
|
|
780
|
-
_v$13 !== _p$.e && (_p$.e = _$setProp(_el$59, "fg", _v$13, _p$.e));
|
|
781
|
-
_v$14 !== _p$.t && (_p$.t = _$setProp(_el$63, "fg", _v$14, _p$.t));
|
|
782
|
-
_v$15 !== _p$.a && (_p$.a = _$setProp(_el$67, "fg", _v$15, _p$.a));
|
|
783
|
-
_v$16 !== _p$.o && (_p$.o = _$setProp(_el$71, "fg", _v$16, _p$.o));
|
|
784
|
-
return _p$;
|
|
785
|
-
}, {
|
|
786
|
-
e: undefined,
|
|
787
|
-
t: undefined,
|
|
788
|
-
a: undefined,
|
|
789
|
-
o: undefined
|
|
790
|
-
});
|
|
791
|
-
return _el$58;
|
|
792
|
-
})(), (() => {
|
|
793
|
-
var _el$74 = _$createElement("box"),
|
|
794
|
-
_el$75 = _$createElement("text"),
|
|
795
|
-
_el$76 = _$createElement("b"),
|
|
796
|
-
_el$78 = _$createElement("box"),
|
|
797
|
-
_el$79 = _$createElement("text"),
|
|
798
|
-
_el$80 = _$createElement("b"),
|
|
799
|
-
_el$82 = _$createElement("box"),
|
|
800
|
-
_el$83 = _$createElement("text"),
|
|
801
|
-
_el$84 = _$createElement("b");
|
|
802
|
-
_$insertNode(_el$74, _el$75);
|
|
803
|
-
_$insertNode(_el$74, _el$78);
|
|
804
|
-
_$insertNode(_el$74, _el$82);
|
|
805
|
-
_$setProp(_el$74, "flexDirection", "column");
|
|
806
|
-
_$setProp(_el$74, "flexGrow", 1);
|
|
807
|
-
_$setProp(_el$74, "flexBasis", 0);
|
|
808
|
-
_$insertNode(_el$75, _el$76);
|
|
809
|
-
_$insertNode(_el$76, _$createTextNode(`Reductions`));
|
|
810
|
-
_$insert(_el$74, _$createComponent(R, {
|
|
811
|
-
get t() {
|
|
812
|
-
return t();
|
|
813
|
-
},
|
|
814
|
-
l: "Execute threshold",
|
|
815
|
-
get v() {
|
|
816
|
-
return `${formatThresholdPercent(s().executeThreshold)}%${s().executeThresholdClamped ? "*" : ""}`;
|
|
817
|
-
}
|
|
818
|
-
}), _el$78);
|
|
819
|
-
_$insert(_el$74, _$createComponent(R, {
|
|
820
|
-
get t() {
|
|
821
|
-
return t();
|
|
822
|
-
},
|
|
823
|
-
l: "Last reduce anchor",
|
|
824
|
-
get v() {
|
|
825
|
-
return `${fmt(s().lastNudgeTokens)} tok`;
|
|
826
|
-
}
|
|
827
|
-
}), _el$78);
|
|
828
|
-
_$insertNode(_el$78, _el$79);
|
|
829
|
-
_$setProp(_el$78, "marginTop", 1);
|
|
830
|
-
_$insertNode(_el$79, _el$80);
|
|
831
|
-
_$insertNode(_el$80, _$createTextNode(`Context Details`));
|
|
832
|
-
_$insert(_el$74, _$createComponent(R, {
|
|
833
|
-
get t() {
|
|
834
|
-
return t();
|
|
835
|
-
},
|
|
836
|
-
l: "Protected tags",
|
|
837
|
-
get v() {
|
|
838
|
-
return String(s().protectedTagCount);
|
|
839
|
-
},
|
|
840
|
-
get fg() {
|
|
841
|
-
return t().textMuted;
|
|
842
|
-
}
|
|
843
|
-
}), _el$82);
|
|
844
|
-
_$insert(_el$74, _$createComponent(R, {
|
|
845
|
-
get t() {
|
|
846
|
-
return t();
|
|
847
|
-
},
|
|
848
|
-
l: "Subagent",
|
|
849
|
-
get v() {
|
|
850
|
-
return s().isSubagent ? "yes" : "no";
|
|
851
|
-
},
|
|
852
|
-
get fg() {
|
|
853
|
-
return t().textMuted;
|
|
854
|
-
}
|
|
855
|
-
}), _el$82);
|
|
856
|
-
_$insertNode(_el$82, _el$83);
|
|
857
|
-
_$setProp(_el$82, "marginTop", 1);
|
|
858
|
-
_$insertNode(_el$83, _el$84);
|
|
859
|
-
_$insertNode(_el$84, _$createTextNode(`History Compression`));
|
|
860
|
-
_$insert(_el$74, (() => {
|
|
861
|
-
var _c$0 = _$memo(() => typeof s().boundaryPresent === "boolean");
|
|
862
|
-
return () => _c$0() && _$createComponent(R, {
|
|
863
|
-
get t() {
|
|
864
|
-
return t();
|
|
865
|
-
},
|
|
866
|
-
l: "Boundary",
|
|
867
|
-
get v() {
|
|
868
|
-
return s().boundaryPresent ? "present" : "absent";
|
|
869
|
-
}
|
|
870
|
-
});
|
|
871
|
-
})(), null);
|
|
872
|
-
_$insert(_el$74, (() => {
|
|
873
|
-
var _c$1 = _$memo(() => s().coverageOrdinal !== undefined);
|
|
874
|
-
return () => _c$1() && _$createComponent(R, {
|
|
875
|
-
get t() {
|
|
876
|
-
return t();
|
|
877
|
-
},
|
|
878
|
-
l: "Coverage ordinal",
|
|
879
|
-
get v() {
|
|
880
|
-
return _$memo(() => s().coverageOrdinal == null)() ? "none" : String(s().coverageOrdinal);
|
|
881
|
-
}
|
|
882
|
-
});
|
|
883
|
-
})(), null);
|
|
884
|
-
_$insert(_el$74, (() => {
|
|
885
|
-
var _c$10 = _$memo(() => typeof s().boundaryPresent === "boolean");
|
|
886
|
-
return () => _c$10() && _$createComponent(R, {
|
|
887
|
-
get t() {
|
|
888
|
-
return t();
|
|
889
|
-
},
|
|
890
|
-
l: "Compartments",
|
|
891
|
-
get v() {
|
|
892
|
-
return String(s().compartmentCount);
|
|
893
|
-
}
|
|
894
|
-
});
|
|
895
|
-
})(), null);
|
|
896
|
-
_$insert(_el$74, _$createComponent(R, {
|
|
897
|
-
get t() {
|
|
898
|
-
return t();
|
|
899
|
-
},
|
|
900
|
-
l: "History block",
|
|
901
|
-
get v() {
|
|
902
|
-
return `~${fmt(s().historyBlockTokens)} tok`;
|
|
903
|
-
}
|
|
904
|
-
}), null);
|
|
905
|
-
_$insert(_el$74, (() => {
|
|
906
|
-
var _c$11 = _$memo(() => s().compressionBudget != null);
|
|
907
|
-
return () => _c$11() && _$createComponent(R, {
|
|
908
|
-
get t() {
|
|
909
|
-
return t();
|
|
910
|
-
},
|
|
911
|
-
l: "Budget",
|
|
912
|
-
get v() {
|
|
913
|
-
return `~${fmt(s().compressionBudget)} tok (${s().compressionUsage} used)`;
|
|
914
|
-
}
|
|
915
|
-
});
|
|
916
|
-
})(), null);
|
|
917
|
-
_$insert(_el$74, (() => {
|
|
918
|
-
var _c$12 = _$memo(() => !!s().lastDreamerRunAt);
|
|
919
|
-
return () => _c$12() && _$createComponent(R, {
|
|
920
|
-
get t() {
|
|
921
|
-
return t();
|
|
922
|
-
},
|
|
923
|
-
l: "Dreamer",
|
|
924
|
-
get v() {
|
|
925
|
-
return `last ${relTime(s().lastDreamerRunAt)}`;
|
|
926
|
-
},
|
|
927
|
-
get fg() {
|
|
928
|
-
return t().textMuted;
|
|
929
|
-
}
|
|
930
|
-
});
|
|
931
|
-
})(), null);
|
|
932
|
-
_$effect(_p$ => {
|
|
933
|
-
var _v$17 = t().text,
|
|
934
|
-
_v$18 = t().text,
|
|
935
|
-
_v$19 = t().text;
|
|
936
|
-
_v$17 !== _p$.e && (_p$.e = _$setProp(_el$75, "fg", _v$17, _p$.e));
|
|
937
|
-
_v$18 !== _p$.t && (_p$.t = _$setProp(_el$79, "fg", _v$18, _p$.t));
|
|
938
|
-
_v$19 !== _p$.a && (_p$.a = _$setProp(_el$83, "fg", _v$19, _p$.a));
|
|
939
|
-
return _p$;
|
|
940
|
-
}, {
|
|
941
|
-
e: undefined,
|
|
942
|
-
t: undefined,
|
|
943
|
-
a: undefined
|
|
944
|
-
});
|
|
945
|
-
return _el$74;
|
|
946
|
-
})()];
|
|
947
|
-
})());
|
|
948
|
-
return _el$25;
|
|
949
|
-
})(), _$memo(() => _$memo(() => !!s().lastTransformError)() && (() => {
|
|
950
|
-
var _el$86 = _$createElement("box"),
|
|
951
|
-
_el$87 = _$createElement("text");
|
|
952
|
-
_$insertNode(_el$86, _el$87);
|
|
953
|
-
_$setProp(_el$86, "marginTop", 1);
|
|
954
|
-
_$setProp(_el$86, "width", "100%");
|
|
955
|
-
_$insert(_el$87, () => renderUserFacingFailure("transform_update_failed"));
|
|
956
|
-
_$effect(_$p => _$setProp(_el$87, "fg", t().error, _$p));
|
|
957
|
-
return _el$86;
|
|
958
|
-
})()), (() => {
|
|
959
|
-
var _el$26 = _$createElement("box"),
|
|
960
|
-
_el$27 = _$createElement("text"),
|
|
961
|
-
_el$28 = _$createElement("b");
|
|
962
|
-
_$insertNode(_el$26, _el$27);
|
|
963
|
-
_$setProp(_el$26, "marginTop", 1);
|
|
964
|
-
_$setProp(_el$26, "width", "100%");
|
|
965
|
-
_$insertNode(_el$27, _el$28);
|
|
966
|
-
_$insertNode(_el$28, _$createTextNode(`Logger`));
|
|
967
|
-
_$insert(_el$26, _$createComponent(R, {
|
|
968
|
-
get t() {
|
|
969
|
-
return t();
|
|
970
|
-
},
|
|
971
|
-
l: "Swallowed writes",
|
|
972
|
-
get v() {
|
|
973
|
-
return String(s().loggerDiagnostics?.swallowedWriteCount ?? 0);
|
|
974
|
-
},
|
|
975
|
-
get fg() {
|
|
976
|
-
return _$memo(() => (s().loggerDiagnostics?.swallowedWriteCount ?? 0) > 0)() ? t().error : t().textMuted;
|
|
977
|
-
}
|
|
978
|
-
}), null);
|
|
979
|
-
_$insert(_el$26, (() => {
|
|
980
|
-
var _c$6 = _$memo(() => !!s().loggerDiagnostics?.lastErrorMessage);
|
|
981
|
-
return () => _c$6() && _$createComponent(R, {
|
|
982
|
-
get t() {
|
|
983
|
-
return t();
|
|
984
|
-
},
|
|
985
|
-
l: "Warning",
|
|
986
|
-
get v() {
|
|
987
|
-
return renderUserFacingFailure("status_unavailable");
|
|
988
|
-
},
|
|
989
|
-
get fg() {
|
|
990
|
-
return t().error;
|
|
991
|
-
}
|
|
992
|
-
});
|
|
993
|
-
})(), null);
|
|
994
|
-
_$insert(_el$26, (() => {
|
|
995
|
-
var _c$7 = _$memo(() => !!s().loggerDiagnostics?.lastErrorTime);
|
|
996
|
-
return () => _c$7() && _$createComponent(R, {
|
|
997
|
-
get t() {
|
|
998
|
-
return t();
|
|
999
|
-
},
|
|
1000
|
-
l: "Last error time",
|
|
1001
|
-
get v() {
|
|
1002
|
-
return s().loggerDiagnostics.lastErrorTime;
|
|
1003
|
-
},
|
|
1004
|
-
get fg() {
|
|
1005
|
-
return t().textMuted;
|
|
1006
|
-
}
|
|
1007
|
-
});
|
|
1008
|
-
})(), null);
|
|
1009
|
-
_$effect(_$p => _$setProp(_el$27, "fg", t().text, _$p));
|
|
1010
|
-
return _el$26;
|
|
1011
|
-
})()];
|
|
1012
|
-
})(), _el$12);
|
|
1013
|
-
_$insertNode(_el$12, _el$13);
|
|
1014
|
-
_$setProp(_el$12, "marginTop", 1);
|
|
1015
|
-
_$setProp(_el$12, "justifyContent", "flex-end");
|
|
1016
|
-
_$setProp(_el$12, "width", "100%");
|
|
1017
|
-
_$insertNode(_el$13, _$createTextNode(`Esc to close`));
|
|
1018
|
-
_$effect(_p$ => {
|
|
1019
|
-
var _v$3 = t().accent,
|
|
1020
|
-
_v$4 = t().textMuted,
|
|
1021
|
-
_v$5 = diagnostics() ? t().accent : t().textMuted,
|
|
1022
|
-
_v$6 = t().textMuted;
|
|
1023
|
-
_v$3 !== _p$.e && (_p$.e = _$setProp(_el$6, "fg", _v$3, _p$.e));
|
|
1024
|
-
_v$4 !== _p$.t && (_p$.t = _$setProp(_el$9, "fg", _v$4, _p$.t));
|
|
1025
|
-
_v$5 !== _p$.a && (_p$.a = _$setProp(_el$10, "fg", _v$5, _p$.a));
|
|
1026
|
-
_v$6 !== _p$.o && (_p$.o = _$setProp(_el$13, "fg", _v$6, _p$.o));
|
|
1027
|
-
return _p$;
|
|
1028
|
-
}, {
|
|
1029
|
-
e: undefined,
|
|
1030
|
-
t: undefined,
|
|
1031
|
-
a: undefined,
|
|
1032
|
-
o: undefined
|
|
1033
|
-
});
|
|
1034
|
-
return _el$4;
|
|
1035
|
-
})();
|
|
1036
|
-
};
|
|
1037
109
|
function getModelKeyFromMessages(api, sessionId) {
|
|
1038
110
|
try {
|
|
1039
111
|
const msgs = api.state.session.messages(sessionId);
|
|
@@ -1108,54 +180,7 @@ async function showRecompDialog(api, targetSessionId = getSessionId(api)) {
|
|
|
1108
180
|
}));
|
|
1109
181
|
return true;
|
|
1110
182
|
}
|
|
1111
|
-
function
|
|
1112
|
-
const sessionId = targetSessionId;
|
|
1113
|
-
if (!sessionId) {
|
|
1114
|
-
// No active session — nothing to upgrade. Silently skip (the server only
|
|
1115
|
-
// enqueues this for sessions with legacy compartments, but the TUI may
|
|
1116
|
-
// have switched sessions before the poller fired).
|
|
1117
|
-
return false;
|
|
1118
|
-
}
|
|
1119
|
-
if (getSessionId(api) !== sessionId) return false;
|
|
1120
|
-
const title = resume ? "🎆 Resume the interrupted upgrade?" : "🎆 Historian V2 is released!";
|
|
1121
|
-
const message = resume ? [`An earlier upgrade to the new historian format was interrupted. ${resume.stagedCount} compartment${resume.stagedCount === 1 ? " was" : "s were"} already rebuilt (through message ${resume.stagedThrough}). Resuming continues from where it left off — nothing already rebuilt is reprocessed.`, "", "Resuming will:", "• Rebuild the remaining compartments into the new layered format", "• Re-organize this project's memories into the new taxonomy (once per project)", "", "The historian runs in the background and you can keep working. You can also resume via /ctx-session-upgrade later.", "", "Resume the upgrade now?"].join("\n") : ["This session's compartments are written by the old historian. The session is still usable with its old compartments, however it's strongly advised to upgrade them to the new format. This means every compartment needs to be reprocessed by the new historian, which might take a while depending on how big your session is.", "", "Running the upgrade will:", "• Rebuild this session's compartments into the new layered format", "• Re-organize this project's memories into the new taxonomy (once per project)", "", "The historian runs in the background and you can keep working while older compartments are reprocessed. You can also upgrade via /ctx-session-upgrade later.", "", "Run the upgrade now?"].join("\n");
|
|
1122
|
-
api.ui.dialog.replace(() => _$createComponent(api.ui.DialogConfirm, {
|
|
1123
|
-
title: title,
|
|
1124
|
-
message: message,
|
|
1125
|
-
onConfirm: async () => {
|
|
1126
|
-
const started = await requestUpgrade(sessionId);
|
|
1127
|
-
if (!started) {
|
|
1128
|
-
showToast(api, {
|
|
1129
|
-
message: "Session upgrade request failed",
|
|
1130
|
-
variant: "error"
|
|
1131
|
-
});
|
|
1132
|
-
return;
|
|
1133
|
-
}
|
|
1134
|
-
// The RPC call fires no message event, so start the sidebar's
|
|
1135
|
-
// progress poll only after the server accepts the request.
|
|
1136
|
-
kickRecompProgressRefresh();
|
|
1137
|
-
showToast(api, {
|
|
1138
|
-
message: resume ? "Resuming session upgrade — running in the background" : "Session upgrade started — running in the background",
|
|
1139
|
-
variant: "info"
|
|
1140
|
-
});
|
|
1141
|
-
void dismissUpgradeReminder(sessionId);
|
|
1142
|
-
},
|
|
1143
|
-
onCancel: () => {
|
|
1144
|
-
// Explicit decline → set the durable stamp so we don't re-prompt
|
|
1145
|
-
// on every restart. The fix for stamp-on-display trapping a
|
|
1146
|
-
// never-upgraded session (dogfood 2026-05-30) relies on THIS
|
|
1147
|
-
// being the only place the TUI path stamps.
|
|
1148
|
-
void dismissUpgradeReminder(sessionId);
|
|
1149
|
-
showToast(api, {
|
|
1150
|
-
message: "Upgrade skipped — run /ctx-session-upgrade anytime",
|
|
1151
|
-
variant: "info",
|
|
1152
|
-
durationOverrideMs: 4000
|
|
1153
|
-
});
|
|
1154
|
-
}
|
|
1155
|
-
}));
|
|
1156
|
-
return true;
|
|
1157
|
-
}
|
|
1158
|
-
async function showStatusDialog(api, targetSessionId = getSessionId(api), initialDiagnostics = false) {
|
|
183
|
+
async function showStatusDialog(api, targetSessionId = getSessionId(api)) {
|
|
1159
184
|
const sessionId = targetSessionId;
|
|
1160
185
|
if (!sessionId) {
|
|
1161
186
|
showToast(api, {
|
|
@@ -1180,8 +205,7 @@ async function showStatusDialog(api, targetSessionId = getSessionId(api), initia
|
|
|
1180
205
|
api: api,
|
|
1181
206
|
get s() {
|
|
1182
207
|
return result.detail;
|
|
1183
|
-
}
|
|
1184
|
-
diagnostics: initialDiagnostics
|
|
208
|
+
}
|
|
1185
209
|
}));
|
|
1186
210
|
return true;
|
|
1187
211
|
}
|
|
@@ -1190,31 +214,31 @@ const EmbedDialog = props => {
|
|
|
1190
214
|
const t = () => theme();
|
|
1191
215
|
const lines = () => props.detail.statusText.split("\n");
|
|
1192
216
|
return (() => {
|
|
1193
|
-
var _el$
|
|
1194
|
-
_el$
|
|
1195
|
-
_el$
|
|
1196
|
-
_el$
|
|
1197
|
-
_$insertNode(_el
|
|
1198
|
-
_$setProp(_el
|
|
1199
|
-
_$setProp(_el
|
|
1200
|
-
_$setProp(_el
|
|
1201
|
-
_$setProp(_el
|
|
1202
|
-
_$setProp(_el
|
|
1203
|
-
_$setProp(_el
|
|
1204
|
-
_$insertNode(_el$
|
|
1205
|
-
_$setProp(_el$
|
|
1206
|
-
_$setProp(_el$
|
|
1207
|
-
_$setProp(_el$
|
|
1208
|
-
_$insertNode(_el$
|
|
1209
|
-
_$insertNode(_el$
|
|
1210
|
-
_$insert(_el
|
|
1211
|
-
var _el$
|
|
1212
|
-
_$insert(_el$
|
|
1213
|
-
_$effect(_$p => _$setProp(_el$
|
|
1214
|
-
return _el$
|
|
217
|
+
var _el$ = _$createElement("box"),
|
|
218
|
+
_el$2 = _$createElement("box"),
|
|
219
|
+
_el$3 = _$createElement("text"),
|
|
220
|
+
_el$4 = _$createElement("b");
|
|
221
|
+
_$insertNode(_el$, _el$2);
|
|
222
|
+
_$setProp(_el$, "flexDirection", "column");
|
|
223
|
+
_$setProp(_el$, "width", "100%");
|
|
224
|
+
_$setProp(_el$, "paddingLeft", 2);
|
|
225
|
+
_$setProp(_el$, "paddingRight", 2);
|
|
226
|
+
_$setProp(_el$, "paddingTop", 1);
|
|
227
|
+
_$setProp(_el$, "paddingBottom", 1);
|
|
228
|
+
_$insertNode(_el$2, _el$3);
|
|
229
|
+
_$setProp(_el$2, "justifyContent", "center");
|
|
230
|
+
_$setProp(_el$2, "width", "100%");
|
|
231
|
+
_$setProp(_el$2, "marginBottom", 1);
|
|
232
|
+
_$insertNode(_el$3, _el$4);
|
|
233
|
+
_$insertNode(_el$4, _$createTextNode(`Embedding`));
|
|
234
|
+
_$insert(_el$, () => lines().map(line => (() => {
|
|
235
|
+
var _el$6 = _$createElement("text");
|
|
236
|
+
_$insert(_el$6, line);
|
|
237
|
+
_$effect(_$p => _$setProp(_el$6, "fg", t().text, _$p));
|
|
238
|
+
return _el$6;
|
|
1215
239
|
})()), null);
|
|
1216
|
-
_$effect(_$p => _$setProp(_el$
|
|
1217
|
-
return _el
|
|
240
|
+
_$effect(_$p => _$setProp(_el$3, "fg", t().accent, _$p));
|
|
241
|
+
return _el$;
|
|
1218
242
|
})();
|
|
1219
243
|
};
|
|
1220
244
|
async function showEmbedDialog(api, targetSessionId = getSessionId(api)) {
|
|
@@ -1280,11 +304,11 @@ function renderTuiProbeCustomArm(api, result) {
|
|
|
1280
304
|
api.ui.dialog.replace(() => {
|
|
1281
305
|
try {
|
|
1282
306
|
return (() => {
|
|
1283
|
-
var _el$
|
|
1284
|
-
_el$
|
|
1285
|
-
_$insertNode(_el$
|
|
1286
|
-
_$insertNode(_el$
|
|
1287
|
-
return _el$
|
|
307
|
+
var _el$7 = _$createElement("box"),
|
|
308
|
+
_el$8 = _$createElement("text");
|
|
309
|
+
_$insertNode(_el$7, _el$8);
|
|
310
|
+
_$insertNode(_el$8, _$createTextNode(`probe`));
|
|
311
|
+
return _el$7;
|
|
1288
312
|
})();
|
|
1289
313
|
} catch (error) {
|
|
1290
314
|
result.customThrew = probeErrorMessage(error);
|
|
@@ -1357,11 +381,11 @@ function reportTuiProbe(api, result) {
|
|
|
1357
381
|
if (result.customThrew === null) {
|
|
1358
382
|
try {
|
|
1359
383
|
api.ui.dialog.replace(() => (() => {
|
|
1360
|
-
var _el$
|
|
1361
|
-
_el$
|
|
1362
|
-
_$insertNode(_el$
|
|
1363
|
-
_$insert(_el$
|
|
1364
|
-
return _el$
|
|
384
|
+
var _el$0 = _$createElement("box"),
|
|
385
|
+
_el$1 = _$createElement("text");
|
|
386
|
+
_$insertNode(_el$0, _el$1);
|
|
387
|
+
_$insert(_el$1, summary);
|
|
388
|
+
return _el$0;
|
|
1365
389
|
})());
|
|
1366
390
|
return;
|
|
1367
391
|
} catch (error) {
|
|
@@ -1602,6 +626,7 @@ const tui = async (api, _options, meta) => {
|
|
|
1602
626
|
}
|
|
1603
627
|
if (n.type === "toast") {
|
|
1604
628
|
const p = n.payload;
|
|
629
|
+
await refreshToastDurationMs();
|
|
1605
630
|
showToast(api, {
|
|
1606
631
|
message: String(p.message ?? ""),
|
|
1607
632
|
variant: p.variant ?? "info",
|
|
@@ -1613,18 +638,11 @@ const tui = async (api, _options, meta) => {
|
|
|
1613
638
|
const action = n.payload?.action;
|
|
1614
639
|
const stillActive = () => getRpcGeneration() === generation && getSessionId(api) === requestedSessionId;
|
|
1615
640
|
if (action === "show-status-dialog") {
|
|
1616
|
-
return stillActive() && (await showStatusDialog(api, requestedSessionId
|
|
641
|
+
return stillActive() && (await showStatusDialog(api, requestedSessionId));
|
|
1617
642
|
}
|
|
1618
643
|
if (action === "show-recomp-dialog") {
|
|
1619
644
|
return stillActive() && (await showRecompDialog(api, requestedSessionId));
|
|
1620
645
|
}
|
|
1621
|
-
if (action === "show-upgrade-dialog") {
|
|
1622
|
-
const resume = n.payload?.resume === true ? {
|
|
1623
|
-
stagedCount: Number(n.payload?.stagedCount ?? 0),
|
|
1624
|
-
stagedThrough: Number(n.payload?.stagedThrough ?? 0)
|
|
1625
|
-
} : undefined;
|
|
1626
|
-
return stillActive() && showUpgradeDialog(api, resume, requestedSessionId);
|
|
1627
|
-
}
|
|
1628
646
|
if (action === "show-embed-dialog") {
|
|
1629
647
|
return stillActive() && (await showEmbedDialog(api, requestedSessionId));
|
|
1630
648
|
}
|