indusagi-coding-agent 0.1.58 → 0.1.60
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 +55 -48
- package/CREDITS.md +19 -0
- package/NOTICE +7 -0
- package/README.md +65 -63
- package/dist/entry.js +19250 -0
- package/dist/types/addons/addons.test.d.ts +21 -0
- package/dist/types/addons/contract.d.ts +640 -0
- package/dist/types/addons/dispatch/event-dispatcher.d.ts +140 -0
- package/dist/types/addons/dispatch/index.d.ts +23 -0
- package/dist/types/addons/dispatch/tool-interceptor.d.ts +128 -0
- package/dist/types/addons/host.d.ts +246 -0
- package/dist/types/addons/index.d.ts +51 -0
- package/dist/types/addons/manifest.d.ts +56 -0
- package/dist/types/addons/sandbox.d.ts +103 -0
- package/dist/types/addons/surface.d.ts +42 -0
- package/dist/types/boot/auth-vault.d.ts +29 -0
- package/dist/types/boot/boot.d.ts +26 -0
- package/dist/types/boot/boot.test.d.ts +15 -0
- package/dist/types/boot/contract.d.ts +234 -0
- package/dist/types/boot/index.d.ts +20 -0
- package/dist/types/boot/invocation.d.ts +40 -0
- package/dist/types/boot/invocation.test.d.ts +8 -0
- package/dist/types/boot/runners/index.d.ts +11 -0
- package/dist/types/boot/runners/link-runner.d.ts +20 -0
- package/dist/types/boot/runners/oneshot-runner.d.ts +19 -0
- package/dist/types/boot/runners/registry.d.ts +30 -0
- package/dist/types/boot/runners/repl-runner.d.ts +19 -0
- package/dist/types/boot/runners/session-persist.test.d.ts +10 -0
- package/dist/types/boot/runners/session.d.ts +45 -0
- package/dist/types/boot/stages.d.ts +92 -0
- package/dist/types/boot/upgrade/apply.d.ts +45 -0
- package/dist/types/boot/upgrade/index.d.ts +13 -0
- package/dist/types/boot/upgrade/upgrades.d.ts +126 -0
- package/dist/types/briefing/briefing.test.d.ts +15 -0
- package/dist/types/briefing/compose.d.ts +37 -0
- package/dist/types/briefing/contract.d.ts +686 -0
- package/dist/types/briefing/index.d.ts +27 -0
- package/dist/types/briefing/macros.d.ts +206 -0
- package/dist/types/briefing/skills.d.ts +67 -0
- package/dist/types/capability-deck/bridge-ledger/index.d.ts +25 -0
- package/dist/types/capability-deck/bridge-ledger/key.d.ts +65 -0
- package/dist/types/capability-deck/bridge-ledger/ledger.d.ts +129 -0
- package/dist/types/capability-deck/bridge-ledger/network.d.ts +115 -0
- package/dist/types/capability-deck/builtin-bridge.d.ts +114 -0
- package/dist/types/capability-deck/capability-deck.test.d.ts +18 -0
- package/dist/types/capability-deck/cards/bg-process-card.d.ts +99 -0
- package/dist/types/capability-deck/cards/index.d.ts +30 -0
- package/dist/types/capability-deck/cards/memory-card.d.ts +69 -0
- package/dist/types/capability-deck/cards/saas-card.d.ts +78 -0
- package/dist/types/capability-deck/cards/task-card.d.ts +82 -0
- package/dist/types/capability-deck/cards/todo-card.d.ts +78 -0
- package/dist/types/capability-deck/contract.d.ts +317 -0
- package/dist/types/capability-deck/index.d.ts +46 -0
- package/dist/types/capability-deck/manifest.d.ts +60 -0
- package/dist/types/capability-deck/provision.d.ts +76 -0
- package/dist/types/channels/channels.test.d.ts +15 -0
- package/dist/types/channels/contract.d.ts +489 -0
- package/dist/types/channels/framer.d.ts +49 -0
- package/dist/types/channels/index.d.ts +24 -0
- package/dist/types/channels/link/dialog.d.ts +138 -0
- package/dist/types/channels/link/driver.d.ts +81 -0
- package/dist/types/channels/link/index.d.ts +13 -0
- package/dist/types/channels/link/server.d.ts +70 -0
- package/dist/types/channels/oneshot.d.ts +37 -0
- package/dist/types/channels/ops.d.ts +89 -0
- package/dist/types/channels/session-ops.d.ts +80 -0
- package/dist/types/conductor/catalog/catalog.d.ts +87 -0
- package/dist/types/conductor/catalog/index.d.ts +14 -0
- package/dist/types/conductor/catalog/matcher.d.ts +47 -0
- package/dist/types/conductor/conductor.d.ts +157 -0
- package/dist/types/conductor/conductor.test.d.ts +10 -0
- package/dist/types/conductor/contract.d.ts +547 -0
- package/dist/types/conductor/index.d.ts +23 -0
- package/dist/types/conductor/signal-hub/hub.d.ts +83 -0
- package/dist/types/conductor/signal-hub/index.d.ts +19 -0
- package/dist/types/conductor/signal-hub/translate.d.ts +74 -0
- package/dist/types/conductor/skill-parse/index.d.ts +10 -0
- package/dist/types/conductor/skill-parse/parse.d.ts +67 -0
- package/dist/types/conductor/submit.test.d.ts +28 -0
- package/dist/types/conductor/transcript-store/index.d.ts +16 -0
- package/dist/types/conductor/transcript-store/serialize.d.ts +106 -0
- package/dist/types/conductor/transcript-store/store.d.ts +170 -0
- package/dist/types/console/components/Banner.d.ts +54 -0
- package/dist/types/console/components/Composer.d.ts +37 -0
- package/dist/types/console/components/StatusBar.d.ts +31 -0
- package/dist/types/console/components/TerminalConsole.d.ts +32 -0
- package/dist/types/console/console.test.d.ts +19 -0
- package/dist/types/console/contract.d.ts +562 -0
- package/dist/types/console/index.d.ts +31 -0
- package/dist/types/console/input/complete.d.ts +120 -0
- package/dist/types/console/input/dir-reader.d.ts +28 -0
- package/dist/types/console/input/index.d.ts +24 -0
- package/dist/types/console/input/input.test.d.ts +14 -0
- package/dist/types/console/input/keymap.d.ts +184 -0
- package/dist/types/console/input/paste.d.ts +131 -0
- package/dist/types/console/mount.d.ts +53 -0
- package/dist/types/console/overlays/auth.d.ts +31 -0
- package/dist/types/console/overlays/host.d.ts +44 -0
- package/dist/types/console/overlays/index.d.ts +13 -0
- package/dist/types/console/overlays/pickers.d.ts +37 -0
- package/dist/types/console/overlays/sessions.d.ts +29 -0
- package/dist/types/console/reducer.d.ts +51 -0
- package/dist/types/console/slash/builtins.d.ts +33 -0
- package/dist/types/console/slash/commands/dynamic.d.ts +57 -0
- package/dist/types/console/slash/commands/dynamic.test.d.ts +9 -0
- package/dist/types/console/slash/commands/integrations.d.ts +28 -0
- package/dist/types/console/slash/commands/integrations.test.d.ts +18 -0
- package/dist/types/console/slash/commands/shared.d.ts +72 -0
- package/dist/types/console/slash/commands/transcript.d.ts +24 -0
- package/dist/types/console/slash/commands/transcript.test.d.ts +10 -0
- package/dist/types/console/slash/commands/workbench.d.ts +21 -0
- package/dist/types/console/slash/commands/workbench.test.d.ts +10 -0
- package/dist/types/console/slash/index.d.ts +34 -0
- package/dist/types/console/slash/registry.d.ts +90 -0
- package/dist/types/console/slash/resolve.d.ts +109 -0
- package/dist/types/console/slash/slash.test.d.ts +18 -0
- package/dist/types/console/startup.d.ts +119 -0
- package/dist/types/console/theme/adapter.d.ts +60 -0
- package/dist/types/console/theme/index.d.ts +18 -0
- package/dist/types/console/theme/palette.d.ts +42 -0
- package/dist/types/console/theme/resolve.d.ts +45 -0
- package/dist/types/console/theme/theme.test.d.ts +16 -0
- package/dist/types/console/theme/tokens.d.ts +40 -0
- package/dist/types/entry.d.ts +17 -0
- package/dist/types/index.d.ts +24 -0
- package/dist/types/insight/channel.d.ts +45 -0
- package/dist/types/insight/contract.d.ts +411 -0
- package/dist/types/insight/index.d.ts +26 -0
- package/dist/types/insight/insight.test.d.ts +17 -0
- package/dist/types/insight/recorder.d.ts +63 -0
- package/dist/types/insight/redaction.d.ts +44 -0
- package/dist/types/insight/replay.d.ts +77 -0
- package/dist/types/insight/sampling.d.ts +84 -0
- package/dist/types/insight/serialize.d.ts +54 -0
- package/dist/types/insight/sinks/console.d.ts +36 -0
- package/dist/types/insight/sinks/file.d.ts +37 -0
- package/dist/types/insight/sinks/index.d.ts +16 -0
- package/dist/types/insight/sinks/stream.d.ts +53 -0
- package/dist/types/kit/clipboard-image.d.ts +40 -0
- package/dist/types/kit/external-editor.d.ts +35 -0
- package/dist/types/kit/image.d.ts +102 -0
- package/dist/types/kit/index.d.ts +29 -0
- package/dist/types/kit/kit.test.d.ts +13 -0
- package/dist/types/kit/shell.d.ts +50 -0
- package/dist/types/kit/tool-fetch.d.ts +165 -0
- package/dist/types/launch/catalog.d.ts +51 -0
- package/dist/types/launch/contract.d.ts +385 -0
- package/dist/types/launch/credentials.d.ts +112 -0
- package/dist/types/launch/index.d.ts +28 -0
- package/dist/types/launch/invocation/attachments.d.ts +72 -0
- package/dist/types/launch/invocation/flags.d.ts +59 -0
- package/dist/types/launch/invocation/index.d.ts +23 -0
- package/dist/types/launch/invocation/read.d.ts +52 -0
- package/dist/types/launch/invocation/usage.d.ts +25 -0
- package/dist/types/launch/launch.test.d.ts +20 -0
- package/dist/types/launch/oauth.d.ts +88 -0
- package/dist/types/launch/packages.d.ts +75 -0
- package/dist/types/launch/packages.test.d.ts +15 -0
- package/dist/types/launch/pickers.d.ts +97 -0
- package/dist/types/runtime-bridge/bridges/_drive.d.ts +74 -0
- package/dist/types/runtime-bridge/bridges/builtins.d.ts +77 -0
- package/dist/types/runtime-bridge/bridges/claude-cli.d.ts +37 -0
- package/dist/types/runtime-bridge/bridges/codex-cli.d.ts +27 -0
- package/dist/types/runtime-bridge/bridges/index.d.ts +15 -0
- package/dist/types/runtime-bridge/bridges/indusagi-cli.d.ts +36 -0
- package/dist/types/runtime-bridge/broker.d.ts +182 -0
- package/dist/types/runtime-bridge/contract.d.ts +436 -0
- package/dist/types/runtime-bridge/index.d.ts +21 -0
- package/dist/types/runtime-bridge/runtime-bridge.test.d.ts +17 -0
- package/dist/types/runtime-bridge/sink.d.ts +59 -0
- package/dist/types/sessions/contract.d.ts +79 -0
- package/dist/types/sessions/index.d.ts +11 -0
- package/dist/types/sessions/library.d.ts +95 -0
- package/dist/types/sessions/sessions.test.d.ts +11 -0
- package/dist/types/settings/contract.d.ts +116 -0
- package/dist/types/settings/index.d.ts +13 -0
- package/dist/types/settings/manager.d.ts +109 -0
- package/dist/types/settings/settings.test.d.ts +16 -0
- package/dist/types/transcript-export/index.d.ts +20 -0
- package/dist/types/transcript-export/publish.d.ts +81 -0
- package/dist/types/transcript-export/sgr.d.ts +90 -0
- package/dist/types/transcript-export/template.d.ts +64 -0
- package/dist/types/transcript-export/theme-bridge.d.ts +99 -0
- package/dist/types/transcript-export/transcript-export.test.d.ts +16 -0
- package/dist/types/window-budget/budget/estimate.d.ts +47 -0
- package/dist/types/window-budget/budget/gate.d.ts +37 -0
- package/dist/types/window-budget/budget/index.d.ts +14 -0
- package/dist/types/window-budget/budget/slice.d.ts +38 -0
- package/dist/types/window-budget/condenser.d.ts +59 -0
- package/dist/types/window-budget/contract.d.ts +182 -0
- package/dist/types/window-budget/index.d.ts +15 -0
- package/dist/types/window-budget/summarize/condense.d.ts +70 -0
- package/dist/types/window-budget/summarize/index.d.ts +12 -0
- package/dist/types/window-budget/summarize/prompt.d.ts +56 -0
- package/dist/types/window-budget/window-budget.test.d.ts +18 -0
- package/dist/types/workspace/brand.d.ts +20 -0
- package/dist/types/workspace/index.d.ts +11 -0
- package/dist/types/workspace/locator.d.ts +50 -0
- package/dist/types/workspace/runtime-detect.d.ts +56 -0
- package/package.json +43 -62
- package/LICENSE +0 -8
- package/LICENSE-THIRD-PARTY.txt +0 -30
- package/demos/README.md +0 -12
- package/dist/cli.d.ts +0 -3
- package/dist/cli.d.ts.map +0 -1
- package/dist/cli.js +0 -30
- package/dist/cli.js.map +0 -1
- package/dist/command-line/args.d.ts +0 -59
- package/dist/command-line/args.d.ts.map +0 -1
- package/dist/command-line/args.js +0 -332
- package/dist/command-line/args.js.map +0 -1
- package/dist/command-line/config-selector.d.ts +0 -17
- package/dist/command-line/config-selector.d.ts.map +0 -1
- package/dist/command-line/config-selector.js +0 -34
- package/dist/command-line/config-selector.js.map +0 -1
- package/dist/command-line/file-processor.d.ts +0 -15
- package/dist/command-line/file-processor.d.ts.map +0 -1
- package/dist/command-line/file-processor.js +0 -73
- package/dist/command-line/file-processor.js.map +0 -1
- package/dist/command-line/list-models.d.ts +0 -9
- package/dist/command-line/list-models.d.ts.map +0 -1
- package/dist/command-line/list-models.js +0 -74
- package/dist/command-line/list-models.js.map +0 -1
- package/dist/command-line/login-handler.d.ts +0 -94
- package/dist/command-line/login-handler.d.ts.map +0 -1
- package/dist/command-line/login-handler.js +0 -794
- package/dist/command-line/login-handler.js.map +0 -1
- package/dist/command-line/session-picker.d.ts +0 -10
- package/dist/command-line/session-picker.d.ts.map +0 -1
- package/dist/command-line/session-picker.js +0 -60
- package/dist/command-line/session-picker.js.map +0 -1
- package/dist/config.d.ts +0 -31
- package/dist/config.d.ts.map +0 -1
- package/dist/config.js +0 -143
- package/dist/config.js.map +0 -1
- package/dist/dev/observe-deep.d.ts +0 -2
- package/dist/dev/observe-deep.d.ts.map +0 -1
- package/dist/dev/observe-deep.js +0 -333
- package/dist/dev/observe-deep.js.map +0 -1
- package/dist/dev/observe-smoke.d.ts +0 -2
- package/dist/dev/observe-smoke.d.ts.map +0 -1
- package/dist/dev/observe-smoke.js +0 -264
- package/dist/dev/observe-smoke.js.map +0 -1
- package/dist/helpers/array.d.ts +0 -438
- package/dist/helpers/array.d.ts.map +0 -1
- package/dist/helpers/array.js +0 -692
- package/dist/helpers/array.js.map +0 -1
- package/dist/helpers/changelog.d.ts +0 -20
- package/dist/helpers/changelog.d.ts.map +0 -1
- package/dist/helpers/changelog.js +0 -79
- package/dist/helpers/changelog.js.map +0 -1
- package/dist/helpers/clipboard-image.d.ts +0 -11
- package/dist/helpers/clipboard-image.d.ts.map +0 -1
- package/dist/helpers/clipboard-image.js +0 -111
- package/dist/helpers/clipboard-image.js.map +0 -1
- package/dist/helpers/clipboard.d.ts +0 -2
- package/dist/helpers/clipboard.d.ts.map +0 -1
- package/dist/helpers/clipboard.js +0 -72
- package/dist/helpers/clipboard.js.map +0 -1
- package/dist/helpers/color-formatter.d.ts +0 -318
- package/dist/helpers/color-formatter.d.ts.map +0 -1
- package/dist/helpers/color-formatter.js +0 -469
- package/dist/helpers/color-formatter.js.map +0 -1
- package/dist/helpers/data-transformer.d.ts +0 -391
- package/dist/helpers/data-transformer.d.ts.map +0 -1
- package/dist/helpers/data-transformer.js +0 -604
- package/dist/helpers/data-transformer.js.map +0 -1
- package/dist/helpers/date-formatter.d.ts +0 -316
- package/dist/helpers/date-formatter.d.ts.map +0 -1
- package/dist/helpers/date-formatter.js +0 -553
- package/dist/helpers/date-formatter.js.map +0 -1
- package/dist/helpers/error-handler.d.ts +0 -541
- package/dist/helpers/error-handler.d.ts.map +0 -1
- package/dist/helpers/error-handler.js +0 -726
- package/dist/helpers/error-handler.js.map +0 -1
- package/dist/helpers/file-operations.d.ts +0 -324
- package/dist/helpers/file-operations.d.ts.map +0 -1
- package/dist/helpers/file-operations.js +0 -543
- package/dist/helpers/file-operations.js.map +0 -1
- package/dist/helpers/frontmatter.d.ts +0 -273
- package/dist/helpers/frontmatter.d.ts.map +0 -1
- package/dist/helpers/frontmatter.js +0 -580
- package/dist/helpers/frontmatter.js.map +0 -1
- package/dist/helpers/git.d.ts +0 -2
- package/dist/helpers/git.d.ts.map +0 -1
- package/dist/helpers/git.js +0 -6
- package/dist/helpers/git.js.map +0 -1
- package/dist/helpers/image-convert.d.ts +0 -9
- package/dist/helpers/image-convert.d.ts.map +0 -1
- package/dist/helpers/image-convert.js +0 -41
- package/dist/helpers/image-convert.js.map +0 -1
- package/dist/helpers/image-resize.d.ts +0 -19
- package/dist/helpers/image-resize.d.ts.map +0 -1
- package/dist/helpers/image-resize.js +0 -143
- package/dist/helpers/image-resize.js.map +0 -1
- package/dist/helpers/json-formatter.d.ts +0 -267
- package/dist/helpers/json-formatter.d.ts.map +0 -1
- package/dist/helpers/json-formatter.js +0 -533
- package/dist/helpers/json-formatter.js.map +0 -1
- package/dist/helpers/logger.d.ts +0 -176
- package/dist/helpers/logger.d.ts.map +0 -1
- package/dist/helpers/logger.js +0 -346
- package/dist/helpers/logger.js.map +0 -1
- package/dist/helpers/markdown-formatter.d.ts +0 -235
- package/dist/helpers/markdown-formatter.d.ts.map +0 -1
- package/dist/helpers/markdown-formatter.js +0 -633
- package/dist/helpers/markdown-formatter.js.map +0 -1
- package/dist/helpers/mime.d.ts +0 -3
- package/dist/helpers/mime.d.ts.map +0 -1
- package/dist/helpers/mime.js +0 -46
- package/dist/helpers/mime.js.map +0 -1
- package/dist/helpers/open-auth-url.d.ts +0 -2
- package/dist/helpers/open-auth-url.d.ts.map +0 -1
- package/dist/helpers/open-auth-url.js +0 -59
- package/dist/helpers/open-auth-url.js.map +0 -1
- package/dist/helpers/path-validator.d.ts +0 -603
- package/dist/helpers/path-validator.d.ts.map +0 -1
- package/dist/helpers/path-validator.js +0 -895
- package/dist/helpers/path-validator.js.map +0 -1
- package/dist/helpers/photon.d.ts +0 -10
- package/dist/helpers/photon.d.ts.map +0 -1
- package/dist/helpers/photon.js +0 -132
- package/dist/helpers/photon.js.map +0 -1
- package/dist/helpers/shell.d.ts +0 -10
- package/dist/helpers/shell.d.ts.map +0 -1
- package/dist/helpers/shell.js +0 -142
- package/dist/helpers/shell.js.map +0 -1
- package/dist/helpers/sleep.d.ts +0 -5
- package/dist/helpers/sleep.d.ts.map +0 -1
- package/dist/helpers/sleep.js +0 -41
- package/dist/helpers/sleep.js.map +0 -1
- package/dist/helpers/string-formatter.d.ts +0 -609
- package/dist/helpers/string-formatter.d.ts.map +0 -1
- package/dist/helpers/string-formatter.js +0 -807
- package/dist/helpers/string-formatter.js.map +0 -1
- package/dist/helpers/tools-manager.d.ts +0 -5
- package/dist/helpers/tools-manager.d.ts.map +0 -1
- package/dist/helpers/tools-manager.js +0 -161
- package/dist/helpers/tools-manager.js.map +0 -1
- package/dist/helpers/type-guards.d.ts +0 -634
- package/dist/helpers/type-guards.d.ts.map +0 -1
- package/dist/helpers/type-guards.js +0 -671
- package/dist/helpers/type-guards.js.map +0 -1
- package/dist/index.d.ts +0 -41
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -40
- package/dist/index.js.map +0 -1
- package/dist/interfaces/index.d.ts +0 -16
- package/dist/interfaces/index.d.ts.map +0 -1
- package/dist/interfaces/index.js +0 -14
- package/dist/interfaces/index.js.map +0 -1
- package/dist/interfaces/print-mode.d.ts +0 -561
- package/dist/interfaces/print-mode.d.ts.map +0 -1
- package/dist/interfaces/print-mode.js +0 -633
- package/dist/interfaces/print-mode.js.map +0 -1
- package/dist/interfaces/react-ink/adapters/command-router.d.ts +0 -19
- package/dist/interfaces/react-ink/adapters/command-router.d.ts.map +0 -1
- package/dist/interfaces/react-ink/adapters/command-router.js +0 -674
- package/dist/interfaces/react-ink/adapters/command-router.js.map +0 -1
- package/dist/interfaces/react-ink/adapters/session-events.d.ts +0 -5
- package/dist/interfaces/react-ink/adapters/session-events.d.ts.map +0 -1
- package/dist/interfaces/react-ink/adapters/session-events.js +0 -255
- package/dist/interfaces/react-ink/adapters/session-events.js.map +0 -1
- package/dist/interfaces/react-ink/adapters/session-history.d.ts +0 -14
- package/dist/interfaces/react-ink/adapters/session-history.d.ts.map +0 -1
- package/dist/interfaces/react-ink/adapters/session-history.js +0 -83
- package/dist/interfaces/react-ink/adapters/session-history.js.map +0 -1
- package/dist/interfaces/react-ink/adapters/tool-state.d.ts +0 -4
- package/dist/interfaces/react-ink/adapters/tool-state.d.ts.map +0 -1
- package/dist/interfaces/react-ink/adapters/tool-state.js +0 -67
- package/dist/interfaces/react-ink/adapters/tool-state.js.map +0 -1
- package/dist/interfaces/react-ink/components/AppShell.d.ts +0 -17
- package/dist/interfaces/react-ink/components/AppShell.d.ts.map +0 -1
- package/dist/interfaces/react-ink/components/AppShell.js +0 -1535
- package/dist/interfaces/react-ink/components/AppShell.js.map +0 -1
- package/dist/interfaces/react-ink/components/ChangelogBlock.d.ts +0 -9
- package/dist/interfaces/react-ink/components/ChangelogBlock.d.ts.map +0 -1
- package/dist/interfaces/react-ink/components/ChangelogBlock.js +0 -58
- package/dist/interfaces/react-ink/components/ChangelogBlock.js.map +0 -1
- package/dist/interfaces/react-ink/components/DisplayBlockView.d.ts +0 -9
- package/dist/interfaces/react-ink/components/DisplayBlockView.d.ts.map +0 -1
- package/dist/interfaces/react-ink/components/DisplayBlockView.js +0 -11
- package/dist/interfaces/react-ink/components/DisplayBlockView.js.map +0 -1
- package/dist/interfaces/react-ink/components/Footer.d.ts +0 -12
- package/dist/interfaces/react-ink/components/Footer.d.ts.map +0 -1
- package/dist/interfaces/react-ink/components/Footer.js +0 -88
- package/dist/interfaces/react-ink/components/Footer.js.map +0 -1
- package/dist/interfaces/react-ink/components/Header.d.ts +0 -14
- package/dist/interfaces/react-ink/components/Header.d.ts.map +0 -1
- package/dist/interfaces/react-ink/components/Header.js +0 -24
- package/dist/interfaces/react-ink/components/Header.js.map +0 -1
- package/dist/interfaces/react-ink/components/MessageList.d.ts +0 -14
- package/dist/interfaces/react-ink/components/MessageList.d.ts.map +0 -1
- package/dist/interfaces/react-ink/components/MessageList.js +0 -43
- package/dist/interfaces/react-ink/components/MessageList.js.map +0 -1
- package/dist/interfaces/react-ink/components/MessageRow.d.ts +0 -13
- package/dist/interfaces/react-ink/components/MessageRow.d.ts.map +0 -1
- package/dist/interfaces/react-ink/components/MessageRow.js +0 -35
- package/dist/interfaces/react-ink/components/MessageRow.js.map +0 -1
- package/dist/interfaces/react-ink/components/PromptInput.d.ts +0 -35
- package/dist/interfaces/react-ink/components/PromptInput.d.ts.map +0 -1
- package/dist/interfaces/react-ink/components/PromptInput.js +0 -458
- package/dist/interfaces/react-ink/components/PromptInput.js.map +0 -1
- package/dist/interfaces/react-ink/components/StartupDiagnosticsBlock.d.ts +0 -9
- package/dist/interfaces/react-ink/components/StartupDiagnosticsBlock.d.ts.map +0 -1
- package/dist/interfaces/react-ink/components/StartupDiagnosticsBlock.js +0 -14
- package/dist/interfaces/react-ink/components/StartupDiagnosticsBlock.js.map +0 -1
- package/dist/interfaces/react-ink/components/StatusLine.d.ts +0 -10
- package/dist/interfaces/react-ink/components/StatusLine.d.ts.map +0 -1
- package/dist/interfaces/react-ink/components/StatusLine.js +0 -39
- package/dist/interfaces/react-ink/components/StatusLine.js.map +0 -1
- package/dist/interfaces/react-ink/components/TaskPanel.d.ts +0 -10
- package/dist/interfaces/react-ink/components/TaskPanel.d.ts.map +0 -1
- package/dist/interfaces/react-ink/components/TaskPanel.js +0 -23
- package/dist/interfaces/react-ink/components/TaskPanel.js.map +0 -1
- package/dist/interfaces/react-ink/components/ToolEventBlock.d.ts +0 -18
- package/dist/interfaces/react-ink/components/ToolEventBlock.d.ts.map +0 -1
- package/dist/interfaces/react-ink/components/ToolEventBlock.js +0 -61
- package/dist/interfaces/react-ink/components/ToolEventBlock.js.map +0 -1
- package/dist/interfaces/react-ink/components/dialogs/DialogFrame.d.ts +0 -9
- package/dist/interfaces/react-ink/components/dialogs/DialogFrame.d.ts.map +0 -1
- package/dist/interfaces/react-ink/components/dialogs/DialogFrame.js +0 -6
- package/dist/interfaces/react-ink/components/dialogs/DialogFrame.js.map +0 -1
- package/dist/interfaces/react-ink/components/dialogs/LoginDialog.d.ts +0 -15
- package/dist/interfaces/react-ink/components/dialogs/LoginDialog.d.ts.map +0 -1
- package/dist/interfaces/react-ink/components/dialogs/LoginDialog.js +0 -10
- package/dist/interfaces/react-ink/components/dialogs/LoginDialog.js.map +0 -1
- package/dist/interfaces/react-ink/components/dialogs/ModelDialog.d.ts +0 -10
- package/dist/interfaces/react-ink/components/dialogs/ModelDialog.d.ts.map +0 -1
- package/dist/interfaces/react-ink/components/dialogs/ModelDialog.js +0 -64
- package/dist/interfaces/react-ink/components/dialogs/ModelDialog.js.map +0 -1
- package/dist/interfaces/react-ink/components/dialogs/OAuthDialog.d.ts +0 -10
- package/dist/interfaces/react-ink/components/dialogs/OAuthDialog.d.ts.map +0 -1
- package/dist/interfaces/react-ink/components/dialogs/OAuthDialog.js +0 -24
- package/dist/interfaces/react-ink/components/dialogs/OAuthDialog.js.map +0 -1
- package/dist/interfaces/react-ink/components/dialogs/ScopedModelsDialog.d.ts +0 -10
- package/dist/interfaces/react-ink/components/dialogs/ScopedModelsDialog.d.ts.map +0 -1
- package/dist/interfaces/react-ink/components/dialogs/ScopedModelsDialog.js +0 -95
- package/dist/interfaces/react-ink/components/dialogs/ScopedModelsDialog.js.map +0 -1
- package/dist/interfaces/react-ink/components/dialogs/SelectableDialog.d.ts +0 -17
- package/dist/interfaces/react-ink/components/dialogs/SelectableDialog.d.ts.map +0 -1
- package/dist/interfaces/react-ink/components/dialogs/SelectableDialog.js +0 -66
- package/dist/interfaces/react-ink/components/dialogs/SelectableDialog.js.map +0 -1
- package/dist/interfaces/react-ink/components/dialogs/SessionDialog.d.ts +0 -11
- package/dist/interfaces/react-ink/components/dialogs/SessionDialog.d.ts.map +0 -1
- package/dist/interfaces/react-ink/components/dialogs/SessionDialog.js +0 -10
- package/dist/interfaces/react-ink/components/dialogs/SessionDialog.js.map +0 -1
- package/dist/interfaces/react-ink/components/dialogs/SettingsDialog.d.ts +0 -15
- package/dist/interfaces/react-ink/components/dialogs/SettingsDialog.d.ts.map +0 -1
- package/dist/interfaces/react-ink/components/dialogs/SettingsDialog.js +0 -79
- package/dist/interfaces/react-ink/components/dialogs/SettingsDialog.js.map +0 -1
- package/dist/interfaces/react-ink/components/dialogs/StartupSessionPicker.d.ts +0 -10
- package/dist/interfaces/react-ink/components/dialogs/StartupSessionPicker.d.ts.map +0 -1
- package/dist/interfaces/react-ink/components/dialogs/StartupSessionPicker.js +0 -99
- package/dist/interfaces/react-ink/components/dialogs/StartupSessionPicker.js.map +0 -1
- package/dist/interfaces/react-ink/components/dialogs/ThemeDialog.d.ts +0 -8
- package/dist/interfaces/react-ink/components/dialogs/ThemeDialog.d.ts.map +0 -1
- package/dist/interfaces/react-ink/components/dialogs/ThemeDialog.js +0 -7
- package/dist/interfaces/react-ink/components/dialogs/ThemeDialog.js.map +0 -1
- package/dist/interfaces/react-ink/components/dialogs/TreeDialog.d.ts +0 -9
- package/dist/interfaces/react-ink/components/dialogs/TreeDialog.d.ts.map +0 -1
- package/dist/interfaces/react-ink/components/dialogs/TreeDialog.js +0 -7
- package/dist/interfaces/react-ink/components/dialogs/TreeDialog.js.map +0 -1
- package/dist/interfaces/react-ink/components/dialogs/UserMessageDialog.d.ts +0 -9
- package/dist/interfaces/react-ink/components/dialogs/UserMessageDialog.d.ts.map +0 -1
- package/dist/interfaces/react-ink/components/dialogs/UserMessageDialog.js +0 -7
- package/dist/interfaces/react-ink/components/dialogs/UserMessageDialog.js.map +0 -1
- package/dist/interfaces/react-ink/components/extensions/ExtensionComponentHost.d.ts +0 -30
- package/dist/interfaces/react-ink/components/extensions/ExtensionComponentHost.d.ts.map +0 -1
- package/dist/interfaces/react-ink/components/extensions/ExtensionComponentHost.js +0 -106
- package/dist/interfaces/react-ink/components/extensions/ExtensionComponentHost.js.map +0 -1
- package/dist/interfaces/react-ink/components/extensions/ExtensionDialogs.d.ts +0 -20
- package/dist/interfaces/react-ink/components/extensions/ExtensionDialogs.d.ts.map +0 -1
- package/dist/interfaces/react-ink/components/extensions/ExtensionDialogs.js +0 -145
- package/dist/interfaces/react-ink/components/extensions/ExtensionDialogs.js.map +0 -1
- package/dist/interfaces/react-ink/components/messages/AssistantMessage.d.ts +0 -12
- package/dist/interfaces/react-ink/components/messages/AssistantMessage.d.ts.map +0 -1
- package/dist/interfaces/react-ink/components/messages/AssistantMessage.js +0 -20
- package/dist/interfaces/react-ink/components/messages/AssistantMessage.js.map +0 -1
- package/dist/interfaces/react-ink/components/messages/BashMessage.d.ts +0 -9
- package/dist/interfaces/react-ink/components/messages/BashMessage.d.ts.map +0 -1
- package/dist/interfaces/react-ink/components/messages/BashMessage.js +0 -11
- package/dist/interfaces/react-ink/components/messages/BashMessage.js.map +0 -1
- package/dist/interfaces/react-ink/components/messages/BranchSummaryMessage.d.ts +0 -9
- package/dist/interfaces/react-ink/components/messages/BranchSummaryMessage.d.ts.map +0 -1
- package/dist/interfaces/react-ink/components/messages/BranchSummaryMessage.js +0 -6
- package/dist/interfaces/react-ink/components/messages/BranchSummaryMessage.js.map +0 -1
- package/dist/interfaces/react-ink/components/messages/CompactionMessage.d.ts +0 -9
- package/dist/interfaces/react-ink/components/messages/CompactionMessage.d.ts.map +0 -1
- package/dist/interfaces/react-ink/components/messages/CompactionMessage.js +0 -6
- package/dist/interfaces/react-ink/components/messages/CompactionMessage.js.map +0 -1
- package/dist/interfaces/react-ink/components/messages/CustomMessage.d.ts +0 -10
- package/dist/interfaces/react-ink/components/messages/CustomMessage.d.ts.map +0 -1
- package/dist/interfaces/react-ink/components/messages/CustomMessage.js +0 -9
- package/dist/interfaces/react-ink/components/messages/CustomMessage.js.map +0 -1
- package/dist/interfaces/react-ink/components/messages/SkillInvocationMessage.d.ts +0 -8
- package/dist/interfaces/react-ink/components/messages/SkillInvocationMessage.d.ts.map +0 -1
- package/dist/interfaces/react-ink/components/messages/SkillInvocationMessage.js +0 -10
- package/dist/interfaces/react-ink/components/messages/SkillInvocationMessage.js.map +0 -1
- package/dist/interfaces/react-ink/components/messages/ToolCallMessage.d.ts +0 -9
- package/dist/interfaces/react-ink/components/messages/ToolCallMessage.d.ts.map +0 -1
- package/dist/interfaces/react-ink/components/messages/ToolCallMessage.js +0 -8
- package/dist/interfaces/react-ink/components/messages/ToolCallMessage.js.map +0 -1
- package/dist/interfaces/react-ink/components/messages/ToolResultBlock.d.ts +0 -12
- package/dist/interfaces/react-ink/components/messages/ToolResultBlock.d.ts.map +0 -1
- package/dist/interfaces/react-ink/components/messages/ToolResultBlock.js +0 -8
- package/dist/interfaces/react-ink/components/messages/ToolResultBlock.js.map +0 -1
- package/dist/interfaces/react-ink/components/messages/UserMessage.d.ts +0 -10
- package/dist/interfaces/react-ink/components/messages/UserMessage.d.ts.map +0 -1
- package/dist/interfaces/react-ink/components/messages/UserMessage.js +0 -7
- package/dist/interfaces/react-ink/components/messages/UserMessage.js.map +0 -1
- package/dist/interfaces/react-ink/hooks/use-agent-session.d.ts +0 -8
- package/dist/interfaces/react-ink/hooks/use-agent-session.d.ts.map +0 -1
- package/dist/interfaces/react-ink/hooks/use-agent-session.js +0 -34
- package/dist/interfaces/react-ink/hooks/use-agent-session.js.map +0 -1
- package/dist/interfaces/react-ink/hooks/use-app-keybindings.d.ts +0 -12
- package/dist/interfaces/react-ink/hooks/use-app-keybindings.d.ts.map +0 -1
- package/dist/interfaces/react-ink/hooks/use-app-keybindings.js +0 -17
- package/dist/interfaces/react-ink/hooks/use-app-keybindings.js.map +0 -1
- package/dist/interfaces/react-ink/hooks/use-footer-data.d.ts +0 -7
- package/dist/interfaces/react-ink/hooks/use-footer-data.d.ts.map +0 -1
- package/dist/interfaces/react-ink/hooks/use-footer-data.js +0 -17
- package/dist/interfaces/react-ink/hooks/use-footer-data.js.map +0 -1
- package/dist/interfaces/react-ink/hooks/use-prompt-submit.d.ts +0 -17
- package/dist/interfaces/react-ink/hooks/use-prompt-submit.d.ts.map +0 -1
- package/dist/interfaces/react-ink/hooks/use-prompt-submit.js +0 -66
- package/dist/interfaces/react-ink/hooks/use-prompt-submit.js.map +0 -1
- package/dist/interfaces/react-ink/hooks/use-session-history.d.ts +0 -8
- package/dist/interfaces/react-ink/hooks/use-session-history.d.ts.map +0 -1
- package/dist/interfaces/react-ink/hooks/use-session-history.js +0 -8
- package/dist/interfaces/react-ink/hooks/use-session-history.js.map +0 -1
- package/dist/interfaces/react-ink/index.d.ts +0 -8
- package/dist/interfaces/react-ink/index.d.ts.map +0 -1
- package/dist/interfaces/react-ink/index.js +0 -8
- package/dist/interfaces/react-ink/index.js.map +0 -1
- package/dist/interfaces/react-ink/interactive-mode.d.ts +0 -24
- package/dist/interfaces/react-ink/interactive-mode.d.ts.map +0 -1
- package/dist/interfaces/react-ink/interactive-mode.js +0 -57
- package/dist/interfaces/react-ink/interactive-mode.js.map +0 -1
- package/dist/interfaces/react-ink/render-root.d.ts +0 -19
- package/dist/interfaces/react-ink/render-root.d.ts.map +0 -1
- package/dist/interfaces/react-ink/render-root.js +0 -6
- package/dist/interfaces/react-ink/render-root.js.map +0 -1
- package/dist/interfaces/react-ink/state/reducer.d.ts +0 -51
- package/dist/interfaces/react-ink/state/reducer.d.ts.map +0 -1
- package/dist/interfaces/react-ink/state/reducer.js +0 -122
- package/dist/interfaces/react-ink/state/reducer.js.map +0 -1
- package/dist/interfaces/react-ink/state/store.d.ts +0 -4
- package/dist/interfaces/react-ink/state/store.d.ts.map +0 -1
- package/dist/interfaces/react-ink/state/store.js +0 -5
- package/dist/interfaces/react-ink/state/store.js.map +0 -1
- package/dist/interfaces/react-ink/state/ui-state.d.ts +0 -5
- package/dist/interfaces/react-ink/state/ui-state.d.ts.map +0 -1
- package/dist/interfaces/react-ink/state/ui-state.js +0 -20
- package/dist/interfaces/react-ink/state/ui-state.js.map +0 -1
- package/dist/interfaces/react-ink/theme-adapter.d.ts +0 -4
- package/dist/interfaces/react-ink/theme-adapter.d.ts.map +0 -1
- package/dist/interfaces/react-ink/theme-adapter.js +0 -15
- package/dist/interfaces/react-ink/theme-adapter.js.map +0 -1
- package/dist/interfaces/react-ink/types.d.ts +0 -51
- package/dist/interfaces/react-ink/types.d.ts.map +0 -1
- package/dist/interfaces/react-ink/types.js +0 -2
- package/dist/interfaces/react-ink/types.js.map +0 -1
- package/dist/interfaces/react-ink/utils/changelog.d.ts +0 -7
- package/dist/interfaces/react-ink/utils/changelog.d.ts.map +0 -1
- package/dist/interfaces/react-ink/utils/changelog.js +0 -40
- package/dist/interfaces/react-ink/utils/changelog.js.map +0 -1
- package/dist/interfaces/react-ink/utils/key-data.d.ts +0 -22
- package/dist/interfaces/react-ink/utils/key-data.d.ts.map +0 -1
- package/dist/interfaces/react-ink/utils/key-data.js +0 -123
- package/dist/interfaces/react-ink/utils/key-data.js.map +0 -1
- package/dist/interfaces/react-ink/utils/message-groups.d.ts +0 -26
- package/dist/interfaces/react-ink/utils/message-groups.d.ts.map +0 -1
- package/dist/interfaces/react-ink/utils/message-groups.js +0 -230
- package/dist/interfaces/react-ink/utils/message-groups.js.map +0 -1
- package/dist/interfaces/react-ink/utils/prompt-autocomplete.d.ts +0 -20
- package/dist/interfaces/react-ink/utils/prompt-autocomplete.d.ts.map +0 -1
- package/dist/interfaces/react-ink/utils/prompt-autocomplete.js +0 -46
- package/dist/interfaces/react-ink/utils/prompt-autocomplete.js.map +0 -1
- package/dist/interfaces/react-ink/utils/selection-dialog.d.ts +0 -3
- package/dist/interfaces/react-ink/utils/selection-dialog.d.ts.map +0 -1
- package/dist/interfaces/react-ink/utils/selection-dialog.js +0 -18
- package/dist/interfaces/react-ink/utils/selection-dialog.js.map +0 -1
- package/dist/interfaces/react-ink/utils/session-actions.d.ts +0 -10
- package/dist/interfaces/react-ink/utils/session-actions.d.ts.map +0 -1
- package/dist/interfaces/react-ink/utils/session-actions.js +0 -66
- package/dist/interfaces/react-ink/utils/session-actions.js.map +0 -1
- package/dist/interfaces/react-ink/utils/slash-commands.d.ts +0 -10
- package/dist/interfaces/react-ink/utils/slash-commands.d.ts.map +0 -1
- package/dist/interfaces/react-ink/utils/slash-commands.js +0 -111
- package/dist/interfaces/react-ink/utils/slash-commands.js.map +0 -1
- package/dist/interfaces/react-ink/utils/startup-diagnostics.d.ts +0 -7
- package/dist/interfaces/react-ink/utils/startup-diagnostics.d.ts.map +0 -1
- package/dist/interfaces/react-ink/utils/startup-diagnostics.js +0 -111
- package/dist/interfaces/react-ink/utils/startup-diagnostics.js.map +0 -1
- package/dist/interfaces/react-ink/utils/tool-display.d.ts +0 -22
- package/dist/interfaces/react-ink/utils/tool-display.d.ts.map +0 -1
- package/dist/interfaces/react-ink/utils/tool-display.js +0 -349
- package/dist/interfaces/react-ink/utils/tool-display.js.map +0 -1
- package/dist/interfaces/service-api/rpc-client.d.ts +0 -1129
- package/dist/interfaces/service-api/rpc-client.d.ts.map +0 -1
- package/dist/interfaces/service-api/rpc-client.js +0 -1333
- package/dist/interfaces/service-api/rpc-client.js.map +0 -1
- package/dist/interfaces/service-api/rpc-mode.d.ts +0 -813
- package/dist/interfaces/service-api/rpc-mode.d.ts.map +0 -1
- package/dist/interfaces/service-api/rpc-mode.js +0 -1229
- package/dist/interfaces/service-api/rpc-mode.js.map +0 -1
- package/dist/interfaces/service-api/rpc-types.d.ts +0 -392
- package/dist/interfaces/service-api/rpc-types.d.ts.map +0 -1
- package/dist/interfaces/service-api/rpc-types.js +0 -22
- package/dist/interfaces/service-api/rpc-types.js.map +0 -1
- package/dist/interfaces/shared.d.ts +0 -386
- package/dist/interfaces/shared.d.ts.map +0 -1
- package/dist/interfaces/shared.js +0 -543
- package/dist/interfaces/shared.js.map +0 -1
- package/dist/interfaces/theme/dark.json +0 -91
- package/dist/interfaces/theme/light.json +0 -90
- package/dist/interfaces/theme/theme-schema.json +0 -339
- package/dist/interfaces/theme/theme.d.ts +0 -500
- package/dist/interfaces/theme/theme.d.ts.map +0 -1
- package/dist/interfaces/theme/theme.js +0 -1511
- package/dist/interfaces/theme/theme.js.map +0 -1
- package/dist/main.d.ts +0 -8
- package/dist/main.d.ts.map +0 -1
- package/dist/main.js +0 -750
- package/dist/main.js.map +0 -1
- package/dist/migrations.d.ts +0 -8
- package/dist/migrations.d.ts.map +0 -1
- package/dist/migrations.js +0 -206
- package/dist/migrations.js.map +0 -1
- package/dist/observe.d.ts +0 -2
- package/dist/observe.d.ts.map +0 -1
- package/dist/observe.js +0 -2
- package/dist/observe.js.map +0 -1
- package/dist/runtime/agent-session.d.ts +0 -988
- package/dist/runtime/agent-session.d.ts.map +0 -1
- package/dist/runtime/agent-session.js +0 -3114
- package/dist/runtime/agent-session.js.map +0 -1
- package/dist/runtime/auth-storage.d.ts +0 -53
- package/dist/runtime/auth-storage.d.ts.map +0 -1
- package/dist/runtime/auth-storage.js +0 -378
- package/dist/runtime/auth-storage.js.map +0 -1
- package/dist/runtime/bash-executor.d.ts +0 -16
- package/dist/runtime/bash-executor.d.ts.map +0 -1
- package/dist/runtime/bash-executor.js +0 -270
- package/dist/runtime/bash-executor.js.map +0 -1
- package/dist/runtime/context-compression/branch-summarization.d.ts +0 -86
- package/dist/runtime/context-compression/branch-summarization.d.ts.map +0 -1
- package/dist/runtime/context-compression/branch-summarization.js +0 -242
- package/dist/runtime/context-compression/branch-summarization.js.map +0 -1
- package/dist/runtime/context-compression/compaction.d.ts +0 -121
- package/dist/runtime/context-compression/compaction.d.ts.map +0 -1
- package/dist/runtime/context-compression/compaction.js +0 -607
- package/dist/runtime/context-compression/compaction.js.map +0 -1
- package/dist/runtime/context-compression/index.d.ts +0 -35
- package/dist/runtime/context-compression/index.d.ts.map +0 -1
- package/dist/runtime/context-compression/index.js +0 -33
- package/dist/runtime/context-compression/index.js.map +0 -1
- package/dist/runtime/context-compression/utils.d.ts +0 -17
- package/dist/runtime/context-compression/utils.d.ts.map +0 -1
- package/dist/runtime/context-compression/utils.js +0 -117
- package/dist/runtime/context-compression/utils.js.map +0 -1
- package/dist/runtime/diagnostics.d.ts +0 -206
- package/dist/runtime/diagnostics.d.ts.map +0 -1
- package/dist/runtime/diagnostics.js +0 -144
- package/dist/runtime/diagnostics.js.map +0 -1
- package/dist/runtime/discover-packages.d.ts +0 -2
- package/dist/runtime/discover-packages.d.ts.map +0 -1
- package/dist/runtime/discover-packages.js +0 -59
- package/dist/runtime/discover-packages.js.map +0 -1
- package/dist/runtime/event-bus.d.ts +0 -9
- package/dist/runtime/event-bus.d.ts.map +0 -1
- package/dist/runtime/event-bus.js +0 -29
- package/dist/runtime/event-bus.js.map +0 -1
- package/dist/runtime/exec.d.ts +0 -13
- package/dist/runtime/exec.d.ts.map +0 -1
- package/dist/runtime/exec.js +0 -62
- package/dist/runtime/exec.js.map +0 -1
- package/dist/runtime/footer-data-provider.d.ts +0 -19
- package/dist/runtime/footer-data-provider.d.ts.map +0 -1
- package/dist/runtime/footer-data-provider.js +0 -122
- package/dist/runtime/footer-data-provider.js.map +0 -1
- package/dist/runtime/html-export/ansi-to-html.d.ts +0 -26
- package/dist/runtime/html-export/ansi-to-html.d.ts.map +0 -1
- package/dist/runtime/html-export/ansi-to-html.js +0 -253
- package/dist/runtime/html-export/ansi-to-html.js.map +0 -1
- package/dist/runtime/html-export/ansi-to-html.ts +0 -262
- package/dist/runtime/html-export/index.d.ts +0 -162
- package/dist/runtime/html-export/index.d.ts.map +0 -1
- package/dist/runtime/html-export/index.js +0 -350
- package/dist/runtime/html-export/index.js.map +0 -1
- package/dist/runtime/html-export/index.ts +0 -432
- package/dist/runtime/html-export/template.css +0 -905
- package/dist/runtime/html-export/template.html +0 -76
- package/dist/runtime/html-export/template.js +0 -1549
- package/dist/runtime/html-export/tool-renderer.d.ts +0 -18
- package/dist/runtime/html-export/tool-renderer.d.ts.map +0 -1
- package/dist/runtime/html-export/tool-renderer.js +0 -45
- package/dist/runtime/html-export/tool-renderer.js.map +0 -1
- package/dist/runtime/html-export/tool-renderer.ts +0 -80
- package/dist/runtime/html-export/vendor/highlight.min.js +0 -1244
- package/dist/runtime/html-export/vendor/marked.min.js +0 -74
- package/dist/runtime/index.d.ts +0 -35
- package/dist/runtime/index.d.ts.map +0 -1
- package/dist/runtime/index.js +0 -35
- package/dist/runtime/index.js.map +0 -1
- package/dist/runtime/keybindings.d.ts +0 -20
- package/dist/runtime/keybindings.d.ts.map +0 -1
- package/dist/runtime/keybindings.js +0 -109
- package/dist/runtime/keybindings.js.map +0 -1
- package/dist/runtime/lifecycle/index.d.ts +0 -4
- package/dist/runtime/lifecycle/index.d.ts.map +0 -1
- package/dist/runtime/lifecycle/index.js +0 -3
- package/dist/runtime/lifecycle/index.js.map +0 -1
- package/dist/runtime/lifecycle/loader.d.ts +0 -6
- package/dist/runtime/lifecycle/loader.d.ts.map +0 -1
- package/dist/runtime/lifecycle/loader.js +0 -179
- package/dist/runtime/lifecycle/loader.js.map +0 -1
- package/dist/runtime/lifecycle/runner.d.ts +0 -14
- package/dist/runtime/lifecycle/runner.d.ts.map +0 -1
- package/dist/runtime/lifecycle/runner.js +0 -58
- package/dist/runtime/lifecycle/runner.js.map +0 -1
- package/dist/runtime/lifecycle/types.d.ts +0 -139
- package/dist/runtime/lifecycle/types.d.ts.map +0 -1
- package/dist/runtime/lifecycle/types.js +0 -2
- package/dist/runtime/lifecycle/types.js.map +0 -1
- package/dist/runtime/messages.d.ts +0 -2
- package/dist/runtime/messages.d.ts.map +0 -1
- package/dist/runtime/messages.js +0 -2
- package/dist/runtime/messages.js.map +0 -1
- package/dist/runtime/model-registry.d.ts +0 -62
- package/dist/runtime/model-registry.d.ts.map +0 -1
- package/dist/runtime/model-registry.js +0 -446
- package/dist/runtime/model-registry.js.map +0 -1
- package/dist/runtime/model-resolver.d.ts +0 -35
- package/dist/runtime/model-resolver.d.ts.map +0 -1
- package/dist/runtime/model-resolver.js +0 -231
- package/dist/runtime/model-resolver.js.map +0 -1
- package/dist/runtime/observe.d.ts +0 -50
- package/dist/runtime/observe.d.ts.map +0 -1
- package/dist/runtime/observe.js +0 -233
- package/dist/runtime/observe.js.map +0 -1
- package/dist/runtime/package-manager.d.ts +0 -103
- package/dist/runtime/package-manager.d.ts.map +0 -1
- package/dist/runtime/package-manager.js +0 -583
- package/dist/runtime/package-manager.js.map +0 -1
- package/dist/runtime/plugins/index.d.ts +0 -13
- package/dist/runtime/plugins/index.d.ts.map +0 -1
- package/dist/runtime/plugins/index.js +0 -23
- package/dist/runtime/plugins/index.js.map +0 -1
- package/dist/runtime/plugins/loader.d.ts +0 -19
- package/dist/runtime/plugins/loader.d.ts.map +0 -1
- package/dist/runtime/plugins/loader.js +0 -415
- package/dist/runtime/plugins/loader.js.map +0 -1
- package/dist/runtime/plugins/runner.d.ts +0 -107
- package/dist/runtime/plugins/runner.d.ts.map +0 -1
- package/dist/runtime/plugins/runner.js +0 -468
- package/dist/runtime/plugins/runner.js.map +0 -1
- package/dist/runtime/plugins/types.d.ts +0 -862
- package/dist/runtime/plugins/types.d.ts.map +0 -1
- package/dist/runtime/plugins/types.js +0 -32
- package/dist/runtime/plugins/types.js.map +0 -1
- package/dist/runtime/plugins/wrapper.d.ts +0 -29
- package/dist/runtime/plugins/wrapper.d.ts.map +0 -1
- package/dist/runtime/plugins/wrapper.js +0 -129
- package/dist/runtime/plugins/wrapper.js.map +0 -1
- package/dist/runtime/prompt-templates.d.ts +0 -18
- package/dist/runtime/prompt-templates.d.ts.map +0 -1
- package/dist/runtime/prompt-templates.js +0 -203
- package/dist/runtime/prompt-templates.js.map +0 -1
- package/dist/runtime/providers/adapters/claude-cli-adapter.d.ts +0 -19
- package/dist/runtime/providers/adapters/claude-cli-adapter.d.ts.map +0 -1
- package/dist/runtime/providers/adapters/claude-cli-adapter.js +0 -242
- package/dist/runtime/providers/adapters/claude-cli-adapter.js.map +0 -1
- package/dist/runtime/providers/adapters/codex-cli-adapter.d.ts +0 -18
- package/dist/runtime/providers/adapters/codex-cli-adapter.d.ts.map +0 -1
- package/dist/runtime/providers/adapters/codex-cli-adapter.js +0 -177
- package/dist/runtime/providers/adapters/codex-cli-adapter.js.map +0 -1
- package/dist/runtime/providers/adapters/indusagi-cli-adapter.d.ts +0 -21
- package/dist/runtime/providers/adapters/indusagi-cli-adapter.d.ts.map +0 -1
- package/dist/runtime/providers/adapters/indusagi-cli-adapter.js +0 -162
- package/dist/runtime/providers/adapters/indusagi-cli-adapter.js.map +0 -1
- package/dist/runtime/providers/adapters/utils.d.ts +0 -12
- package/dist/runtime/providers/adapters/utils.d.ts.map +0 -1
- package/dist/runtime/providers/adapters/utils.js +0 -122
- package/dist/runtime/providers/adapters/utils.js.map +0 -1
- package/dist/runtime/providers/builtins.d.ts +0 -3
- package/dist/runtime/providers/builtins.d.ts.map +0 -1
- package/dist/runtime/providers/builtins.js +0 -113
- package/dist/runtime/providers/builtins.js.map +0 -1
- package/dist/runtime/providers/provider-adapter-registry.d.ts +0 -11
- package/dist/runtime/providers/provider-adapter-registry.d.ts.map +0 -1
- package/dist/runtime/providers/provider-adapter-registry.js +0 -36
- package/dist/runtime/providers/provider-adapter-registry.js.map +0 -1
- package/dist/runtime/providers/provider-adapter.d.ts +0 -33
- package/dist/runtime/providers/provider-adapter.d.ts.map +0 -1
- package/dist/runtime/providers/provider-adapter.js +0 -2
- package/dist/runtime/providers/provider-adapter.js.map +0 -1
- package/dist/runtime/providers/provider-service.d.ts +0 -33
- package/dist/runtime/providers/provider-service.d.ts.map +0 -1
- package/dist/runtime/providers/provider-service.js +0 -157
- package/dist/runtime/providers/provider-service.js.map +0 -1
- package/dist/runtime/providers/types.d.ts +0 -29
- package/dist/runtime/providers/types.d.ts.map +0 -1
- package/dist/runtime/providers/types.js +0 -9
- package/dist/runtime/providers/types.js.map +0 -1
- package/dist/runtime/resource-loader.d.ts +0 -180
- package/dist/runtime/resource-loader.d.ts.map +0 -1
- package/dist/runtime/resource-loader.js +0 -530
- package/dist/runtime/resource-loader.js.map +0 -1
- package/dist/runtime/sdk.d.ts +0 -65
- package/dist/runtime/sdk.d.ts.map +0 -1
- package/dist/runtime/sdk.js +0 -402
- package/dist/runtime/sdk.js.map +0 -1
- package/dist/runtime/session-manager.d.ts +0 -448
- package/dist/runtime/session-manager.d.ts.map +0 -1
- package/dist/runtime/session-manager.js +0 -1177
- package/dist/runtime/session-manager.js.map +0 -1
- package/dist/runtime/settings-manager.d.ts +0 -234
- package/dist/runtime/settings-manager.d.ts.map +0 -1
- package/dist/runtime/settings-manager.js +0 -298
- package/dist/runtime/settings-manager.js.map +0 -1
- package/dist/runtime/skills.d.ts +0 -33
- package/dist/runtime/skills.d.ts.map +0 -1
- package/dist/runtime/skills.js +0 -277
- package/dist/runtime/skills.js.map +0 -1
- package/dist/runtime/subagents.d.ts +0 -29
- package/dist/runtime/subagents.d.ts.map +0 -1
- package/dist/runtime/subagents.js +0 -163
- package/dist/runtime/subagents.js.map +0 -1
- package/dist/runtime/system-prompt.d.ts +0 -16
- package/dist/runtime/system-prompt.d.ts.map +0 -1
- package/dist/runtime/system-prompt.js +0 -275
- package/dist/runtime/system-prompt.js.map +0 -1
- package/dist/runtime/task-session-manager.d.ts +0 -55
- package/dist/runtime/task-session-manager.d.ts.map +0 -1
- package/dist/runtime/task-session-manager.js +0 -410
- package/dist/runtime/task-session-manager.js.map +0 -1
- package/dist/runtime/timings.d.ts +0 -4
- package/dist/runtime/timings.d.ts.map +0 -1
- package/dist/runtime/timings.js +0 -41
- package/dist/runtime/timings.js.map +0 -1
- package/dist/runtime/todo-store.d.ts +0 -20
- package/dist/runtime/todo-store.d.ts.map +0 -1
- package/dist/runtime/todo-store.js +0 -60
- package/dist/runtime/todo-store.js.map +0 -1
- package/dist/runtime/tooling/bash.d.ts +0 -2
- package/dist/runtime/tooling/bash.d.ts.map +0 -1
- package/dist/runtime/tooling/bash.js +0 -2
- package/dist/runtime/tooling/bash.js.map +0 -1
- package/dist/runtime/tooling/bg-process.d.ts +0 -44
- package/dist/runtime/tooling/bg-process.d.ts.map +0 -1
- package/dist/runtime/tooling/bg-process.js +0 -55
- package/dist/runtime/tooling/bg-process.js.map +0 -1
- package/dist/runtime/tooling/composio-compat.d.ts +0 -169
- package/dist/runtime/tooling/composio-compat.d.ts.map +0 -1
- package/dist/runtime/tooling/composio-compat.js +0 -163
- package/dist/runtime/tooling/composio-compat.js.map +0 -1
- package/dist/runtime/tooling/edit-diff.d.ts +0 -9
- package/dist/runtime/tooling/edit-diff.d.ts.map +0 -1
- package/dist/runtime/tooling/edit-diff.js +0 -2
- package/dist/runtime/tooling/edit-diff.js.map +0 -1
- package/dist/runtime/tooling/edit.d.ts +0 -2
- package/dist/runtime/tooling/edit.d.ts.map +0 -1
- package/dist/runtime/tooling/edit.js +0 -2
- package/dist/runtime/tooling/edit.js.map +0 -1
- package/dist/runtime/tooling/find.d.ts +0 -2
- package/dist/runtime/tooling/find.d.ts.map +0 -1
- package/dist/runtime/tooling/find.js +0 -2
- package/dist/runtime/tooling/find.js.map +0 -1
- package/dist/runtime/tooling/grep.d.ts +0 -2
- package/dist/runtime/tooling/grep.d.ts.map +0 -1
- package/dist/runtime/tooling/grep.js +0 -2
- package/dist/runtime/tooling/grep.js.map +0 -1
- package/dist/runtime/tooling/index.d.ts +0 -248
- package/dist/runtime/tooling/index.d.ts.map +0 -1
- package/dist/runtime/tooling/index.js +0 -325
- package/dist/runtime/tooling/index.js.map +0 -1
- package/dist/runtime/tooling/ls.d.ts +0 -2
- package/dist/runtime/tooling/ls.d.ts.map +0 -1
- package/dist/runtime/tooling/ls.js +0 -2
- package/dist/runtime/tooling/ls.js.map +0 -1
- package/dist/runtime/tooling/memory.d.ts +0 -132
- package/dist/runtime/tooling/memory.d.ts.map +0 -1
- package/dist/runtime/tooling/memory.js +0 -171
- package/dist/runtime/tooling/memory.js.map +0 -1
- package/dist/runtime/tooling/path-utils.d.ts +0 -2
- package/dist/runtime/tooling/path-utils.d.ts.map +0 -1
- package/dist/runtime/tooling/path-utils.js +0 -2
- package/dist/runtime/tooling/path-utils.js.map +0 -1
- package/dist/runtime/tooling/read.d.ts +0 -2
- package/dist/runtime/tooling/read.d.ts.map +0 -1
- package/dist/runtime/tooling/read.js +0 -2
- package/dist/runtime/tooling/read.js.map +0 -1
- package/dist/runtime/tooling/registry.d.ts +0 -18
- package/dist/runtime/tooling/registry.d.ts.map +0 -1
- package/dist/runtime/tooling/registry.js +0 -166
- package/dist/runtime/tooling/registry.js.map +0 -1
- package/dist/runtime/tooling/task.d.ts +0 -37
- package/dist/runtime/tooling/task.d.ts.map +0 -1
- package/dist/runtime/tooling/task.js +0 -65
- package/dist/runtime/tooling/task.js.map +0 -1
- package/dist/runtime/tooling/todo.d.ts +0 -34
- package/dist/runtime/tooling/todo.d.ts.map +0 -1
- package/dist/runtime/tooling/todo.js +0 -96
- package/dist/runtime/tooling/todo.js.map +0 -1
- package/dist/runtime/tooling/truncate.d.ts +0 -2
- package/dist/runtime/tooling/truncate.d.ts.map +0 -1
- package/dist/runtime/tooling/truncate.js +0 -2
- package/dist/runtime/tooling/truncate.js.map +0 -1
- package/dist/runtime/tooling/webfetch.d.ts +0 -2
- package/dist/runtime/tooling/webfetch.d.ts.map +0 -1
- package/dist/runtime/tooling/webfetch.js +0 -2
- package/dist/runtime/tooling/webfetch.js.map +0 -1
- package/dist/runtime/tooling/websearch.d.ts +0 -2
- package/dist/runtime/tooling/websearch.d.ts.map +0 -1
- package/dist/runtime/tooling/websearch.js +0 -2
- package/dist/runtime/tooling/websearch.js.map +0 -1
- package/dist/runtime/tooling/write.d.ts +0 -2
- package/dist/runtime/tooling/write.d.ts.map +0 -1
- package/dist/runtime/tooling/write.js +0 -2
- package/dist/runtime/tooling/write.js.map +0 -1
- package/dist/telemetry/core/config.d.ts +0 -28
- package/dist/telemetry/core/config.d.ts.map +0 -1
- package/dist/telemetry/core/config.js +0 -150
- package/dist/telemetry/core/config.js.map +0 -1
- package/dist/telemetry/core/event-bus.d.ts +0 -15
- package/dist/telemetry/core/event-bus.d.ts.map +0 -1
- package/dist/telemetry/core/event-bus.js +0 -37
- package/dist/telemetry/core/event-bus.js.map +0 -1
- package/dist/telemetry/core/index.d.ts +0 -12
- package/dist/telemetry/core/index.d.ts.map +0 -1
- package/dist/telemetry/core/index.js +0 -14
- package/dist/telemetry/core/index.js.map +0 -1
- package/dist/telemetry/core/observability.d.ts +0 -63
- package/dist/telemetry/core/observability.d.ts.map +0 -1
- package/dist/telemetry/core/observability.js +0 -127
- package/dist/telemetry/core/observability.js.map +0 -1
- package/dist/telemetry/core/span.d.ts +0 -37
- package/dist/telemetry/core/span.d.ts.map +0 -1
- package/dist/telemetry/core/span.js +0 -90
- package/dist/telemetry/core/span.js.map +0 -1
- package/dist/telemetry/core/tracer.d.ts +0 -22
- package/dist/telemetry/core/tracer.d.ts.map +0 -1
- package/dist/telemetry/core/tracer.js +0 -79
- package/dist/telemetry/core/tracer.js.map +0 -1
- package/dist/telemetry/core/types.d.ts +0 -155
- package/dist/telemetry/core/types.d.ts.map +0 -1
- package/dist/telemetry/core/types.js +0 -38
- package/dist/telemetry/core/types.js.map +0 -1
- package/dist/telemetry/exporters/base-exporter.d.ts +0 -16
- package/dist/telemetry/exporters/base-exporter.d.ts.map +0 -1
- package/dist/telemetry/exporters/base-exporter.js +0 -26
- package/dist/telemetry/exporters/base-exporter.js.map +0 -1
- package/dist/telemetry/exporters/console-exporter.d.ts +0 -22
- package/dist/telemetry/exporters/console-exporter.d.ts.map +0 -1
- package/dist/telemetry/exporters/console-exporter.js +0 -80
- package/dist/telemetry/exporters/console-exporter.js.map +0 -1
- package/dist/telemetry/exporters/file-exporter.d.ts +0 -31
- package/dist/telemetry/exporters/file-exporter.d.ts.map +0 -1
- package/dist/telemetry/exporters/file-exporter.js +0 -120
- package/dist/telemetry/exporters/file-exporter.js.map +0 -1
- package/dist/telemetry/exporters/index.d.ts +0 -12
- package/dist/telemetry/exporters/index.d.ts.map +0 -1
- package/dist/telemetry/exporters/index.js +0 -11
- package/dist/telemetry/exporters/index.js.map +0 -1
- package/dist/telemetry/exporters/langfuse-exporter.d.ts +0 -27
- package/dist/telemetry/exporters/langfuse-exporter.d.ts.map +0 -1
- package/dist/telemetry/exporters/langfuse-exporter.js +0 -146
- package/dist/telemetry/exporters/langfuse-exporter.js.map +0 -1
- package/dist/telemetry/exporters/sentry-exporter.d.ts +0 -22
- package/dist/telemetry/exporters/sentry-exporter.d.ts.map +0 -1
- package/dist/telemetry/exporters/sentry-exporter.js +0 -121
- package/dist/telemetry/exporters/sentry-exporter.js.map +0 -1
- package/dist/telemetry/index.d.ts +0 -3
- package/dist/telemetry/index.d.ts.map +0 -1
- package/dist/telemetry/index.js +0 -3
- package/dist/telemetry/index.js.map +0 -1
- package/dist/vendor/observe/adapters/agent-event-adapter.d.ts +0 -28
- package/dist/vendor/observe/adapters/agent-event-adapter.d.ts.map +0 -1
- package/dist/vendor/observe/adapters/agent-event-adapter.js +0 -136
- package/dist/vendor/observe/adapters/agent-event-adapter.js.map +0 -1
- package/dist/vendor/observe/adapters/ai-stream-adapter.d.ts +0 -24
- package/dist/vendor/observe/adapters/ai-stream-adapter.d.ts.map +0 -1
- package/dist/vendor/observe/adapters/ai-stream-adapter.js +0 -118
- package/dist/vendor/observe/adapters/ai-stream-adapter.js.map +0 -1
- package/dist/vendor/observe/artifacts/content-store.d.ts +0 -12
- package/dist/vendor/observe/artifacts/content-store.d.ts.map +0 -1
- package/dist/vendor/observe/artifacts/content-store.js +0 -2
- package/dist/vendor/observe/artifacts/content-store.js.map +0 -1
- package/dist/vendor/observe/artifacts/file-content-store.d.ts +0 -16
- package/dist/vendor/observe/artifacts/file-content-store.d.ts.map +0 -1
- package/dist/vendor/observe/artifacts/file-content-store.js +0 -43
- package/dist/vendor/observe/artifacts/file-content-store.js.map +0 -1
- package/dist/vendor/observe/batcher.d.ts +0 -27
- package/dist/vendor/observe/batcher.d.ts.map +0 -1
- package/dist/vendor/observe/batcher.js +0 -66
- package/dist/vendor/observe/batcher.js.map +0 -1
- package/dist/vendor/observe/client/artifacts-manager.d.ts +0 -29
- package/dist/vendor/observe/client/artifacts-manager.d.ts.map +0 -1
- package/dist/vendor/observe/client/artifacts-manager.js +0 -120
- package/dist/vendor/observe/client/artifacts-manager.js.map +0 -1
- package/dist/vendor/observe/client/datasets-manager.d.ts +0 -16
- package/dist/vendor/observe/client/datasets-manager.d.ts.map +0 -1
- package/dist/vendor/observe/client/datasets-manager.js +0 -27
- package/dist/vendor/observe/client/datasets-manager.js.map +0 -1
- package/dist/vendor/observe/client/experiments-manager.d.ts +0 -61
- package/dist/vendor/observe/client/experiments-manager.d.ts.map +0 -1
- package/dist/vendor/observe/client/experiments-manager.js +0 -132
- package/dist/vendor/observe/client/experiments-manager.js.map +0 -1
- package/dist/vendor/observe/client/index.d.ts +0 -9
- package/dist/vendor/observe/client/index.d.ts.map +0 -1
- package/dist/vendor/observe/client/index.js +0 -9
- package/dist/vendor/observe/client/index.js.map +0 -1
- package/dist/vendor/observe/client/observe-client.d.ts +0 -30
- package/dist/vendor/observe/client/observe-client.d.ts.map +0 -1
- package/dist/vendor/observe/client/observe-client.js +0 -22
- package/dist/vendor/observe/client/observe-client.js.map +0 -1
- package/dist/vendor/observe/client/prompts-manager.d.ts +0 -17
- package/dist/vendor/observe/client/prompts-manager.d.ts.map +0 -1
- package/dist/vendor/observe/client/prompts-manager.js +0 -38
- package/dist/vendor/observe/client/prompts-manager.js.map +0 -1
- package/dist/vendor/observe/client/scores-manager.d.ts +0 -10
- package/dist/vendor/observe/client/scores-manager.d.ts.map +0 -1
- package/dist/vendor/observe/client/scores-manager.js +0 -15
- package/dist/vendor/observe/client/scores-manager.js.map +0 -1
- package/dist/vendor/observe/client/sessions-manager.d.ts +0 -15
- package/dist/vendor/observe/client/sessions-manager.d.ts.map +0 -1
- package/dist/vendor/observe/client/sessions-manager.js +0 -24
- package/dist/vendor/observe/client/sessions-manager.js.map +0 -1
- package/dist/vendor/observe/client/traces-manager.d.ts +0 -23
- package/dist/vendor/observe/client/traces-manager.d.ts.map +0 -1
- package/dist/vendor/observe/client/traces-manager.js +0 -39
- package/dist/vendor/observe/client/traces-manager.js.map +0 -1
- package/dist/vendor/observe/console-exporter.d.ts +0 -11
- package/dist/vendor/observe/console-exporter.d.ts.map +0 -1
- package/dist/vendor/observe/console-exporter.js +0 -18
- package/dist/vendor/observe/console-exporter.js.map +0 -1
- package/dist/vendor/observe/context.d.ts +0 -4
- package/dist/vendor/observe/context.d.ts.map +0 -1
- package/dist/vendor/observe/context.js +0 -9
- package/dist/vendor/observe/context.js.map +0 -1
- package/dist/vendor/observe/entities/artifacts.d.ts +0 -46
- package/dist/vendor/observe/entities/artifacts.d.ts.map +0 -1
- package/dist/vendor/observe/entities/artifacts.js +0 -2
- package/dist/vendor/observe/entities/artifacts.js.map +0 -1
- package/dist/vendor/observe/entities/datasets.d.ts +0 -37
- package/dist/vendor/observe/entities/datasets.d.ts.map +0 -1
- package/dist/vendor/observe/entities/datasets.js +0 -2
- package/dist/vendor/observe/entities/datasets.js.map +0 -1
- package/dist/vendor/observe/entities/experiments.d.ts +0 -66
- package/dist/vendor/observe/entities/experiments.d.ts.map +0 -1
- package/dist/vendor/observe/entities/experiments.js +0 -2
- package/dist/vendor/observe/entities/experiments.js.map +0 -1
- package/dist/vendor/observe/entities/index.d.ts +0 -9
- package/dist/vendor/observe/entities/index.d.ts.map +0 -1
- package/dist/vendor/observe/entities/index.js +0 -9
- package/dist/vendor/observe/entities/index.js.map +0 -1
- package/dist/vendor/observe/entities/prompts.d.ts +0 -25
- package/dist/vendor/observe/entities/prompts.d.ts.map +0 -1
- package/dist/vendor/observe/entities/prompts.js +0 -2
- package/dist/vendor/observe/entities/prompts.js.map +0 -1
- package/dist/vendor/observe/entities/scores.d.ts +0 -28
- package/dist/vendor/observe/entities/scores.d.ts.map +0 -1
- package/dist/vendor/observe/entities/scores.js +0 -2
- package/dist/vendor/observe/entities/scores.js.map +0 -1
- package/dist/vendor/observe/entities/sessions.d.ts +0 -36
- package/dist/vendor/observe/entities/sessions.d.ts.map +0 -1
- package/dist/vendor/observe/entities/sessions.js +0 -2
- package/dist/vendor/observe/entities/sessions.js.map +0 -1
- package/dist/vendor/observe/entities/shared.d.ts +0 -26
- package/dist/vendor/observe/entities/shared.d.ts.map +0 -1
- package/dist/vendor/observe/entities/shared.js +0 -2
- package/dist/vendor/observe/entities/shared.js.map +0 -1
- package/dist/vendor/observe/entities/traces.d.ts +0 -59
- package/dist/vendor/observe/entities/traces.d.ts.map +0 -1
- package/dist/vendor/observe/entities/traces.js +0 -2
- package/dist/vendor/observe/entities/traces.js.map +0 -1
- package/dist/vendor/observe/exporter.d.ts +0 -2
- package/dist/vendor/observe/exporter.d.ts.map +0 -1
- package/dist/vendor/observe/exporter.js +0 -2
- package/dist/vendor/observe/exporter.js.map +0 -1
- package/dist/vendor/observe/file-exporter.d.ts +0 -16
- package/dist/vendor/observe/file-exporter.d.ts.map +0 -1
- package/dist/vendor/observe/file-exporter.js +0 -39
- package/dist/vendor/observe/file-exporter.js.map +0 -1
- package/dist/vendor/observe/global.d.ts +0 -6
- package/dist/vendor/observe/global.d.ts.map +0 -1
- package/dist/vendor/observe/global.js +0 -17
- package/dist/vendor/observe/global.js.map +0 -1
- package/dist/vendor/observe/index.d.ts +0 -24
- package/dist/vendor/observe/index.d.ts.map +0 -1
- package/dist/vendor/observe/index.js +0 -24
- package/dist/vendor/observe/index.js.map +0 -1
- package/dist/vendor/observe/noop.d.ts +0 -17
- package/dist/vendor/observe/noop.d.ts.map +0 -1
- package/dist/vendor/observe/noop.js +0 -80
- package/dist/vendor/observe/noop.js.map +0 -1
- package/dist/vendor/observe/privacy.d.ts +0 -18
- package/dist/vendor/observe/privacy.d.ts.map +0 -1
- package/dist/vendor/observe/privacy.js +0 -160
- package/dist/vendor/observe/privacy.js.map +0 -1
- package/dist/vendor/observe/query/simple-query-client.d.ts +0 -11
- package/dist/vendor/observe/query/simple-query-client.d.ts.map +0 -1
- package/dist/vendor/observe/query/simple-query-client.js +0 -31
- package/dist/vendor/observe/query/simple-query-client.js.map +0 -1
- package/dist/vendor/observe/replay/session-replay.d.ts +0 -20
- package/dist/vendor/observe/replay/session-replay.d.ts.map +0 -1
- package/dist/vendor/observe/replay/session-replay.js +0 -180
- package/dist/vendor/observe/replay/session-replay.js.map +0 -1
- package/dist/vendor/observe/runtime.d.ts +0 -27
- package/dist/vendor/observe/runtime.d.ts.map +0 -1
- package/dist/vendor/observe/runtime.js +0 -177
- package/dist/vendor/observe/runtime.js.map +0 -1
- package/dist/vendor/observe/server/dashboard-html.d.ts +0 -6
- package/dist/vendor/observe/server/dashboard-html.d.ts.map +0 -1
- package/dist/vendor/observe/server/dashboard-html.js +0 -305
- package/dist/vendor/observe/server/dashboard-html.js.map +0 -1
- package/dist/vendor/observe/server/http-observe-server.d.ts +0 -62
- package/dist/vendor/observe/server/http-observe-server.d.ts.map +0 -1
- package/dist/vendor/observe/server/http-observe-server.js +0 -418
- package/dist/vendor/observe/server/http-observe-server.js.map +0 -1
- package/dist/vendor/observe/server/in-memory-observe-server.d.ts +0 -20
- package/dist/vendor/observe/server/in-memory-observe-server.d.ts.map +0 -1
- package/dist/vendor/observe/server/in-memory-observe-server.js +0 -76
- package/dist/vendor/observe/server/in-memory-observe-server.js.map +0 -1
- package/dist/vendor/observe/span.d.ts +0 -45
- package/dist/vendor/observe/span.d.ts.map +0 -1
- package/dist/vendor/observe/span.js +0 -110
- package/dist/vendor/observe/span.js.map +0 -1
- package/dist/vendor/observe/store/contracts.d.ts +0 -59
- package/dist/vendor/observe/store/contracts.d.ts.map +0 -1
- package/dist/vendor/observe/store/contracts.js +0 -2
- package/dist/vendor/observe/store/contracts.js.map +0 -1
- package/dist/vendor/observe/store/file-control-plane-store.d.ts +0 -33
- package/dist/vendor/observe/store/file-control-plane-store.d.ts.map +0 -1
- package/dist/vendor/observe/store/file-control-plane-store.js +0 -146
- package/dist/vendor/observe/store/file-control-plane-store.js.map +0 -1
- package/dist/vendor/observe/store/in-memory-control-plane-store.d.ts +0 -84
- package/dist/vendor/observe/store/in-memory-control-plane-store.d.ts.map +0 -1
- package/dist/vendor/observe/store/in-memory-control-plane-store.js +0 -447
- package/dist/vendor/observe/store/in-memory-control-plane-store.js.map +0 -1
- package/dist/vendor/observe/store/index.d.ts +0 -4
- package/dist/vendor/observe/store/index.d.ts.map +0 -1
- package/dist/vendor/observe/store/index.js +0 -4
- package/dist/vendor/observe/store/index.js.map +0 -1
- package/dist/vendor/observe/types.d.ts +0 -246
- package/dist/vendor/observe/types.d.ts.map +0 -1
- package/dist/vendor/observe/types.js +0 -152
- package/dist/vendor/observe/types.js.map +0 -1
- package/dist/vendor/observe/worker/in-memory-observe-worker.d.ts +0 -25
- package/dist/vendor/observe/worker/in-memory-observe-worker.d.ts.map +0 -1
- package/dist/vendor/observe/worker/in-memory-observe-worker.js +0 -82
- package/dist/vendor/observe/worker/in-memory-observe-worker.js.map +0 -1
- package/guides/CLAUDE_CODEX_CLI_INTEGRATION_PLAN.md +0 -321
- package/guides/INDUSAGI_MONO_MIT_REMOVAL_GUIDE.md +0 -2132
- package/guides/INDUSVX_OBSERVE_FULL_INTEGRATION_REPORT.md +0 -543
- package/guides/OBSERVE_DEEP_VALIDATION.md +0 -252
- package/guides/OBSERVE_LOCAL_TESTING.md +0 -183
- package/guides/OPTION3_PROVIDER_ADAPTER_RUNTIME_PLAN.md +0 -370
- package/guides/SAME_TO_SAME_PARITY_REPORT.md +0 -312
- package/tasks/patch-indusagi-react-host.mjs +0 -247
|
@@ -1,1549 +0,0 @@
|
|
|
1
|
-
(function() {
|
|
2
|
-
'use strict';
|
|
3
|
-
|
|
4
|
-
// ============================================================
|
|
5
|
-
// DATA LOADING
|
|
6
|
-
// ============================================================
|
|
7
|
-
|
|
8
|
-
const base64 = document.getElementById('session-data').textContent;
|
|
9
|
-
const binary = atob(base64);
|
|
10
|
-
const bytes = new Uint8Array(binary.length);
|
|
11
|
-
for (let i = 0; i < binary.length; i++) {
|
|
12
|
-
bytes[i] = binary.charCodeAt(i);
|
|
13
|
-
}
|
|
14
|
-
const data = JSON.parse(new TextDecoder('utf-8').decode(bytes));
|
|
15
|
-
const { header, entries, leafId: defaultLeafId, systemPrompt, tools, renderedTools } = data;
|
|
16
|
-
|
|
17
|
-
// ============================================================
|
|
18
|
-
// URL PARAMETER HANDLING
|
|
19
|
-
// ============================================================
|
|
20
|
-
|
|
21
|
-
// Parse URL parameters for deep linking: leafId and targetId
|
|
22
|
-
// Check for injected params (when loaded in iframe via srcdoc) or use window.location
|
|
23
|
-
const injectedParams = document.querySelector('meta[name="indusagi-url-params"]');
|
|
24
|
-
const searchString = injectedParams ? injectedParams.content : window.location.search.substring(1);
|
|
25
|
-
const urlParams = new URLSearchParams(searchString);
|
|
26
|
-
const urlLeafId = urlParams.get('leafId');
|
|
27
|
-
const urlTargetId = urlParams.get('targetId');
|
|
28
|
-
// Use URL leafId if provided, otherwise fall back to session default
|
|
29
|
-
const leafId = urlLeafId || defaultLeafId;
|
|
30
|
-
|
|
31
|
-
// ============================================================
|
|
32
|
-
// DATA STRUCTURES
|
|
33
|
-
// ============================================================
|
|
34
|
-
|
|
35
|
-
// Entry lookup by ID
|
|
36
|
-
const byId = new Map();
|
|
37
|
-
for (const entry of entries) {
|
|
38
|
-
byId.set(entry.id, entry);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
// Tool call lookup (toolCallId -> {name, arguments})
|
|
42
|
-
const toolCallMap = new Map();
|
|
43
|
-
for (const entry of entries) {
|
|
44
|
-
if (entry.type === 'message' && entry.message.role === 'assistant') {
|
|
45
|
-
const content = entry.message.content;
|
|
46
|
-
if (Array.isArray(content)) {
|
|
47
|
-
for (const block of content) {
|
|
48
|
-
if (block.type === 'toolCall') {
|
|
49
|
-
toolCallMap.set(block.id, { name: block.name, arguments: block.arguments });
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
// Label lookup (entryId -> label string)
|
|
57
|
-
// Labels are stored in 'label' entries that reference their target via targetId
|
|
58
|
-
const labelMap = new Map();
|
|
59
|
-
for (const entry of entries) {
|
|
60
|
-
if (entry.type === 'label' && entry.targetId && entry.label) {
|
|
61
|
-
labelMap.set(entry.targetId, entry.label);
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
// ============================================================
|
|
66
|
-
// TREE DATA PREPARATION (no DOM, pure data)
|
|
67
|
-
// ============================================================
|
|
68
|
-
|
|
69
|
-
/**
|
|
70
|
-
* Build tree structure from flat entries.
|
|
71
|
-
* Returns array of root nodes, each with { entry, children, label }.
|
|
72
|
-
*/
|
|
73
|
-
function buildTree() {
|
|
74
|
-
const nodeMap = new Map();
|
|
75
|
-
const roots = [];
|
|
76
|
-
|
|
77
|
-
// Create nodes
|
|
78
|
-
for (const entry of entries) {
|
|
79
|
-
nodeMap.set(entry.id, {
|
|
80
|
-
entry,
|
|
81
|
-
children: [],
|
|
82
|
-
label: labelMap.get(entry.id)
|
|
83
|
-
});
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
// Build parent-child relationships
|
|
87
|
-
for (const entry of entries) {
|
|
88
|
-
const node = nodeMap.get(entry.id);
|
|
89
|
-
if (entry.parentId === null || entry.parentId === undefined || entry.parentId === entry.id) {
|
|
90
|
-
roots.push(node);
|
|
91
|
-
} else {
|
|
92
|
-
const parent = nodeMap.get(entry.parentId);
|
|
93
|
-
if (parent) {
|
|
94
|
-
parent.children.push(node);
|
|
95
|
-
} else {
|
|
96
|
-
roots.push(node);
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
// Sort children by timestamp
|
|
102
|
-
function sortChildren(node) {
|
|
103
|
-
node.children.sort((a, b) =>
|
|
104
|
-
new Date(a.entry.timestamp).getTime() - new Date(b.entry.timestamp).getTime()
|
|
105
|
-
);
|
|
106
|
-
node.children.forEach(sortChildren);
|
|
107
|
-
}
|
|
108
|
-
roots.forEach(sortChildren);
|
|
109
|
-
|
|
110
|
-
return roots;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
/**
|
|
114
|
-
* Build set of entry IDs on path from root to target.
|
|
115
|
-
*/
|
|
116
|
-
function buildActivePathIds(targetId) {
|
|
117
|
-
const ids = new Set();
|
|
118
|
-
let current = byId.get(targetId);
|
|
119
|
-
while (current) {
|
|
120
|
-
ids.add(current.id);
|
|
121
|
-
// Stop if no parent or self-referencing (root)
|
|
122
|
-
if (!current.parentId || current.parentId === current.id) {
|
|
123
|
-
break;
|
|
124
|
-
}
|
|
125
|
-
current = byId.get(current.parentId);
|
|
126
|
-
}
|
|
127
|
-
return ids;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
/**
|
|
131
|
-
* Get array of entries from root to target (the conversation path).
|
|
132
|
-
*/
|
|
133
|
-
function getPath(targetId) {
|
|
134
|
-
const path = [];
|
|
135
|
-
let current = byId.get(targetId);
|
|
136
|
-
while (current) {
|
|
137
|
-
path.unshift(current);
|
|
138
|
-
// Stop if no parent or self-referencing (root)
|
|
139
|
-
if (!current.parentId || current.parentId === current.id) {
|
|
140
|
-
break;
|
|
141
|
-
}
|
|
142
|
-
current = byId.get(current.parentId);
|
|
143
|
-
}
|
|
144
|
-
return path;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
// Tree node lookup for finding leaves
|
|
148
|
-
let treeNodeMap = null;
|
|
149
|
-
|
|
150
|
-
/**
|
|
151
|
-
* Find the newest leaf node reachable from a given node.
|
|
152
|
-
* This allows clicking any node in a branch to show the full branch.
|
|
153
|
-
* Children are sorted by timestamp, so the newest is always last.
|
|
154
|
-
*/
|
|
155
|
-
function findNewestLeaf(nodeId) {
|
|
156
|
-
// Build tree node map lazily
|
|
157
|
-
if (!treeNodeMap) {
|
|
158
|
-
treeNodeMap = new Map();
|
|
159
|
-
const tree = buildTree();
|
|
160
|
-
function mapNodes(node) {
|
|
161
|
-
treeNodeMap.set(node.entry.id, node);
|
|
162
|
-
node.children.forEach(mapNodes);
|
|
163
|
-
}
|
|
164
|
-
tree.forEach(mapNodes);
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
const node = treeNodeMap.get(nodeId);
|
|
168
|
-
if (!node) return nodeId;
|
|
169
|
-
|
|
170
|
-
// Follow the newest (last) child at each level
|
|
171
|
-
let current = node;
|
|
172
|
-
while (current.children.length > 0) {
|
|
173
|
-
current = current.children[current.children.length - 1];
|
|
174
|
-
}
|
|
175
|
-
return current.entry.id;
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
/**
|
|
179
|
-
* Flatten tree into list with indentation and connector info.
|
|
180
|
-
* Returns array of { node, indent, showConnector, isLast, gutters, isVirtualRootChild, multipleRoots }.
|
|
181
|
-
* Matches tree-selector.ts logic exactly.
|
|
182
|
-
*/
|
|
183
|
-
function flattenTree(roots, activePathIds) {
|
|
184
|
-
const result = [];
|
|
185
|
-
const multipleRoots = roots.length > 1;
|
|
186
|
-
|
|
187
|
-
// Mark which subtrees contain the active leaf
|
|
188
|
-
const containsActive = new Map();
|
|
189
|
-
function markActive(node) {
|
|
190
|
-
let has = activePathIds.has(node.entry.id);
|
|
191
|
-
for (const child of node.children) {
|
|
192
|
-
if (markActive(child)) has = true;
|
|
193
|
-
}
|
|
194
|
-
containsActive.set(node, has);
|
|
195
|
-
return has;
|
|
196
|
-
}
|
|
197
|
-
roots.forEach(markActive);
|
|
198
|
-
|
|
199
|
-
// Stack: [node, indent, justBranched, showConnector, isLast, gutters, isVirtualRootChild]
|
|
200
|
-
const stack = [];
|
|
201
|
-
|
|
202
|
-
// Add roots (prioritize branch containing active leaf)
|
|
203
|
-
const orderedRoots = [...roots].sort((a, b) =>
|
|
204
|
-
Number(containsActive.get(b)) - Number(containsActive.get(a))
|
|
205
|
-
);
|
|
206
|
-
for (let i = orderedRoots.length - 1; i >= 0; i--) {
|
|
207
|
-
const isLast = i === orderedRoots.length - 1;
|
|
208
|
-
stack.push([orderedRoots[i], multipleRoots ? 1 : 0, multipleRoots, multipleRoots, isLast, [], multipleRoots]);
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
while (stack.length > 0) {
|
|
212
|
-
const [node, indent, justBranched, showConnector, isLast, gutters, isVirtualRootChild] = stack.pop();
|
|
213
|
-
|
|
214
|
-
result.push({ node, indent, showConnector, isLast, gutters, isVirtualRootChild, multipleRoots });
|
|
215
|
-
|
|
216
|
-
const children = node.children;
|
|
217
|
-
const multipleChildren = children.length > 1;
|
|
218
|
-
|
|
219
|
-
// Order children (active branch first)
|
|
220
|
-
const orderedChildren = [...children].sort((a, b) =>
|
|
221
|
-
Number(containsActive.get(b)) - Number(containsActive.get(a))
|
|
222
|
-
);
|
|
223
|
-
|
|
224
|
-
// Calculate child indent (matches tree-selector.ts)
|
|
225
|
-
let childIndent;
|
|
226
|
-
if (multipleChildren) {
|
|
227
|
-
// Parent branches: children get +1
|
|
228
|
-
childIndent = indent + 1;
|
|
229
|
-
} else if (justBranched && indent > 0) {
|
|
230
|
-
// First generation after a branch: +1 for visual grouping
|
|
231
|
-
childIndent = indent + 1;
|
|
232
|
-
} else {
|
|
233
|
-
// Single-child chain: stay flat
|
|
234
|
-
childIndent = indent;
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
// Build gutters for children
|
|
238
|
-
const connectorDisplayed = showConnector && !isVirtualRootChild;
|
|
239
|
-
const currentDisplayIndent = multipleRoots ? Math.max(0, indent - 1) : indent;
|
|
240
|
-
const connectorPosition = Math.max(0, currentDisplayIndent - 1);
|
|
241
|
-
const childGutters = connectorDisplayed
|
|
242
|
-
? [...gutters, { position: connectorPosition, show: !isLast }]
|
|
243
|
-
: gutters;
|
|
244
|
-
|
|
245
|
-
// Add children in reverse order for stack
|
|
246
|
-
for (let i = orderedChildren.length - 1; i >= 0; i--) {
|
|
247
|
-
const childIsLast = i === orderedChildren.length - 1;
|
|
248
|
-
stack.push([orderedChildren[i], childIndent, multipleChildren, multipleChildren, childIsLast, childGutters, false]);
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
return result;
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
/**
|
|
256
|
-
* Build ASCII prefix string for tree node.
|
|
257
|
-
*/
|
|
258
|
-
function buildTreePrefix(flatNode) {
|
|
259
|
-
const { indent, showConnector, isLast, gutters, isVirtualRootChild, multipleRoots } = flatNode;
|
|
260
|
-
const displayIndent = multipleRoots ? Math.max(0, indent - 1) : indent;
|
|
261
|
-
const connector = showConnector && !isVirtualRootChild ? (isLast ? '└─ ' : '├─ ') : '';
|
|
262
|
-
const connectorPosition = connector ? displayIndent - 1 : -1;
|
|
263
|
-
|
|
264
|
-
const totalChars = displayIndent * 3;
|
|
265
|
-
const prefixChars = [];
|
|
266
|
-
for (let i = 0; i < totalChars; i++) {
|
|
267
|
-
const level = Math.floor(i / 3);
|
|
268
|
-
const posInLevel = i % 3;
|
|
269
|
-
|
|
270
|
-
const gutter = gutters.find(g => g.position === level);
|
|
271
|
-
if (gutter) {
|
|
272
|
-
prefixChars.push(posInLevel === 0 ? (gutter.show ? '│' : ' ') : ' ');
|
|
273
|
-
} else if (connector && level === connectorPosition) {
|
|
274
|
-
if (posInLevel === 0) {
|
|
275
|
-
prefixChars.push(isLast ? '└' : '├');
|
|
276
|
-
} else if (posInLevel === 1) {
|
|
277
|
-
prefixChars.push('─');
|
|
278
|
-
} else {
|
|
279
|
-
prefixChars.push(' ');
|
|
280
|
-
}
|
|
281
|
-
} else {
|
|
282
|
-
prefixChars.push(' ');
|
|
283
|
-
}
|
|
284
|
-
}
|
|
285
|
-
return prefixChars.join('');
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
// ============================================================
|
|
289
|
-
// FILTERING (pure data)
|
|
290
|
-
// ============================================================
|
|
291
|
-
|
|
292
|
-
let filterMode = 'default';
|
|
293
|
-
let searchQuery = '';
|
|
294
|
-
|
|
295
|
-
function hasTextContent(content) {
|
|
296
|
-
if (typeof content === 'string') return content.trim().length > 0;
|
|
297
|
-
if (Array.isArray(content)) {
|
|
298
|
-
for (const c of content) {
|
|
299
|
-
if (c.type === 'text' && c.text && c.text.trim().length > 0) return true;
|
|
300
|
-
}
|
|
301
|
-
}
|
|
302
|
-
return false;
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
function extractContent(content) {
|
|
306
|
-
if (typeof content === 'string') return content;
|
|
307
|
-
if (Array.isArray(content)) {
|
|
308
|
-
return content
|
|
309
|
-
.filter(c => c.type === 'text' && c.text)
|
|
310
|
-
.map(c => c.text)
|
|
311
|
-
.join('');
|
|
312
|
-
}
|
|
313
|
-
return '';
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
function getSearchableText(entry, label) {
|
|
317
|
-
const parts = [];
|
|
318
|
-
if (label) parts.push(label);
|
|
319
|
-
|
|
320
|
-
switch (entry.type) {
|
|
321
|
-
case 'message': {
|
|
322
|
-
const msg = entry.message;
|
|
323
|
-
parts.push(msg.role);
|
|
324
|
-
if (msg.content) parts.push(extractContent(msg.content));
|
|
325
|
-
if (msg.role === 'bashExecution' && msg.command) parts.push(msg.command);
|
|
326
|
-
break;
|
|
327
|
-
}
|
|
328
|
-
case 'custom_message':
|
|
329
|
-
parts.push(entry.customType);
|
|
330
|
-
parts.push(typeof entry.content === 'string' ? entry.content : extractContent(entry.content));
|
|
331
|
-
break;
|
|
332
|
-
case 'compaction':
|
|
333
|
-
parts.push('compaction');
|
|
334
|
-
break;
|
|
335
|
-
case 'branch_summary':
|
|
336
|
-
parts.push('branch summary', entry.summary);
|
|
337
|
-
break;
|
|
338
|
-
case 'model_change':
|
|
339
|
-
parts.push('model', entry.modelId);
|
|
340
|
-
break;
|
|
341
|
-
case 'thinking_level_change':
|
|
342
|
-
parts.push('thinking', entry.thinkingLevel);
|
|
343
|
-
break;
|
|
344
|
-
}
|
|
345
|
-
|
|
346
|
-
return parts.join(' ').toLowerCase();
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
/**
|
|
350
|
-
* Filter flat nodes based on current filterMode and searchQuery.
|
|
351
|
-
*/
|
|
352
|
-
function filterNodes(flatNodes, currentLeafId) {
|
|
353
|
-
const searchTokens = searchQuery.toLowerCase().split(/\s+/).filter(Boolean);
|
|
354
|
-
|
|
355
|
-
const filtered = flatNodes.filter(flatNode => {
|
|
356
|
-
const entry = flatNode.node.entry;
|
|
357
|
-
const label = flatNode.node.label;
|
|
358
|
-
const isCurrentLeaf = entry.id === currentLeafId;
|
|
359
|
-
|
|
360
|
-
// Always show current leaf
|
|
361
|
-
if (isCurrentLeaf) return true;
|
|
362
|
-
|
|
363
|
-
// Hide assistant messages with only tool calls (no text) unless error/aborted
|
|
364
|
-
if (entry.type === 'message' && entry.message.role === 'assistant') {
|
|
365
|
-
const msg = entry.message;
|
|
366
|
-
const hasText = hasTextContent(msg.content);
|
|
367
|
-
const isErrorOrAborted = msg.stopReason && msg.stopReason !== 'stop' && msg.stopReason !== 'toolUse';
|
|
368
|
-
if (!hasText && !isErrorOrAborted) return false;
|
|
369
|
-
}
|
|
370
|
-
|
|
371
|
-
// Apply filter mode
|
|
372
|
-
const isSettingsEntry = ['label', 'custom', 'model_change', 'thinking_level_change'].includes(entry.type);
|
|
373
|
-
let passesFilter = true;
|
|
374
|
-
|
|
375
|
-
switch (filterMode) {
|
|
376
|
-
case 'user-only':
|
|
377
|
-
passesFilter = entry.type === 'message' && entry.message.role === 'user';
|
|
378
|
-
break;
|
|
379
|
-
case 'no-tools':
|
|
380
|
-
passesFilter = !isSettingsEntry && !(entry.type === 'message' && entry.message.role === 'toolResult');
|
|
381
|
-
break;
|
|
382
|
-
case 'labeled-only':
|
|
383
|
-
passesFilter = label !== undefined;
|
|
384
|
-
break;
|
|
385
|
-
case 'all':
|
|
386
|
-
passesFilter = true;
|
|
387
|
-
break;
|
|
388
|
-
default: // 'default'
|
|
389
|
-
passesFilter = !isSettingsEntry;
|
|
390
|
-
break;
|
|
391
|
-
}
|
|
392
|
-
|
|
393
|
-
if (!passesFilter) return false;
|
|
394
|
-
|
|
395
|
-
// Apply search filter
|
|
396
|
-
if (searchTokens.length > 0) {
|
|
397
|
-
const nodeText = getSearchableText(entry, label);
|
|
398
|
-
if (!searchTokens.every(t => nodeText.includes(t))) return false;
|
|
399
|
-
}
|
|
400
|
-
|
|
401
|
-
return true;
|
|
402
|
-
});
|
|
403
|
-
|
|
404
|
-
// Recalculate visual structure based on visible tree
|
|
405
|
-
recalculateVisualStructure(filtered, flatNodes);
|
|
406
|
-
|
|
407
|
-
return filtered;
|
|
408
|
-
}
|
|
409
|
-
|
|
410
|
-
/**
|
|
411
|
-
* Recompute indentation/connectors for the filtered view
|
|
412
|
-
*
|
|
413
|
-
* Filtering can hide intermediate entries; descendants attach to the nearest visible ancestor.
|
|
414
|
-
* Keep indentation semantics aligned with flattenTree() so single-child chains don't drift right.
|
|
415
|
-
*/
|
|
416
|
-
function recalculateVisualStructure(filteredNodes, allFlatNodes) {
|
|
417
|
-
if (filteredNodes.length === 0) return;
|
|
418
|
-
|
|
419
|
-
const visibleIds = new Set(filteredNodes.map(n => n.node.entry.id));
|
|
420
|
-
|
|
421
|
-
// Build entry map for parent lookup (using full tree)
|
|
422
|
-
const entryMap = new Map();
|
|
423
|
-
for (const flatNode of allFlatNodes) {
|
|
424
|
-
entryMap.set(flatNode.node.entry.id, flatNode);
|
|
425
|
-
}
|
|
426
|
-
|
|
427
|
-
// Find nearest visible ancestor for a node
|
|
428
|
-
function findVisibleAncestor(nodeId) {
|
|
429
|
-
let currentId = entryMap.get(nodeId)?.node.entry.parentId;
|
|
430
|
-
while (currentId != null) {
|
|
431
|
-
if (visibleIds.has(currentId)) {
|
|
432
|
-
return currentId;
|
|
433
|
-
}
|
|
434
|
-
currentId = entryMap.get(currentId)?.node.entry.parentId;
|
|
435
|
-
}
|
|
436
|
-
return null;
|
|
437
|
-
}
|
|
438
|
-
|
|
439
|
-
// Build visible tree structure
|
|
440
|
-
const visibleParent = new Map();
|
|
441
|
-
const visibleChildren = new Map();
|
|
442
|
-
visibleChildren.set(null, []); // root-level nodes
|
|
443
|
-
|
|
444
|
-
for (const flatNode of filteredNodes) {
|
|
445
|
-
const nodeId = flatNode.node.entry.id;
|
|
446
|
-
const ancestorId = findVisibleAncestor(nodeId);
|
|
447
|
-
visibleParent.set(nodeId, ancestorId);
|
|
448
|
-
|
|
449
|
-
if (!visibleChildren.has(ancestorId)) {
|
|
450
|
-
visibleChildren.set(ancestorId, []);
|
|
451
|
-
}
|
|
452
|
-
visibleChildren.get(ancestorId).push(nodeId);
|
|
453
|
-
}
|
|
454
|
-
|
|
455
|
-
// Update multipleRoots based on visible roots
|
|
456
|
-
const visibleRootIds = visibleChildren.get(null);
|
|
457
|
-
const multipleRoots = visibleRootIds.length > 1;
|
|
458
|
-
|
|
459
|
-
// Build a map for quick lookup: nodeId → FlatNode
|
|
460
|
-
const filteredNodeMap = new Map();
|
|
461
|
-
for (const flatNode of filteredNodes) {
|
|
462
|
-
filteredNodeMap.set(flatNode.node.entry.id, flatNode);
|
|
463
|
-
}
|
|
464
|
-
|
|
465
|
-
// DFS traversal of visible tree, applying same indentation rules as flattenTree()
|
|
466
|
-
// Stack items: [nodeId, indent, justBranched, showConnector, isLast, gutters, isVirtualRootChild]
|
|
467
|
-
const stack = [];
|
|
468
|
-
|
|
469
|
-
// Add visible roots in reverse order (to process in forward order via stack)
|
|
470
|
-
for (let i = visibleRootIds.length - 1; i >= 0; i--) {
|
|
471
|
-
const isLast = i === visibleRootIds.length - 1;
|
|
472
|
-
stack.push([
|
|
473
|
-
visibleRootIds[i],
|
|
474
|
-
multipleRoots ? 1 : 0,
|
|
475
|
-
multipleRoots,
|
|
476
|
-
multipleRoots,
|
|
477
|
-
isLast,
|
|
478
|
-
[],
|
|
479
|
-
multipleRoots
|
|
480
|
-
]);
|
|
481
|
-
}
|
|
482
|
-
|
|
483
|
-
while (stack.length > 0) {
|
|
484
|
-
const [nodeId, indent, justBranched, showConnector, isLast, gutters, isVirtualRootChild] = stack.pop();
|
|
485
|
-
|
|
486
|
-
const flatNode = filteredNodeMap.get(nodeId);
|
|
487
|
-
if (!flatNode) continue;
|
|
488
|
-
|
|
489
|
-
// Update this node's visual properties
|
|
490
|
-
flatNode.indent = indent;
|
|
491
|
-
flatNode.showConnector = showConnector;
|
|
492
|
-
flatNode.isLast = isLast;
|
|
493
|
-
flatNode.gutters = gutters;
|
|
494
|
-
flatNode.isVirtualRootChild = isVirtualRootChild;
|
|
495
|
-
flatNode.multipleRoots = multipleRoots;
|
|
496
|
-
|
|
497
|
-
// Get visible children of this node
|
|
498
|
-
const children = visibleChildren.get(nodeId) || [];
|
|
499
|
-
const multipleChildren = children.length > 1;
|
|
500
|
-
|
|
501
|
-
// Calculate child indent using same rules as flattenTree():
|
|
502
|
-
// - Parent branches (multiple children): children get +1
|
|
503
|
-
// - Just branched and indent > 0: children get +1 for visual grouping
|
|
504
|
-
// - Single-child chain: stay flat
|
|
505
|
-
let childIndent;
|
|
506
|
-
if (multipleChildren) {
|
|
507
|
-
childIndent = indent + 1;
|
|
508
|
-
} else if (justBranched && indent > 0) {
|
|
509
|
-
childIndent = indent + 1;
|
|
510
|
-
} else {
|
|
511
|
-
childIndent = indent;
|
|
512
|
-
}
|
|
513
|
-
|
|
514
|
-
// Build gutters for children (same logic as flattenTree)
|
|
515
|
-
const connectorDisplayed = showConnector && !isVirtualRootChild;
|
|
516
|
-
const currentDisplayIndent = multipleRoots ? Math.max(0, indent - 1) : indent;
|
|
517
|
-
const connectorPosition = Math.max(0, currentDisplayIndent - 1);
|
|
518
|
-
const childGutters = connectorDisplayed
|
|
519
|
-
? [...gutters, { position: connectorPosition, show: !isLast }]
|
|
520
|
-
: gutters;
|
|
521
|
-
|
|
522
|
-
// Add children in reverse order (to process in forward order via stack)
|
|
523
|
-
for (let i = children.length - 1; i >= 0; i--) {
|
|
524
|
-
const childIsLast = i === children.length - 1;
|
|
525
|
-
stack.push([
|
|
526
|
-
children[i],
|
|
527
|
-
childIndent,
|
|
528
|
-
multipleChildren,
|
|
529
|
-
multipleChildren,
|
|
530
|
-
childIsLast,
|
|
531
|
-
childGutters,
|
|
532
|
-
false
|
|
533
|
-
]);
|
|
534
|
-
}
|
|
535
|
-
}
|
|
536
|
-
}
|
|
537
|
-
|
|
538
|
-
// ============================================================
|
|
539
|
-
// TREE DISPLAY TEXT (pure data -> string)
|
|
540
|
-
// ============================================================
|
|
541
|
-
|
|
542
|
-
function shortenPath(p) {
|
|
543
|
-
if (p.startsWith('/Users/')) {
|
|
544
|
-
const parts = p.split('/');
|
|
545
|
-
if (parts.length > 2) return '~' + p.slice(('/Users/' + parts[2]).length);
|
|
546
|
-
}
|
|
547
|
-
if (p.startsWith('/home/')) {
|
|
548
|
-
const parts = p.split('/');
|
|
549
|
-
if (parts.length > 2) return '~' + p.slice(('/home/' + parts[2]).length);
|
|
550
|
-
}
|
|
551
|
-
return p;
|
|
552
|
-
}
|
|
553
|
-
|
|
554
|
-
function formatToolCall(name, args) {
|
|
555
|
-
switch (name) {
|
|
556
|
-
case 'read': {
|
|
557
|
-
const path = shortenPath(String(args.path || args.file_path || ''));
|
|
558
|
-
const offset = args.offset;
|
|
559
|
-
const limit = args.limit;
|
|
560
|
-
let display = path;
|
|
561
|
-
if (offset !== undefined || limit !== undefined) {
|
|
562
|
-
const start = offset ?? 1;
|
|
563
|
-
const end = limit !== undefined ? start + limit - 1 : '';
|
|
564
|
-
display += `:${start}${end ? `-${end}` : ''}`;
|
|
565
|
-
}
|
|
566
|
-
return `[read: ${display}]`;
|
|
567
|
-
}
|
|
568
|
-
case 'write':
|
|
569
|
-
return `[write: ${shortenPath(String(args.path || args.file_path || ''))}]`;
|
|
570
|
-
case 'edit':
|
|
571
|
-
return `[edit: ${shortenPath(String(args.path || args.file_path || ''))}]`;
|
|
572
|
-
case 'bash': {
|
|
573
|
-
const rawCmd = String(args.command || '');
|
|
574
|
-
const cmd = rawCmd.replace(/[\n\t]/g, ' ').trim().slice(0, 50);
|
|
575
|
-
return `[bash: ${cmd}${rawCmd.length > 50 ? '...' : ''}]`;
|
|
576
|
-
}
|
|
577
|
-
case 'grep':
|
|
578
|
-
return `[grep: /${args.pattern || ''}/ in ${shortenPath(String(args.path || '.'))}]`;
|
|
579
|
-
case 'find':
|
|
580
|
-
return `[find: ${args.pattern || ''} in ${shortenPath(String(args.path || '.'))}]`;
|
|
581
|
-
case 'ls':
|
|
582
|
-
return `[ls: ${shortenPath(String(args.path || '.'))}]`;
|
|
583
|
-
default: {
|
|
584
|
-
const argsStr = JSON.stringify(args).slice(0, 40);
|
|
585
|
-
return `[${name}: ${argsStr}${JSON.stringify(args).length > 40 ? '...' : ''}]`;
|
|
586
|
-
}
|
|
587
|
-
}
|
|
588
|
-
}
|
|
589
|
-
|
|
590
|
-
function escapeHtml(text) {
|
|
591
|
-
const div = document.createElement('div');
|
|
592
|
-
div.textContent = text;
|
|
593
|
-
return div.innerHTML;
|
|
594
|
-
}
|
|
595
|
-
|
|
596
|
-
/**
|
|
597
|
-
* Truncate string to maxLen chars, append "..." if truncated.
|
|
598
|
-
*/
|
|
599
|
-
function truncate(s, maxLen = 100) {
|
|
600
|
-
if (s.length <= maxLen) return s;
|
|
601
|
-
return s.slice(0, maxLen) + '...';
|
|
602
|
-
}
|
|
603
|
-
|
|
604
|
-
/**
|
|
605
|
-
* Get display text for tree node (returns HTML string).
|
|
606
|
-
*/
|
|
607
|
-
function getTreeNodeDisplayHtml(entry, label) {
|
|
608
|
-
const normalize = s => s.replace(/[\n\t]/g, ' ').trim();
|
|
609
|
-
const labelHtml = label ? `<span class="tree-label">[${escapeHtml(label)}]</span> ` : '';
|
|
610
|
-
|
|
611
|
-
switch (entry.type) {
|
|
612
|
-
case 'message': {
|
|
613
|
-
const msg = entry.message;
|
|
614
|
-
if (msg.role === 'user') {
|
|
615
|
-
const content = truncate(normalize(extractContent(msg.content)));
|
|
616
|
-
return labelHtml + `<span class="tree-role-user">user:</span> ${escapeHtml(content)}`;
|
|
617
|
-
}
|
|
618
|
-
if (msg.role === 'assistant') {
|
|
619
|
-
const textContent = truncate(normalize(extractContent(msg.content)));
|
|
620
|
-
if (textContent) {
|
|
621
|
-
return labelHtml + `<span class="tree-role-assistant">assistant:</span> ${escapeHtml(textContent)}`;
|
|
622
|
-
}
|
|
623
|
-
if (msg.stopReason === 'aborted') {
|
|
624
|
-
return labelHtml + `<span class="tree-role-assistant">assistant:</span> <span class="tree-muted">(aborted)</span>`;
|
|
625
|
-
}
|
|
626
|
-
if (msg.errorMessage) {
|
|
627
|
-
return labelHtml + `<span class="tree-role-assistant">assistant:</span> <span class="tree-error">${escapeHtml(truncate(msg.errorMessage))}</span>`;
|
|
628
|
-
}
|
|
629
|
-
return labelHtml + `<span class="tree-role-assistant">assistant:</span> <span class="tree-muted">(no text)</span>`;
|
|
630
|
-
}
|
|
631
|
-
if (msg.role === 'toolResult') {
|
|
632
|
-
const toolCall = msg.toolCallId ? toolCallMap.get(msg.toolCallId) : null;
|
|
633
|
-
if (toolCall) {
|
|
634
|
-
return labelHtml + `<span class="tree-role-tool">${escapeHtml(formatToolCall(toolCall.name, toolCall.arguments))}</span>`;
|
|
635
|
-
}
|
|
636
|
-
return labelHtml + `<span class="tree-role-tool">[${msg.toolName || 'tool'}]</span>`;
|
|
637
|
-
}
|
|
638
|
-
if (msg.role === 'bashExecution') {
|
|
639
|
-
const cmd = truncate(normalize(msg.command || ''));
|
|
640
|
-
return labelHtml + `<span class="tree-role-tool">[bash]:</span> ${escapeHtml(cmd)}`;
|
|
641
|
-
}
|
|
642
|
-
return labelHtml + `<span class="tree-muted">[${msg.role}]</span>`;
|
|
643
|
-
}
|
|
644
|
-
case 'compaction':
|
|
645
|
-
return labelHtml + `<span class="tree-compaction">[compaction: ${Math.round(entry.tokensBefore/1000)}k tokens]</span>`;
|
|
646
|
-
case 'branch_summary': {
|
|
647
|
-
const summary = truncate(normalize(entry.summary || ''));
|
|
648
|
-
return labelHtml + `<span class="tree-branch-summary">[branch summary]:</span> ${escapeHtml(summary)}`;
|
|
649
|
-
}
|
|
650
|
-
case 'custom_message': {
|
|
651
|
-
const content = typeof entry.content === 'string' ? entry.content : extractContent(entry.content);
|
|
652
|
-
return labelHtml + `<span class="tree-custom">[${escapeHtml(entry.customType)}]:</span> ${escapeHtml(truncate(normalize(content)))}`;
|
|
653
|
-
}
|
|
654
|
-
case 'model_change':
|
|
655
|
-
return labelHtml + `<span class="tree-muted">[model: ${entry.modelId}]</span>`;
|
|
656
|
-
case 'thinking_level_change':
|
|
657
|
-
return labelHtml + `<span class="tree-muted">[thinking: ${entry.thinkingLevel}]</span>`;
|
|
658
|
-
default:
|
|
659
|
-
return labelHtml + `<span class="tree-muted">[${entry.type}]</span>`;
|
|
660
|
-
}
|
|
661
|
-
}
|
|
662
|
-
|
|
663
|
-
// ============================================================
|
|
664
|
-
// TREE RENDERING (DOM manipulation)
|
|
665
|
-
// ============================================================
|
|
666
|
-
|
|
667
|
-
let currentLeafId = leafId;
|
|
668
|
-
let currentTargetId = urlTargetId || leafId;
|
|
669
|
-
let treeRendered = false;
|
|
670
|
-
|
|
671
|
-
function renderTree() {
|
|
672
|
-
const tree = buildTree();
|
|
673
|
-
const activePathIds = buildActivePathIds(currentLeafId);
|
|
674
|
-
const flatNodes = flattenTree(tree, activePathIds);
|
|
675
|
-
const filtered = filterNodes(flatNodes, currentLeafId);
|
|
676
|
-
const container = document.getElementById('tree-container');
|
|
677
|
-
|
|
678
|
-
// Full render only on first call or when filter/search changes
|
|
679
|
-
if (!treeRendered) {
|
|
680
|
-
container.innerHTML = '';
|
|
681
|
-
|
|
682
|
-
for (const flatNode of filtered) {
|
|
683
|
-
const entry = flatNode.node.entry;
|
|
684
|
-
const isOnPath = activePathIds.has(entry.id);
|
|
685
|
-
const isTarget = entry.id === currentTargetId;
|
|
686
|
-
|
|
687
|
-
const div = document.createElement('div');
|
|
688
|
-
div.className = 'tree-node';
|
|
689
|
-
if (isOnPath) div.classList.add('in-path');
|
|
690
|
-
if (isTarget) div.classList.add('active');
|
|
691
|
-
div.dataset.id = entry.id;
|
|
692
|
-
|
|
693
|
-
const prefix = buildTreePrefix(flatNode);
|
|
694
|
-
const prefixSpan = document.createElement('span');
|
|
695
|
-
prefixSpan.className = 'tree-prefix';
|
|
696
|
-
prefixSpan.textContent = prefix;
|
|
697
|
-
|
|
698
|
-
const marker = document.createElement('span');
|
|
699
|
-
marker.className = 'tree-marker';
|
|
700
|
-
marker.textContent = isOnPath ? '•' : ' ';
|
|
701
|
-
|
|
702
|
-
const content = document.createElement('span');
|
|
703
|
-
content.className = 'tree-content';
|
|
704
|
-
content.innerHTML = getTreeNodeDisplayHtml(entry, flatNode.node.label);
|
|
705
|
-
|
|
706
|
-
div.appendChild(prefixSpan);
|
|
707
|
-
div.appendChild(marker);
|
|
708
|
-
div.appendChild(content);
|
|
709
|
-
// Navigate to the newest leaf through this node, but scroll to the clicked node
|
|
710
|
-
div.addEventListener('click', () => {
|
|
711
|
-
const leafId = findNewestLeaf(entry.id);
|
|
712
|
-
navigateTo(leafId, 'target', entry.id);
|
|
713
|
-
});
|
|
714
|
-
|
|
715
|
-
container.appendChild(div);
|
|
716
|
-
}
|
|
717
|
-
|
|
718
|
-
treeRendered = true;
|
|
719
|
-
} else {
|
|
720
|
-
// Just update markers and classes
|
|
721
|
-
const nodes = container.querySelectorAll('.tree-node');
|
|
722
|
-
for (const node of nodes) {
|
|
723
|
-
const id = node.dataset.id;
|
|
724
|
-
const isOnPath = activePathIds.has(id);
|
|
725
|
-
const isTarget = id === currentTargetId;
|
|
726
|
-
|
|
727
|
-
node.classList.toggle('in-path', isOnPath);
|
|
728
|
-
node.classList.toggle('active', isTarget);
|
|
729
|
-
|
|
730
|
-
const marker = node.querySelector('.tree-marker');
|
|
731
|
-
if (marker) {
|
|
732
|
-
marker.textContent = isOnPath ? '•' : ' ';
|
|
733
|
-
}
|
|
734
|
-
}
|
|
735
|
-
}
|
|
736
|
-
|
|
737
|
-
document.getElementById('tree-status').textContent = `${filtered.length} / ${flatNodes.length} entries`;
|
|
738
|
-
|
|
739
|
-
// Scroll active node into view after layout
|
|
740
|
-
setTimeout(() => {
|
|
741
|
-
const activeNode = container.querySelector('.tree-node.active');
|
|
742
|
-
if (activeNode) {
|
|
743
|
-
activeNode.scrollIntoView({ block: 'nearest' });
|
|
744
|
-
}
|
|
745
|
-
}, 0);
|
|
746
|
-
}
|
|
747
|
-
|
|
748
|
-
function forceTreeRerender() {
|
|
749
|
-
treeRendered = false;
|
|
750
|
-
renderTree();
|
|
751
|
-
}
|
|
752
|
-
|
|
753
|
-
// ============================================================
|
|
754
|
-
// MESSAGE RENDERING
|
|
755
|
-
// ============================================================
|
|
756
|
-
|
|
757
|
-
function formatTokens(count) {
|
|
758
|
-
if (count < 1000) return count.toString();
|
|
759
|
-
if (count < 10000) return (count / 1000).toFixed(1) + 'k';
|
|
760
|
-
if (count < 1000000) return Math.round(count / 1000) + 'k';
|
|
761
|
-
return (count / 1000000).toFixed(1) + 'M';
|
|
762
|
-
}
|
|
763
|
-
|
|
764
|
-
function formatTimestamp(ts) {
|
|
765
|
-
if (!ts) return '';
|
|
766
|
-
const date = new Date(ts);
|
|
767
|
-
return date.toLocaleTimeString(undefined, { hour: '2-digit', minute: '2-digit', second: '2-digit' });
|
|
768
|
-
}
|
|
769
|
-
|
|
770
|
-
function replaceTabs(text) {
|
|
771
|
-
return text.replace(/\t/g, ' ');
|
|
772
|
-
}
|
|
773
|
-
|
|
774
|
-
function getLanguageFromPath(filePath) {
|
|
775
|
-
const ext = filePath.split('.').pop()?.toLowerCase();
|
|
776
|
-
const extToLang = {
|
|
777
|
-
ts: 'typescript', tsx: 'typescript', js: 'javascript', jsx: 'javascript',
|
|
778
|
-
py: 'python', rb: 'ruby', rs: 'rust', go: 'go', java: 'java',
|
|
779
|
-
c: 'c', cpp: 'cpp', h: 'c', hpp: 'cpp', cs: 'csharp',
|
|
780
|
-
php: 'php', sh: 'bash', bash: 'bash', zsh: 'bash',
|
|
781
|
-
sql: 'sql', html: 'html', css: 'css', scss: 'scss',
|
|
782
|
-
json: 'json', yaml: 'yaml', yml: 'yaml', xml: 'xml',
|
|
783
|
-
md: 'markdown', dockerfile: 'dockerfile'
|
|
784
|
-
};
|
|
785
|
-
return extToLang[ext];
|
|
786
|
-
}
|
|
787
|
-
|
|
788
|
-
function findToolResult(toolCallId) {
|
|
789
|
-
for (const entry of entries) {
|
|
790
|
-
if (entry.type === 'message' && entry.message.role === 'toolResult') {
|
|
791
|
-
if (entry.message.toolCallId === toolCallId) {
|
|
792
|
-
return entry.message;
|
|
793
|
-
}
|
|
794
|
-
}
|
|
795
|
-
}
|
|
796
|
-
return null;
|
|
797
|
-
}
|
|
798
|
-
|
|
799
|
-
function formatExpandableOutput(text, maxLines, lang) {
|
|
800
|
-
text = replaceTabs(text);
|
|
801
|
-
const lines = text.split('\n');
|
|
802
|
-
const displayLines = lines.slice(0, maxLines);
|
|
803
|
-
const remaining = lines.length - maxLines;
|
|
804
|
-
|
|
805
|
-
if (lang) {
|
|
806
|
-
let highlighted;
|
|
807
|
-
try {
|
|
808
|
-
highlighted = hljs.highlight(text, { language: lang }).value;
|
|
809
|
-
} catch {
|
|
810
|
-
highlighted = escapeHtml(text);
|
|
811
|
-
}
|
|
812
|
-
|
|
813
|
-
if (remaining > 0) {
|
|
814
|
-
const previewCode = displayLines.join('\n');
|
|
815
|
-
let previewHighlighted;
|
|
816
|
-
try {
|
|
817
|
-
previewHighlighted = hljs.highlight(previewCode, { language: lang }).value;
|
|
818
|
-
} catch {
|
|
819
|
-
previewHighlighted = escapeHtml(previewCode);
|
|
820
|
-
}
|
|
821
|
-
|
|
822
|
-
return `<div class="tool-output expandable" onclick="this.classList.toggle('expanded')">
|
|
823
|
-
<div class="output-preview"><pre><code class="hljs">${previewHighlighted}</code></pre>
|
|
824
|
-
<div class="expand-hint">... (${remaining} more lines)</div></div>
|
|
825
|
-
<div class="output-full"><pre><code class="hljs">${highlighted}</code></pre></div></div>`;
|
|
826
|
-
}
|
|
827
|
-
|
|
828
|
-
return `<div class="tool-output"><pre><code class="hljs">${highlighted}</code></pre></div>`;
|
|
829
|
-
}
|
|
830
|
-
|
|
831
|
-
// Plain text output
|
|
832
|
-
if (remaining > 0) {
|
|
833
|
-
let out = '<div class="tool-output expandable" onclick="this.classList.toggle(\'expanded\')">';
|
|
834
|
-
out += '<div class="output-preview">';
|
|
835
|
-
for (const line of displayLines) {
|
|
836
|
-
out += `<div>${escapeHtml(replaceTabs(line))}</div>`;
|
|
837
|
-
}
|
|
838
|
-
out += `<div class="expand-hint">... (${remaining} more lines)</div></div>`;
|
|
839
|
-
out += '<div class="output-full">';
|
|
840
|
-
for (const line of lines) {
|
|
841
|
-
out += `<div>${escapeHtml(replaceTabs(line))}</div>`;
|
|
842
|
-
}
|
|
843
|
-
out += '</div></div>';
|
|
844
|
-
return out;
|
|
845
|
-
}
|
|
846
|
-
|
|
847
|
-
let out = '<div class="tool-output">';
|
|
848
|
-
for (const line of displayLines) {
|
|
849
|
-
out += `<div>${escapeHtml(replaceTabs(line))}</div>`;
|
|
850
|
-
}
|
|
851
|
-
out += '</div>';
|
|
852
|
-
return out;
|
|
853
|
-
}
|
|
854
|
-
|
|
855
|
-
function renderToolCall(call) {
|
|
856
|
-
const result = findToolResult(call.id);
|
|
857
|
-
const isError = result?.isError || false;
|
|
858
|
-
const statusClass = result ? (isError ? 'error' : 'success') : 'pending';
|
|
859
|
-
|
|
860
|
-
const getResultText = () => {
|
|
861
|
-
if (!result) return '';
|
|
862
|
-
const textBlocks = result.content.filter(c => c.type === 'text');
|
|
863
|
-
return textBlocks.map(c => c.text).join('\n');
|
|
864
|
-
};
|
|
865
|
-
|
|
866
|
-
const getResultImages = () => {
|
|
867
|
-
if (!result) return [];
|
|
868
|
-
return result.content.filter(c => c.type === 'image');
|
|
869
|
-
};
|
|
870
|
-
|
|
871
|
-
const renderResultImages = () => {
|
|
872
|
-
const images = getResultImages();
|
|
873
|
-
if (images.length === 0) return '';
|
|
874
|
-
return '<div class="tool-images">' +
|
|
875
|
-
images.map(img => `<img src="data:${img.mimeType};base64,${img.data}" class="tool-image" />`).join('') +
|
|
876
|
-
'</div>';
|
|
877
|
-
};
|
|
878
|
-
|
|
879
|
-
let html = `<div class="tool-execution ${statusClass}">`;
|
|
880
|
-
const args = call.arguments || {};
|
|
881
|
-
const name = call.name;
|
|
882
|
-
|
|
883
|
-
switch (name) {
|
|
884
|
-
case 'bash': {
|
|
885
|
-
const command = args.command || '';
|
|
886
|
-
html += `<div class="tool-command">$ ${escapeHtml(command)}</div>`;
|
|
887
|
-
if (result) {
|
|
888
|
-
const output = getResultText().trim();
|
|
889
|
-
if (output) html += formatExpandableOutput(output, 5);
|
|
890
|
-
}
|
|
891
|
-
break;
|
|
892
|
-
}
|
|
893
|
-
case 'read': {
|
|
894
|
-
const filePath = args.file_path || args.path || '';
|
|
895
|
-
const offset = args.offset;
|
|
896
|
-
const limit = args.limit;
|
|
897
|
-
const lang = getLanguageFromPath(filePath);
|
|
898
|
-
|
|
899
|
-
let pathHtml = escapeHtml(shortenPath(filePath));
|
|
900
|
-
if (offset !== undefined || limit !== undefined) {
|
|
901
|
-
const startLine = offset ?? 1;
|
|
902
|
-
const endLine = limit !== undefined ? startLine + limit - 1 : '';
|
|
903
|
-
pathHtml += `<span class="line-numbers">:${startLine}${endLine ? '-' + endLine : ''}</span>`;
|
|
904
|
-
}
|
|
905
|
-
|
|
906
|
-
html += `<div class="tool-header"><span class="tool-name">read</span> <span class="tool-path">${pathHtml}</span></div>`;
|
|
907
|
-
if (result) {
|
|
908
|
-
html += renderResultImages();
|
|
909
|
-
const output = getResultText();
|
|
910
|
-
if (output) html += formatExpandableOutput(output, 10, lang);
|
|
911
|
-
}
|
|
912
|
-
break;
|
|
913
|
-
}
|
|
914
|
-
case 'write': {
|
|
915
|
-
const filePath = args.file_path || args.path || '';
|
|
916
|
-
const content = args.content || '';
|
|
917
|
-
const lines = content.split('\n');
|
|
918
|
-
const lang = getLanguageFromPath(filePath);
|
|
919
|
-
|
|
920
|
-
html += `<div class="tool-header"><span class="tool-name">write</span> <span class="tool-path">${escapeHtml(shortenPath(filePath))}</span>`;
|
|
921
|
-
if (lines.length > 10) html += ` <span class="line-count">(${lines.length} lines)</span>`;
|
|
922
|
-
html += '</div>';
|
|
923
|
-
|
|
924
|
-
if (content) html += formatExpandableOutput(content, 10, lang);
|
|
925
|
-
if (result) {
|
|
926
|
-
const output = getResultText().trim();
|
|
927
|
-
if (output) html += `<div class="tool-output"><div>${escapeHtml(output)}</div></div>`;
|
|
928
|
-
}
|
|
929
|
-
break;
|
|
930
|
-
}
|
|
931
|
-
case 'edit': {
|
|
932
|
-
const filePath = args.file_path || args.path || '';
|
|
933
|
-
html += `<div class="tool-header"><span class="tool-name">edit</span> <span class="tool-path">${escapeHtml(shortenPath(filePath))}</span></div>`;
|
|
934
|
-
|
|
935
|
-
if (result?.details?.diff) {
|
|
936
|
-
const diffLines = result.details.diff.split('\n');
|
|
937
|
-
html += '<div class="tool-diff">';
|
|
938
|
-
for (const line of diffLines) {
|
|
939
|
-
const cls = line.match(/^\+/) ? 'diff-added' : line.match(/^-/) ? 'diff-removed' : 'diff-context';
|
|
940
|
-
html += `<div class="${cls}">${escapeHtml(replaceTabs(line))}</div>`;
|
|
941
|
-
}
|
|
942
|
-
html += '</div>';
|
|
943
|
-
} else if (result) {
|
|
944
|
-
const output = getResultText().trim();
|
|
945
|
-
if (output) html += `<div class="tool-output"><pre>${escapeHtml(output)}</pre></div>`;
|
|
946
|
-
}
|
|
947
|
-
break;
|
|
948
|
-
}
|
|
949
|
-
default: {
|
|
950
|
-
// Check for pre-rendered custom tool HTML
|
|
951
|
-
const rendered = renderedTools?.[call.id];
|
|
952
|
-
if (rendered?.callHtml || rendered?.resultHtml) {
|
|
953
|
-
// Custom tool with pre-rendered HTML from TUI renderer
|
|
954
|
-
if (rendered.callHtml) {
|
|
955
|
-
html += `<div class="tool-header ansi-rendered">${rendered.callHtml}</div>`;
|
|
956
|
-
} else {
|
|
957
|
-
html += `<div class="tool-header"><span class="tool-name">${escapeHtml(name)}</span></div>`;
|
|
958
|
-
}
|
|
959
|
-
|
|
960
|
-
if (rendered.resultHtml) {
|
|
961
|
-
// Apply same truncation as built-in tools (10 lines)
|
|
962
|
-
const lines = rendered.resultHtml.split('\n');
|
|
963
|
-
if (lines.length > 10) {
|
|
964
|
-
const preview = lines.slice(0, 10).join('\n');
|
|
965
|
-
html += `<div class="tool-output expandable ansi-rendered" onclick="this.classList.toggle('expanded')">
|
|
966
|
-
<div class="output-preview">${preview}<div class="expand-hint">... (${lines.length - 10} more lines)</div></div>
|
|
967
|
-
<div class="output-full">${rendered.resultHtml}</div>
|
|
968
|
-
</div>`;
|
|
969
|
-
} else {
|
|
970
|
-
html += `<div class="tool-output ansi-rendered">${rendered.resultHtml}</div>`;
|
|
971
|
-
}
|
|
972
|
-
} else if (result) {
|
|
973
|
-
// Fallback to JSON for result if no pre-rendered HTML
|
|
974
|
-
const output = getResultText();
|
|
975
|
-
if (output) html += formatExpandableOutput(output, 10);
|
|
976
|
-
}
|
|
977
|
-
} else {
|
|
978
|
-
// Fallback to JSON display (existing behavior)
|
|
979
|
-
html += `<div class="tool-header"><span class="tool-name">${escapeHtml(name)}</span></div>`;
|
|
980
|
-
html += `<div class="tool-output"><pre>${escapeHtml(JSON.stringify(args, null, 2))}</pre></div>`;
|
|
981
|
-
if (result) {
|
|
982
|
-
const output = getResultText();
|
|
983
|
-
if (output) html += formatExpandableOutput(output, 10);
|
|
984
|
-
}
|
|
985
|
-
}
|
|
986
|
-
}
|
|
987
|
-
}
|
|
988
|
-
|
|
989
|
-
html += '</div>';
|
|
990
|
-
return html;
|
|
991
|
-
}
|
|
992
|
-
|
|
993
|
-
/**
|
|
994
|
-
* Download the session data as a JSONL file.
|
|
995
|
-
* Reconstructs the original format: header line + entry lines.
|
|
996
|
-
*/
|
|
997
|
-
window.downloadSessionJson = function() {
|
|
998
|
-
// Build JSONL content: header first, then all entries
|
|
999
|
-
const lines = [];
|
|
1000
|
-
if (header) {
|
|
1001
|
-
lines.push(JSON.stringify({ type: 'header', ...header }));
|
|
1002
|
-
}
|
|
1003
|
-
for (const entry of entries) {
|
|
1004
|
-
lines.push(JSON.stringify(entry));
|
|
1005
|
-
}
|
|
1006
|
-
const jsonlContent = lines.join('\n');
|
|
1007
|
-
|
|
1008
|
-
// Create download
|
|
1009
|
-
const blob = new Blob([jsonlContent], { type: 'application/x-ndjson' });
|
|
1010
|
-
const url = URL.createObjectURL(blob);
|
|
1011
|
-
const a = document.createElement('a');
|
|
1012
|
-
a.href = url;
|
|
1013
|
-
a.download = `${header?.id || 'session'}.jsonl`;
|
|
1014
|
-
document.body.appendChild(a);
|
|
1015
|
-
a.click();
|
|
1016
|
-
document.body.removeChild(a);
|
|
1017
|
-
URL.revokeObjectURL(url);
|
|
1018
|
-
}
|
|
1019
|
-
|
|
1020
|
-
/**
|
|
1021
|
-
* Build a shareable URL for a specific message.
|
|
1022
|
-
* URL format: base?gistId&leafId=<leafId>&targetId=<entryId>
|
|
1023
|
-
*/
|
|
1024
|
-
function buildShareUrl(entryId) {
|
|
1025
|
-
// Check for injected base URL (used when loaded in iframe via srcdoc)
|
|
1026
|
-
const baseUrlMeta = document.querySelector('meta[name="indusagi-share-base-url"]');
|
|
1027
|
-
const baseUrl = baseUrlMeta ? baseUrlMeta.content : window.location.href.split('?')[0];
|
|
1028
|
-
|
|
1029
|
-
const url = new URL(window.location.href);
|
|
1030
|
-
// Find the gist ID (first query param without value, e.g., ?abc123)
|
|
1031
|
-
const gistId = Array.from(url.searchParams.keys()).find(k => !url.searchParams.get(k));
|
|
1032
|
-
|
|
1033
|
-
// Build the share URL
|
|
1034
|
-
const params = new URLSearchParams();
|
|
1035
|
-
params.set('leafId', currentLeafId);
|
|
1036
|
-
params.set('targetId', entryId);
|
|
1037
|
-
|
|
1038
|
-
// If we have an injected base URL (iframe context), use it directly
|
|
1039
|
-
if (baseUrlMeta) {
|
|
1040
|
-
return `${baseUrl}&${params.toString()}`;
|
|
1041
|
-
}
|
|
1042
|
-
|
|
1043
|
-
// Otherwise build from current location (direct file access)
|
|
1044
|
-
url.search = gistId ? `?${gistId}&${params.toString()}` : `?${params.toString()}`;
|
|
1045
|
-
return url.toString();
|
|
1046
|
-
}
|
|
1047
|
-
|
|
1048
|
-
/**
|
|
1049
|
-
* Copy text to clipboard with visual feedback.
|
|
1050
|
-
* Uses navigator.clipboard with fallback to execCommand for HTTP contexts.
|
|
1051
|
-
*/
|
|
1052
|
-
async function copyToClipboard(text, button) {
|
|
1053
|
-
let success = false;
|
|
1054
|
-
try {
|
|
1055
|
-
if (navigator.clipboard && navigator.clipboard.writeText) {
|
|
1056
|
-
await navigator.clipboard.writeText(text);
|
|
1057
|
-
success = true;
|
|
1058
|
-
}
|
|
1059
|
-
} catch (err) {
|
|
1060
|
-
// Clipboard API failed, try fallback
|
|
1061
|
-
}
|
|
1062
|
-
|
|
1063
|
-
// Fallback for HTTP or when Clipboard API is unavailable
|
|
1064
|
-
if (!success) {
|
|
1065
|
-
try {
|
|
1066
|
-
const textarea = document.createElement('textarea');
|
|
1067
|
-
textarea.value = text;
|
|
1068
|
-
textarea.style.position = 'fixed';
|
|
1069
|
-
textarea.style.opacity = '0';
|
|
1070
|
-
document.body.appendChild(textarea);
|
|
1071
|
-
textarea.select();
|
|
1072
|
-
success = document.execCommand('copy');
|
|
1073
|
-
document.body.removeChild(textarea);
|
|
1074
|
-
} catch (err) {
|
|
1075
|
-
console.error('Failed to copy:', err);
|
|
1076
|
-
}
|
|
1077
|
-
}
|
|
1078
|
-
|
|
1079
|
-
if (success && button) {
|
|
1080
|
-
const originalHtml = button.innerHTML;
|
|
1081
|
-
button.innerHTML = '✓';
|
|
1082
|
-
button.classList.add('copied');
|
|
1083
|
-
setTimeout(() => {
|
|
1084
|
-
button.innerHTML = originalHtml;
|
|
1085
|
-
button.classList.remove('copied');
|
|
1086
|
-
}, 1500);
|
|
1087
|
-
}
|
|
1088
|
-
}
|
|
1089
|
-
|
|
1090
|
-
/**
|
|
1091
|
-
* Render the copy-link button HTML for a message.
|
|
1092
|
-
*/
|
|
1093
|
-
function renderCopyLinkButton(entryId) {
|
|
1094
|
-
return `<button class="copy-link-btn" data-entry-id="${entryId}" title="Copy link to this message">
|
|
1095
|
-
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
1096
|
-
<path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/>
|
|
1097
|
-
<path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/>
|
|
1098
|
-
</svg>
|
|
1099
|
-
</button>`;
|
|
1100
|
-
}
|
|
1101
|
-
|
|
1102
|
-
function renderEntry(entry) {
|
|
1103
|
-
const ts = formatTimestamp(entry.timestamp);
|
|
1104
|
-
const tsHtml = ts ? `<div class="message-timestamp">${ts}</div>` : '';
|
|
1105
|
-
const entryId = `entry-${entry.id}`;
|
|
1106
|
-
const copyBtnHtml = renderCopyLinkButton(entry.id);
|
|
1107
|
-
|
|
1108
|
-
if (entry.type === 'message') {
|
|
1109
|
-
const msg = entry.message;
|
|
1110
|
-
|
|
1111
|
-
if (msg.role === 'user') {
|
|
1112
|
-
let html = `<div class="user-message" id="${entryId}">${copyBtnHtml}${tsHtml}`;
|
|
1113
|
-
const content = msg.content;
|
|
1114
|
-
|
|
1115
|
-
if (Array.isArray(content)) {
|
|
1116
|
-
const images = content.filter(c => c.type === 'image');
|
|
1117
|
-
if (images.length > 0) {
|
|
1118
|
-
html += '<div class="message-images">';
|
|
1119
|
-
for (const img of images) {
|
|
1120
|
-
html += `<img src="data:${img.mimeType};base64,${img.data}" class="message-image" />`;
|
|
1121
|
-
}
|
|
1122
|
-
html += '</div>';
|
|
1123
|
-
}
|
|
1124
|
-
}
|
|
1125
|
-
|
|
1126
|
-
const text = typeof content === 'string' ? content :
|
|
1127
|
-
content.filter(c => c.type === 'text').map(c => c.text).join('\n');
|
|
1128
|
-
if (text.trim()) {
|
|
1129
|
-
html += `<div class="markdown-content">${safeMarkedParse(text)}</div>`;
|
|
1130
|
-
}
|
|
1131
|
-
html += '</div>';
|
|
1132
|
-
return html;
|
|
1133
|
-
}
|
|
1134
|
-
|
|
1135
|
-
if (msg.role === 'assistant') {
|
|
1136
|
-
let html = `<div class="assistant-message" id="${entryId}">${copyBtnHtml}${tsHtml}`;
|
|
1137
|
-
|
|
1138
|
-
for (const block of msg.content) {
|
|
1139
|
-
if (block.type === 'text' && block.text.trim()) {
|
|
1140
|
-
html += `<div class="assistant-text markdown-content">${safeMarkedParse(block.text)}</div>`;
|
|
1141
|
-
} else if (block.type === 'thinking' && block.thinking.trim()) {
|
|
1142
|
-
html += `<div class="thinking-block">
|
|
1143
|
-
<div class="thinking-text">${escapeHtml(block.thinking)}</div>
|
|
1144
|
-
<div class="thinking-collapsed">Thinking ...</div>
|
|
1145
|
-
</div>`;
|
|
1146
|
-
}
|
|
1147
|
-
}
|
|
1148
|
-
|
|
1149
|
-
for (const block of msg.content) {
|
|
1150
|
-
if (block.type === 'toolCall') {
|
|
1151
|
-
html += renderToolCall(block);
|
|
1152
|
-
}
|
|
1153
|
-
}
|
|
1154
|
-
|
|
1155
|
-
if (msg.stopReason === 'aborted') {
|
|
1156
|
-
html += '<div class="error-text">Aborted</div>';
|
|
1157
|
-
} else if (msg.stopReason === 'error') {
|
|
1158
|
-
html += `<div class="error-text">Error: ${escapeHtml(msg.errorMessage || 'Unknown error')}</div>`;
|
|
1159
|
-
}
|
|
1160
|
-
|
|
1161
|
-
html += '</div>';
|
|
1162
|
-
return html;
|
|
1163
|
-
}
|
|
1164
|
-
|
|
1165
|
-
if (msg.role === 'bashExecution') {
|
|
1166
|
-
const isError = msg.cancelled || (msg.exitCode !== 0 && msg.exitCode !== null);
|
|
1167
|
-
let html = `<div class="tool-execution ${isError ? 'error' : 'success'}" id="${entryId}">${tsHtml}`;
|
|
1168
|
-
html += `<div class="tool-command">$ ${escapeHtml(msg.command)}</div>`;
|
|
1169
|
-
if (msg.output) html += formatExpandableOutput(msg.output, 10);
|
|
1170
|
-
if (msg.cancelled) {
|
|
1171
|
-
html += '<div style="color: var(--warning)">(cancelled)</div>';
|
|
1172
|
-
} else if (msg.exitCode !== 0 && msg.exitCode !== null) {
|
|
1173
|
-
html += `<div style="color: var(--error)">(exit ${msg.exitCode})</div>`;
|
|
1174
|
-
}
|
|
1175
|
-
html += '</div>';
|
|
1176
|
-
return html;
|
|
1177
|
-
}
|
|
1178
|
-
|
|
1179
|
-
if (msg.role === 'toolResult') return '';
|
|
1180
|
-
}
|
|
1181
|
-
|
|
1182
|
-
if (entry.type === 'model_change') {
|
|
1183
|
-
return `<div class="model-change" id="${entryId}">${tsHtml}Switched to model: <span class="model-name">${escapeHtml(entry.provider)}/${escapeHtml(entry.modelId)}</span></div>`;
|
|
1184
|
-
}
|
|
1185
|
-
|
|
1186
|
-
if (entry.type === 'compaction') {
|
|
1187
|
-
return `<div class="compaction" id="${entryId}" onclick="this.classList.toggle('expanded')">
|
|
1188
|
-
<div class="compaction-label">[compaction]</div>
|
|
1189
|
-
<div class="compaction-collapsed">Compacted from ${entry.tokensBefore.toLocaleString()} tokens</div>
|
|
1190
|
-
<div class="compaction-content"><strong>Compacted from ${entry.tokensBefore.toLocaleString()} tokens</strong>\n\n${escapeHtml(entry.summary)}</div>
|
|
1191
|
-
</div>`;
|
|
1192
|
-
}
|
|
1193
|
-
|
|
1194
|
-
if (entry.type === 'branch_summary') {
|
|
1195
|
-
return `<div class="branch-summary" id="${entryId}">${tsHtml}
|
|
1196
|
-
<div class="branch-summary-header">Branch Summary</div>
|
|
1197
|
-
<div class="markdown-content">${safeMarkedParse(entry.summary)}</div>
|
|
1198
|
-
</div>`;
|
|
1199
|
-
}
|
|
1200
|
-
|
|
1201
|
-
if (entry.type === 'custom_message' && entry.display) {
|
|
1202
|
-
return `<div class="hook-message" id="${entryId}">${tsHtml}
|
|
1203
|
-
<div class="hook-type">[${escapeHtml(entry.customType)}]</div>
|
|
1204
|
-
<div class="markdown-content">${safeMarkedParse(typeof entry.content === 'string' ? entry.content : JSON.stringify(entry.content))}</div>
|
|
1205
|
-
</div>`;
|
|
1206
|
-
}
|
|
1207
|
-
|
|
1208
|
-
return '';
|
|
1209
|
-
}
|
|
1210
|
-
|
|
1211
|
-
// ============================================================
|
|
1212
|
-
// HEADER / STATS
|
|
1213
|
-
// ============================================================
|
|
1214
|
-
|
|
1215
|
-
function computeStats(entryList) {
|
|
1216
|
-
let userMessages = 0, assistantMessages = 0, toolResults = 0;
|
|
1217
|
-
let customMessages = 0, compactions = 0, branchSummaries = 0, toolCalls = 0;
|
|
1218
|
-
const tokens = { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 };
|
|
1219
|
-
const cost = { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 };
|
|
1220
|
-
const models = new Set();
|
|
1221
|
-
|
|
1222
|
-
for (const entry of entryList) {
|
|
1223
|
-
if (entry.type === 'message') {
|
|
1224
|
-
const msg = entry.message;
|
|
1225
|
-
if (msg.role === 'user') userMessages++;
|
|
1226
|
-
if (msg.role === 'assistant') {
|
|
1227
|
-
assistantMessages++;
|
|
1228
|
-
if (msg.model) models.add(msg.provider ? `${msg.provider}/${msg.model}` : msg.model);
|
|
1229
|
-
if (msg.usage) {
|
|
1230
|
-
tokens.input += msg.usage.input || 0;
|
|
1231
|
-
tokens.output += msg.usage.output || 0;
|
|
1232
|
-
tokens.cacheRead += msg.usage.cacheRead || 0;
|
|
1233
|
-
tokens.cacheWrite += msg.usage.cacheWrite || 0;
|
|
1234
|
-
if (msg.usage.cost) {
|
|
1235
|
-
cost.input += msg.usage.cost.input || 0;
|
|
1236
|
-
cost.output += msg.usage.cost.output || 0;
|
|
1237
|
-
cost.cacheRead += msg.usage.cost.cacheRead || 0;
|
|
1238
|
-
cost.cacheWrite += msg.usage.cost.cacheWrite || 0;
|
|
1239
|
-
}
|
|
1240
|
-
}
|
|
1241
|
-
toolCalls += msg.content.filter(c => c.type === 'toolCall').length;
|
|
1242
|
-
}
|
|
1243
|
-
if (msg.role === 'toolResult') toolResults++;
|
|
1244
|
-
} else if (entry.type === 'compaction') {
|
|
1245
|
-
compactions++;
|
|
1246
|
-
} else if (entry.type === 'branch_summary') {
|
|
1247
|
-
branchSummaries++;
|
|
1248
|
-
} else if (entry.type === 'custom_message') {
|
|
1249
|
-
customMessages++;
|
|
1250
|
-
}
|
|
1251
|
-
}
|
|
1252
|
-
|
|
1253
|
-
return { userMessages, assistantMessages, toolResults, customMessages, compactions, branchSummaries, toolCalls, tokens, cost, models: Array.from(models) };
|
|
1254
|
-
}
|
|
1255
|
-
|
|
1256
|
-
const globalStats = computeStats(entries);
|
|
1257
|
-
|
|
1258
|
-
function renderHeader() {
|
|
1259
|
-
const totalCost = globalStats.cost.input + globalStats.cost.output + globalStats.cost.cacheRead + globalStats.cost.cacheWrite;
|
|
1260
|
-
|
|
1261
|
-
const tokenParts = [];
|
|
1262
|
-
if (globalStats.tokens.input) tokenParts.push(`↑${formatTokens(globalStats.tokens.input)}`);
|
|
1263
|
-
if (globalStats.tokens.output) tokenParts.push(`↓${formatTokens(globalStats.tokens.output)}`);
|
|
1264
|
-
if (globalStats.tokens.cacheRead) tokenParts.push(`R${formatTokens(globalStats.tokens.cacheRead)}`);
|
|
1265
|
-
if (globalStats.tokens.cacheWrite) tokenParts.push(`W${formatTokens(globalStats.tokens.cacheWrite)}`);
|
|
1266
|
-
|
|
1267
|
-
const msgParts = [];
|
|
1268
|
-
if (globalStats.userMessages) msgParts.push(`${globalStats.userMessages} user`);
|
|
1269
|
-
if (globalStats.assistantMessages) msgParts.push(`${globalStats.assistantMessages} assistant`);
|
|
1270
|
-
if (globalStats.toolResults) msgParts.push(`${globalStats.toolResults} tool results`);
|
|
1271
|
-
if (globalStats.customMessages) msgParts.push(`${globalStats.customMessages} custom`);
|
|
1272
|
-
if (globalStats.compactions) msgParts.push(`${globalStats.compactions} compactions`);
|
|
1273
|
-
if (globalStats.branchSummaries) msgParts.push(`${globalStats.branchSummaries} branch summaries`);
|
|
1274
|
-
|
|
1275
|
-
let html = `
|
|
1276
|
-
<div class="header">
|
|
1277
|
-
<h1>Session: ${escapeHtml(header?.id || 'unknown')}</h1>
|
|
1278
|
-
<div class="help-bar">
|
|
1279
|
-
<span>Ctrl+T toggle thinking · Ctrl+O toggle tools</span>
|
|
1280
|
-
<button class="download-json-btn" onclick="downloadSessionJson()" title="Download session as JSONL">↓ JSONL</button>
|
|
1281
|
-
</div>
|
|
1282
|
-
<div class="header-info">
|
|
1283
|
-
<div class="info-item"><span class="info-label">Date:</span><span class="info-value">${header?.timestamp ? new Date(header.timestamp).toLocaleString() : 'unknown'}</span></div>
|
|
1284
|
-
<div class="info-item"><span class="info-label">Models:</span><span class="info-value">${globalStats.models.join(', ') || 'unknown'}</span></div>
|
|
1285
|
-
<div class="info-item"><span class="info-label">Messages:</span><span class="info-value">${msgParts.join(', ') || '0'}</span></div>
|
|
1286
|
-
<div class="info-item"><span class="info-label">Tool Calls:</span><span class="info-value">${globalStats.toolCalls}</span></div>
|
|
1287
|
-
<div class="info-item"><span class="info-label">Tokens:</span><span class="info-value">${tokenParts.join(' ') || '0'}</span></div>
|
|
1288
|
-
<div class="info-item"><span class="info-label">Cost:</span><span class="info-value">$${totalCost.toFixed(3)}</span></div>
|
|
1289
|
-
</div>
|
|
1290
|
-
</div>`;
|
|
1291
|
-
|
|
1292
|
-
// Render system prompt (user's base prompt, applies to all providers)
|
|
1293
|
-
if (systemPrompt) {
|
|
1294
|
-
const lines = systemPrompt.split('\n');
|
|
1295
|
-
const previewLines = 10;
|
|
1296
|
-
if (lines.length > previewLines) {
|
|
1297
|
-
const preview = lines.slice(0, previewLines).join('\n');
|
|
1298
|
-
const remaining = lines.length - previewLines;
|
|
1299
|
-
html += `<div class="system-prompt expandable" onclick="this.classList.toggle('expanded')">
|
|
1300
|
-
<div class="system-prompt-header">System Prompt</div>
|
|
1301
|
-
<div class="system-prompt-preview">${escapeHtml(preview)}</div>
|
|
1302
|
-
<div class="system-prompt-expand-hint">... (${remaining} more lines, click to expand)</div>
|
|
1303
|
-
<div class="system-prompt-full">${escapeHtml(systemPrompt)}</div>
|
|
1304
|
-
</div>`;
|
|
1305
|
-
} else {
|
|
1306
|
-
html += `<div class="system-prompt">
|
|
1307
|
-
<div class="system-prompt-header">System Prompt</div>
|
|
1308
|
-
<div class="system-prompt-full" style="display: block">${escapeHtml(systemPrompt)}</div>
|
|
1309
|
-
</div>`;
|
|
1310
|
-
}
|
|
1311
|
-
}
|
|
1312
|
-
|
|
1313
|
-
if (tools && tools.length > 0) {
|
|
1314
|
-
html += `<div class="tools-list">
|
|
1315
|
-
<div class="tools-header">Available Tools</div>
|
|
1316
|
-
<div class="tools-content">
|
|
1317
|
-
${tools.map(t => `<div class="tool-item"><span class="tool-item-name">${escapeHtml(t.name)}</span> - <span class="tool-item-desc">${escapeHtml(t.description)}</span></div>`).join('')}
|
|
1318
|
-
</div>
|
|
1319
|
-
</div>`;
|
|
1320
|
-
}
|
|
1321
|
-
|
|
1322
|
-
return html;
|
|
1323
|
-
}
|
|
1324
|
-
|
|
1325
|
-
// ============================================================
|
|
1326
|
-
// NAVIGATION
|
|
1327
|
-
// ============================================================
|
|
1328
|
-
|
|
1329
|
-
// Cache for rendered entry DOM nodes
|
|
1330
|
-
const entryCache = new Map();
|
|
1331
|
-
|
|
1332
|
-
function renderEntryToNode(entry) {
|
|
1333
|
-
// Check cache first
|
|
1334
|
-
if (entryCache.has(entry.id)) {
|
|
1335
|
-
return entryCache.get(entry.id).cloneNode(true);
|
|
1336
|
-
}
|
|
1337
|
-
|
|
1338
|
-
// Render to HTML string, then parse to node
|
|
1339
|
-
const html = renderEntry(entry);
|
|
1340
|
-
if (!html) return null;
|
|
1341
|
-
|
|
1342
|
-
const template = document.createElement('template');
|
|
1343
|
-
template.innerHTML = html;
|
|
1344
|
-
const node = template.content.firstElementChild;
|
|
1345
|
-
|
|
1346
|
-
// Cache the node
|
|
1347
|
-
if (node) {
|
|
1348
|
-
entryCache.set(entry.id, node.cloneNode(true));
|
|
1349
|
-
}
|
|
1350
|
-
return node;
|
|
1351
|
-
}
|
|
1352
|
-
|
|
1353
|
-
function navigateTo(targetId, scrollMode = 'target', scrollToEntryId = null) {
|
|
1354
|
-
currentLeafId = targetId;
|
|
1355
|
-
currentTargetId = scrollToEntryId || targetId;
|
|
1356
|
-
const path = getPath(targetId);
|
|
1357
|
-
|
|
1358
|
-
renderTree();
|
|
1359
|
-
|
|
1360
|
-
document.getElementById('header-container').innerHTML = renderHeader();
|
|
1361
|
-
|
|
1362
|
-
// Build messages using cached DOM nodes
|
|
1363
|
-
const messagesEl = document.getElementById('messages');
|
|
1364
|
-
const fragment = document.createDocumentFragment();
|
|
1365
|
-
|
|
1366
|
-
for (const entry of path) {
|
|
1367
|
-
const node = renderEntryToNode(entry);
|
|
1368
|
-
if (node) {
|
|
1369
|
-
fragment.appendChild(node);
|
|
1370
|
-
}
|
|
1371
|
-
}
|
|
1372
|
-
|
|
1373
|
-
messagesEl.innerHTML = '';
|
|
1374
|
-
messagesEl.appendChild(fragment);
|
|
1375
|
-
|
|
1376
|
-
// Attach click handlers for copy-link buttons
|
|
1377
|
-
messagesEl.querySelectorAll('.copy-link-btn').forEach(btn => {
|
|
1378
|
-
btn.addEventListener('click', (e) => {
|
|
1379
|
-
e.stopPropagation();
|
|
1380
|
-
const entryId = btn.dataset.entryId;
|
|
1381
|
-
const shareUrl = buildShareUrl(entryId);
|
|
1382
|
-
copyToClipboard(shareUrl, btn);
|
|
1383
|
-
});
|
|
1384
|
-
});
|
|
1385
|
-
|
|
1386
|
-
// Use setTimeout(0) to ensure DOM is fully laid out before scrolling
|
|
1387
|
-
setTimeout(() => {
|
|
1388
|
-
const content = document.getElementById('content');
|
|
1389
|
-
if (scrollMode === 'bottom') {
|
|
1390
|
-
content.scrollTop = content.scrollHeight;
|
|
1391
|
-
} else if (scrollMode === 'target') {
|
|
1392
|
-
// If scrollToEntryId is provided, scroll to that specific entry
|
|
1393
|
-
const scrollTargetId = scrollToEntryId || targetId;
|
|
1394
|
-
const targetEl = document.getElementById(`entry-${scrollTargetId}`);
|
|
1395
|
-
if (targetEl) {
|
|
1396
|
-
targetEl.scrollIntoView({ block: 'center' });
|
|
1397
|
-
// Briefly highlight the target message
|
|
1398
|
-
if (scrollToEntryId) {
|
|
1399
|
-
targetEl.classList.add('highlight');
|
|
1400
|
-
setTimeout(() => targetEl.classList.remove('highlight'), 2000);
|
|
1401
|
-
}
|
|
1402
|
-
}
|
|
1403
|
-
}
|
|
1404
|
-
}, 0);
|
|
1405
|
-
}
|
|
1406
|
-
|
|
1407
|
-
// ============================================================
|
|
1408
|
-
// INITIALIZATION
|
|
1409
|
-
// ============================================================
|
|
1410
|
-
|
|
1411
|
-
// Escape HTML tags in text (but not code blocks)
|
|
1412
|
-
function escapeHtmlTags(text) {
|
|
1413
|
-
return text.replace(/<(?=[a-zA-Z\/])/g, '<');
|
|
1414
|
-
}
|
|
1415
|
-
|
|
1416
|
-
// Configure marked with syntax highlighting and HTML escaping for text
|
|
1417
|
-
marked.use({
|
|
1418
|
-
breaks: true,
|
|
1419
|
-
gfm: true,
|
|
1420
|
-
renderer: {
|
|
1421
|
-
// Code blocks: syntax highlight, no HTML escaping
|
|
1422
|
-
code(token) {
|
|
1423
|
-
const code = token.text;
|
|
1424
|
-
const lang = token.lang;
|
|
1425
|
-
let highlighted;
|
|
1426
|
-
if (lang && hljs.getLanguage(lang)) {
|
|
1427
|
-
try {
|
|
1428
|
-
highlighted = hljs.highlight(code, { language: lang }).value;
|
|
1429
|
-
} catch {
|
|
1430
|
-
highlighted = escapeHtml(code);
|
|
1431
|
-
}
|
|
1432
|
-
} else {
|
|
1433
|
-
// Auto-detect language if not specified
|
|
1434
|
-
try {
|
|
1435
|
-
highlighted = hljs.highlightAuto(code).value;
|
|
1436
|
-
} catch {
|
|
1437
|
-
highlighted = escapeHtml(code);
|
|
1438
|
-
}
|
|
1439
|
-
}
|
|
1440
|
-
return `<pre><code class="hljs">${highlighted}</code></pre>`;
|
|
1441
|
-
},
|
|
1442
|
-
// Text content: escape HTML tags
|
|
1443
|
-
text(token) {
|
|
1444
|
-
return escapeHtmlTags(escapeHtml(token.text));
|
|
1445
|
-
},
|
|
1446
|
-
// Inline code: escape HTML
|
|
1447
|
-
codespan(token) {
|
|
1448
|
-
return `<code>${escapeHtml(token.text)}</code>`;
|
|
1449
|
-
}
|
|
1450
|
-
}
|
|
1451
|
-
});
|
|
1452
|
-
|
|
1453
|
-
// Simple marked parse (escaping handled in renderers)
|
|
1454
|
-
function safeMarkedParse(text) {
|
|
1455
|
-
return marked.parse(text);
|
|
1456
|
-
}
|
|
1457
|
-
|
|
1458
|
-
// Search input
|
|
1459
|
-
const searchInput = document.getElementById('tree-search');
|
|
1460
|
-
searchInput.addEventListener('input', (e) => {
|
|
1461
|
-
searchQuery = e.target.value;
|
|
1462
|
-
forceTreeRerender();
|
|
1463
|
-
});
|
|
1464
|
-
|
|
1465
|
-
// Filter buttons
|
|
1466
|
-
document.querySelectorAll('.filter-btn').forEach(btn => {
|
|
1467
|
-
btn.addEventListener('click', () => {
|
|
1468
|
-
document.querySelectorAll('.filter-btn').forEach(b => b.classList.remove('active'));
|
|
1469
|
-
btn.classList.add('active');
|
|
1470
|
-
filterMode = btn.dataset.filter;
|
|
1471
|
-
forceTreeRerender();
|
|
1472
|
-
});
|
|
1473
|
-
});
|
|
1474
|
-
|
|
1475
|
-
// Sidebar toggle
|
|
1476
|
-
const sidebar = document.getElementById('sidebar');
|
|
1477
|
-
const overlay = document.getElementById('sidebar-overlay');
|
|
1478
|
-
const hamburger = document.getElementById('hamburger');
|
|
1479
|
-
|
|
1480
|
-
hamburger.addEventListener('click', () => {
|
|
1481
|
-
sidebar.classList.add('open');
|
|
1482
|
-
overlay.classList.add('open');
|
|
1483
|
-
hamburger.style.display = 'none';
|
|
1484
|
-
});
|
|
1485
|
-
|
|
1486
|
-
const closeSidebar = () => {
|
|
1487
|
-
sidebar.classList.remove('open');
|
|
1488
|
-
overlay.classList.remove('open');
|
|
1489
|
-
hamburger.style.display = '';
|
|
1490
|
-
};
|
|
1491
|
-
|
|
1492
|
-
overlay.addEventListener('click', closeSidebar);
|
|
1493
|
-
document.getElementById('sidebar-close').addEventListener('click', closeSidebar);
|
|
1494
|
-
|
|
1495
|
-
// Toggle states
|
|
1496
|
-
let thinkingExpanded = true;
|
|
1497
|
-
let toolOutputsExpanded = false;
|
|
1498
|
-
|
|
1499
|
-
const toggleThinking = () => {
|
|
1500
|
-
thinkingExpanded = !thinkingExpanded;
|
|
1501
|
-
document.querySelectorAll('.thinking-text').forEach(el => {
|
|
1502
|
-
el.style.display = thinkingExpanded ? '' : 'none';
|
|
1503
|
-
});
|
|
1504
|
-
document.querySelectorAll('.thinking-collapsed').forEach(el => {
|
|
1505
|
-
el.style.display = thinkingExpanded ? 'none' : 'block';
|
|
1506
|
-
});
|
|
1507
|
-
};
|
|
1508
|
-
|
|
1509
|
-
const toggleToolOutputs = () => {
|
|
1510
|
-
toolOutputsExpanded = !toolOutputsExpanded;
|
|
1511
|
-
document.querySelectorAll('.tool-output.expandable').forEach(el => {
|
|
1512
|
-
el.classList.toggle('expanded', toolOutputsExpanded);
|
|
1513
|
-
});
|
|
1514
|
-
document.querySelectorAll('.compaction').forEach(el => {
|
|
1515
|
-
el.classList.toggle('expanded', toolOutputsExpanded);
|
|
1516
|
-
});
|
|
1517
|
-
};
|
|
1518
|
-
|
|
1519
|
-
// Keyboard shortcuts
|
|
1520
|
-
document.addEventListener('keydown', (e) => {
|
|
1521
|
-
if (e.key === 'Escape') {
|
|
1522
|
-
searchInput.value = '';
|
|
1523
|
-
searchQuery = '';
|
|
1524
|
-
navigateTo(leafId, 'bottom');
|
|
1525
|
-
}
|
|
1526
|
-
if (e.ctrlKey && e.key === 't') {
|
|
1527
|
-
e.preventDefault();
|
|
1528
|
-
toggleThinking();
|
|
1529
|
-
}
|
|
1530
|
-
if (e.ctrlKey && e.key === 'o') {
|
|
1531
|
-
e.preventDefault();
|
|
1532
|
-
toggleToolOutputs();
|
|
1533
|
-
}
|
|
1534
|
-
});
|
|
1535
|
-
|
|
1536
|
-
// Initial render
|
|
1537
|
-
// If URL has targetId, scroll to that specific message; otherwise stay at top
|
|
1538
|
-
if (leafId) {
|
|
1539
|
-
if (urlTargetId && byId.has(urlTargetId)) {
|
|
1540
|
-
// Deep link: navigate to leaf and scroll to target message
|
|
1541
|
-
navigateTo(leafId, 'target', urlTargetId);
|
|
1542
|
-
} else {
|
|
1543
|
-
navigateTo(leafId, 'none');
|
|
1544
|
-
}
|
|
1545
|
-
} else if (entries.length > 0) {
|
|
1546
|
-
// Fallback: use last entry if no leafId
|
|
1547
|
-
navigateTo(entries[entries.length - 1].id, 'none');
|
|
1548
|
-
}
|
|
1549
|
-
})();
|