aicodeman 1.47.0 → 1.49.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -3
- package/dist/cli-notify.d.ts +34 -0
- package/dist/cli-notify.d.ts.map +1 -0
- package/dist/cli-notify.js +100 -0
- package/dist/cli-notify.js.map +1 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +16 -0
- package/dist/cli.js.map +1 -1
- package/dist/config/cli-registry/patterns.d.ts +1 -1
- package/dist/config/cli-registry/patterns.d.ts.map +1 -1
- package/dist/config/cli-registry/patterns.js +4 -0
- package/dist/config/cli-registry/patterns.js.map +1 -1
- package/dist/config/cli-registry/schema.d.ts +7 -0
- package/dist/config/cli-registry/schema.d.ts.map +1 -1
- package/dist/config/cli-registry/schema.js +67 -3
- package/dist/config/cli-registry/schema.js.map +1 -1
- package/dist/config/cli-registry/stock.d.ts.map +1 -1
- package/dist/config/cli-registry/stock.js +114 -31
- package/dist/config/cli-registry/stock.js.map +1 -1
- package/dist/config/cli-registry/types.d.ts +51 -21
- package/dist/config/cli-registry/types.d.ts.map +1 -1
- package/dist/config/foreign-tmux.d.ts +48 -0
- package/dist/config/foreign-tmux.d.ts.map +1 -0
- package/dist/config/foreign-tmux.js +48 -0
- package/dist/config/foreign-tmux.js.map +1 -0
- package/dist/config/path-probe.d.ts +6 -0
- package/dist/config/path-probe.d.ts.map +1 -1
- package/dist/config/path-probe.js +6 -0
- package/dist/config/path-probe.js.map +1 -1
- package/dist/config-backup.d.ts +1 -1
- package/dist/config-backup.d.ts.map +1 -1
- package/dist/config-backup.js +2 -0
- package/dist/config-backup.js.map +1 -1
- package/dist/custom-model-hosts.d.ts +32 -8
- package/dist/custom-model-hosts.d.ts.map +1 -1
- package/dist/custom-model-hosts.js +10 -0
- package/dist/custom-model-hosts.js.map +1 -1
- package/dist/custom-model-injection-apply.d.ts +21 -5
- package/dist/custom-model-injection-apply.d.ts.map +1 -1
- package/dist/custom-model-injection-apply.js +121 -27
- package/dist/custom-model-injection-apply.js.map +1 -1
- package/dist/custom-model-injection.d.ts +6 -0
- package/dist/custom-model-injection.d.ts.map +1 -1
- package/dist/custom-model-injection.js +92 -10
- package/dist/custom-model-injection.js.map +1 -1
- package/dist/discord-bridge.d.ts +338 -0
- package/dist/discord-bridge.d.ts.map +1 -0
- package/dist/discord-bridge.js +1256 -0
- package/dist/discord-bridge.js.map +1 -0
- package/dist/docker-hosts.d.ts +8 -1
- package/dist/docker-hosts.d.ts.map +1 -1
- package/dist/docker-hosts.js +5 -5
- package/dist/docker-hosts.js.map +1 -1
- package/dist/edit-history-local-source.d.ts +83 -0
- package/dist/edit-history-local-source.d.ts.map +1 -0
- package/dist/edit-history-local-source.js +198 -0
- package/dist/edit-history-local-source.js.map +1 -0
- package/dist/edit-history-parse.d.ts +114 -0
- package/dist/edit-history-parse.d.ts.map +1 -0
- package/dist/edit-history-parse.js +312 -0
- package/dist/edit-history-parse.js.map +1 -0
- package/dist/edit-history-store.d.ts +209 -0
- package/dist/edit-history-store.d.ts.map +1 -0
- package/dist/edit-history-store.js +599 -0
- package/dist/edit-history-store.js.map +1 -0
- package/dist/foreign-tmux-discovery.d.ts +140 -0
- package/dist/foreign-tmux-discovery.d.ts.map +1 -0
- package/dist/foreign-tmux-discovery.js +366 -0
- package/dist/foreign-tmux-discovery.js.map +1 -0
- package/dist/foreign-tmux.d.ts +381 -0
- package/dist/foreign-tmux.d.ts.map +1 -0
- package/dist/foreign-tmux.js +775 -0
- package/dist/foreign-tmux.js.map +1 -0
- package/dist/git-clone.d.ts +6 -1
- package/dist/git-clone.d.ts.map +1 -1
- package/dist/git-clone.js +79 -14
- package/dist/git-clone.js.map +1 -1
- package/dist/git-fetch-scheduler.d.ts +2 -0
- package/dist/git-fetch-scheduler.d.ts.map +1 -1
- package/dist/git-fetch-scheduler.js +1 -1
- package/dist/git-fetch-scheduler.js.map +1 -1
- package/dist/git-fetch.d.ts +1 -1
- package/dist/git-fetch.d.ts.map +1 -1
- package/dist/git-workspace-status.d.ts +2 -2
- package/dist/git-workspace-status.d.ts.map +1 -1
- package/dist/hooks-config.d.ts +2 -1
- package/dist/hooks-config.d.ts.map +1 -1
- package/dist/hooks-config.js +2 -1
- package/dist/hooks-config.js.map +1 -1
- package/dist/image-watcher.js +4 -4
- package/dist/image-watcher.js.map +1 -1
- package/dist/live-worktree.d.ts +53 -0
- package/dist/live-worktree.d.ts.map +1 -0
- package/dist/live-worktree.js +97 -0
- package/dist/live-worktree.js.map +1 -0
- package/dist/mux-interface.d.ts +22 -2
- package/dist/mux-interface.d.ts.map +1 -1
- package/dist/reboot-restore.d.ts +1 -1
- package/dist/reboot-restore.d.ts.map +1 -1
- package/dist/reboot-restore.js +9 -0
- package/dist/reboot-restore.js.map +1 -1
- package/dist/remote-files.d.ts +150 -5
- package/dist/remote-files.d.ts.map +1 -1
- package/dist/remote-files.js +505 -7
- package/dist/remote-files.js.map +1 -1
- package/dist/remote-hosts.d.ts +15 -9
- package/dist/remote-hosts.d.ts.map +1 -1
- package/dist/remote-hosts.js +42 -20
- package/dist/remote-hosts.js.map +1 -1
- package/dist/session-cli-registry-bridge.d.ts.map +1 -1
- package/dist/session-cli-registry-bridge.js +23 -8
- package/dist/session-cli-registry-bridge.js.map +1 -1
- package/dist/session-env-clamp.d.ts +1 -1
- package/dist/session-env-clamp.d.ts.map +1 -1
- package/dist/session-env-clamp.js +4 -3
- package/dist/session-env-clamp.js.map +1 -1
- package/dist/session.d.ts +161 -24
- package/dist/session.d.ts.map +1 -1
- package/dist/session.js +337 -37
- package/dist/session.js.map +1 -1
- package/dist/tmux-manager.d.ts +114 -12
- package/dist/tmux-manager.d.ts.map +1 -1
- package/dist/tmux-manager.js +318 -41
- package/dist/tmux-manager.js.map +1 -1
- package/dist/types/discord.d.ts +55 -0
- package/dist/types/discord.d.ts.map +1 -0
- package/dist/types/discord.js +18 -0
- package/dist/types/discord.js.map +1 -0
- package/dist/types/foreign-tmux.d.ts +101 -0
- package/dist/types/foreign-tmux.d.ts.map +1 -0
- package/dist/types/foreign-tmux.js +27 -0
- package/dist/types/foreign-tmux.js.map +1 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +3 -0
- package/dist/types/index.js.map +1 -1
- package/dist/types/session.d.ts +119 -2
- package/dist/types/session.d.ts.map +1 -1
- package/dist/types/session.js.map +1 -1
- package/dist/types/update.d.ts +4 -1
- package/dist/types/update.d.ts.map +1 -1
- package/dist/web/case-path.d.ts +2 -0
- package/dist/web/case-path.d.ts.map +1 -1
- package/dist/web/case-path.js +3 -3
- package/dist/web/case-path.js.map +1 -1
- package/dist/web/edit-history-sync.d.ts +178 -0
- package/dist/web/edit-history-sync.d.ts.map +1 -0
- package/dist/web/edit-history-sync.js +461 -0
- package/dist/web/edit-history-sync.js.map +1 -0
- package/dist/web/launch-defaults.d.ts +1 -1
- package/dist/web/launch-defaults.js +2 -2
- package/dist/web/launch-defaults.js.map +1 -1
- package/dist/web/linked-cases-writer.d.ts +43 -0
- package/dist/web/linked-cases-writer.d.ts.map +1 -0
- package/dist/web/linked-cases-writer.js +107 -0
- package/dist/web/linked-cases-writer.js.map +1 -0
- package/dist/web/paste-image-gc.d.ts +10 -1
- package/dist/web/paste-image-gc.d.ts.map +1 -1
- package/dist/web/paste-image-gc.js +10 -2
- package/dist/web/paste-image-gc.js.map +1 -1
- package/dist/web/ports/session-port.d.ts +13 -0
- package/dist/web/ports/session-port.d.ts.map +1 -1
- package/dist/web/public/admin-ui.js.gz +0 -0
- package/dist/web/public/api-client.c9b1cddc.js.gz +0 -0
- package/dist/web/public/{app.fe8a6b4c.js → app.9ea37070.js} +6 -6
- package/dist/web/public/app.9ea37070.js.br +0 -0
- package/dist/web/public/app.9ea37070.js.gz +0 -0
- package/dist/web/public/approvals-ui.js.gz +0 -0
- package/dist/web/public/{constants.affcdde6.js → constants.782170e1.js} +114 -25
- package/dist/web/public/constants.782170e1.js.br +0 -0
- package/dist/web/public/constants.782170e1.js.gz +0 -0
- package/dist/web/public/cron-ui.js.gz +0 -0
- package/dist/web/public/edit-history-ui.js +643 -0
- package/dist/web/public/edit-history-ui.js.br +0 -0
- package/dist/web/public/edit-history-ui.js.gz +0 -0
- package/dist/web/public/entrance-animations.js.gz +0 -0
- package/dist/web/public/foreign-sessions.js +476 -0
- package/dist/web/public/foreign-sessions.js.br +0 -0
- package/dist/web/public/foreign-sessions.js.gz +0 -0
- package/dist/web/public/git-status-ui.js +5 -3
- package/dist/web/public/git-status-ui.js.br +0 -0
- package/dist/web/public/git-status-ui.js.gz +0 -0
- package/dist/web/public/header-divider.eb2d2463.js.gz +0 -0
- package/dist/web/public/home-sessions.js.gz +0 -0
- package/dist/web/public/host-wake-ui.js.gz +0 -0
- package/dist/web/public/i18n.a5e82c95.js +2 -0
- package/dist/web/public/i18n.a5e82c95.js.br +0 -0
- package/dist/web/public/i18n.a5e82c95.js.gz +0 -0
- package/dist/web/public/image-input.a5d0f8f3.js.gz +0 -0
- package/dist/web/public/index.html +183 -18
- package/dist/web/public/index.html.br +0 -0
- package/dist/web/public/index.html.gz +0 -0
- package/dist/web/public/input-cjk.8bc46081.js.gz +0 -0
- package/dist/web/public/{keyboard-accessory.ff64fafc.js → keyboard-accessory.b941676c.js} +75 -2
- package/dist/web/public/keyboard-accessory.b941676c.js.br +0 -0
- package/dist/web/public/keyboard-accessory.b941676c.js.gz +0 -0
- package/dist/web/public/mobile-handlers.f7c3f692.js.gz +0 -0
- package/dist/web/public/mobile-ime-preview.2dbaf262.js.gz +0 -0
- package/dist/web/public/mobile-overview.js +10 -0
- package/dist/web/public/mobile-overview.js.br +0 -0
- package/dist/web/public/mobile-overview.js.gz +0 -0
- package/dist/web/public/mobile.67c8eb5b.css +1 -0
- package/dist/web/public/mobile.67c8eb5b.css.br +0 -0
- package/dist/web/public/mobile.67c8eb5b.css.gz +0 -0
- package/dist/web/public/notification-manager.feb82c04.js.gz +0 -0
- package/dist/web/public/orchestrator-panel.js.gz +0 -0
- package/dist/web/public/{panels-ui.4a56ee63.js → panels-ui.8bcd4473.js} +5 -5
- package/dist/web/public/panels-ui.8bcd4473.js.br +0 -0
- package/dist/web/public/panels-ui.8bcd4473.js.gz +0 -0
- package/dist/web/public/ralph-panel.b350e2ef.js.gz +0 -0
- package/dist/web/public/ralph-wizard.b6c0dd19.js.gz +0 -0
- package/dist/web/public/readmymind-ui.js.gz +0 -0
- package/dist/web/public/reboot-restore-ui.js.gz +0 -0
- package/dist/web/public/{respawn-ui.d7adcf6a.js → respawn-ui.304ba0d4.js} +1 -1
- package/dist/web/public/respawn-ui.304ba0d4.js.br +0 -0
- package/dist/web/public/respawn-ui.304ba0d4.js.gz +0 -0
- package/dist/web/public/sanitize-html.e7147e76.js.gz +0 -0
- package/dist/web/public/security-notices.json +1 -21
- package/dist/web/public/session-lineage.js.gz +0 -0
- package/dist/web/public/{session-ui.426fb671.js → session-ui.a7c8c095.js} +30 -30
- package/dist/web/public/session-ui.a7c8c095.js.br +0 -0
- package/dist/web/public/session-ui.a7c8c095.js.gz +0 -0
- package/dist/web/public/settings-ui.18f92052.js +106 -0
- package/dist/web/public/settings-ui.18f92052.js.br +0 -0
- package/dist/web/public/settings-ui.18f92052.js.gz +0 -0
- package/dist/web/public/spreadsheet-preview-worker.js.gz +0 -0
- package/dist/web/public/spreadsheet-preview.75c751de.js.gz +0 -0
- package/dist/web/public/spreadsheet-xlsx-core.js.gz +0 -0
- package/dist/web/public/styles.6a718331.css +1 -0
- package/dist/web/public/styles.6a718331.css.br +0 -0
- package/dist/web/public/styles.6a718331.css.gz +0 -0
- package/dist/web/public/subagent-windows.07277a58.js.gz +0 -0
- package/dist/web/public/sw.js +2 -2
- package/dist/web/public/sw.js.br +0 -0
- package/dist/web/public/sw.js.gz +0 -0
- package/dist/web/public/tab-layout-browser.2d6189f7.js.gz +0 -0
- package/dist/web/public/tab-rail-resize.b5cdceaf.js.gz +0 -0
- package/dist/web/public/terminal-keycode229-recovery.98843069.js.gz +0 -0
- package/dist/web/public/terminal-split.js.gz +0 -0
- package/dist/web/public/terminal-tile.js +2 -2
- package/dist/web/public/terminal-tile.js.br +0 -0
- package/dist/web/public/terminal-tile.js.gz +0 -0
- package/dist/web/public/terminal-ui.a7883640.js +4 -0
- package/dist/web/public/terminal-ui.a7883640.js.br +0 -0
- package/dist/web/public/terminal-ui.a7883640.js.gz +0 -0
- package/dist/web/public/tile-grid.js.gz +0 -0
- package/dist/web/public/ultracode-panel.js.gz +0 -0
- package/dist/web/public/ultracode-windows.js.gz +0 -0
- package/dist/web/public/vendor/dompurify.min.js.gz +0 -0
- package/dist/web/public/vendor/exceljs.min.js.gz +0 -0
- package/dist/web/public/vendor/fflate.min.js.gz +0 -0
- package/dist/web/public/vendor/marked.min.js.gz +0 -0
- package/dist/web/public/vendor/xterm-addon-fit.min.js.gz +0 -0
- package/dist/web/public/vendor/xterm-addon-serialize.min.js.gz +0 -0
- package/dist/web/public/vendor/xterm-addon-unicode11.min.js.gz +0 -0
- package/dist/web/public/vendor/xterm-addon-webgl.min.js.gz +0 -0
- package/dist/web/public/vendor/xterm-predictive-echo.276b11d9.js.gz +0 -0
- package/dist/web/public/vendor/xterm-zerolag-input.1be42307.js.gz +0 -0
- package/dist/web/public/vendor/xterm.css.gz +0 -0
- package/dist/web/public/vendor/xterm.min.js.gz +0 -0
- package/dist/web/public/voice-input.2342c37b.js.gz +0 -0
- package/dist/web/public/voice-pcm-worklet.js.gz +0 -0
- package/dist/web/public/webview-tabs.js.gz +0 -0
- package/dist/web/public/whats-new.json +9 -8
- package/dist/web/routes/case-routes.d.ts.map +1 -1
- package/dist/web/routes/case-routes.js +165 -50
- package/dist/web/routes/case-routes.js.map +1 -1
- package/dist/web/routes/config-backup-routes.d.ts +5 -1
- package/dist/web/routes/config-backup-routes.d.ts.map +1 -1
- package/dist/web/routes/config-backup-routes.js +4 -1
- package/dist/web/routes/config-backup-routes.js.map +1 -1
- package/dist/web/routes/custom-model-routes.d.ts +7 -2
- package/dist/web/routes/custom-model-routes.d.ts.map +1 -1
- package/dist/web/routes/custom-model-routes.js +51 -6
- package/dist/web/routes/custom-model-routes.js.map +1 -1
- package/dist/web/routes/discord-routes.d.ts +25 -0
- package/dist/web/routes/discord-routes.d.ts.map +1 -0
- package/dist/web/routes/discord-routes.js +206 -0
- package/dist/web/routes/discord-routes.js.map +1 -0
- package/dist/web/routes/edit-history-routes.d.ts +43 -0
- package/dist/web/routes/edit-history-routes.d.ts.map +1 -0
- package/dist/web/routes/edit-history-routes.js +107 -0
- package/dist/web/routes/edit-history-routes.js.map +1 -0
- package/dist/web/routes/file-routes.d.ts.map +1 -1
- package/dist/web/routes/file-routes.js +273 -102
- package/dist/web/routes/file-routes.js.map +1 -1
- package/dist/web/routes/git-status-routes.d.ts.map +1 -1
- package/dist/web/routes/git-status-routes.js +7 -2
- package/dist/web/routes/git-status-routes.js.map +1 -1
- package/dist/web/routes/index.d.ts +2 -0
- package/dist/web/routes/index.d.ts.map +1 -1
- package/dist/web/routes/index.js +2 -0
- package/dist/web/routes/index.js.map +1 -1
- package/dist/web/routes/mux-routes.d.ts +10 -3
- package/dist/web/routes/mux-routes.d.ts.map +1 -1
- package/dist/web/routes/mux-routes.js +59 -1
- package/dist/web/routes/mux-routes.js.map +1 -1
- package/dist/web/routes/ralph-routes.d.ts.map +1 -1
- package/dist/web/routes/ralph-routes.js +22 -0
- package/dist/web/routes/ralph-routes.js.map +1 -1
- package/dist/web/routes/readmymind-routes.d.ts.map +1 -1
- package/dist/web/routes/readmymind-routes.js +3 -2
- package/dist/web/routes/readmymind-routes.js.map +1 -1
- package/dist/web/routes/respawn-routes.d.ts.map +1 -1
- package/dist/web/routes/respawn-routes.js +24 -0
- package/dist/web/routes/respawn-routes.js.map +1 -1
- package/dist/web/routes/session-routes.d.ts +21 -1
- package/dist/web/routes/session-routes.d.ts.map +1 -1
- package/dist/web/routes/session-routes.js +338 -55
- package/dist/web/routes/session-routes.js.map +1 -1
- package/dist/web/routes/system-routes.d.ts.map +1 -1
- package/dist/web/routes/system-routes.js +4 -2
- package/dist/web/routes/system-routes.js.map +1 -1
- package/dist/web/schemas.d.ts +92 -2
- package/dist/web/schemas.d.ts.map +1 -1
- package/dist/web/schemas.js +111 -10
- package/dist/web/schemas.js.map +1 -1
- package/dist/web/self-update.d.ts +9 -0
- package/dist/web/self-update.d.ts.map +1 -1
- package/dist/web/self-update.js +19 -3
- package/dist/web/self-update.js.map +1 -1
- package/dist/web/sensitive-path.d.ts.map +1 -1
- package/dist/web/sensitive-path.js +15 -0
- package/dist/web/sensitive-path.js.map +1 -1
- package/dist/web/server.d.ts +56 -0
- package/dist/web/server.d.ts.map +1 -1
- package/dist/web/server.js +285 -17
- package/dist/web/server.js.map +1 -1
- package/dist/web/session-wait-registry.d.ts +13 -0
- package/dist/web/session-wait-registry.d.ts.map +1 -1
- package/dist/web/session-wait-registry.js +16 -8
- package/dist/web/session-wait-registry.js.map +1 -1
- package/package.json +2 -2
- package/skills/codeman/SKILL.md +20 -4
- package/dist/web/public/app.fe8a6b4c.js.br +0 -0
- package/dist/web/public/app.fe8a6b4c.js.gz +0 -0
- package/dist/web/public/constants.affcdde6.js.br +0 -0
- package/dist/web/public/constants.affcdde6.js.gz +0 -0
- package/dist/web/public/i18n.a618ef4e.js +0 -2
- package/dist/web/public/i18n.a618ef4e.js.br +0 -0
- package/dist/web/public/i18n.a618ef4e.js.gz +0 -0
- package/dist/web/public/keyboard-accessory.ff64fafc.js.br +0 -0
- package/dist/web/public/keyboard-accessory.ff64fafc.js.gz +0 -0
- package/dist/web/public/mobile.1bbd2d67.css +0 -1
- package/dist/web/public/mobile.1bbd2d67.css.br +0 -0
- package/dist/web/public/mobile.1bbd2d67.css.gz +0 -0
- package/dist/web/public/panels-ui.4a56ee63.js.br +0 -0
- package/dist/web/public/panels-ui.4a56ee63.js.gz +0 -0
- package/dist/web/public/respawn-ui.d7adcf6a.js.br +0 -0
- package/dist/web/public/respawn-ui.d7adcf6a.js.gz +0 -0
- package/dist/web/public/session-ui.426fb671.js.br +0 -0
- package/dist/web/public/session-ui.426fb671.js.gz +0 -0
- package/dist/web/public/settings-ui.a191154e.js +0 -106
- package/dist/web/public/settings-ui.a191154e.js.br +0 -0
- package/dist/web/public/settings-ui.a191154e.js.gz +0 -0
- package/dist/web/public/styles.4f0c67a0.css +0 -1
- package/dist/web/public/styles.4f0c67a0.css.br +0 -0
- package/dist/web/public/styles.4f0c67a0.css.gz +0 -0
- package/dist/web/public/terminal-ui.7e787829.js +0 -4
- package/dist/web/public/terminal-ui.7e787829.js.br +0 -0
- package/dist/web/public/terminal-ui.7e787829.js.gz +0 -0
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -281,6 +281,11 @@ function resolveTabRailKeyboardWidth(input = {}) {
|
|
|
281
281
|
// the gap is what tells the user there is more strip to swipe to.
|
|
282
282
|
const TAB_SCROLL_REVEAL_PX = 16;
|
|
283
283
|
|
|
284
|
+
// Narrowest room beside the toolbar the L-shaped header strip trims its first
|
|
285
|
+
// tab into (`_syncTabStripCorner()`, app.js). Less than this keeps the plain
|
|
286
|
+
// wrap: a tab squeezed further shows its number and buttons but no name.
|
|
287
|
+
const TAB_CORNER_MIN_FIRST_TAB = 120;
|
|
288
|
+
|
|
284
289
|
// Phone/tablet tab-strip scroll policy (issue #257). Those breakpoints scroll
|
|
285
290
|
// the strip horizontally (desktop wraps to a second row instead and never
|
|
286
291
|
// scrolls), so the active tab can sit entirely outside the visible slice with
|
|
@@ -2106,7 +2111,7 @@ function computeRewriteScrollLine(input) {
|
|
|
2106
2111
|
* a `/g` regex, so {@link absoluteFilePathPattern} mints a fresh one per call.
|
|
2107
2112
|
*/
|
|
2108
2113
|
const FILE_PATH_LINK_PATTERN =
|
|
2109
|
-
/(\/(?:home|Users|tmp|var|private|opt|mnt|srv|media|data|workspace)\/[^\s"'<>|;&\n\x00-\x1f]*\.(?:log|txt|json|markdown|md|ya?ml|csv|tsv|xml|sh|py|tsx|ts|jsx|js|mjs|cjs|css|html?|toml|ini|sql|diff|patch|png|jpe?g|gif|webp|avif|bmp|ico|svg|pdf|docx|pptx|xlsx|zip|mp4|webm|mov|m4v|ogv|mp3|wav))\b/g;
|
|
2114
|
+
/(\/(?:home|Users|tmp|var|private|opt|mnt|srv|media|data|workspace)\/[^\s"'<>|;&\n\x00-\x1f]*\.(?:log|txt|json|markdown|md|ya?ml|csv|tsv|xml|sh|py|tsx|ts|jsx|js|mjs|cjs|css|html?|toml|ini|conf|sql|diff|patch|png|jpe?g|gif|webp|avif|bmp|ico|svg|pdf|docx|pptx|xlsx|zip|mp4|webm|mov|m4v|ogv|mp3|wav))\b/g;
|
|
2110
2115
|
|
|
2111
2116
|
/** A fresh, zero-state instance of {@link FILE_PATH_LINK_PATTERN}. */
|
|
2112
2117
|
function absoluteFilePathPattern() {
|
|
@@ -2159,14 +2164,14 @@ function previewsInFileViewer(filePath) {
|
|
|
2159
2164
|
* {@link findFilePathLinks}.
|
|
2160
2165
|
*/
|
|
2161
2166
|
const RELATIVE_FILE_PATH_LINK_PATTERN =
|
|
2162
|
-
/(^|[\s"'`(\[{<>=,])((?![^\s"'`<>|;&()[\]{}=,\n\x00-\x1f]*:\/\/)(?:~\/|[^\s"'`<>|;&()[\]{}=,\/~\n\x00-\x1f])[^\s"'`<>|;&()[\]{}=,\n\x00-\x1f]*\.(?:log|txt|json|markdown|md|ya?ml|csv|tsv|xml|sh|py|tsx|ts|jsx|js|mjs|cjs|css|html?|toml|ini|sql|diff|patch|png|jpe?g|gif|webp|avif|bmp|ico|svg|pdf|docx|pptx|xlsx|zip|mp4|webm|mov|m4v|ogv|mp3|wav))\b/g;
|
|
2167
|
+
/(^|[\s"'`(\[{<>=,])((?![^\s"'`<>|;&()[\]{}=,\n\x00-\x1f]*:\/\/)(?:~\/|[^\s"'`<>|;&()[\]{}=,\/~\n\x00-\x1f])[^\s"'`<>|;&()[\]{}=,\n\x00-\x1f]*\.(?:log|txt|json|markdown|md|ya?ml|csv|tsv|xml|sh|py|tsx|ts|jsx|js|mjs|cjs|css|html?|toml|ini|conf|sql|diff|patch|png|jpe?g|gif|webp|avif|bmp|ico|svg|pdf|docx|pptx|xlsx|zip|mp4|webm|mov|m4v|ogv|mp3|wav))\b/g;
|
|
2163
2168
|
|
|
2164
2169
|
/** The `(?:log|txt|…)` extension group, read off the rooted pattern so it cannot drift. */
|
|
2165
2170
|
const FILE_LINK_EXTENSION_GROUP = /\\\.(\(\?:[^()]*\))\)\\b$/.exec(FILE_PATH_LINK_PATTERN.source)[1];
|
|
2166
2171
|
|
|
2167
2172
|
/**
|
|
2168
2173
|
* Every linkable file path in `text`, sorted by position. Spaced candidates
|
|
2169
|
-
* reserve their whole span first, even when unlinkable; rooted, `~/`, relative
|
|
2174
|
+
* reserve their whole span first, including paths bounded by parentheses, even when unlinkable; rooted, `~/`, relative
|
|
2170
2175
|
* and folder detectors then skip reserved spans, earlier matches and URLs.
|
|
2171
2176
|
*
|
|
2172
2177
|
* The one entry point for both consumers (terminal link provider, response
|
|
@@ -2195,19 +2200,26 @@ function findFilePathLinks(text) {
|
|
|
2195
2200
|
// A path with spaces is taken whole, or the span it covers links nothing
|
|
2196
2201
|
// (spacedFilePathOnLine). Either way no detector below may cut a fragment out of it.
|
|
2197
2202
|
const reserved = [];
|
|
2203
|
+
const isReserved = (index, length) =>
|
|
2204
|
+
reserved.some((r) => index < r.index + r.path.length && r.index < index + length);
|
|
2205
|
+
const reserve = (spaced, index) => {
|
|
2206
|
+
if (!spaced) return;
|
|
2207
|
+
const start = index + spaced.index;
|
|
2208
|
+
if (inUrl(start, spaced.path.length) || isReserved(start, spaced.path.length)) return;
|
|
2209
|
+
reserved.push({ index: start, path: spaced.path });
|
|
2210
|
+
if (spaced.link) found.push({ path: spaced.path, index: start });
|
|
2211
|
+
};
|
|
2198
2212
|
let lineStart = 0;
|
|
2199
2213
|
for (const line of value.split('\n')) {
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
if (
|
|
2214
|
+
reserve(spacedFilePathOnLine(line), lineStart);
|
|
2215
|
+
// Parentheses bound an inline path just as a whole line bounds a standalone path.
|
|
2216
|
+
const parenthesised = /\(([^()\r\n]{1,1000})\)/g;
|
|
2217
|
+
while ((match = parenthesised.exec(line)) !== null) {
|
|
2218
|
+
if (opensBashCall(line, match.index)) continue;
|
|
2219
|
+
reserve(spacedFilePathOnLine(match[1], { parenthesised: true }), lineStart + match.index + 1);
|
|
2205
2220
|
}
|
|
2206
2221
|
lineStart += line.length + 1;
|
|
2207
2222
|
}
|
|
2208
|
-
const isReserved = (index, length) =>
|
|
2209
|
-
reserved.some((r) => index < r.index + r.path.length && r.index < index + length);
|
|
2210
|
-
|
|
2211
2223
|
const absolute = absoluteFilePathPattern();
|
|
2212
2224
|
while ((match = absolute.exec(value)) !== null) {
|
|
2213
2225
|
if (!inUrl(match.index, match[1].length) && !isReserved(match.index, match[1].length)) {
|
|
@@ -2235,14 +2247,29 @@ function findFilePathLinks(text) {
|
|
|
2235
2247
|
const SPACED_FILE_PATH_LABEL_PATTERN =
|
|
2236
2248
|
/^(?:path|files?|saved (?:to|as)|wrote|written to|output|created|location|attachment):[ \t]*$/i;
|
|
2237
2249
|
|
|
2250
|
+
/**
|
|
2251
|
+
* True when the `(` at `open` starts a `Bash(` tool row, which holds a command rather than
|
|
2252
|
+
* a path: `Bash(/tmp/a.out input.txt)` is a program and its argument, so the parentheses do
|
|
2253
|
+
* not bound one spaced path and the ordinary detectors keep the row. Only `Bash(`: the path
|
|
2254
|
+
* tools (`Read(`, `Update(`, `Write(`) do hold a path, spaces included.
|
|
2255
|
+
*
|
|
2256
|
+
* @param {string} text
|
|
2257
|
+
* @param {number} open Index of the `(`.
|
|
2258
|
+
* @returns {boolean}
|
|
2259
|
+
*/
|
|
2260
|
+
function opensBashCall(text, open) {
|
|
2261
|
+
return /(?:^|\W)Bash\($/.test(text.slice(Math.max(0, open - 5), open + 1));
|
|
2262
|
+
}
|
|
2263
|
+
|
|
2238
2264
|
/**
|
|
2239
2265
|
* A file path WITH SPACES on one line, or null.
|
|
2240
2266
|
*
|
|
2241
2267
|
* Every path pattern ends a path at whitespace, so `/mnt/c/OneDrive - Contoso/a.docx`
|
|
2242
2268
|
* linked `/mnt/c/OneDrive` plus a relative `Contoso/a.docx`, two links to the
|
|
2243
2269
|
* wrong targets. A space is only safe inside a path where the line itself bounds
|
|
2244
|
-
* the path, so a spaced path is recognised in
|
|
2270
|
+
* the path or a parenthesised group bounds it, so a spaced path is recognised in these shapes:
|
|
2245
2271
|
*
|
|
2272
|
+
* Updated (/mnt/c/My Docs/report.docx) inside parentheses in prose
|
|
2246
2273
|
* /mnt/c/My Docs/report.docx the whole line is the path
|
|
2247
2274
|
* - /mnt/c/My Docs/report.docx after a list marker (`-`, `*`, `•`, `1.`, `2)`)
|
|
2248
2275
|
* Saved to: 03 Attachments/Build SIPOC Design/plan.pptx after a path label (SPACED_FILE_PATH_LABEL_PATTERN)
|
|
@@ -2256,7 +2283,7 @@ const SPACED_FILE_PATH_LABEL_PATTERN =
|
|
|
2256
2283
|
* it ends on a known extension, a rooted one has a directory before its first
|
|
2257
2284
|
* space, no earlier word holds an extension (`a.md,`, `a.ts#L12`) or ends in `/`,
|
|
2258
2285
|
* and none holds a `:` and a digit (`a.ts:42`, a line suffix ends the path). Later words cannot start a new
|
|
2259
|
-
* `/`, `~/`, `./` or `../` path, no earlier word ends in
|
|
2286
|
+
* `/`, `~/`, `./` or `../` path, no earlier word ends in `:` (or `,` inside parentheses), is an arrow or has
|
|
2260
2287
|
* no letter or digit (a prompt glyph such as `❯` or `$`; a bare `-` is kept), and
|
|
2261
2288
|
* a run of spaces (a column gap) is refused, so two paths on a line are never
|
|
2262
2289
|
* merged. A relative candidate whose only `/` word is its last is prose after the
|
|
@@ -2278,9 +2305,10 @@ const SPACED_FILE_PATH_LABEL_PATTERN =
|
|
|
2278
2305
|
* Linear: one bounded prefix match, then string scans.
|
|
2279
2306
|
*
|
|
2280
2307
|
* @param {string} line One line, no newline.
|
|
2308
|
+
* @param {{parenthesised?: boolean}} [options] Refuse comma-separated lists inside parentheses only.
|
|
2281
2309
|
* @returns {{path: string, index: number, link: boolean} | null}
|
|
2282
2310
|
*/
|
|
2283
|
-
function spacedFilePathOnLine(line) {
|
|
2311
|
+
function spacedFilePathOnLine(line, options = {}) {
|
|
2284
2312
|
const text = String(line || '');
|
|
2285
2313
|
const prefix = /^[ \t]*((?:\d{1,3}[.)]|[-*•])[ \t]+)?((?:[A-Za-z][\w-]{0,30}(?: [\w-]{1,30}){0,3}):[ \t]+)?/.exec(text);
|
|
2286
2314
|
const index = prefix[0].length;
|
|
@@ -2304,6 +2332,7 @@ function spacedFilePathOnLine(line) {
|
|
|
2304
2332
|
}
|
|
2305
2333
|
for (const word of words.slice(0, -1)) {
|
|
2306
2334
|
if (word.endsWith('/') || word.endsWith(':') || /^(?:—|–|→|=>|->|<-|=)$/.test(word)) return null;
|
|
2335
|
+
if (options.parenthesised && word.endsWith(',')) return null;
|
|
2307
2336
|
// A shell prompt that prints its working directory in full (`/home/me/proj$ cat
|
|
2308
2337
|
// notes.md`; WSL's `/mnt/c/...` is outside `$HOME`) is a command line too, and so is
|
|
2309
2338
|
// one whose directory has a space in it (`/mnt/c/My Docs$ ls notes.md`): the `$`
|
|
@@ -2397,6 +2426,31 @@ function resolveLinkedFilePath(filePath, workingDir) {
|
|
|
2397
2426
|
return `/${parts.join('/')}`;
|
|
2398
2427
|
}
|
|
2399
2428
|
|
|
2429
|
+
/**
|
|
2430
|
+
* The directory a RELATIVE path printed for a session is relative TO.
|
|
2431
|
+
*
|
|
2432
|
+
* `workingDir` is recorded once at create time and never follows a `cd`, so it
|
|
2433
|
+
* stops describing where a shell (or an agent that changed directory) really
|
|
2434
|
+
* is. `session.paneCwd` is the pane's live `#{pane_current_path}`, published by the
|
|
2435
|
+
* server from its pane read. It only changes which BASE a relative path joins;
|
|
2436
|
+
* the result is then routed like any other path, so a target outside the
|
|
2437
|
+
* workspace still goes through the attachment routes.
|
|
2438
|
+
*
|
|
2439
|
+
* Remote and Docker sessions are excluded (the server never sends them a paneCwd,
|
|
2440
|
+
* and this checks again): their local pane runs the ssh / docker-exec CLIENT,
|
|
2441
|
+
* so its directory says nothing about the agent. An unknown paneCwd falls back to
|
|
2442
|
+
* `workingDir`.
|
|
2443
|
+
*
|
|
2444
|
+
* @param {{workingDir?: string, paneCwd?: string, remote?: unknown, docker?: unknown}} [session]
|
|
2445
|
+
* @returns {string|undefined}
|
|
2446
|
+
*/
|
|
2447
|
+
function relativeResolutionBase(session) {
|
|
2448
|
+
if (!session) return undefined;
|
|
2449
|
+
const paneCwd = session.paneCwd;
|
|
2450
|
+
if (!session.remote && !session.docker && typeof paneCwd === 'string' && paneCwd.startsWith('/')) return paneCwd;
|
|
2451
|
+
return session.workingDir;
|
|
2452
|
+
}
|
|
2453
|
+
|
|
2400
2454
|
/**
|
|
2401
2455
|
* Extensions the file preview renders as a PAGE, from the sandboxed
|
|
2402
2456
|
* `/html-view/<cap>/` route (src/web/routes/html-view-routes.ts, whose
|
|
@@ -2557,9 +2611,10 @@ const pathFirstSegment = (path) => path.replace(/^(?:\.?\/)+/, '').split('/')[0]
|
|
|
2557
2611
|
* top directory the broken token did (the next entry of a listing).
|
|
2558
2612
|
*/
|
|
2559
2613
|
function pathContinuation(prevText, nextText) {
|
|
2560
|
-
const
|
|
2561
|
-
if (!tail.includes('/') || !/[\w\-.~+@%/]$/.test(tail) || PATH_TOKEN_ENDS_WITH_EXTENSION.test(tail)) return null;
|
|
2614
|
+
const previous = String(prevText || '').trimEnd();
|
|
2562
2615
|
const next = String(nextText || '').replace(/^\s+/, '');
|
|
2616
|
+
const tail = /[^\s"'<>|;&]+$/.exec(previous)?.[0] || '';
|
|
2617
|
+
if (!tail.includes('/') || !/[\w\-.~+@%/]$/.test(tail) || PATH_TOKEN_ENDS_WITH_EXTENSION.test(tail)) return null;
|
|
2563
2618
|
const head = /^[^\s"'<>|;&]+/.exec(next)?.[0] || '';
|
|
2564
2619
|
if (!head || PATH_TOKEN_STARTS_NEW_PATH.test(head) || PATH_TOKEN_STARTS_EXPLICIT_RELATIVE.test(head)) return null;
|
|
2565
2620
|
// A listing (`git ls-files`, `find`, `ls -R`) puts one path per row, so `src/components`
|
|
@@ -2586,7 +2641,9 @@ function pathContinuation(prevText, nextText) {
|
|
|
2586
2641
|
* A following logical line is glued on (its indent dropped, cell mapping kept
|
|
2587
2642
|
* exact) when {@link pathContinuation} says it carries the path on and the row it
|
|
2588
2643
|
* broke off is at least as long as the row it continues on. Bounded by the same
|
|
2589
|
-
* `maxRows` as the logical line.
|
|
2644
|
+
* `maxRows` as the logical line. Hard breaks concatenate without inserting spaces.
|
|
2645
|
+
* An ambiguous parenthesised filename also carries `pathAlternatives` for a
|
|
2646
|
+
* guarded lookup on activation; its text and cell mapping remain unchanged.
|
|
2590
2647
|
*
|
|
2591
2648
|
* @returns Same shape as {@link terminalLogicalLine}; null when the row does not exist.
|
|
2592
2649
|
*/
|
|
@@ -2607,6 +2664,7 @@ function terminalPathLine(buffer, row, cols, maxRows) {
|
|
|
2607
2664
|
/** `first` and the lines a path carries on into, stopping at the last confirmed join. */
|
|
2608
2665
|
const extend = (first) => {
|
|
2609
2666
|
const parts = [first];
|
|
2667
|
+
const alternatives = [];
|
|
2610
2668
|
let text = first.text;
|
|
2611
2669
|
let rows = rowsOf(first);
|
|
2612
2670
|
let confirmed = 1;
|
|
@@ -2616,25 +2674,41 @@ function terminalPathLine(buffer, row, cols, maxRows) {
|
|
|
2616
2674
|
const kind = continues(parts[parts.length - 1], next, text);
|
|
2617
2675
|
if (!kind) break;
|
|
2618
2676
|
parts.push(next);
|
|
2677
|
+
if (kind === 'join') {
|
|
2678
|
+
const opening = text.lastIndexOf('(');
|
|
2679
|
+
const closing = next.text.indexOf(')');
|
|
2680
|
+
if (opening >= 0 && closing > 0 && !opensBashCall(text, opening)) {
|
|
2681
|
+
const before = text.slice(opening + 1);
|
|
2682
|
+
const after = next.text.slice(0, closing).trimStart();
|
|
2683
|
+
const spaced = spacedFilePathOnLine(`${before} ${after}`, { parenthesised: true });
|
|
2684
|
+
if (!before.includes(')') && !/[/-]$/.test(before) && !after.includes('/') && spaced?.link) {
|
|
2685
|
+
alternatives.push({ path: before.slice(spaced.index) + after, spacedPath: spaced.path });
|
|
2686
|
+
}
|
|
2687
|
+
}
|
|
2688
|
+
}
|
|
2619
2689
|
text += next.text.replace(/^\s+/, '');
|
|
2620
2690
|
rows += rowsOf(next);
|
|
2621
2691
|
if (kind === 'join') confirmed = parts.length;
|
|
2622
2692
|
}
|
|
2623
|
-
return parts.slice(0, confirmed);
|
|
2693
|
+
return { parts: parts.slice(0, confirmed), alternatives };
|
|
2624
2694
|
};
|
|
2625
2695
|
|
|
2626
|
-
//
|
|
2627
|
-
//
|
|
2696
|
+
// A middle fragment may have no slash, so only a forward pass from its
|
|
2697
|
+
// rooted start can confirm a path spanning three or more rows.
|
|
2698
|
+
let extended = extend(base);
|
|
2628
2699
|
let first = base;
|
|
2629
2700
|
let rows = rowsOf(base);
|
|
2630
2701
|
while (first.startRow > 0) {
|
|
2631
2702
|
const prev = lineAt(first.startRow - 1);
|
|
2632
|
-
if (!prev || rows + rowsOf(prev) > bound
|
|
2703
|
+
if (!prev || rows + rowsOf(prev) > bound) break;
|
|
2633
2704
|
first = prev;
|
|
2634
2705
|
rows += rowsOf(prev);
|
|
2706
|
+
const tail = /[^\s"'<>|;&]+$/.exec(first.text.trimEnd())?.[0] || '';
|
|
2707
|
+
if (!tail.includes('/')) continue;
|
|
2708
|
+
const candidate = extend(first);
|
|
2709
|
+
if (candidate.parts[candidate.parts.length - 1].endRow >= base.startRow) extended = candidate;
|
|
2635
2710
|
}
|
|
2636
|
-
|
|
2637
|
-
if (parts[parts.length - 1].endRow < base.startRow) parts = extend(base);
|
|
2711
|
+
const { parts, alternatives } = extended;
|
|
2638
2712
|
if (parts.length === 1) return parts[0];
|
|
2639
2713
|
|
|
2640
2714
|
const segments = [];
|
|
@@ -2659,7 +2733,14 @@ function terminalPathLine(buffer, row, cols, maxRows) {
|
|
|
2659
2733
|
}
|
|
2660
2734
|
return -1;
|
|
2661
2735
|
};
|
|
2662
|
-
return {
|
|
2736
|
+
return {
|
|
2737
|
+
startRow: parts[0].startRow,
|
|
2738
|
+
endRow: parts[parts.length - 1].endRow,
|
|
2739
|
+
text,
|
|
2740
|
+
offsetToCell,
|
|
2741
|
+
cellToOffset,
|
|
2742
|
+
...(alternatives.length ? { pathAlternatives: alternatives } : {}),
|
|
2743
|
+
};
|
|
2663
2744
|
}
|
|
2664
2745
|
|
|
2665
2746
|
/**
|
|
@@ -2915,7 +2996,14 @@ function terminalLinkLine(buffer, row, cols, maxRows) {
|
|
|
2915
2996
|
for (const s of segments) if (s.row === targetRow && (!seg || s.colStart <= targetCol)) seg = s;
|
|
2916
2997
|
return seg ? seg.textStart + Math.max(0, targetCol - seg.colStart) : -1;
|
|
2917
2998
|
};
|
|
2918
|
-
return {
|
|
2999
|
+
return {
|
|
3000
|
+
startRow,
|
|
3001
|
+
endRow: lastRow,
|
|
3002
|
+
text,
|
|
3003
|
+
offsetToCell,
|
|
3004
|
+
cellToOffset,
|
|
3005
|
+
...(base.pathAlternatives ? { pathAlternatives: base.pathAlternatives } : {}),
|
|
3006
|
+
};
|
|
2919
3007
|
}
|
|
2920
3008
|
|
|
2921
3009
|
/**
|
|
@@ -4025,6 +4113,7 @@ if (typeof window !== 'undefined') {
|
|
|
4025
4113
|
absoluteFilePathPattern,
|
|
4026
4114
|
findFilePathLinks,
|
|
4027
4115
|
resolveLinkedFilePath,
|
|
4116
|
+
relativeResolutionBase,
|
|
4028
4117
|
previewsInFileViewer,
|
|
4029
4118
|
FILE_PREVIEW_EXTENSIONS,
|
|
4030
4119
|
rendersAsPage,
|
|
Binary file
|
|
Binary file
|
|
Binary file
|