arco-workbench 0.1.6 → 0.1.8
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/CONTRIBUTING.md +52 -12
- package/README.md +20 -13
- package/client/dist/assets/{PhosphorBackdrop-BR-TgB5x.js → PhosphorBackdrop-D7jdAV_G.js} +1 -1
- package/client/dist/assets/{ThemedBackgroundShaderImpl-DgcFj6JN.js → ThemedBackgroundShaderImpl-DrDm60h8.js} +1 -1
- package/client/dist/assets/{XtermView-CflVBQgC.js → XtermView-BGFujb1e.js} +1 -1
- package/client/dist/assets/{galleryEditor-BB-emfmi.js → galleryEditor-D951A2sE.js} +1 -1
- package/client/dist/assets/{index-B_EqHDz3.js → index-CsVy3eZm.js} +248 -248
- package/client/dist/index.html +1 -1
- package/client/src/buildCheck.ts +3 -1
- package/client/src/components/AppUpdateNotice.tsx +2 -1
- package/client/src/components/ClusterRightPanel/AutoPickupControl.tsx +24 -12
- package/client/src/components/ClusterRightPanel/ReplaceMemberDialog.tsx +65 -15
- package/client/src/components/ClusterRightPanel/SkillsControl.tsx +107 -0
- package/client/src/components/ClusterRightPanel/index.tsx +6 -1
- package/client/src/components/ClusterTaskBoardTab.tsx +9 -22
- package/client/src/components/HeaderVersionBox.tsx +7 -4
- package/client/src/components/NeedsYouBadge.tsx +3 -3
- package/client/src/components/ProviderReleasesModal.tsx +8 -4
- package/client/src/components/ProvidersPopover.tsx +28 -23
- package/client/src/components/SettingsPanel.tsx +2 -2
- package/client/src/components/SkillsSettings.tsx +5 -0
- package/client/src/components/TabBar.tsx +91 -9
- package/client/src/components/TerminalInput.tsx +12 -10
- package/client/src/components/TranscriptSendDialog.tsx +12 -8
- package/client/src/components/TranscriptWorkerDialog.tsx +119 -0
- package/client/src/components/UpdateAction.tsx +18 -4
- package/client/src/components/UpdateResultNotice.tsx +3 -1
- package/client/src/components/clusterNeedsYou.ts +11 -18
- package/client/src/help/content/cluster.tsx +54 -22
- package/client/src/help/content/composer.tsx +22 -0
- package/client/src/help/content/header.tsx +19 -1
- package/client/src/help/content/misc.tsx +8 -0
- package/client/src/help/content/rightPanel.tsx +1 -1
- package/client/src/help/content/settings.tsx +19 -5
- package/client/src/help/content/tabbar.tsx +5 -0
- package/client/src/help/manualSections/actions.tsx +31 -0
- package/client/src/help/manualSections/clusters.tsx +58 -21
- package/client/src/help/manualSections/configuration.tsx +38 -4
- package/client/src/help/manualSections/maintenance.tsx +30 -0
- package/client/src/help/manualSections/plans.tsx +5 -1
- package/client/src/help/manualSections/providers.tsx +32 -8
- package/client/src/help/manualSections/troubleshooting.tsx +2 -1
- package/client/src/help/manualSections/workflows.tsx +19 -0
- package/client/src/help/manualSections/workspace.tsx +6 -0
- package/client/src/stores/appUpdateStore.ts +29 -8
- package/client/src/utils/transcriptWorkerRequest.ts +24 -0
- package/client/src/utils/wsSession.ts +2 -1
- package/client/src/ws/handleServerMessage.ts +8 -2
- package/docs/ARCHITECTURE.md +1 -1
- package/docs/CLIENT.md +9 -8
- package/docs/FEATURES.md +8 -5
- package/docs/GETTING_STARTED.md +9 -4
- package/docs/GOTCHAS.md +2 -1
- package/docs/OPERATIONS.md +37 -4
- package/docs/PERSISTENCE.md +25 -3
- package/docs/PRIMITIVES.md +42 -0
- package/docs/PROTOCOL_CLUSTER.md +51 -5
- package/docs/PROTOCOL_PRIMITIVES.md +39 -0
- package/docs/PROVIDERS.md +50 -13
- package/docs/SETTINGS.md +27 -3
- package/docs/TASK_LEDGER.md +7 -15
- package/node_modules/@arco/shared/dist/clusterCoordination.d.ts +2 -0
- package/node_modules/@arco/shared/dist/clusterCoordination.js +5 -1
- package/node_modules/@arco/shared/dist/protocol/autoPickup.d.ts +3 -0
- package/node_modules/@arco/shared/dist/protocol/clientMessages.d.ts +3 -2
- package/node_modules/@arco/shared/dist/protocol/clusters.d.ts +13 -1
- package/node_modules/@arco/shared/dist/protocol/index.d.ts +1 -0
- package/node_modules/@arco/shared/dist/protocol/index.js +1 -0
- package/node_modules/@arco/shared/dist/protocol/models.d.ts +4 -3
- package/node_modules/@arco/shared/dist/protocol/models.js +26 -2
- package/node_modules/@arco/shared/dist/protocol/serverMessages.d.ts +2 -1
- package/node_modules/@arco/shared/dist/protocol/tasks.d.ts +4 -0
- package/node_modules/@arco/shared/dist/protocol/transcriptWorker.d.ts +47 -0
- package/node_modules/@arco/shared/dist/protocol/transcriptWorker.js +2 -0
- package/node_modules/@arco/shared/dist/runtimeVersions.d.ts +1 -0
- package/node_modules/@arco/shared/dist/runtimeVersions.js +14 -0
- package/node_modules/@arco/shared/package.json +1 -1
- package/package.json +2 -2
- package/scripts/packaging/arco.mjs +1 -1
- package/scripts/packaging/native-repair.mjs +78 -12
- package/scripts/packaging/update.mjs +5 -1
- package/server/dist/atomicFile.js +1 -2
- package/server/dist/capabilities.d.ts +5 -2
- package/server/dist/capabilities.js +59 -9
- package/server/dist/cliUpdateDecision.d.ts +1 -1
- package/server/dist/cliUpdateDecision.js +5 -3
- package/server/dist/clusterAutoTurn.d.ts +4 -0
- package/server/dist/clusterAutoTurn.js +29 -25
- package/server/dist/clusterBusyReminder.js +1 -1
- package/server/dist/clusterDirector.js +1 -1
- package/server/dist/clusterPeerOps.js +10 -7
- package/server/dist/clusterProgress.js +1 -1
- package/server/dist/clusterSkills.d.ts +13 -0
- package/server/dist/clusterSkills.js +81 -0
- package/server/dist/clusterSnapshots.js +2 -0
- package/server/dist/clusterStore.d.ts +10 -2
- package/server/dist/clusterStore.js +64 -1
- package/server/dist/diagnostics/codeSkew.js +1 -0
- package/server/dist/eventLog.d.ts +7 -0
- package/server/dist/eventLog.js +70 -13
- package/server/dist/historyLimits.d.ts +1 -0
- package/server/dist/historyLimits.js +3 -0
- package/server/dist/http/router.js +1 -1
- package/server/dist/index.js +24 -1
- package/server/dist/jsonlLines.d.ts +4 -0
- package/server/dist/jsonlLines.js +53 -0
- package/server/dist/management/identity.js +1 -0
- package/server/dist/mcp/clusterMcpTools.js +4 -4
- package/server/dist/project/taskLedger.d.ts +4 -0
- package/server/dist/project/taskLedger.js +7 -4
- package/server/dist/providerConversation.d.ts +1 -0
- package/server/dist/providerConversation.js +17 -0
- package/server/dist/providers/claude-native/resumeSummary.d.ts +9 -0
- package/server/dist/providers/claude-native/resumeSummary.js +102 -49
- package/server/dist/providers/claude-native/worker.js +8 -4
- package/server/dist/providers/claude.js +2 -1
- package/server/dist/providers/clusterTaskToolDefinitions.js +4 -4
- package/server/dist/providers/codex-appserver/catalog.js +16 -1
- package/server/dist/providers/codex.js +2 -1
- package/server/dist/providers/codexCodeMode.d.ts +1 -1
- package/server/dist/providers/codexCodeMode.js +4 -3
- package/server/dist/providers/cursor/print.js +2 -1
- package/server/dist/providers/cursor/worker.js +2 -1
- package/server/dist/providers/llamacpp.js +17 -8
- package/server/dist/providers/ollamaRecovery.js +6 -6
- package/server/dist/providers/ollamaResilience.js +3 -3
- package/server/dist/providers/ollamaTokens.js +1 -1
- package/server/dist/quota.d.ts +0 -18
- package/server/dist/quota.js +0 -44
- package/server/dist/replacementHistory.d.ts +19 -0
- package/server/dist/replacementHistory.js +49 -0
- package/server/dist/server/broadcast.d.ts +2 -1
- package/server/dist/server/broadcast.js +1 -0
- package/server/dist/server/prompts.d.ts +1 -0
- package/server/dist/server/prompts.js +6 -1
- package/server/dist/sessionJsonl.d.ts +1 -1
- package/server/dist/sessionJsonl.js +115 -40
- package/server/dist/smartPickup.d.ts +2 -1
- package/server/dist/smartPickup.js +28 -1
- package/server/dist/smartPickupAdapters.js +15 -2
- package/server/dist/smartPickupLedger.js +6 -4
- package/server/dist/smartPickupObserver.d.ts +1 -0
- package/server/dist/smartPickupObserver.js +24 -15
- package/server/dist/transcriptWorker.d.ts +34 -0
- package/server/dist/transcriptWorker.js +201 -0
- package/server/dist/workflowStore.d.ts +1 -0
- package/server/dist/workflowStore.js +31 -0
- package/server/dist/ws/clusterHandlers.d.ts +2 -0
- package/server/dist/ws/clusterHandlers.js +64 -27
- package/server/dist/ws/handoffHandlers.js +5 -2
- package/server/dist/ws/transcriptWorkerHandlers.d.ts +25 -0
- package/server/dist/ws/transcriptWorkerHandlers.js +139 -0
- package/server/dist/ws/turnEngine.js +23 -9
- package/server/dist/ws/updatePrimaryConfig.js +27 -8
- package/server/dist/ws/workflowHandlers.d.ts +4 -1
- package/server/dist/ws/workflowHandlers.js +3 -1
- package/server/package.json +1 -1
- package/server/src/atomicFile.ts +1 -2
- package/server/src/capabilities.ts +58 -17
- package/server/src/cliUpdateDecision.ts +5 -4
- package/server/src/clusterAutoTurn.ts +26 -21
- package/server/src/clusterBusyReminder.ts +1 -1
- package/server/src/clusterDirector.ts +1 -1
- package/server/src/clusterPeerOps.ts +11 -8
- package/server/src/clusterProgress.ts +1 -1
- package/server/src/clusterSkills.ts +79 -0
- package/server/src/clusterSnapshots.ts +1 -0
- package/server/src/clusterStore.ts +64 -1
- package/server/src/diagnostics/codeSkew.ts +1 -0
- package/server/src/eventLog.ts +73 -13
- package/server/src/historyLimits.ts +2 -0
- package/server/src/http/router.ts +1 -1
- package/server/src/index.ts +23 -0
- package/server/src/jsonlLines.ts +52 -0
- package/server/src/management/identity.ts +1 -0
- package/server/src/mcp/clusterMcpTools.ts +4 -4
- package/server/src/project/taskLedger.ts +7 -5
- package/server/src/providerConversation.ts +15 -0
- package/server/src/providers/claude-native/resumeSummary.ts +98 -50
- package/server/src/providers/claude-native/worker.ts +8 -4
- package/server/src/providers/claude.ts +2 -1
- package/server/src/providers/clusterTaskToolDefinitions.ts +4 -4
- package/server/src/providers/codex-appserver/catalog.ts +14 -1
- package/server/src/providers/codex.ts +2 -1
- package/server/src/providers/codexCodeMode.ts +4 -4
- package/server/src/providers/cursor/print.ts +2 -1
- package/server/src/providers/cursor/worker.ts +2 -1
- package/server/src/providers/llamacpp.ts +18 -7
- package/server/src/providers/llamacppRecovery.ts +2 -0
- package/server/src/providers/ollamaRecovery.ts +6 -6
- package/server/src/providers/ollamaResilience.ts +3 -3
- package/server/src/providers/ollamaTokens.ts +1 -1
- package/server/src/providers/ollamaToolSubset.ts +3 -3
- package/server/src/quota.ts +0 -50
- package/server/src/replacementHistory.ts +44 -0
- package/server/src/server/broadcast.ts +2 -0
- package/server/src/server/prompts.ts +8 -1
- package/server/src/sessionJsonl.ts +92 -32
- package/server/src/smartPickup.ts +27 -3
- package/server/src/smartPickupAdapters.ts +17 -3
- package/server/src/smartPickupLedger.ts +6 -4
- package/server/src/smartPickupObserver.ts +20 -11
- package/server/src/transcriptWorker.ts +182 -0
- package/server/src/workflowStore.ts +21 -0
- package/server/src/ws/clusterHandlers.ts +46 -27
- package/server/src/ws/handoffHandlers.ts +5 -1
- package/server/src/ws/transcriptWorkerHandlers.ts +126 -0
- package/server/src/ws/turnEngine.ts +20 -8
- package/server/src/ws/updatePrimaryConfig.ts +25 -6
- package/server/src/ws/workflowHandlers.ts +3 -1
- package/shared/dist/clusterCoordination.d.ts +2 -0
- package/shared/dist/clusterCoordination.js +5 -1
- package/shared/dist/protocol/autoPickup.d.ts +3 -0
- package/shared/dist/protocol/clientMessages.d.ts +3 -2
- package/shared/dist/protocol/clusters.d.ts +13 -1
- package/shared/dist/protocol/index.d.ts +1 -0
- package/shared/dist/protocol/index.js +1 -0
- package/shared/dist/protocol/models.d.ts +4 -3
- package/shared/dist/protocol/models.js +26 -2
- package/shared/dist/protocol/serverMessages.d.ts +2 -1
- package/shared/dist/protocol/tasks.d.ts +4 -0
- package/shared/dist/protocol/transcriptWorker.d.ts +47 -0
- package/shared/dist/protocol/transcriptWorker.js +2 -0
- package/shared/dist/runtimeVersions.d.ts +1 -0
- package/shared/dist/runtimeVersions.js +14 -0
- package/shared/src/clusterCoordination.ts +7 -1
- package/shared/src/protocol/autoPickup.ts +5 -0
- package/shared/src/protocol/clientMessages.ts +5 -0
- package/shared/src/protocol/clusters.ts +16 -1
- package/shared/src/protocol/index.ts +1 -0
- package/shared/src/protocol/models.ts +31 -5
- package/shared/src/protocol/serverMessages.ts +2 -0
- package/shared/src/protocol/settings.ts +2 -3
- package/shared/src/protocol/tasks.ts +4 -7
- package/shared/src/protocol/transcriptWorker.ts +49 -0
- package/shared/src/runtimeVersions.ts +14 -0
package/CONTRIBUTING.md
CHANGED
|
@@ -178,6 +178,9 @@ Hosted CI runs the build, typecheck, unit suite, privacy audit, and configured s
|
|
|
178
178
|
|
|
179
179
|
Hosted CI (the **CI** workflow) runs on three occasions. A push to `main` runs the verify job on Ubuntu, macOS and Windows, the Ubuntu and Windows browser smokes and the Docker smoke; pushes that touch only `docs/**`, `devlog/**` or root-level `*.md` files skip it. The verify job on a push to `main` also audits the full history of every branch and tag (`node scripts/public-audit.mjs --history`); other runs audit the checked-out commit's history and the tags (`--history-head`). A weekly run adds the best-effort macOS browser job. A run started by hand from the `workflow_dispatch` form, whose `os` input selects `ubuntu`, `macos`, `windows` or `all`, checks any branch, such as a release branch before `main` moves to it. Pull requests do not start CI; the project's own changes reach `main` from a release branch that passed a hand-started run with `os` set to `all`. Every run also builds and smoke-tests the native packages. The suites that need the Linux isolated-server harness report as skipped on Windows. Every job has a timeout, and a newer run on the same ref cancels the older one. Hosted minutes are metered, and macOS and Windows runners bill at a multiple of Linux. The local gate (`npm run build`, `npm run typecheck`, `npm run test:unit`, `npm run audit:public -- --tree`) stays the first line of defense.
|
|
180
180
|
|
|
181
|
+
CI and Release use `.github/actions/setup-arco/action.yml` for Node, development dependencies and the existing optional ripgrep prerequisite. Calls can separate Node setup from installation to preserve intervening Python setup or the release tag check. Release calls explicitly disable npm caching. Both workflows call `.github/workflows/native-packages.yml` for the same six native targets, collection, audit, Node 26 probe and artifact upload. The calling workflows retain their existing checks and publication permissions; npm staging and GitHub Release creation remain release-only. A dropped hosted job still requires a targeted manual rerun, not an automatic retry.
|
|
182
|
+
|
|
183
|
+
|
|
181
184
|
```bash
|
|
182
185
|
# Type check across all three workspaces (no emit):
|
|
183
186
|
npm run typecheck
|
|
@@ -199,6 +202,21 @@ context, test entry filenames and a loaded `node:test` detect test execution;
|
|
|
199
202
|
`NODE_ENV` alone does not. Atomic writers also check cached paths when writing,
|
|
200
203
|
so importing a store before the fixture setup cannot bypass that check.
|
|
201
204
|
|
|
205
|
+
Compare existing file and folder paths through `realpath` on both sides. macOS
|
|
206
|
+
can expose temporary fixtures through `/var` while Arco stores paths under
|
|
207
|
+
`/private/var`. To check that an output is already resolved, compare the output
|
|
208
|
+
directly with the resolved expected path.
|
|
209
|
+
|
|
210
|
+
The updater fixtures copy one prepared release history into independent repositories;
|
|
211
|
+
its CRLF case creates a fresh clone so Git initializes the index with line-ending
|
|
212
|
+
conversion enabled. Public-audit fixtures write their initial local configuration
|
|
213
|
+
directly; cases that exercise configuration changes still use Git. Listing parity
|
|
214
|
+
captures each implementation once, while project race cases keep concurrent
|
|
215
|
+
renames, listings and creations without repeating a load benchmark. Artifact and
|
|
216
|
+
cluster-output checks retain their boundary-sized fixtures and print setup and
|
|
217
|
+
request durations separately. These diagnostics distinguish fixture overhead from
|
|
218
|
+
the time spent in the product without changing pass criteria.
|
|
219
|
+
|
|
202
220
|
Pure-logic modules ship a co-located `*.test.ts` run under the Node built-in runner: `node --conditions development --import tsx --test <file>`. Each is wired as a `test:<name>` script (root `package.json` + `server/package.json`), e.g. `npm run test:cursor-models`. Convention: add a co-located test for each new deterministic parser, budgeter, or matcher. Run the relevant `test:*` script and `npm run typecheck`; run the aggregate unit suite with `npm run test:unit`.
|
|
203
221
|
|
|
204
222
|
---
|
|
@@ -228,7 +246,7 @@ synthetic fixtures and fails when a reachable interactive control lacks a
|
|
|
228
246
|
resolving `data-help` key (short allowlist for the help toggle itself). Run that
|
|
229
247
|
suite when adding or rearranging controls.
|
|
230
248
|
|
|
231
|
-
Dynamic keys (`data-help={`rightpanel.tab.${id}`}`) and forwarded-prop helpers (`helpKey="..."`, `const helpKey = ... ? 'a' : 'b'`, `{ 'data-help': key }`) are recognized so they don't produce false errors. See the header comment in `scripts/docs-check.ts` for the exact heuristics, and `docs/CLIENT.md` under `Help system`.
|
|
249
|
+
Dynamic keys (`data-help={`rightpanel.tab.${id}`}`) and forwarded-prop helpers (`help="..."`, forwarded `help` defaults, `helpKey="..."`, `const helpKey = ... ? 'a' : 'b'`, `{ 'data-help': key }`) are recognized so they don't produce false errors. See the header comment in `scripts/docs-check.ts` for the exact heuristics, and `docs/CLIENT.md` under `Help system`.
|
|
232
250
|
|
|
233
251
|
**Feature documentation obligation:** every feature change ships its own `data-help` attributes + `HELP_CONTENT` entries + manual section(s) when it adds controls, and **`npm run docs:check` must stay green** (no new hard errors). Run it alongside `npm run typecheck` and the unit suite before landing a documentation change; run the help-coverage browser suite when controls change.
|
|
234
252
|
|
|
@@ -390,24 +408,43 @@ npm run typecheck
|
|
|
390
408
|
npm run test:unit
|
|
391
409
|
npm run docs:check
|
|
392
410
|
npm run audit:public
|
|
393
|
-
node scripts/release.mjs patch --dry-run
|
|
394
|
-
node scripts/release.mjs patch
|
|
411
|
+
node scripts/release.mjs patch --entry-file ../release-entry.md --dry-run
|
|
412
|
+
node scripts/release.mjs patch --entry-file ../release-entry.md
|
|
395
413
|
```
|
|
396
414
|
|
|
397
415
|
The inaugural release is the one exception to the bump and empty-Unreleased rules:
|
|
398
|
-
when there are no local version tags, `node scripts/release.mjs 0.1.0` uses the
|
|
416
|
+
when there are no local version tags, `node scripts/release.mjs 0.1.0 --entry-file ../release-entry.md` uses the
|
|
399
417
|
already seeded `v0.1.0` notes and retains the package version. It requires an
|
|
400
418
|
empty Unreleased section and no other release sections. Any pending changes must
|
|
401
419
|
be reviewed before that tag is cut.
|
|
402
420
|
|
|
403
421
|
Use `minor`, `major`, or an explicit newer `X.Y.Z` instead of `patch` when
|
|
404
|
-
appropriate. Unreleased must contain a change bullet.
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
422
|
+
appropriate. Unreleased must contain a change bullet. Write the finished UTF-8
|
|
423
|
+
release entry body to a file outside the checkout or in an ignored local
|
|
424
|
+
folder, so it does not make the tree dirty. The examples use a file beside the
|
|
425
|
+
checkout. The script generates its dated heading and separator; do not include
|
|
426
|
+
them in the input. Links in the body must resolve from the devlog archive.
|
|
427
|
+
The file is read before any tracked edit. File mode opens no editor and does
|
|
428
|
+
not append the changelog bullets again. The dry run prints the
|
|
429
|
+
exact planned edits and tag message without changing files.
|
|
430
|
+
|
|
431
|
+
The command prints the entry word count against 150-300 words, configured and
|
|
432
|
+
release identities, hooks status and lockfile workspace consistency. Entry
|
|
433
|
+
length, hooks status, identity and lock-version differences are diagnostics,
|
|
434
|
+
not new refusals. Existing clean-tree, main/origin-main, version, changelog,
|
|
435
|
+
complete-entry and unique-tag requirements remain, with repair instructions.
|
|
436
|
+
The origin/main comparison uses the locally fetched ref; the command does not
|
|
437
|
+
fetch or inspect hosted runs. Confirm their results and operator approval
|
|
438
|
+
before running it. On approval, push the reviewed green commit to main first.
|
|
439
|
+
|
|
440
|
+
The real invocation rolls the changelog, updates all four manifests and their
|
|
441
|
+
lockfile entries, and prepends the supplied entry. For interactive editing use
|
|
442
|
+
`--edit-entry` instead of `--entry-file`; it opens the stub in `GIT_EDITOR` or
|
|
443
|
+
`core.editor`. Complete the entry and remove `RELEASE_ENTRY_REQUIRED`. An
|
|
444
|
+
unchanged stub or failed editor prevents the commit; edits remain for review
|
|
445
|
+
and recovery. A failure states whether files were written or a release commit
|
|
446
|
+
already exists. The script never resets files, deletes a tag or retries a
|
|
447
|
+
failed release automatically.
|
|
411
448
|
|
|
412
449
|
The script commits `Release vX.Y.Z` with the project identity and creates the
|
|
413
450
|
annotated `vX.Y.Z` tag from the changelog section. It never pushes. The maintainer
|
|
@@ -431,6 +468,9 @@ When `arco-workbench` already exists on npm, it then stages the package with
|
|
|
431
468
|
publishing is recovered through the workflow; the release script does not
|
|
432
469
|
overwrite an existing local tag. See [Updating Arco](docs/OPERATIONS.md#updating-arco)
|
|
433
470
|
for installs and updates. The release notes can be
|
|
434
|
-
inspected independently with `node scripts/release/notes.mjs vX.Y.Z`.
|
|
471
|
+
inspected independently with `node scripts/release/notes.mjs vX.Y.Z`. After
|
|
472
|
+
checking the installed update and deleting the merged release branch, create
|
|
473
|
+
the next release branch only when its version is agreed. The command prints
|
|
474
|
+
these remaining commands but never executes them.
|
|
435
475
|
|
|
436
476
|
On Linux, `ARCO_TEST_PER_FILE=1` uses the same network namespace isolation as the aggregate unit runner. `ARCO_TEST_REQUIRE_NETNS=1` refuses a run when that isolation is unavailable.
|
package/README.md
CHANGED
|
@@ -50,10 +50,11 @@ box, a release toast, or Settings. See
|
|
|
50
50
|
before a fresh install (package, source checkout, or unknown origin), see
|
|
51
51
|
[Before a fresh install: remove older copies](docs/OPERATIONS.md#before-a-fresh-install-remove-older-copies).
|
|
52
52
|
|
|
53
|
-
`arco setup`
|
|
54
|
-
application shortcut, starts the service, and
|
|
55
|
-
shortcut or `arco open` for a Chromium app window
|
|
56
|
-
or Chromium, including other installed channels;
|
|
53
|
+
`arco setup` prints the package version it runs, then asks before installing the
|
|
54
|
+
per-user service and creating an application shortcut, starts the service, and
|
|
55
|
+
opens the local URL. Use the shortcut or `arco open` for a Chromium app window
|
|
56
|
+
(Chrome, Edge, Brave, Vivaldi or Chromium, including other installed channels;
|
|
57
|
+
choose one in Settings > Advanced > App window browser or with
|
|
57
58
|
`arco open --browser <name-or-path>`); `arco open --tab` opens a regular
|
|
58
59
|
browser tab. The service is `arco.service` under systemd user services,
|
|
59
60
|
`arco-workbench.plist` with label `arco-workbench` under launchd, or the
|
|
@@ -67,6 +68,8 @@ one that was modified after installation.
|
|
|
67
68
|
|
|
68
69
|
For Linux service recovery after 0.1.3, see the
|
|
69
70
|
[package update recovery steps](docs/OPERATIONS.md#packaged-install).
|
|
71
|
+
The same section gives manual update steps when Arco cannot locate npm; stop
|
|
72
|
+
Arco before replacing the package from a terminal where npm works.
|
|
70
73
|
|
|
71
74
|
Use these package commands for maintenance:
|
|
72
75
|
|
|
@@ -183,7 +186,10 @@ Global state defaults to `~/.arco` on Linux and macOS and
|
|
|
183
186
|
different global home. Opening a project creates a `.arco` folder there for
|
|
184
187
|
workflows and project settings. That folder ships its own `.gitignore` so its
|
|
185
188
|
contents stay out of Git by default; adding `.arco/` to the project's root
|
|
186
|
-
`.gitignore` is a sensible extra safeguard.
|
|
189
|
+
`.gitignore` is a sensible extra safeguard. Treat `.arco/` as local state that
|
|
190
|
+
is not committed, except a skill shared through SHARE WITH REPOSITORY. Put
|
|
191
|
+
files you want kept in the project in the project tree, not only under a
|
|
192
|
+
conversation's `artifacts/` folder. Provider command-line tools may
|
|
187
193
|
keep their own login data outside the Arco home. See
|
|
188
194
|
[Persistence](docs/PERSISTENCE.md) for the storage layout and
|
|
189
195
|
[Backup](docs/BACKUP.md) before moving an installation.
|
|
@@ -209,14 +215,15 @@ making it reachable elsewhere.
|
|
|
209
215
|
- **Utility agent:** one operator-chosen provider and model for short side jobs such as **BRIEF**, **CATCH ME UP**, and **TIDY**. Accepts Claude with Native sign-in, Codex, Cursor, Ollama, LM Studio, llama.cpp, and Strata or DeepSeek through Xolotl; never chosen silently. [Settings](docs/SETTINGS.md#utility-agent) | [Feature reference](docs/FEATURES.md)
|
|
210
216
|
- **Conversation control:** interrupt an active Claude or Codex turn and send a correction next, preserving queued follow-ups. Mid-turn sends show Queued or Delivered; the conversation header names the current step and its elapsed time. PLAN FIRST arms a Native Claude turn to plan before editing, separately from the project plan. It is hidden for cluster roles that do not edit code. [Interrupt and send](docs/PROVIDERS.md#interrupt-and-send)
|
|
211
217
|
- **Operator actions:** Review, SECOND OPINION, Research, Handoff, and Spawn keep results visible and actions explicit. [Operator actions](docs/OPERATOR_ACTIONS.md)
|
|
212
|
-
- **Clusters and plans:** size-ordered templates, at most one director,
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
218
|
+
- **Clusters and plans:** size-ordered templates, at most one director, eight
|
|
219
|
+
role presets including ADVISOR and DESIGNER, shared task boards, peer
|
|
220
|
+
messages, plans, and optional operator-armed AUTO-PICKUP (Rule-based
|
|
221
|
+
recommended; Smart modes need an evaluator from the same providers as the
|
|
222
|
+
utility agent) with PAUSE, RESUME and RESET BUDGET. A plan gives a workflow or
|
|
223
|
+
cluster its shared direction; the board tracks who is doing each task. Member
|
|
224
|
+
status shows when a turn starts and remains working until it settles; cards
|
|
225
|
+
keep the last settled reply or tool step. Describe a cluster's purpose during
|
|
226
|
+
creation to request a director's draft, then review it before attaching.
|
|
220
227
|
[Task ledger](docs/TASK_LEDGER.md) | [Plan or board?](docs/PLAN_OR_BOARD.md) | [Getting started](docs/GETTING_STARTED.md)
|
|
221
228
|
- **Updates and shortcuts:** the top-bar version box shows the running version and opens the update dialog; package installs use `arco update` or **UPDATE AND RESTART**; `arco open` and per-user shortcuts open a dedicated app window. [Updating Arco](docs/OPERATIONS.md#updating-arco) | [Service mode](docs/SERVICE_MODE.md)
|
|
222
229
|
- **Working tools:** an embedded terminal and Git workbench keep commands, diffs, checkpoints, and reviews beside the conversation. [Git workbench](docs/GIT_WORKBENCH.md)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as F,j as d}from"./index-
|
|
1
|
+
import{r as F,j as d}from"./index-CsVy3eZm.js";const W=`// Adapted from the reference terminal crt.js, d52d430. No time-driven scan/band/hum.
|
|
2
2
|
|
|
3
3
|
precision highp float;
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as ee,u as ke,j as pe,T as Le,e as De}from"./index-
|
|
1
|
+
import{r as ee,u as ke,j as pe,T as Le,e as De}from"./index-CsVy3eZm.js";var ge={exports:{}},Ce;function Re(){return Ce||(Ce=1,(function(se,ie){(function(Z,X){se.exports=X()})(globalThis,(()=>(()=>{var Z={4567:function(M,r,a){var l=this&&this.__decorate||function(e,t,n,u){var _,p=arguments.length,h=p<3?t:u===null?u=Object.getOwnPropertyDescriptor(t,n):u;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")h=Reflect.decorate(e,t,n,u);else for(var S=e.length-1;S>=0;S--)(_=e[S])&&(h=(p<3?_(h):p>3?_(t,n,h):_(t,n))||h);return p>3&&h&&Object.defineProperty(t,n,h),h},f=this&&this.__param||function(e,t){return function(n,u){t(n,u,e)}};Object.defineProperty(r,"__esModule",{value:!0}),r.AccessibilityManager=void 0;const o=a(9042),d=a(9924),v=a(844),g=a(4725),c=a(2585),i=a(3656);let s=r.AccessibilityManager=class extends v.Disposable{constructor(e,t,n,u){super(),this._terminal=e,this._coreBrowserService=n,this._renderService=u,this._rowColumns=new WeakMap,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="",this._accessibilityContainer=this._coreBrowserService.mainDocument.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=this._coreBrowserService.mainDocument.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let _=0;_<this._terminal.rows;_++)this._rowElements[_]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[_]);if(this._topBoundaryFocusListener=_=>this._handleBoundaryFocus(_,0),this._bottomBoundaryFocusListener=_=>this._handleBoundaryFocus(_,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions(),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=this._coreBrowserService.mainDocument.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this.register(new d.TimeBasedDebouncer(this._renderRows.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this.register(this._terminal.onResize((_=>this._handleResize(_.rows)))),this.register(this._terminal.onRender((_=>this._refreshRows(_.start,_.end)))),this.register(this._terminal.onScroll((()=>this._refreshRows()))),this.register(this._terminal.onA11yChar((_=>this._handleChar(_)))),this.register(this._terminal.onLineFeed((()=>this._handleChar(`
|
|
2
2
|
`)))),this.register(this._terminal.onA11yTab((_=>this._handleTab(_)))),this.register(this._terminal.onKey((_=>this._handleKey(_.key)))),this.register(this._terminal.onBlur((()=>this._clearLiveRegion()))),this.register(this._renderService.onDimensionsChange((()=>this._refreshRowsDimensions()))),this.register((0,i.addDisposableDomListener)(document,"selectionchange",(()=>this._handleSelectionChange()))),this.register(this._coreBrowserService.onDprChange((()=>this._refreshRowsDimensions()))),this._refreshRows(),this.register((0,v.toDisposable)((()=>{this._accessibilityContainer.remove(),this._rowElements.length=0})))}_handleTab(e){for(let t=0;t<e;t++)this._handleChar(" ")}_handleChar(e){this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==e&&(this._charsToAnnounce+=e):this._charsToAnnounce+=e,e===`
|
|
3
3
|
`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=o.tooMuchOutput)))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(e){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(e)||this._charsToConsume.push(e)}_refreshRows(e,t){this._liveRegionDebouncer.refresh(e,t,this._terminal.rows)}_renderRows(e,t){const n=this._terminal.buffer,u=n.lines.length.toString();for(let _=e;_<=t;_++){const p=n.lines.get(n.ydisp+_),h=[],S=(p==null?void 0:p.translateToString(!0,void 0,void 0,h))||"",E=(n.ydisp+_+1).toString(),k=this._rowElements[_];k&&(S.length===0?(k.innerText=" ",this._rowColumns.set(k,[0,1])):(k.textContent=S,this._rowColumns.set(k,h)),k.setAttribute("aria-posinset",E),k.setAttribute("aria-setsize",u))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(e,t){const n=e.target,u=this._rowElements[t===0?1:this._rowElements.length-2];if(n.getAttribute("aria-posinset")===(t===0?"1":`${this._terminal.buffer.lines.length}`)||e.relatedTarget!==u)return;let _,p;if(t===0?(_=n,p=this._rowElements.pop(),this._rowContainer.removeChild(p)):(_=this._rowElements.shift(),p=n,this._rowContainer.removeChild(_)),_.removeEventListener("focus",this._topBoundaryFocusListener),p.removeEventListener("focus",this._bottomBoundaryFocusListener),t===0){const h=this._createAccessibilityTreeNode();this._rowElements.unshift(h),this._rowContainer.insertAdjacentElement("afterbegin",h)}else{const h=this._createAccessibilityTreeNode();this._rowElements.push(h),this._rowContainer.appendChild(h)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(t===0?-1:1),this._rowElements[t===0?1:this._rowElements.length-2].focus(),e.preventDefault(),e.stopImmediatePropagation()}_handleSelectionChange(){var S;if(this._rowElements.length===0)return;const e=document.getSelection();if(!e)return;if(e.isCollapsed)return void(this._rowContainer.contains(e.anchorNode)&&this._terminal.clearSelection());if(!e.anchorNode||!e.focusNode)return void console.error("anchorNode and/or focusNode are null");let t={node:e.anchorNode,offset:e.anchorOffset},n={node:e.focusNode,offset:e.focusOffset};if((t.node.compareDocumentPosition(n.node)&Node.DOCUMENT_POSITION_PRECEDING||t.node===n.node&&t.offset>n.offset)&&([t,n]=[n,t]),t.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(t={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(t.node))return;const u=this._rowElements.slice(-1)[0];if(n.node.compareDocumentPosition(u)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(n={node:u,offset:((S=u.textContent)==null?void 0:S.length)??0}),!this._rowContainer.contains(n.node))return;const _=({node:E,offset:k})=>{const D=E instanceof Text?E.parentNode:E;let w=parseInt(D==null?void 0:D.getAttribute("aria-posinset"),10)-1;if(isNaN(w))return console.warn("row is invalid. Race condition?"),null;const x=this._rowColumns.get(D);if(!x)return console.warn("columns is null. Race condition?"),null;let B=k<x.length?x[k]:x.slice(-1)[0]+1;return B>=this._terminal.cols&&(++w,B=0),{row:w,column:B}},p=_(t),h=_(n);if(p&&h){if(p.row>h.row||p.row===h.row&&p.column>=h.column)throw new Error("invalid range");this._terminal.select(p.column,p.row,(h.row-p.row)*this._terminal.cols-p.column+h.column)}}_handleResize(e){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let t=this._rowContainer.children.length;t<this._terminal.rows;t++)this._rowElements[t]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[t]);for(;this._rowElements.length>e;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const e=this._coreBrowserService.mainDocument.createElement("div");return e.setAttribute("role","listitem"),e.tabIndex=-1,this._refreshRowDimensions(e),e}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){this._accessibilityContainer.style.width=`${this._renderService.dimensions.css.canvas.width}px`,this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let e=0;e<this._terminal.rows;e++)this._refreshRowDimensions(this._rowElements[e])}}_refreshRowDimensions(e){e.style.height=`${this._renderService.dimensions.css.cell.height}px`}};r.AccessibilityManager=s=l([f(1,c.IInstantiationService),f(2,g.ICoreBrowserService),f(3,g.IRenderService)],s)},3614:(M,r)=>{function a(d){return d.replace(/\r?\n/g,"\r")}function l(d,v){return v?"\x1B[200~"+d+"\x1B[201~":d}function f(d,v,g,c){d=l(d=a(d),g.decPrivateModes.bracketedPasteMode&&c.rawOptions.ignoreBracketedPasteMode!==!0),g.triggerDataEvent(d,!0),v.value=""}function o(d,v,g){const c=g.getBoundingClientRect(),i=d.clientX-c.left-10,s=d.clientY-c.top-10;v.style.width="20px",v.style.height="20px",v.style.left=`${i}px`,v.style.top=`${s}px`,v.style.zIndex="1000",v.focus()}Object.defineProperty(r,"__esModule",{value:!0}),r.rightClickHandler=r.moveTextAreaUnderMouseCursor=r.paste=r.handlePasteEvent=r.copyHandler=r.bracketTextForPaste=r.prepareTextForTerminal=void 0,r.prepareTextForTerminal=a,r.bracketTextForPaste=l,r.copyHandler=function(d,v){d.clipboardData&&d.clipboardData.setData("text/plain",v.selectionText),d.preventDefault()},r.handlePasteEvent=function(d,v,g,c){d.stopPropagation(),d.clipboardData&&f(d.clipboardData.getData("text/plain"),v,g,c)},r.paste=f,r.moveTextAreaUnderMouseCursor=o,r.rightClickHandler=function(d,v,g,c,i){o(d,v,g),i&&c.rightClickSelect(d),v.value=c.selectionText,v.select()}},7239:(M,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.ColorContrastCache=void 0;const l=a(1505);r.ColorContrastCache=class{constructor(){this._color=new l.TwoKeyMap,this._css=new l.TwoKeyMap}setCss(f,o,d){this._css.set(f,o,d)}getCss(f,o){return this._css.get(f,o)}setColor(f,o,d){this._color.set(f,o,d)}getColor(f,o){return this._color.get(f,o)}clear(){this._color.clear(),this._css.clear()}}},3656:(M,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.addDisposableDomListener=void 0,r.addDisposableDomListener=function(a,l,f,o){a.addEventListener(l,f,o);let d=!1;return{dispose:()=>{d||(d=!0,a.removeEventListener(l,f,o))}}}},3551:function(M,r,a){var l=this&&this.__decorate||function(s,e,t,n){var u,_=arguments.length,p=_<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(s,e,t,n);else for(var h=s.length-1;h>=0;h--)(u=s[h])&&(p=(_<3?u(p):_>3?u(e,t,p):u(e,t))||p);return _>3&&p&&Object.defineProperty(e,t,p),p},f=this&&this.__param||function(s,e){return function(t,n){e(t,n,s)}};Object.defineProperty(r,"__esModule",{value:!0}),r.Linkifier=void 0;const o=a(3656),d=a(8460),v=a(844),g=a(2585),c=a(4725);let i=r.Linkifier=class extends v.Disposable{get currentLink(){return this._currentLink}constructor(s,e,t,n,u){super(),this._element=s,this._mouseService=e,this._renderService=t,this._bufferService=n,this._linkProviderService=u,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new d.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new d.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,v.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,v.toDisposable)((()=>{var _;this._lastMouseEvent=void 0,(_=this._activeProviderReplies)==null||_.clear()}))),this.register(this._bufferService.onResize((()=>{this._clearCurrentLink(),this._wasResized=!0}))),this.register((0,o.addDisposableDomListener)(this._element,"mouseleave",(()=>{this._isMouseOut=!0,this._clearCurrentLink()}))),this.register((0,o.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,o.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,o.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(s){this._lastMouseEvent=s;const e=this._positionFromMouseEvent(s,this._element,this._mouseService);if(!e)return;this._isMouseOut=!1;const t=s.composedPath();for(let n=0;n<t.length;n++){const u=t[n];if(u.classList.contains("xterm"))break;if(u.classList.contains("xterm-hover"))return}this._lastBufferCell&&e.x===this._lastBufferCell.x&&e.y===this._lastBufferCell.y||(this._handleHover(e),this._lastBufferCell=e)}_handleHover(s){if(this._activeLine!==s.y||this._wasResized)return this._clearCurrentLink(),this._askForLink(s,!1),void(this._wasResized=!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,s)||(this._clearCurrentLink(),this._askForLink(s,!0))}_askForLink(s,e){var n,u;this._activeProviderReplies&&e||((n=this._activeProviderReplies)==null||n.forEach((_=>{_==null||_.forEach((p=>{p.link.dispose&&p.link.dispose()}))})),this._activeProviderReplies=new Map,this._activeLine=s.y);let t=!1;for(const[_,p]of this._linkProviderService.linkProviders.entries())e?(u=this._activeProviderReplies)!=null&&u.get(_)&&(t=this._checkLinkProviderResult(_,s,t)):p.provideLinks(s.y,(h=>{var E,k;if(this._isMouseOut)return;const S=h==null?void 0:h.map((D=>({link:D})));(E=this._activeProviderReplies)==null||E.set(_,S),t=this._checkLinkProviderResult(_,s,t),((k=this._activeProviderReplies)==null?void 0:k.size)===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(s.y,this._activeProviderReplies)}))}_removeIntersectingLinks(s,e){const t=new Set;for(let n=0;n<e.size;n++){const u=e.get(n);if(u)for(let _=0;_<u.length;_++){const p=u[_],h=p.link.range.start.y<s?0:p.link.range.start.x,S=p.link.range.end.y>s?this._bufferService.cols:p.link.range.end.x;for(let E=h;E<=S;E++){if(t.has(E)){u.splice(_--,1);break}t.add(E)}}}}_checkLinkProviderResult(s,e,t){var _;if(!this._activeProviderReplies)return t;const n=this._activeProviderReplies.get(s);let u=!1;for(let p=0;p<s;p++)this._activeProviderReplies.has(p)&&!this._activeProviderReplies.get(p)||(u=!0);if(!u&&n){const p=n.find((h=>this._linkAtPosition(h.link,e)));p&&(t=!0,this._handleNewLink(p))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!t)for(let p=0;p<this._activeProviderReplies.size;p++){const h=(_=this._activeProviderReplies.get(p))==null?void 0:_.find((S=>this._linkAtPosition(S.link,e)));if(h){t=!0,this._handleNewLink(h);break}}return t}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(s){if(!this._currentLink)return;const e=this._positionFromMouseEvent(s,this._element,this._mouseService);e&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,e)&&this._currentLink.link.activate(s,this._currentLink.link.text)}_clearCurrentLink(s,e){this._currentLink&&this._lastMouseEvent&&(!s||!e||this._currentLink.link.range.start.y>=s&&this._currentLink.link.range.end.y<=e)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,v.disposeArray)(this._linkCacheDisposables))}_handleNewLink(s){if(!this._lastMouseEvent)return;const e=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);e&&this._linkAtPosition(s.link,e)&&(this._currentLink=s,this._currentLink.state={decorations:{underline:s.link.decorations===void 0||s.link.decorations.underline,pointerCursor:s.link.decorations===void 0||s.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,s.link,this._lastMouseEvent),s.link.decorations={},Object.defineProperties(s.link.decorations,{pointerCursor:{get:()=>{var t,n;return(n=(t=this._currentLink)==null?void 0:t.state)==null?void 0:n.decorations.pointerCursor},set:t=>{var n;(n=this._currentLink)!=null&&n.state&&this._currentLink.state.decorations.pointerCursor!==t&&(this._currentLink.state.decorations.pointerCursor=t,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",t))}},underline:{get:()=>{var t,n;return(n=(t=this._currentLink)==null?void 0:t.state)==null?void 0:n.decorations.underline},set:t=>{var n,u,_;(n=this._currentLink)!=null&&n.state&&((_=(u=this._currentLink)==null?void 0:u.state)==null?void 0:_.decorations.underline)!==t&&(this._currentLink.state.decorations.underline=t,this._currentLink.state.isHovered&&this._fireUnderlineEvent(s.link,t))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange((t=>{if(!this._currentLink)return;const n=t.start===0?0:t.start+1+this._bufferService.buffer.ydisp,u=this._bufferService.buffer.ydisp+1+t.end;if(this._currentLink.link.range.start.y>=n&&this._currentLink.link.range.end.y<=u&&(this._clearCurrentLink(n,u),this._lastMouseEvent)){const _=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);_&&this._askForLink(_,!1)}}))))}_linkHover(s,e,t){var n;(n=this._currentLink)!=null&&n.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(e,!0),this._currentLink.state.decorations.pointerCursor&&s.classList.add("xterm-cursor-pointer")),e.hover&&e.hover(t,e.text)}_fireUnderlineEvent(s,e){const t=s.range,n=this._bufferService.buffer.ydisp,u=this._createLinkUnderlineEvent(t.start.x-1,t.start.y-n-1,t.end.x,t.end.y-n-1,void 0);(e?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(u)}_linkLeave(s,e,t){var n;(n=this._currentLink)!=null&&n.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(e,!1),this._currentLink.state.decorations.pointerCursor&&s.classList.remove("xterm-cursor-pointer")),e.leave&&e.leave(t,e.text)}_linkAtPosition(s,e){const t=s.range.start.y*this._bufferService.cols+s.range.start.x,n=s.range.end.y*this._bufferService.cols+s.range.end.x,u=e.y*this._bufferService.cols+e.x;return t<=u&&u<=n}_positionFromMouseEvent(s,e,t){const n=t.getCoords(s,e,this._bufferService.cols,this._bufferService.rows);if(n)return{x:n[0],y:n[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(s,e,t,n,u){return{x1:s,y1:e,x2:t,y2:n,cols:this._bufferService.cols,fg:u}}};r.Linkifier=i=l([f(1,c.IMouseService),f(2,c.IRenderService),f(3,g.IBufferService),f(4,c.ILinkProviderService)],i)},9042:(M,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.tooMuchOutput=r.promptLabel=void 0,r.promptLabel="Terminal input",r.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(M,r,a){var l=this&&this.__decorate||function(c,i,s,e){var t,n=arguments.length,u=n<3?i:e===null?e=Object.getOwnPropertyDescriptor(i,s):e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(c,i,s,e);else for(var _=c.length-1;_>=0;_--)(t=c[_])&&(u=(n<3?t(u):n>3?t(i,s,u):t(i,s))||u);return n>3&&u&&Object.defineProperty(i,s,u),u},f=this&&this.__param||function(c,i){return function(s,e){i(s,e,c)}};Object.defineProperty(r,"__esModule",{value:!0}),r.OscLinkProvider=void 0;const o=a(511),d=a(2585);let v=r.OscLinkProvider=class{constructor(c,i,s){this._bufferService=c,this._optionsService=i,this._oscLinkService=s}provideLinks(c,i){var S;const s=this._bufferService.buffer.lines.get(c-1);if(!s)return void i(void 0);const e=[],t=this._optionsService.rawOptions.linkHandler,n=new o.CellData,u=s.getTrimmedLength();let _=-1,p=-1,h=!1;for(let E=0;E<u;E++)if(p!==-1||s.hasContent(E)){if(s.loadCell(E,n),n.hasExtendedAttrs()&&n.extended.urlId){if(p===-1){p=E,_=n.extended.urlId;continue}h=n.extended.urlId!==_}else p!==-1&&(h=!0);if(h||p!==-1&&E===u-1){const k=(S=this._oscLinkService.getLinkData(_))==null?void 0:S.uri;if(k){const D={start:{x:p+1,y:c},end:{x:E+(h||E!==u-1?0:1),y:c}};let w=!1;if(!(t!=null&&t.allowNonHttpProtocols))try{const x=new URL(k);["http:","https:"].includes(x.protocol)||(w=!0)}catch{w=!0}w||e.push({text:k,range:D,activate:(x,B)=>t?t.activate(x,B,D):g(0,B),hover:(x,B)=>{var P;return(P=t==null?void 0:t.hover)==null?void 0:P.call(t,x,B,D)},leave:(x,B)=>{var P;return(P=t==null?void 0:t.leave)==null?void 0:P.call(t,x,B,D)}})}h=!1,n.hasExtendedAttrs()&&n.extended.urlId?(p=E,_=n.extended.urlId):(p=-1,_=-1)}}i(e)}};function g(c,i){if(confirm(`Do you want to navigate to ${i}?
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{i as F,l as Z,b as ie,c as cn,r as dn,W as un}from"./index-B_EqHDz3.js";function gn(){let t=document.getElementById("ge-vendor-toast-host");return t||(t=document.createElement("div"),t.id="ge-vendor-toast-host",t.style.cssText="position:fixed;left:50%;bottom:24px;transform:translateX(-50%);z-index:2147483000;display:flex;flex-direction:column;gap:8px;align-items:center;pointer-events:none;",document.body.appendChild(t)),t}function Tt(t,{error:n=!1,duration:s=2600}={}){if(typeof document>"u"||!t)return;const o=gn(),r=document.createElement("div");r.textContent=String(t),r.style.cssText=`pointer-events:auto;max-width:480px;padding:8px 14px;border-radius:4px;font-family:var(--font-body,system-ui);font-size:13px;line-height:1.4;box-shadow:0 4px 18px rgba(0,0,0,0.45);opacity:0;transition:opacity .15s;background:var(--color-bg-elevated,#1a1a1a);color:${n?"var(--color-danger,#e06c75)":"var(--color-fg,#9cdef2)"};border:1px solid ${n?"var(--color-danger,#e06c75)":"var(--color-border-bright,#355a66)"};`,o.appendChild(r),requestAnimationFrame(()=>{r.style.opacity="1"}),setTimeout(()=>{r.style.opacity="0",setTimeout(()=>r.remove(),200)},typeof s=="number"?s:2600)}function pn(t,n){Tt(t,typeof n=="number"?{duration:n}:n||{})}function mn(t){Tt(t,{error:!0,duration:5e3})}function hn(t){return typeof window>"u"||typeof window.confirm!="function"?Promise.resolve(!0):Promise.resolve(window.confirm(String(t)))}function fn(t,{defaultValue:n=""}={}){return typeof window>"u"||typeof window.prompt!="function"?Promise.resolve(null):Promise.resolve(window.prompt(String(t),n))}const W={showToast:pn,showError:mn,styledConfirm:hn,styledPrompt:fn},yn={getJSON(t,n=null){try{const s=localStorage.getItem(t);return s==null?n:JSON.parse(s)}catch{return n}},setJSON(t,n){try{localStorage.setItem(t,JSON.stringify(n))}catch{}},remove(t){try{localStorage.removeItem(t)}catch{}}},Be=new Map;function vn(t,n,s={}){const o=document.getElementById(t);if(!o){console.warn("[DragSort] container not found:",t);return}const r=s.instanceKey||t;Be.has(r)&&(Be.get(r).cleanup(),Be.delete(r));const i={onReorder:s.onReorder||null,handleSelector:s.handleSelector||null,excludeSelector:s.excludeSelector||null,storageKey:s.storageKey||null};let l=null,a=null,c=0,d=[];function u(){let C=Array.from(o.querySelectorAll(n));return i.excludeSelector&&(C=C.filter(M=>!M.matches(i.excludeSelector))),C}function g(C){const M=document.createElement("div");return M.className="drag-placeholder",M.style.height=C+"px",M.style.margin="4px 0",M}function m(C,M){const T=M.getBoundingClientRect(),B=o.getBoundingClientRect(),I=(T.top-B.top)/F()+o.scrollTop,_=(T.left-B.left)/F();c=C-T.top,d=u(),l=M,getComputedStyle(o).position==="static"&&(o.style.position="relative"),a=g(T.height/F()),M.parentNode.insertBefore(a,M),M.classList.add("dragging"),Object.assign(M.style,{position:"absolute",width:T.width/F()+"px",left:_+"px",top:I+"px",zIndex:"9999",pointerEvents:"none",margin:"0",boxSizing:"border-box",transition:"none"})}function w(C){if(!l)return;const M=o.getBoundingClientRect(),T=(C-c-M.top)/F()+o.scrollTop;l.style.top=T+"px";const B=d.filter(O=>O!==l),I=l.getBoundingClientRect(),_=I.top+I.height/2;let P=null;for(const O of B){const A=O.getBoundingClientRect(),D=A.top+A.height/2;if(_<D){P=O;break}}if(P)a.nextElementSibling!==P&&o.insertBefore(a,P);else if(B.length>0){const O=B[B.length-1];a!==O.nextElementSibling&&o.insertBefore(a,O.nextElementSibling)}}function k(){if(!l)return;const C=a.getBoundingClientRect(),M=o.getBoundingClientRect(),T=(C.top-M.top)/F()+o.scrollTop;l.style.transition="top 0.08s ease-out",l.style.top=T+"px",setTimeout(()=>{if(a.parentNode.insertBefore(l,a),a.remove(),l.classList.remove("dragging"),l.style.cssText="",i.storageKey){const B=u().map(I=>I.dataset.sessionId||I.dataset.modelId||I.dataset.filePath).filter(Boolean);B.length&&yn.setJSON(i.storageKey,B)}i.onReorder&&i.onReorder(u()),l=null,a=null,d=[]},80)}function E(C){if(C.button!==0||i.handleSelector&&!C.target.closest(i.handleSelector))return;const M=C.target.closest(n);!M||!o.contains(M)||i.excludeSelector&&M.matches(i.excludeSelector)||(C.preventDefault(),C.stopPropagation(),m(C.clientY,M),document.addEventListener("mousemove",p),document.addEventListener("mouseup",v))}function p(C){w(C.clientY)}function v(){document.removeEventListener("mousemove",p),document.removeEventListener("mouseup",v),k()}let x=null,y=0,f=null;function h(C){if(C.target.closest("button, input, select, a")||i.handleSelector&&!C.target.closest(i.handleSelector))return;const M=C.target.closest(n);if(!M||!o.contains(M)||i.excludeSelector&&M.matches(i.excludeSelector))return;f=M;const T=C.touches[0].clientY;y=T,x=setTimeout(()=>{x=null,f&&(navigator.vibrate&&navigator.vibrate(30),m(T,f),f.classList.add("touch-dragging"))},400)}function L(C){if(x){Math.abs(C.touches[0].clientY-y)>10&&(clearTimeout(x),x=null,f=null);return}l&&(C.preventDefault(),w(C.touches[0].clientY))}function S(){if(x){clearTimeout(x),x=null,f=null;return}l&&(l.classList.remove("touch-dragging"),k())}o.addEventListener("mousedown",E),o.addEventListener("touchstart",h,{passive:!0}),o.addEventListener("touchmove",L,{passive:!1}),o.addEventListener("touchend",S),o.addEventListener("touchcancel",S);const b={cleanup:()=>{o.removeEventListener("mousedown",E),o.removeEventListener("touchstart",h),o.removeEventListener("touchmove",L),o.removeEventListener("touchend",S),o.removeEventListener("touchcancel",S)},refresh:()=>{d=u()}};return Be.set(r,b),b}const Bt={enable:vn};window.dragSortModule=Bt;class Re{constructor(n="AI is processing",s="right",o="spinner"){this.animations={spinner:["|","/","-","\\"],wave:["▁▂▃","▂▃▄","▃▄▅","▄▅▆","▅▆▅","▆▅▄","▅▄▃","▄▃▂","▃▂▁"]},this.animation=o,this.frames=this.animations[o]||this.animations.spinner,this.message=n,this.style=s,this.isRunning=!1,this.currentFrame=0,this.intervalId=null,this.rafId=null,this.element=null}createElement(){if(this.animation==="sinewave")return this._createSineWaveElement();if(this.animation==="whirlpool")return this._createWhirlpoolElement();const n=document.createElement("span");return n.className="ai-spinner",n.style.cssText="font-family: monospace; white-space: pre;",this.element=n,this.updateDisplay(),n}_createSineWaveElement(){const n=document.createElement("span");n.className="ai-spinner ai-spinner-sinewave",n.style.cssText="font-family: monospace; white-space: pre; display: inline-flex; align-items: center; gap: 6px;";const s=document.createElement("canvas");s.width=50,s.height=18,s.style.cssText="display: inline-block; vertical-align: middle;";const o=document.createElement("span");return o.textContent=this.message,this._msgSpan=o,this.style==="left"?(n.appendChild(s),n.appendChild(o)):this.style==="right"?(n.appendChild(o),n.appendChild(s)):n.appendChild(o),this._canvas=s,this._ctx=s.getContext("2d"),this._waveT=0,this._wavePrev=performance.now(),this.element=n,n}_drawSineWave(){const n=this._ctx,s=this._canvas.width,o=this._canvas.height,r=o/2,i=7,l=2.5,a=3,c=s-2*a,d=.44,u=.4,g=2.5,m=performance.now(),w=(m-this._wavePrev)/1e3;this._wavePrev=m;const k=.5*l*2*Math.PI+this._waveT,E=(1+Math.sin(k))/2,p=u+(g-u)*Math.pow(E,1.3);this._waveT+=w*d*p*l*2*Math.PI,n.clearRect(0,0,s,o),n.beginPath();for(let f=0;f<=80;f++){const h=f/80,L=a+h*c,S=h*l*2*Math.PI+this._waveT,b=r+Math.sin(S)*i;f===0?n.moveTo(L,b):n.lineTo(L,b)}n.strokeStyle="rgba(156, 222, 242, 0.5)",n.lineWidth=1.5,n.stroke();const v=s/2,x=.5*l*2*Math.PI+this._waveT,y=r+Math.sin(x)*i;n.beginPath(),n.arc(v,y,1.5,0,Math.PI*2),n.fillStyle="rgba(156, 222, 242, 0.9)",n.fill(),this.isRunning&&(this.rafId=requestAnimationFrame(()=>this._drawSineWave()))}_createWhirlpoolElement(){const n=document.createElement("span");n.className="ai-spinner ai-spinner-whirlpool",n.style.cssText="font-family: monospace; white-space: pre; display: inline-flex; align-items: center; gap: 6px;";const s=this._wpSize||18,o=document.createElement("canvas");o.width=s,o.height=s,o.style.cssText="display: inline-block; vertical-align: middle;";const r=document.createElement("span");return r.textContent=this.message,this._msgSpan=r,this.style==="left"?(n.appendChild(o),n.appendChild(r)):(this.style==="right"&&n.appendChild(r),n.appendChild(o)),this._wpCanvas=o,this._wpCtx=o.getContext("2d"),this._wpFrame=60,this.element=n,n}_drawWhirlpool(){const n=this._wpCtx,s=this._wpCanvas.width,o=this._wpCanvas.height,r=s/2,i=o/2,l=Math.min(s,o)/2-1,a=s>30?3:s>20?2:1.5,c=4,d=.45,u=.08,g=12,m=50,w=this._wpFrame;if(!this._wpColors){const f=getComputedStyle(document.documentElement);this._wpColors={fg:f.getPropertyValue("--red").trim()||f.getPropertyValue("--fg").trim()||"#9cdef2",track:f.getPropertyValue("--border").trim()||"#355a66"}}const k=this._wpColors.fg,E=this._wpColors.track;function p(f,h){const L=l*(1-f),S=f*c*Math.PI*2+h;return{x:r+Math.cos(S)*L,y:i+Math.sin(S)*L}}n.clearRect(0,0,s,o),n.beginPath(),n.arc(r,i,l-a/2,0,Math.PI*2),n.strokeStyle=E,n.lineWidth=a,n.globalAlpha=.35,n.stroke(),n.globalAlpha=1;const v=w*.008%1;n.lineCap="round",n.lineJoin="round";for(let f=g-1;f>=0;f--){const h=(f+1)/g,L=Math.ceil(m*h),S=Math.pow(1-h,2)*.7;n.beginPath();let b=!1,C=-1;for(let M=0;M<=L;M++){const T=M/m;let B=v-T*d;B<0&&(B+=1),b&&C<.3&&B>.7&&(n.stroke(),n.beginPath(),b=!1);const I=p(B,w*u);b?n.lineTo(I.x,I.y):(n.moveTo(I.x,I.y),b=!0),C=B}n.strokeStyle=k,n.lineWidth=a*.8,n.globalAlpha=S,n.stroke()}const x=p(v,w*u);if(n.beginPath(),n.arc(x.x,x.y,Math.max(1,a*.45),0,Math.PI*2),n.fillStyle=k,n.globalAlpha=.9,n.fill(),n.globalAlpha=1,this._wpFrame++,!this.isRunning)return;const y=!!(this.element&&this.element.isConnected);y&&(this._wpWasConnected=!0),y||!this._wpWasConnected?this.rafId=requestAnimationFrame(()=>this._drawWhirlpool()):this.isRunning=!1}updateDisplay(){if(!this.element)return;const n=this.frames[this.currentFrame%this.frames.length];let s="";this.style==="left"?s=`${n} ${this.message}`:this.style==="right"?s=`${this.message} ${n}`:s=this.message,this.element.innerHTML=s}start(n=150){if(!this.isRunning){if(this.isRunning=!0,this.animation==="sinewave"){this._wavePrev=performance.now(),this._drawSineWave();return}if(this.animation==="whirlpool"){this._wpFrame=60,this._drawWhirlpool();return}this.currentFrame=0,this.intervalId=setInterval(()=>{this.currentFrame++,this.updateDisplay()},n)}}stop(){this.isRunning=!1,this.intervalId&&(clearInterval(this.intervalId),this.intervalId=null),this.rafId&&(cancelAnimationFrame(this.rafId),this.rafId=null)}updateMessage(n){this.message=n,(this.animation==="sinewave"||this.animation==="whirlpool")&&this._msgSpan?this._msgSpan.textContent=n:this.updateDisplay()}updateLabel(n){this.message=n,this._msgSpan?this._msgSpan.textContent=n:this.updateDisplay()}destroy(){this.stop(),this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element),this.element=null}}function wn(t,n="right",s="wave"){return new Re(t,n,s)}function bn(t=24){const n=new Re("","clean","whirlpool");n._wpSize=t;const s=n.createElement(),o=document.createElement("div");return o.className="spinner-whirlpool",o.style.cssText=`width:${t}px;height:${t}px;margin:8px auto;`,o.appendChild(s),n.start(),{element:o,stop:()=>n.stop(),destroy:()=>n.destroy()}}function xn(t="Loading…",n=16){const s=new Re("","clean","whirlpool");s._wpSize=n;const o=s.createElement(),r=document.createElement("div");r.className="lib-loading-row";const i=document.createElement("span");return i.textContent=t,r.appendChild(i),r.appendChild(o),s.start(),r}const _t={create:wn,createWhirlpool:bn,createLoadingRow:xn,Spinner:Re},Ht="odysseus-recent-colors",kn=12;let U=null,ue=null,ce=0,me=100,re=100,xe=null,de=null;function Me(t,n,s){return Math.max(n,Math.min(s,t))}function En(t){if(t=String(t||"").replace("#",""),t.length===3&&(t=t.split("").map(s=>s+s).join("")),!/^[0-9a-f]{6}$/i.test(t))return{r:0,g:0,b:0};const n=parseInt(t,16);return{r:n>>16&255,g:n>>8&255,b:n&255}}function Cn(t,n,s){return"#"+[t,n,s].map(o=>Math.round(Me(o,0,255)).toString(16).padStart(2,"0")).join("")}function Ln(t,n,s){t/=255,n/=255,s/=255;const o=Math.max(t,n,s),r=Math.min(t,n,s),i=o-r;let l;const a=o===0?0:i/o,c=o;return i===0?l=0:o===t?l=(n-s)/i+(n<s?6:0):o===n?l=(s-t)/i+2:l=(t-n)/i+4,{h:l*60,s:a*100,v:c*100}}function Sn(t,n,s){t=(t%360+360)%360,t/=60,n/=100,s/=100;const o=Math.floor(t),r=t-o,i=s*(1-n),l=s*(1-r*n),a=s*(1-(1-r)*n);let c,d,u;switch(o%6){case 0:c=s,d=a,u=i;break;case 1:c=l,d=s,u=i;break;case 2:c=i,d=s,u=a;break;case 3:c=i,d=l,u=s;break;case 4:c=a,d=i,u=s;break;case 5:c=s,d=i,u=l;break}return{r:Math.round(c*255),g:Math.round(d*255),b:Math.round(u*255)}}function we(t,n,s){const{r:o,g:r,b:i}=Sn(t,n,s);return Cn(o,r,i)}function Mn(t){const{r:n,g:s,b:o}=En(t);return Ln(n,s,o)}function Ot(){try{return JSON.parse(localStorage.getItem(Ht)||"[]")}catch{return[]}}function In(t){if(!/^#[0-9a-f]{6}$/i.test(t))return;let n=Ot().filter(s=>s.toLowerCase()!==t.toLowerCase());n.unshift(t.toLowerCase()),n=n.slice(0,kn);try{localStorage.setItem(Ht,JSON.stringify(n))}catch{}}function Pn(){return[{hex:we(ce+180,me,re),label:"Complement"},{hex:we(ce+30,me,re),label:"Analogous +30°"},{hex:we(ce-30,me,re),label:"Analogous -30°"},{hex:we(ce+150,me,re),label:"Split-complement"},{hex:we(ce,me,Me(re>50?re-30:re+30,10,95)),label:"Tone shift"}]}function Tn(){const t=document.createElement("div");return t.className="cp-popover",t.innerHTML=`
|
|
1
|
+
import{i as F,l as Z,b as ie,c as cn,r as dn,W as un}from"./index-CsVy3eZm.js";function gn(){let t=document.getElementById("ge-vendor-toast-host");return t||(t=document.createElement("div"),t.id="ge-vendor-toast-host",t.style.cssText="position:fixed;left:50%;bottom:24px;transform:translateX(-50%);z-index:2147483000;display:flex;flex-direction:column;gap:8px;align-items:center;pointer-events:none;",document.body.appendChild(t)),t}function Tt(t,{error:n=!1,duration:s=2600}={}){if(typeof document>"u"||!t)return;const o=gn(),r=document.createElement("div");r.textContent=String(t),r.style.cssText=`pointer-events:auto;max-width:480px;padding:8px 14px;border-radius:4px;font-family:var(--font-body,system-ui);font-size:13px;line-height:1.4;box-shadow:0 4px 18px rgba(0,0,0,0.45);opacity:0;transition:opacity .15s;background:var(--color-bg-elevated,#1a1a1a);color:${n?"var(--color-danger,#e06c75)":"var(--color-fg,#9cdef2)"};border:1px solid ${n?"var(--color-danger,#e06c75)":"var(--color-border-bright,#355a66)"};`,o.appendChild(r),requestAnimationFrame(()=>{r.style.opacity="1"}),setTimeout(()=>{r.style.opacity="0",setTimeout(()=>r.remove(),200)},typeof s=="number"?s:2600)}function pn(t,n){Tt(t,typeof n=="number"?{duration:n}:n||{})}function mn(t){Tt(t,{error:!0,duration:5e3})}function hn(t){return typeof window>"u"||typeof window.confirm!="function"?Promise.resolve(!0):Promise.resolve(window.confirm(String(t)))}function fn(t,{defaultValue:n=""}={}){return typeof window>"u"||typeof window.prompt!="function"?Promise.resolve(null):Promise.resolve(window.prompt(String(t),n))}const W={showToast:pn,showError:mn,styledConfirm:hn,styledPrompt:fn},yn={getJSON(t,n=null){try{const s=localStorage.getItem(t);return s==null?n:JSON.parse(s)}catch{return n}},setJSON(t,n){try{localStorage.setItem(t,JSON.stringify(n))}catch{}},remove(t){try{localStorage.removeItem(t)}catch{}}},Be=new Map;function vn(t,n,s={}){const o=document.getElementById(t);if(!o){console.warn("[DragSort] container not found:",t);return}const r=s.instanceKey||t;Be.has(r)&&(Be.get(r).cleanup(),Be.delete(r));const i={onReorder:s.onReorder||null,handleSelector:s.handleSelector||null,excludeSelector:s.excludeSelector||null,storageKey:s.storageKey||null};let l=null,a=null,c=0,d=[];function u(){let C=Array.from(o.querySelectorAll(n));return i.excludeSelector&&(C=C.filter(M=>!M.matches(i.excludeSelector))),C}function g(C){const M=document.createElement("div");return M.className="drag-placeholder",M.style.height=C+"px",M.style.margin="4px 0",M}function m(C,M){const T=M.getBoundingClientRect(),B=o.getBoundingClientRect(),I=(T.top-B.top)/F()+o.scrollTop,_=(T.left-B.left)/F();c=C-T.top,d=u(),l=M,getComputedStyle(o).position==="static"&&(o.style.position="relative"),a=g(T.height/F()),M.parentNode.insertBefore(a,M),M.classList.add("dragging"),Object.assign(M.style,{position:"absolute",width:T.width/F()+"px",left:_+"px",top:I+"px",zIndex:"9999",pointerEvents:"none",margin:"0",boxSizing:"border-box",transition:"none"})}function w(C){if(!l)return;const M=o.getBoundingClientRect(),T=(C-c-M.top)/F()+o.scrollTop;l.style.top=T+"px";const B=d.filter(O=>O!==l),I=l.getBoundingClientRect(),_=I.top+I.height/2;let P=null;for(const O of B){const A=O.getBoundingClientRect(),D=A.top+A.height/2;if(_<D){P=O;break}}if(P)a.nextElementSibling!==P&&o.insertBefore(a,P);else if(B.length>0){const O=B[B.length-1];a!==O.nextElementSibling&&o.insertBefore(a,O.nextElementSibling)}}function k(){if(!l)return;const C=a.getBoundingClientRect(),M=o.getBoundingClientRect(),T=(C.top-M.top)/F()+o.scrollTop;l.style.transition="top 0.08s ease-out",l.style.top=T+"px",setTimeout(()=>{if(a.parentNode.insertBefore(l,a),a.remove(),l.classList.remove("dragging"),l.style.cssText="",i.storageKey){const B=u().map(I=>I.dataset.sessionId||I.dataset.modelId||I.dataset.filePath).filter(Boolean);B.length&&yn.setJSON(i.storageKey,B)}i.onReorder&&i.onReorder(u()),l=null,a=null,d=[]},80)}function E(C){if(C.button!==0||i.handleSelector&&!C.target.closest(i.handleSelector))return;const M=C.target.closest(n);!M||!o.contains(M)||i.excludeSelector&&M.matches(i.excludeSelector)||(C.preventDefault(),C.stopPropagation(),m(C.clientY,M),document.addEventListener("mousemove",p),document.addEventListener("mouseup",v))}function p(C){w(C.clientY)}function v(){document.removeEventListener("mousemove",p),document.removeEventListener("mouseup",v),k()}let x=null,y=0,f=null;function h(C){if(C.target.closest("button, input, select, a")||i.handleSelector&&!C.target.closest(i.handleSelector))return;const M=C.target.closest(n);if(!M||!o.contains(M)||i.excludeSelector&&M.matches(i.excludeSelector))return;f=M;const T=C.touches[0].clientY;y=T,x=setTimeout(()=>{x=null,f&&(navigator.vibrate&&navigator.vibrate(30),m(T,f),f.classList.add("touch-dragging"))},400)}function L(C){if(x){Math.abs(C.touches[0].clientY-y)>10&&(clearTimeout(x),x=null,f=null);return}l&&(C.preventDefault(),w(C.touches[0].clientY))}function S(){if(x){clearTimeout(x),x=null,f=null;return}l&&(l.classList.remove("touch-dragging"),k())}o.addEventListener("mousedown",E),o.addEventListener("touchstart",h,{passive:!0}),o.addEventListener("touchmove",L,{passive:!1}),o.addEventListener("touchend",S),o.addEventListener("touchcancel",S);const b={cleanup:()=>{o.removeEventListener("mousedown",E),o.removeEventListener("touchstart",h),o.removeEventListener("touchmove",L),o.removeEventListener("touchend",S),o.removeEventListener("touchcancel",S)},refresh:()=>{d=u()}};return Be.set(r,b),b}const Bt={enable:vn};window.dragSortModule=Bt;class Re{constructor(n="AI is processing",s="right",o="spinner"){this.animations={spinner:["|","/","-","\\"],wave:["▁▂▃","▂▃▄","▃▄▅","▄▅▆","▅▆▅","▆▅▄","▅▄▃","▄▃▂","▃▂▁"]},this.animation=o,this.frames=this.animations[o]||this.animations.spinner,this.message=n,this.style=s,this.isRunning=!1,this.currentFrame=0,this.intervalId=null,this.rafId=null,this.element=null}createElement(){if(this.animation==="sinewave")return this._createSineWaveElement();if(this.animation==="whirlpool")return this._createWhirlpoolElement();const n=document.createElement("span");return n.className="ai-spinner",n.style.cssText="font-family: monospace; white-space: pre;",this.element=n,this.updateDisplay(),n}_createSineWaveElement(){const n=document.createElement("span");n.className="ai-spinner ai-spinner-sinewave",n.style.cssText="font-family: monospace; white-space: pre; display: inline-flex; align-items: center; gap: 6px;";const s=document.createElement("canvas");s.width=50,s.height=18,s.style.cssText="display: inline-block; vertical-align: middle;";const o=document.createElement("span");return o.textContent=this.message,this._msgSpan=o,this.style==="left"?(n.appendChild(s),n.appendChild(o)):this.style==="right"?(n.appendChild(o),n.appendChild(s)):n.appendChild(o),this._canvas=s,this._ctx=s.getContext("2d"),this._waveT=0,this._wavePrev=performance.now(),this.element=n,n}_drawSineWave(){const n=this._ctx,s=this._canvas.width,o=this._canvas.height,r=o/2,i=7,l=2.5,a=3,c=s-2*a,d=.44,u=.4,g=2.5,m=performance.now(),w=(m-this._wavePrev)/1e3;this._wavePrev=m;const k=.5*l*2*Math.PI+this._waveT,E=(1+Math.sin(k))/2,p=u+(g-u)*Math.pow(E,1.3);this._waveT+=w*d*p*l*2*Math.PI,n.clearRect(0,0,s,o),n.beginPath();for(let f=0;f<=80;f++){const h=f/80,L=a+h*c,S=h*l*2*Math.PI+this._waveT,b=r+Math.sin(S)*i;f===0?n.moveTo(L,b):n.lineTo(L,b)}n.strokeStyle="rgba(156, 222, 242, 0.5)",n.lineWidth=1.5,n.stroke();const v=s/2,x=.5*l*2*Math.PI+this._waveT,y=r+Math.sin(x)*i;n.beginPath(),n.arc(v,y,1.5,0,Math.PI*2),n.fillStyle="rgba(156, 222, 242, 0.9)",n.fill(),this.isRunning&&(this.rafId=requestAnimationFrame(()=>this._drawSineWave()))}_createWhirlpoolElement(){const n=document.createElement("span");n.className="ai-spinner ai-spinner-whirlpool",n.style.cssText="font-family: monospace; white-space: pre; display: inline-flex; align-items: center; gap: 6px;";const s=this._wpSize||18,o=document.createElement("canvas");o.width=s,o.height=s,o.style.cssText="display: inline-block; vertical-align: middle;";const r=document.createElement("span");return r.textContent=this.message,this._msgSpan=r,this.style==="left"?(n.appendChild(o),n.appendChild(r)):(this.style==="right"&&n.appendChild(r),n.appendChild(o)),this._wpCanvas=o,this._wpCtx=o.getContext("2d"),this._wpFrame=60,this.element=n,n}_drawWhirlpool(){const n=this._wpCtx,s=this._wpCanvas.width,o=this._wpCanvas.height,r=s/2,i=o/2,l=Math.min(s,o)/2-1,a=s>30?3:s>20?2:1.5,c=4,d=.45,u=.08,g=12,m=50,w=this._wpFrame;if(!this._wpColors){const f=getComputedStyle(document.documentElement);this._wpColors={fg:f.getPropertyValue("--red").trim()||f.getPropertyValue("--fg").trim()||"#9cdef2",track:f.getPropertyValue("--border").trim()||"#355a66"}}const k=this._wpColors.fg,E=this._wpColors.track;function p(f,h){const L=l*(1-f),S=f*c*Math.PI*2+h;return{x:r+Math.cos(S)*L,y:i+Math.sin(S)*L}}n.clearRect(0,0,s,o),n.beginPath(),n.arc(r,i,l-a/2,0,Math.PI*2),n.strokeStyle=E,n.lineWidth=a,n.globalAlpha=.35,n.stroke(),n.globalAlpha=1;const v=w*.008%1;n.lineCap="round",n.lineJoin="round";for(let f=g-1;f>=0;f--){const h=(f+1)/g,L=Math.ceil(m*h),S=Math.pow(1-h,2)*.7;n.beginPath();let b=!1,C=-1;for(let M=0;M<=L;M++){const T=M/m;let B=v-T*d;B<0&&(B+=1),b&&C<.3&&B>.7&&(n.stroke(),n.beginPath(),b=!1);const I=p(B,w*u);b?n.lineTo(I.x,I.y):(n.moveTo(I.x,I.y),b=!0),C=B}n.strokeStyle=k,n.lineWidth=a*.8,n.globalAlpha=S,n.stroke()}const x=p(v,w*u);if(n.beginPath(),n.arc(x.x,x.y,Math.max(1,a*.45),0,Math.PI*2),n.fillStyle=k,n.globalAlpha=.9,n.fill(),n.globalAlpha=1,this._wpFrame++,!this.isRunning)return;const y=!!(this.element&&this.element.isConnected);y&&(this._wpWasConnected=!0),y||!this._wpWasConnected?this.rafId=requestAnimationFrame(()=>this._drawWhirlpool()):this.isRunning=!1}updateDisplay(){if(!this.element)return;const n=this.frames[this.currentFrame%this.frames.length];let s="";this.style==="left"?s=`${n} ${this.message}`:this.style==="right"?s=`${this.message} ${n}`:s=this.message,this.element.innerHTML=s}start(n=150){if(!this.isRunning){if(this.isRunning=!0,this.animation==="sinewave"){this._wavePrev=performance.now(),this._drawSineWave();return}if(this.animation==="whirlpool"){this._wpFrame=60,this._drawWhirlpool();return}this.currentFrame=0,this.intervalId=setInterval(()=>{this.currentFrame++,this.updateDisplay()},n)}}stop(){this.isRunning=!1,this.intervalId&&(clearInterval(this.intervalId),this.intervalId=null),this.rafId&&(cancelAnimationFrame(this.rafId),this.rafId=null)}updateMessage(n){this.message=n,(this.animation==="sinewave"||this.animation==="whirlpool")&&this._msgSpan?this._msgSpan.textContent=n:this.updateDisplay()}updateLabel(n){this.message=n,this._msgSpan?this._msgSpan.textContent=n:this.updateDisplay()}destroy(){this.stop(),this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element),this.element=null}}function wn(t,n="right",s="wave"){return new Re(t,n,s)}function bn(t=24){const n=new Re("","clean","whirlpool");n._wpSize=t;const s=n.createElement(),o=document.createElement("div");return o.className="spinner-whirlpool",o.style.cssText=`width:${t}px;height:${t}px;margin:8px auto;`,o.appendChild(s),n.start(),{element:o,stop:()=>n.stop(),destroy:()=>n.destroy()}}function xn(t="Loading…",n=16){const s=new Re("","clean","whirlpool");s._wpSize=n;const o=s.createElement(),r=document.createElement("div");r.className="lib-loading-row";const i=document.createElement("span");return i.textContent=t,r.appendChild(i),r.appendChild(o),s.start(),r}const _t={create:wn,createWhirlpool:bn,createLoadingRow:xn,Spinner:Re},Ht="odysseus-recent-colors",kn=12;let U=null,ue=null,ce=0,me=100,re=100,xe=null,de=null;function Me(t,n,s){return Math.max(n,Math.min(s,t))}function En(t){if(t=String(t||"").replace("#",""),t.length===3&&(t=t.split("").map(s=>s+s).join("")),!/^[0-9a-f]{6}$/i.test(t))return{r:0,g:0,b:0};const n=parseInt(t,16);return{r:n>>16&255,g:n>>8&255,b:n&255}}function Cn(t,n,s){return"#"+[t,n,s].map(o=>Math.round(Me(o,0,255)).toString(16).padStart(2,"0")).join("")}function Ln(t,n,s){t/=255,n/=255,s/=255;const o=Math.max(t,n,s),r=Math.min(t,n,s),i=o-r;let l;const a=o===0?0:i/o,c=o;return i===0?l=0:o===t?l=(n-s)/i+(n<s?6:0):o===n?l=(s-t)/i+2:l=(t-n)/i+4,{h:l*60,s:a*100,v:c*100}}function Sn(t,n,s){t=(t%360+360)%360,t/=60,n/=100,s/=100;const o=Math.floor(t),r=t-o,i=s*(1-n),l=s*(1-r*n),a=s*(1-(1-r)*n);let c,d,u;switch(o%6){case 0:c=s,d=a,u=i;break;case 1:c=l,d=s,u=i;break;case 2:c=i,d=s,u=a;break;case 3:c=i,d=l,u=s;break;case 4:c=a,d=i,u=s;break;case 5:c=s,d=i,u=l;break}return{r:Math.round(c*255),g:Math.round(d*255),b:Math.round(u*255)}}function we(t,n,s){const{r:o,g:r,b:i}=Sn(t,n,s);return Cn(o,r,i)}function Mn(t){const{r:n,g:s,b:o}=En(t);return Ln(n,s,o)}function Ot(){try{return JSON.parse(localStorage.getItem(Ht)||"[]")}catch{return[]}}function In(t){if(!/^#[0-9a-f]{6}$/i.test(t))return;let n=Ot().filter(s=>s.toLowerCase()!==t.toLowerCase());n.unshift(t.toLowerCase()),n=n.slice(0,kn);try{localStorage.setItem(Ht,JSON.stringify(n))}catch{}}function Pn(){return[{hex:we(ce+180,me,re),label:"Complement"},{hex:we(ce+30,me,re),label:"Analogous +30°"},{hex:we(ce-30,me,re),label:"Analogous -30°"},{hex:we(ce+150,me,re),label:"Split-complement"},{hex:we(ce,me,Me(re>50?re-30:re+30,10,95)),label:"Tone shift"}]}function Tn(){const t=document.createElement("div");return t.className="cp-popover",t.innerHTML=`
|
|
2
2
|
<div class="cp-sl" data-drag="sl">
|
|
3
3
|
<div class="cp-sl-white"></div>
|
|
4
4
|
<div class="cp-sl-black"></div>
|