@nervekit/desktop 0.42.0 → 0.43.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/THIRD-PARTY-LICENSES.txt +210 -16
- package/dist/builtin/configure-nerve/SKILL.md +19 -10
- package/dist/builtin/configure-nerve/reference/agent-preferences.md +9 -0
- package/dist/builtin/configure-nerve/reference/agent-profiles.md +2 -6
- package/dist/builtin/configure-nerve/reference/agents-md.md +1 -1
- package/dist/builtin/configure-nerve/reference/extensions/api/extension-api/artifacts.d.ts +10 -0
- package/dist/builtin/configure-nerve/reference/extensions/api/extension-api/text.d.ts +4 -0
- package/dist/builtin/configure-nerve/reference/extensions/api/extension-sdk/components/ui-kit/collections/match-terms.d.ts +8 -0
- package/dist/builtin/configure-nerve/reference/extensions/api/extension-sdk/components/ui-kit/components/composites/callout/callout.svelte.d.ts +1 -1
- package/dist/builtin/configure-nerve/reference/extensions/api/extension-sdk/components/ui-kit/display/status.d.ts +3 -0
- package/dist/builtin/configure-nerve/{guide/extensions.md → reference/extensions/build.md} +4 -4
- package/dist/builtin/configure-nerve/reference/extensions/manifest.md +1 -1
- package/dist/builtin/configure-nerve/reference/extensions/overview.md +2 -2
- package/dist/builtin/configure-nerve/{scripts → reference/extensions/scripts}/lib.mjs +2 -2
- package/dist/builtin/configure-nerve/reference/extensions/scripts/nerve-version.json +1 -0
- package/dist/builtin/configure-nerve/reference/extensions/sharing.md +2 -2
- package/dist/builtin/configure-nerve/reference/extensions/themes.md +1 -1
- package/dist/builtin/configure-nerve/reference/permissions.md +2 -2
- package/dist/builtin/configure-nerve/reference/prompt-suggestions.md +2 -2
- package/dist/builtin/configure-nerve/reference/skills.md +9 -9
- package/dist/{chunk-QFK2SWD2.js → chunk-34SYO66C.js} +11 -11
- package/dist/{chunk-6ZS7TA6E.js → chunk-35O66NLU.js} +2 -2
- package/dist/{chunk-7FSH3ABG.js → chunk-57A5HFXL.js} +4 -4
- package/dist/{chunk-EF7ZZKA3.js → chunk-5K7U6UXA.js} +3 -3
- package/dist/{chunk-WIQEPAUG.js → chunk-5S5O3V5G.js} +11 -10
- package/dist/{chunk-MTHLTFG4.js → chunk-5VLAJMQQ.js} +97 -105
- package/dist/{chunk-MI6L5CEA.js → chunk-5WMHGTVL.js} +2 -2
- package/dist/{chunk-NVVW3MWJ.js → chunk-6IJORN3N.js} +9 -9
- package/dist/{chunk-OMCM3MHS.js → chunk-7GSR2AW5.js} +10 -9
- package/dist/{chunk-WG62RHZ2.js → chunk-7MJT6LHU.js} +14 -4
- package/dist/{chunk-DDBE2VLT.js → chunk-A3OFIREH.js} +2 -2
- package/dist/{chunk-ZGWXLG5X.js → chunk-BNBEFI2M.js} +66 -76
- package/dist/{chunk-7RPHIJT3.js → chunk-C7L4BBGD.js} +4 -4
- package/dist/{chunk-2ICPO4UM.js → chunk-CZXRZEV4.js} +16 -14
- package/dist/{chunk-H5CAHDII.js → chunk-EBDLSTDH.js} +51414 -50054
- package/dist/{chunk-PVPJAGWR.js → chunk-EOZLBW5E.js} +2 -2
- package/dist/{chunk-U5KGV63C.js → chunk-EZJH7ED5.js} +1 -1
- package/dist/{chunk-RL52LSTV.js → chunk-F3X2KHP4.js} +1 -1
- package/dist/{chunk-Q3C7TQ2M.js → chunk-FNWUCFVO.js} +3 -3
- package/dist/chunk-FQVIQOV5.js +163 -0
- package/dist/{chunk-LP4APBBQ.js → chunk-FZ7U3GZI.js} +1 -1
- package/dist/{chunk-MBMZEIOG.js → chunk-G5SVCJCT.js} +38 -51
- package/dist/{chunk-62DQXVPO.js → chunk-HDTS5AS5.js} +26 -7
- package/dist/{chunk-376GN4PB.js → chunk-HKBJTS2Z.js} +173 -79
- package/dist/{chunk-WC5HHPPM.js → chunk-HRJJKZGM.js} +1 -1
- package/dist/chunk-I7OMW4RJ.js +87 -0
- package/dist/{chunk-TQURLRHD.js → chunk-IL67WXRA.js} +1 -1
- package/dist/{chunk-QDEH776O.js → chunk-KBBBQCYV.js} +179 -20
- package/dist/{chunk-KUFIFCB4.js → chunk-KDGUQYYY.js} +1 -1
- package/dist/{chunk-IRRR3PWN.js → chunk-KQD4DYEP.js} +68 -35
- package/dist/{chunk-JBEWFFOK.js → chunk-LIIGX2XX.js} +1 -1
- package/dist/{chunk-IVBMHEPK.js → chunk-LX33FMTS.js} +23 -36
- package/dist/{chunk-HPINJGBO.js → chunk-METH7J6V.js} +13 -12
- package/dist/{chunk-N6BUYKF3.js → chunk-MLE6MKPY.js} +7 -7
- package/dist/{chunk-3CZXUKLG.js → chunk-MRDORR5Z.js} +8 -1
- package/dist/{chunk-6IHXVT5H.js → chunk-NSISYP6D.js} +1 -1
- package/dist/{chunk-P72Y5ZBH.js → chunk-O2IYZBX6.js} +15 -26
- package/dist/{chunk-TSAUBRRU.js → chunk-P7GPT4XL.js} +1 -1
- package/dist/{chunk-F5XCJ6UV.js → chunk-PA37GH3T.js} +33 -58
- package/dist/{chunk-BACYVEE6.js → chunk-QC6DSC4D.js} +2 -2
- package/dist/{chunk-ZVH6EB7S.js → chunk-QKRWXA5W.js} +1 -1
- package/dist/{chunk-D6C32XHS.js → chunk-QQPLW3ZX.js} +17359 -12634
- package/dist/chunk-QQPLW3ZX.js.LEGAL.txt +59 -0
- package/dist/{chunk-N4OXAS3A.js → chunk-R22FWLXU.js} +1 -1
- package/dist/{chunk-7HGFEQSD.js → chunk-R7UJIPJA.js} +5 -5
- package/dist/{chunk-NW3DH7IK.js → chunk-RAHBWFWV.js} +8457 -2726
- package/dist/{chunk-O5JHHRFN.js → chunk-RMV6IZ2C.js} +32 -116
- package/dist/{chunk-Z6AY5VOZ.js → chunk-RQIN5JYO.js} +9 -6
- package/dist/{chunk-Q5E4ZL2R.js → chunk-S2UG5HD6.js} +1 -1
- package/dist/{chunk-U3TEC52G.js → chunk-S637DPAG.js} +1 -1
- package/dist/chunk-S6KM4DOB.js +37 -0
- package/dist/{chunk-MPDKZVHT.js → chunk-SVX46YXY.js} +1 -3
- package/dist/{chunk-XTUSLUQ7.js → chunk-TLDULBKV.js} +70 -24
- package/dist/{chunk-L5WGVYXM.js → chunk-UFE7IMKQ.js} +2 -2
- package/dist/{chunk-ZUWBEV2O.js → chunk-UQHUYEFW.js} +1 -1
- package/dist/{chunk-XM27UVWN.js → chunk-V7WOX4O7.js} +3 -3
- package/dist/{chunk-W7LEYYFH.js → chunk-WJAHXDL4.js} +41 -32
- package/dist/{chunk-6GUJQURI.js → chunk-WLTE6OJM.js} +2 -2
- package/dist/{chunk-BG2KGLIA.js → chunk-WMZAJ7XA.js} +2 -2
- package/dist/chunk-WOLKTL4F.js +32 -0
- package/dist/{chunk-DHIDYKXJ.js → chunk-XIVWNWL7.js} +1778 -1701
- package/dist/{chunk-EUT45AKW.js → chunk-YODV42KQ.js} +25 -32
- package/dist/{chunk-FCAIYPDJ.js → chunk-ZFFWWZIA.js} +2 -2
- package/dist/{chunk-O6FDXE54.js → chunk-ZVUAJ7UV.js} +25 -36
- package/dist/daemon.js +15 -15
- package/dist/ext-frame/base.css +1 -1
- package/dist/extension-assets/atlassian/docs/confluence-writing.md +5 -5
- package/dist/extension-assets/diagram/bundle.js +3 -0
- package/dist/git-isolated-reader-helper.js +1 -1
- package/dist/main.js +57 -128
- package/dist/quick-script-docs/runtime/artifacts.md +11 -0
- package/dist/quick-script-docs/runtime/documents.md +21 -12
- package/dist/quick-script-docs/runtime/editing.md +44 -0
- package/dist/quick-script-docs/runtime/images.md +1 -1
- package/dist/sandbox-libraries/credential-runtime.js +3 -0
- package/dist/sandbox-libraries/extension-runtime.js +3 -0
- package/dist/web/assets/{AsyncBashCenterHost-DldW4utc.js → AsyncBashCenterHost-Dcx6zVCo.js} +1 -1
- package/dist/web/assets/{ConversationListItem-CCaGnyA1.js → ConversationListItem-DALhochc.js} +3 -3
- package/dist/web/assets/{ConversationsWorkbenchPanel-DLM3saY5.js → ConversationsWorkbenchPanel-ChtoTW2H.js} +1 -1
- package/dist/web/assets/{DiscoverCenterHost-DVNL8uZQ.js → DiscoverCenterHost-Bju7ypB-.js} +1 -1
- package/dist/web/assets/{ExtensionPageCenterHost-CHKg6c3M.js → ExtensionPageCenterHost-BO-5q4j_.js} +1 -1
- package/dist/web/assets/FileCenterComposedHost-BxLlLMBI.js +1 -0
- package/dist/web/assets/{FilesWorkbenchPanel-BxjUf50f.js → FilesWorkbenchPanel-jyqwIQAe.js} +4 -4
- package/dist/web/assets/{GitDiffCenterHost-DmtKqHer.js → GitDiffCenterHost-D8i3Jq9A.js} +1 -1
- package/dist/web/assets/{GitWorkbenchPanel-BmyMyvL8.js → GitWorkbenchPanel-CtZPJKqJ.js} +1 -1
- package/dist/web/assets/{LaunchCenterHost-1xrIDf73.js → LaunchCenterHost-CSy1io6s.js} +1 -1
- package/dist/web/assets/{LaunchConfigurationNotice-BfRdIOv0.js → LaunchConfigurationNotice-DugBa05c.js} +1 -1
- package/dist/web/assets/{LaunchesWorkbenchPanel-BhCyWFHf.js → LaunchesWorkbenchPanel-CNqGG_AP.js} +1 -1
- package/dist/web/assets/{LogStream-CibF_jgC.js → LogStream-DfJ4LiCv.js} +1 -1
- package/dist/web/assets/{LogsCenterHost-CdqD6zH8.js → LogsCenterHost-xynA0TWK.js} +1 -1
- package/dist/web/assets/{MermaidCenterHost-BjwJLU-2.js → MermaidCenterHost-kAV1ocvE.js} +1 -1
- package/dist/web/assets/MobileFilesBody-CiwIT8Vf.js +1 -0
- package/dist/web/assets/MobileFilesHost-DvQOpQFH.js +1 -0
- package/dist/web/assets/MobileLaunchOutputHost-pFJgIV1_.js +1 -0
- package/dist/web/assets/MobileLaunchesHost-0VtdW0x8.js +2 -0
- package/dist/web/assets/{MobileNoteEditorHost-lfAeMVH9.js → MobileNoteEditorHost-DSuZ0mU5.js} +1 -1
- package/dist/web/assets/{MobileNotesHost-DOi0goPc.js → MobileNotesHost-Lg699XCv.js} +2 -2
- package/dist/web/assets/MobileSettingsHost-Bv1P74ck.js +2 -0
- package/dist/web/assets/{MobileSettingsPageHost-CtpUzfVG.js → MobileSettingsPageHost-DudFqhZC.js} +1 -1
- package/dist/web/assets/{NotesWorkbenchPanel-CsbMYHAw.js → NotesWorkbenchPanel-C8sctQWR.js} +1 -1
- package/dist/web/assets/{PullRequestCenterHost-B22Ua7bA.js → PullRequestCenterHost-BWJ-exw1.js} +1 -1
- package/dist/web/assets/{PullRequestsWorkbenchPanel-DOIHvZ6H.js → PullRequestsWorkbenchPanel-8Fb0-hW3.js} +1 -1
- package/dist/web/assets/SearchWorkbenchPanel-B35YmwtL.js +1 -0
- package/dist/web/assets/SettingsCenterHost-BuiirrId.js +1 -0
- package/dist/web/assets/SystemPromptCenterHost-BqKV92Ew.js +2 -0
- package/dist/web/assets/{ThemePreviewPicker-B_DTUsui.js → ThemePreviewPicker-C6J0H91i.js} +1 -1
- package/dist/web/assets/adapters-C5HB2cBr.js +1 -0
- package/dist/web/assets/agent-profiles.svelte-DjdXLJnE.js +1 -0
- package/dist/web/assets/appearance.svelte-fB4gKc-X.js +1 -0
- package/dist/web/assets/center-tabs.svelte-8YpJhA1o.js +2 -0
- package/dist/web/assets/{channel-CxF1CmEY.js → channel-3Wv484LF.js} +2 -2
- package/dist/web/assets/{client-CVZRorEj.js → client-CjIsgPXA.js} +1 -1
- package/dist/web/assets/code-BDTZAlQg.js +7 -0
- package/dist/web/assets/conversation-activity-CZJfUGoL.js +1 -0
- package/dist/web/assets/conversation-connection-Dm9Zr6Yb.js +1 -0
- package/dist/web/assets/discover-Cwv6pB0p.js +4 -0
- package/dist/web/assets/{dist-DZN4bTV3.js → dist-BB4fpXjy.js} +1 -1
- package/dist/web/assets/{dist-DkQMSgZ5.js → dist-BBlCv_-z.js} +1 -1
- package/dist/web/assets/{dist-HTsJAisd.js → dist-BENZZeCy.js} +1 -1
- package/dist/web/assets/{dist-BWsookwC.js → dist-BqcaQXZ-.js} +1 -1
- package/dist/web/assets/{dist-CDM0qUmO.js → dist-CIK1TmOX.js} +1 -1
- package/dist/web/assets/{dist-EmwCDpCc.js → dist-DUPZ8ZaX.js} +1 -1
- package/dist/web/assets/{dist-BVmTdBxj.js → dist-DoKRJEPu.js} +1 -1
- package/dist/web/assets/{easing-DfoPn4-z.js → easing-B6dSt4eu.js} +1 -1
- package/dist/web/assets/empty-CtUlV5QU.js +1 -0
- package/dist/web/assets/eraser-B8qFMviR.js +1 -0
- package/dist/web/assets/{extension-themes.svelte-BAce41Wm.js → extension-themes.svelte-D2TAUtUA.js} +2 -2
- package/dist/web/assets/{file-tabs.svelte-CaZRhyw0.js → file-tabs.svelte-DxL_vZZv.js} +2 -2
- package/dist/web/assets/{files-dFQS0tcX.css → files-N9JiAfxr.css} +1 -1
- package/dist/web/assets/files-vq7_WbHL.js +156 -0
- package/dist/web/assets/filesystem-DiVFVMn3.js +1 -0
- package/dist/web/assets/floating-toolbar-Cqtfs8M7.js +1 -0
- package/dist/web/assets/{git-store.svelte-DkeLA_WZ.js → git-store.svelte-D9S4P9gI.js} +1 -1
- package/dist/web/assets/{icon-action-efe9ZEWq.js → icon-action-C9h3TdBz.js} +1 -1
- package/dist/web/assets/index-B8XniJoh.js +165 -0
- package/dist/web/assets/index-DC_ohlBG.css +1 -0
- package/dist/web/assets/{launches-ZxeZFPI8.js → launches-CmB4KShL.js} +5 -5
- package/dist/web/assets/launches.api-C4z0obJK.js +1 -0
- package/dist/web/assets/{launches.svelte-QFDoCgug.js → launches.svelte-D2bNAphM.js} +2 -2
- package/dist/web/assets/{logs.api-gZ2mVC9q.js → logs.api-BtGxtYFi.js} +1 -1
- package/dist/web/assets/{maintenance-state.svelte-xMmmI9yr.js → maintenance-state.svelte-BusQWeCR.js} +2 -2
- package/dist/web/assets/menu-icons-DLuZ586C.js +1 -0
- package/dist/web/assets/{mermaid-ACpEwsfj.js → mermaid-DL5xfcqL.js} +1 -1
- package/dist/web/assets/mobile-launch-rows-DR6V5AUH.js +1 -0
- package/dist/web/assets/page-tabs.svelte-Cc5F8hMx.js +4 -0
- package/dist/web/assets/panel-BW0llJiU.js +1 -0
- package/dist/web/assets/popover-panel-SA7quIc1.js +4 -0
- package/dist/web/assets/{pr-view-loader.svelte-CZfxwzwL.js → pr-view-loader.svelte-eOmDNaGf.js} +1 -1
- package/dist/web/assets/progress-BZbo8ynI.js +1 -0
- package/dist/web/assets/{scratch-notes-state.svelte-rBeSOn4h.js → scratch-notes-state.svelte-B4NySamQ.js} +1 -1
- package/dist/web/assets/{scratch-notes.api-Co80EGtL.js → scratch-notes.api-BMBs2yoU.js} +1 -1
- package/dist/web/assets/settings-Cu_0wNkX.js +1 -0
- package/dist/web/assets/settings-DTw27q0i.js +1 -0
- package/dist/web/assets/settings-scope-Bz4U5ImL.js +35 -0
- package/dist/web/assets/shell-BiZy0tcZ.js +1 -0
- package/dist/web/assets/{shell-layout.svelte-D5u4i1UJ.js → shell-layout.svelte-Dyx_fbRn.js} +2 -2
- package/dist/web/assets/{lock-open-BBTCOUg5.js → tag-Bp1l7psd.js} +1 -1
- package/dist/web/assets/time-egBWJGDu.js +1 -0
- package/dist/web/assets/views-DIrSFdZB.js +2 -0
- package/dist/web/assets/{workbench-connection-Gsy9bIuP.js → workbench-connection-BpvUZMVX.js} +1 -1
- package/dist/web/assets/workspace-actions.svelte-DE0mQsY6.js +1 -0
- package/dist/web/assets/{workspace-selectors.svelte-D-EQR_-Z.js → workspace-selectors.svelte-B90FdGfV.js} +2 -2
- package/dist/web/assets/{workspace-CUoFFOwJ.js → workspace-uXAUsF3x.js} +1 -1
- package/dist/web/index.html +47 -47
- package/dist/web/sw.js +1 -1
- package/dist/worker.js +14 -14
- package/package.json +7 -7
- package/dist/builtin/configure-nerve/guide/collaboration.md +0 -15
- package/dist/builtin/configure-nerve/scripts/nerve-version.json +0 -1
- package/dist/chunk-D6C32XHS.js.LEGAL.txt +0 -25
- package/dist/chunk-RJR7DJJK.js +0 -32
- package/dist/chunk-UVRULOOP.js +0 -35
- package/dist/quick-script-docs/runtime/files.md +0 -11
- package/dist/web/assets/FileCenterComposedHost-kxFWeFmP.js +0 -1
- package/dist/web/assets/MobileFilesBody-4bLT2m0j.js +0 -1
- package/dist/web/assets/MobileFilesHost-X_0r4Z16.js +0 -1
- package/dist/web/assets/MobileLaunchOutputHost-BEchaBtD.js +0 -1
- package/dist/web/assets/MobileLaunchesHost-S7Z3DySI.js +0 -2
- package/dist/web/assets/MobileSettingsHost-94-sABuO.js +0 -2
- package/dist/web/assets/SearchWorkbenchPanel-CKccBrNr.js +0 -1
- package/dist/web/assets/SettingsCenterHost-BM-xIy5S.js +0 -1
- package/dist/web/assets/SystemPromptCenterHost-VL4DXNId.js +0 -1
- package/dist/web/assets/adapters-CbIIxNp9.js +0 -1
- package/dist/web/assets/agent-profiles.svelte-8LAIYKmb.js +0 -1
- package/dist/web/assets/appearance.svelte-CLR_fMAx.js +0 -1
- package/dist/web/assets/center-tabs.svelte-BCriw5Eu.js +0 -1
- package/dist/web/assets/code-H_8FkG35.js +0 -7
- package/dist/web/assets/conversation-activity-Dl7udunb.js +0 -1
- package/dist/web/assets/conversation-connection-B226pY9T.js +0 -1
- package/dist/web/assets/discover-DTlfL84I.js +0 -4
- package/dist/web/assets/empty-B8eEKvqc.js +0 -1
- package/dist/web/assets/file-code-CMYYNL9l.js +0 -1
- package/dist/web/assets/files-eAvb-uRC.js +0 -48
- package/dist/web/assets/filesystem-CmkTuQNl.js +0 -1
- package/dist/web/assets/floating-toolbar-BwJ2tdsN.js +0 -1
- package/dist/web/assets/index-CH1Mvlxk.css +0 -1
- package/dist/web/assets/index-DNfABG4x.js +0 -172
- package/dist/web/assets/launches.api-BEsX6AKZ.js +0 -1
- package/dist/web/assets/menu-icons-C24r3TCF.js +0 -1
- package/dist/web/assets/mobile-launch-rows-Ci7ldwx6.js +0 -1
- package/dist/web/assets/page-tabs.svelte-VZp38ac7.js +0 -4
- package/dist/web/assets/panel-DEG1zXHj.js +0 -1
- package/dist/web/assets/popover-panel-B1cUdhY5.js +0 -5
- package/dist/web/assets/progress-D2Cb6vK_.js +0 -1
- package/dist/web/assets/settings-B_ed0eye.js +0 -1
- package/dist/web/assets/settings-Dzj6Az_d.js +0 -1
- package/dist/web/assets/settings-scope-BjQBgG9v.js +0 -33
- package/dist/web/assets/shell-CbR1KanT.js +0 -1
- package/dist/web/assets/time-DqcZ_PFK.js +0 -1
- package/dist/web/assets/views-D4ociG21.js +0 -2
- package/dist/web/assets/workspace-actions.svelte-BMp3D2e1.js +0 -1
- /package/dist/builtin/configure-nerve/{scripts → reference/extensions/scripts}/create-extension.mjs +0 -0
- /package/dist/builtin/configure-nerve/{scripts → reference/extensions/scripts}/install-extension.mjs +0 -0
- /package/dist/builtin/configure-nerve/{scripts → reference/extensions/scripts}/upgrade-extension.mjs +0 -0
- /package/dist/builtin/configure-nerve/{reference/writing-for-agents.md → writing-for-agents.md} +0 -0
- /package/dist/{chunk-H5CAHDII.js.LEGAL.txt → chunk-EBDLSTDH.js.LEGAL.txt} +0 -0
package/dist/main.js
CHANGED
|
@@ -14,11 +14,15 @@ import {
|
|
|
14
14
|
CREDENTIAL_ROTATION_HEADER,
|
|
15
15
|
DAEMON_LEASE_CONFLICT_CODE,
|
|
16
16
|
LOCAL_TOKEN_COOKIE_NAME,
|
|
17
|
+
appendLogLine,
|
|
17
18
|
parseProjectRelativePath,
|
|
19
|
+
performanceLogFilename,
|
|
18
20
|
readCurrentSettingsForBootstrap,
|
|
19
21
|
resolveApplicationConfiguration,
|
|
20
|
-
|
|
21
|
-
|
|
22
|
+
serializeCrashError,
|
|
23
|
+
version,
|
|
24
|
+
writeCrashReportSync
|
|
25
|
+
} from "./chunk-EBDLSTDH.js";
|
|
22
26
|
import "./chunk-KKPRPUSK.js";
|
|
23
27
|
import "./chunk-RGDXDX7B.js";
|
|
24
28
|
import "./chunk-OQC3F6JA.js";
|
|
@@ -30,8 +34,9 @@ import "./chunk-JYWXPSUY.js";
|
|
|
30
34
|
import {
|
|
31
35
|
MIGRATION_METADATA,
|
|
32
36
|
MIN_DAEMON_MAX_OLD_SPACE_MB,
|
|
37
|
+
SerialQueue,
|
|
38
|
+
atomicWriteFile,
|
|
33
39
|
createId,
|
|
34
|
-
daemonCrashReportSchema,
|
|
35
40
|
daemonFileSchema,
|
|
36
41
|
defaultSettings,
|
|
37
42
|
homeAdmissionFailureKind,
|
|
@@ -41,21 +46,22 @@ import {
|
|
|
41
46
|
resolveDataDir,
|
|
42
47
|
serverHealthSchema,
|
|
43
48
|
settingsSchema,
|
|
49
|
+
sleep,
|
|
44
50
|
storagePaths
|
|
45
|
-
} from "./chunk-
|
|
46
|
-
import "./chunk-
|
|
47
|
-
import "./chunk-
|
|
48
|
-
import "./chunk-
|
|
49
|
-
import "./chunk-
|
|
50
|
-
import "./chunk-
|
|
51
|
+
} from "./chunk-XIVWNWL7.js";
|
|
52
|
+
import "./chunk-HDTS5AS5.js";
|
|
53
|
+
import "./chunk-WOLKTL4F.js";
|
|
54
|
+
import "./chunk-F3X2KHP4.js";
|
|
55
|
+
import "./chunk-QKRWXA5W.js";
|
|
56
|
+
import "./chunk-ZFFWWZIA.js";
|
|
51
57
|
import "./chunk-54GJIXAU.js";
|
|
52
|
-
import "./chunk-
|
|
53
|
-
import "./chunk-
|
|
54
|
-
import "./chunk-
|
|
55
|
-
import "./chunk-
|
|
56
|
-
import "./chunk-
|
|
57
|
-
import "./chunk-
|
|
58
|
-
import "./chunk-
|
|
58
|
+
import "./chunk-5VLAJMQQ.js";
|
|
59
|
+
import "./chunk-LIIGX2XX.js";
|
|
60
|
+
import "./chunk-WMZAJ7XA.js";
|
|
61
|
+
import "./chunk-WJAHXDL4.js";
|
|
62
|
+
import "./chunk-A3OFIREH.js";
|
|
63
|
+
import "./chunk-FNWUCFVO.js";
|
|
64
|
+
import "./chunk-EZJH7ED5.js";
|
|
59
65
|
import "./chunk-CWESUMYQ.js";
|
|
60
66
|
|
|
61
67
|
// packages/desktop-shell/dist/main.js
|
|
@@ -328,7 +334,7 @@ function createDesktopConfigurationController(options) {
|
|
|
328
334
|
}
|
|
329
335
|
|
|
330
336
|
// packages/desktop-shell/dist/daemon/composition.js
|
|
331
|
-
import { join as
|
|
337
|
+
import { join as join5 } from "node:path";
|
|
332
338
|
|
|
333
339
|
// packages/desktop-shell/dist/daemon/profile.js
|
|
334
340
|
import { homedir } from "node:os";
|
|
@@ -1332,12 +1338,11 @@ function monitorExistingDaemon(existing, paths, readinessTimeoutMs, ports) {
|
|
|
1332
1338
|
}
|
|
1333
1339
|
|
|
1334
1340
|
// packages/desktop-shell/dist/daemon/adapters/remote-credential-store.js
|
|
1335
|
-
import {
|
|
1336
|
-
import { dirname as dirname2 } from "node:path";
|
|
1341
|
+
import { readFile } from "node:fs/promises";
|
|
1337
1342
|
function createRemoteCredentialStore(options) {
|
|
1338
1343
|
const { filePath, cipher, logger } = options;
|
|
1339
1344
|
const memory = /* @__PURE__ */ new Map();
|
|
1340
|
-
|
|
1345
|
+
const writes = new SerialQueue();
|
|
1341
1346
|
async function readFileEntries() {
|
|
1342
1347
|
try {
|
|
1343
1348
|
const parsed = JSON.parse(await readFile(filePath, "utf8"));
|
|
@@ -1347,16 +1352,14 @@ function createRemoteCredentialStore(options) {
|
|
|
1347
1352
|
}
|
|
1348
1353
|
}
|
|
1349
1354
|
function persist(update) {
|
|
1350
|
-
|
|
1355
|
+
return writes.run(async () => {
|
|
1351
1356
|
const entries = await readFileEntries();
|
|
1352
1357
|
update(entries);
|
|
1353
|
-
await
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1358
|
+
await atomicWriteFile(filePath, JSON.stringify(entries), {
|
|
1359
|
+
mode: 384,
|
|
1360
|
+
durability: "directory"
|
|
1361
|
+
});
|
|
1357
1362
|
});
|
|
1358
|
-
writeChain = next.catch(() => void 0);
|
|
1359
|
-
return next;
|
|
1360
1363
|
}
|
|
1361
1364
|
return {
|
|
1362
1365
|
async load(origin) {
|
|
@@ -1403,70 +1406,6 @@ import { access } from "node:fs/promises";
|
|
|
1403
1406
|
import { hostname } from "node:os";
|
|
1404
1407
|
import { fileURLToPath } from "node:url";
|
|
1405
1408
|
|
|
1406
|
-
// packages/desktop-shell/dist/crash-reports.js
|
|
1407
|
-
import { mkdirSync, writeFileSync } from "node:fs";
|
|
1408
|
-
import { join as join4 } from "node:path";
|
|
1409
|
-
function writeCrashReportSync(dataDir, input) {
|
|
1410
|
-
try {
|
|
1411
|
-
const ts = (/* @__PURE__ */ new Date()).toISOString();
|
|
1412
|
-
const report = daemonCrashReportSchema.parse({
|
|
1413
|
-
id: createId("crash"),
|
|
1414
|
-
ts,
|
|
1415
|
-
dataDir,
|
|
1416
|
-
runtime: {
|
|
1417
|
-
node: process.version,
|
|
1418
|
-
platform: process.platform,
|
|
1419
|
-
arch: process.arch
|
|
1420
|
-
},
|
|
1421
|
-
...input
|
|
1422
|
-
});
|
|
1423
|
-
const dir = join4(dataDir, "crashes");
|
|
1424
|
-
mkdirSync(dir, { recursive: true, mode: 448 });
|
|
1425
|
-
const safeTs = ts.replace(/[:.]/g, "-");
|
|
1426
|
-
const path = join4(dir, `${safeTs}-${report.id}.json`);
|
|
1427
|
-
writeFileSync(path, `${JSON.stringify(report, null, 2)}
|
|
1428
|
-
`, {
|
|
1429
|
-
encoding: "utf8",
|
|
1430
|
-
mode: 384
|
|
1431
|
-
});
|
|
1432
|
-
return path;
|
|
1433
|
-
} catch (error) {
|
|
1434
|
-
console.error("[nerve] failed to write crash report", error);
|
|
1435
|
-
return void 0;
|
|
1436
|
-
}
|
|
1437
|
-
}
|
|
1438
|
-
function serializeCrashError(error) {
|
|
1439
|
-
if (error instanceof Error) {
|
|
1440
|
-
return { name: error.name, message: error.message, stack: error.stack };
|
|
1441
|
-
}
|
|
1442
|
-
if (typeof error === "string")
|
|
1443
|
-
return { message: error };
|
|
1444
|
-
if (error && typeof error === "object") {
|
|
1445
|
-
const pretty = safeStringify2(error);
|
|
1446
|
-
return {
|
|
1447
|
-
name: typeof error.name === "string" ? error.name : void 0,
|
|
1448
|
-
message: typeof error.message === "string" ? error.message : pretty.split("\n", 1)[0],
|
|
1449
|
-
stack: typeof error.stack === "string" ? error.stack : pretty
|
|
1450
|
-
};
|
|
1451
|
-
}
|
|
1452
|
-
return { message: String(error) };
|
|
1453
|
-
}
|
|
1454
|
-
function safeStringify2(value) {
|
|
1455
|
-
try {
|
|
1456
|
-
const seen = /* @__PURE__ */ new WeakSet();
|
|
1457
|
-
return JSON.stringify(value, (_key, val) => {
|
|
1458
|
-
if (val && typeof val === "object") {
|
|
1459
|
-
if (seen.has(val))
|
|
1460
|
-
return "[Circular]";
|
|
1461
|
-
seen.add(val);
|
|
1462
|
-
}
|
|
1463
|
-
return val;
|
|
1464
|
-
}, 2);
|
|
1465
|
-
} catch {
|
|
1466
|
-
return String(value);
|
|
1467
|
-
}
|
|
1468
|
-
}
|
|
1469
|
-
|
|
1470
1409
|
// packages/desktop-shell/dist/daemon/adapters/daemon-access.js
|
|
1471
1410
|
var REQUEST_TIMEOUT_MS = 1e4;
|
|
1472
1411
|
function createDaemonAccessClient(request = fetch) {
|
|
@@ -1629,7 +1568,7 @@ import { spawn } from "node:child_process";
|
|
|
1629
1568
|
|
|
1630
1569
|
// packages/desktop-shell/dist/daemon/adapters/diagnostic-report.js
|
|
1631
1570
|
import { readdir, stat } from "node:fs/promises";
|
|
1632
|
-
import { join as
|
|
1571
|
+
import { join as join4 } from "node:path";
|
|
1633
1572
|
async function captureDiagnosticReport(child, dataDir) {
|
|
1634
1573
|
const startedAt = Date.now();
|
|
1635
1574
|
if (process.platform === "win32")
|
|
@@ -1641,7 +1580,7 @@ async function captureDiagnosticReport(child, dataDir) {
|
|
|
1641
1580
|
elapsedMs: 0,
|
|
1642
1581
|
error: "Daemon PID is unavailable"
|
|
1643
1582
|
};
|
|
1644
|
-
const directory =
|
|
1583
|
+
const directory = join4(dataDir, "crashes");
|
|
1645
1584
|
const before = new Set(await readdir(directory).catch(() => []));
|
|
1646
1585
|
if (!child.kill("SIGUSR2"))
|
|
1647
1586
|
return {
|
|
@@ -1652,12 +1591,12 @@ async function captureDiagnosticReport(child, dataDir) {
|
|
|
1652
1591
|
const pidMarker = `.${pid}.`;
|
|
1653
1592
|
let candidate;
|
|
1654
1593
|
while (Date.now() - startedAt < DAEMON_DIAGNOSTIC_TIMEOUT_MS) {
|
|
1655
|
-
await
|
|
1594
|
+
await sleep(DAEMON_DIAGNOSTIC_POLL_INTERVAL_MS);
|
|
1656
1595
|
const names = await readdir(directory).catch(() => []);
|
|
1657
1596
|
const name = names.find((value) => !before.has(value) && value.startsWith("report.") && value.includes(pidMarker) && value.endsWith(".json"));
|
|
1658
1597
|
if (!name)
|
|
1659
1598
|
continue;
|
|
1660
|
-
const path =
|
|
1599
|
+
const path = join4(directory, name);
|
|
1661
1600
|
const info = await stat(path).catch(() => void 0);
|
|
1662
1601
|
if (!info?.isFile())
|
|
1663
1602
|
continue;
|
|
@@ -1759,7 +1698,7 @@ function createNodeDaemonPorts(credentials) {
|
|
|
1759
1698
|
},
|
|
1760
1699
|
scheduler: {
|
|
1761
1700
|
now: () => Date.now(),
|
|
1762
|
-
delay: (ms) =>
|
|
1701
|
+
delay: (ms) => sleep(ms),
|
|
1763
1702
|
every: (ms, callback) => {
|
|
1764
1703
|
const timer = setInterval(callback, ms);
|
|
1765
1704
|
timer.unref?.();
|
|
@@ -1802,7 +1741,7 @@ function ensureDaemon(options = {}) {
|
|
|
1802
1741
|
const credentials = createRemoteCredentialStore({
|
|
1803
1742
|
// Electron profile data, not NERVE_HOME: the credential belongs to this
|
|
1804
1743
|
// desktop install, not to the daemon's data directory.
|
|
1805
|
-
filePath:
|
|
1744
|
+
filePath: join5(app.getPath("userData"), "remote-credentials.json"),
|
|
1806
1745
|
cipher: {
|
|
1807
1746
|
isAvailable: () => safeStorage.isEncryptionAvailable(),
|
|
1808
1747
|
encrypt: (plain) => safeStorage.encryptString(plain),
|
|
@@ -1960,7 +1899,7 @@ function registerDirectoryDialogIpc() {
|
|
|
1960
1899
|
|
|
1961
1900
|
// packages/desktop-shell/dist/ipc/project-entry-path.js
|
|
1962
1901
|
import { realpath } from "node:fs/promises";
|
|
1963
|
-
import { basename, dirname as
|
|
1902
|
+
import { basename, dirname as dirname2, isAbsolute as isAbsolute2, join as join6, posix, relative, sep, win32 } from "node:path";
|
|
1964
1903
|
function parseProjectEntryTarget(input) {
|
|
1965
1904
|
if (!input || typeof input !== "object")
|
|
1966
1905
|
throw new Error("Project entry target is required.");
|
|
@@ -1990,7 +1929,7 @@ function resolveProjectEntryPath(root, segments, platform = process.platform) {
|
|
|
1990
1929
|
async function resolveContainedProjectEntryPath(root, segments, options) {
|
|
1991
1930
|
const target = resolveProjectEntryPath(root, segments);
|
|
1992
1931
|
const realRoot = await realpath(root);
|
|
1993
|
-
const real = options.followLeaf ? await realpath(target) :
|
|
1932
|
+
const real = options.followLeaf ? await realpath(target) : join6(await realpath(dirname2(target)), basename(target));
|
|
1994
1933
|
const fromRoot = relative(realRoot, real);
|
|
1995
1934
|
if (fromRoot === ".." || fromRoot.startsWith(`..${sep}`) || isAbsolute2(fromRoot))
|
|
1996
1935
|
throw new Error("Project entry path escapes the project root.");
|
|
@@ -2225,29 +2164,19 @@ function registerDesktopIpc(options) {
|
|
|
2225
2164
|
}
|
|
2226
2165
|
|
|
2227
2166
|
// packages/desktop-shell/dist/performance/performance-monitor.js
|
|
2228
|
-
import {
|
|
2229
|
-
import { dirname as dirname4, join as join8 } from "node:path";
|
|
2167
|
+
import { join as join7 } from "node:path";
|
|
2230
2168
|
var SAMPLE_INTERVAL_MS = 1e4;
|
|
2231
|
-
async function appendJsonLine(path, line) {
|
|
2232
|
-
await mkdir3(dirname4(path), { recursive: true });
|
|
2233
|
-
await appendFile2(path, line, "utf8");
|
|
2234
|
-
}
|
|
2235
|
-
var SAFE_SESSION_ID = /^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/;
|
|
2236
|
-
function performanceLogFilename(sessionId, source, now, pid) {
|
|
2237
|
-
const safeSessionId = SAFE_SESSION_ID.test(sessionId ?? "") ? sessionId : `${now.toISOString().replace(/[-:.]/g, "")}-${source}-${Math.max(0, Math.trunc(pid))}`;
|
|
2238
|
-
return `performance-${safeSessionId}.jsonl`;
|
|
2239
|
-
}
|
|
2240
2169
|
function kilobytesToBytes(value) {
|
|
2241
2170
|
return value === void 0 ? void 0 : value * 1024;
|
|
2242
2171
|
}
|
|
2243
2172
|
function installDesktopPerformanceMonitor(options) {
|
|
2244
2173
|
if (!options.enabled)
|
|
2245
2174
|
return { stop: () => void 0 };
|
|
2246
|
-
const append = options.append ??
|
|
2175
|
+
const append = options.append ?? appendLogLine;
|
|
2247
2176
|
const now = options.now ?? (() => /* @__PURE__ */ new Date());
|
|
2248
2177
|
const createInterval = options.setInterval ?? setInterval;
|
|
2249
2178
|
const destroyInterval = options.clearInterval ?? clearInterval;
|
|
2250
|
-
const path =
|
|
2179
|
+
const path = join7(options.dataDir, "logs", performanceLogFilename(options.sessionId, "desktop", now(), options.pid ?? process.pid));
|
|
2251
2180
|
let stopped = false;
|
|
2252
2181
|
let writing = false;
|
|
2253
2182
|
let warned = false;
|
|
@@ -2450,7 +2379,7 @@ function headerValue(headers, name) {
|
|
|
2450
2379
|
|
|
2451
2380
|
// packages/desktop-shell/dist/window/preload-paths.js
|
|
2452
2381
|
import { existsSync } from "node:fs";
|
|
2453
|
-
import { dirname as
|
|
2382
|
+
import { dirname as dirname3, join as join8 } from "node:path";
|
|
2454
2383
|
import { fileURLToPath as fileURLToPath2 } from "node:url";
|
|
2455
2384
|
|
|
2456
2385
|
// packages/desktop-shell/dist/window/desktop-asset-names.js
|
|
@@ -2467,9 +2396,9 @@ function trayIconAssetSegments(platform, shouldUseDarkColors) {
|
|
|
2467
2396
|
|
|
2468
2397
|
// packages/desktop-shell/dist/window/preload-paths.js
|
|
2469
2398
|
function resolvePackageRoot() {
|
|
2470
|
-
let directory =
|
|
2471
|
-
while (!existsSync(
|
|
2472
|
-
const parent =
|
|
2399
|
+
let directory = dirname3(fileURLToPath2(import.meta.url));
|
|
2400
|
+
while (!existsSync(join8(directory, "package.json"))) {
|
|
2401
|
+
const parent = dirname3(directory);
|
|
2473
2402
|
if (parent === directory)
|
|
2474
2403
|
throw new Error("Could not locate the desktop package root.");
|
|
2475
2404
|
directory = parent;
|
|
@@ -2477,7 +2406,7 @@ function resolvePackageRoot() {
|
|
|
2477
2406
|
return directory;
|
|
2478
2407
|
}
|
|
2479
2408
|
function resolvePreloadPath() {
|
|
2480
|
-
return
|
|
2409
|
+
return join8(resolvePackageRoot(), "dist", "preload.cjs");
|
|
2481
2410
|
}
|
|
2482
2411
|
function resolveAppIconPath() {
|
|
2483
2412
|
return resolveDesktopAssetPath(...appIconAssetSegments(process.platform));
|
|
@@ -2486,7 +2415,7 @@ function resolveTrayIconPath() {
|
|
|
2486
2415
|
return resolveDesktopAssetPath(...trayIconAssetSegments(process.platform, nativeTheme.shouldUseDarkColors));
|
|
2487
2416
|
}
|
|
2488
2417
|
function resolveDesktopAssetPath(...segments) {
|
|
2489
|
-
return
|
|
2418
|
+
return join8(resolvePackageRoot(), ...segments);
|
|
2490
2419
|
}
|
|
2491
2420
|
|
|
2492
2421
|
// packages/desktop-shell/dist/window/gpu-process.js
|
|
@@ -2612,8 +2541,8 @@ function createTrayIcon() {
|
|
|
2612
2541
|
}
|
|
2613
2542
|
|
|
2614
2543
|
// packages/desktop-shell/dist/window/window-appearance.js
|
|
2615
|
-
import { mkdirSync
|
|
2616
|
-
import { dirname as
|
|
2544
|
+
import { mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
2545
|
+
import { dirname as dirname4, join as join9 } from "node:path";
|
|
2617
2546
|
var WINDOW_APPEARANCE_FILE = "window-appearance.json";
|
|
2618
2547
|
var DEFAULT_WINDOW_APPEARANCE = {
|
|
2619
2548
|
background: "#272521",
|
|
@@ -2632,13 +2561,13 @@ function parseWindowAppearance(value) {
|
|
|
2632
2561
|
return { background: background.toLowerCase(), dark };
|
|
2633
2562
|
}
|
|
2634
2563
|
function windowAppearanceFilePath(userDataDir) {
|
|
2635
|
-
return
|
|
2564
|
+
return join9(userDataDir, WINDOW_APPEARANCE_FILE);
|
|
2636
2565
|
}
|
|
2637
2566
|
var nodeFiles = {
|
|
2638
2567
|
read: (path) => readFileSync(path, "utf8"),
|
|
2639
2568
|
write: (path, contents) => {
|
|
2640
|
-
|
|
2641
|
-
|
|
2569
|
+
mkdirSync(dirname4(path), { recursive: true });
|
|
2570
|
+
writeFileSync(path, contents);
|
|
2642
2571
|
}
|
|
2643
2572
|
};
|
|
2644
2573
|
function readWindowAppearance(path, files = nodeFiles) {
|
|
@@ -3025,8 +2954,8 @@ function openExternally(rawUrl) {
|
|
|
3025
2954
|
}
|
|
3026
2955
|
|
|
3027
2956
|
// packages/desktop-shell/dist/app/desktop-runtime.js
|
|
3028
|
-
import { appendFile as
|
|
3029
|
-
import { dirname as
|
|
2957
|
+
import { appendFile as appendFile2, mkdir as mkdir2 } from "node:fs/promises";
|
|
2958
|
+
import { dirname as dirname5, join as join10 } from "node:path";
|
|
3030
2959
|
|
|
3031
2960
|
// packages/desktop-shell/dist/app/runtime-recovery.js
|
|
3032
2961
|
async function startRunRuntime(start) {
|
|
@@ -3931,9 +3860,9 @@ var DesktopRuntime = class {
|
|
|
3931
3860
|
if (desktopOptions2.mode === "remote")
|
|
3932
3861
|
return;
|
|
3933
3862
|
try {
|
|
3934
|
-
const path =
|
|
3935
|
-
await
|
|
3936
|
-
await
|
|
3863
|
+
const path = join10(desktopDataDir2, "logs", "startup.jsonl");
|
|
3864
|
+
await mkdir2(dirname5(path), { recursive: true });
|
|
3865
|
+
await appendFile2(path, `${JSON.stringify({ ts: (/* @__PURE__ */ new Date()).toISOString(), ...record })}
|
|
3937
3866
|
`, "utf8");
|
|
3938
3867
|
} catch {
|
|
3939
3868
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Artifacts and handles
|
|
2
|
+
|
|
3
|
+
Artifacts are this conversation's own files: script results, downloads (`web.fetch` files arrive as `artifact:web-N.ext`) and generated documents. They live in `$NERVE_HOME/data/conversations/<id>/quick-script/`, are shared by all scripts of the conversation and kept across runs. Each result prints `Artifacts: … in <folder>`, so the Read/Edit tools can open `<folder>/<name>` directly. Artifacts need no permission.
|
|
4
|
+
|
|
5
|
+
`artifacts.*` takes a name or an `artifact:<name>` handle. Names: 1-128 letters (any language), digits, spaces, `.`, `_`, `-`; no folders, no leading dot. A missing artifact lists the existing ones. Workspace files go through `files.*`, checked like the read, write and edit tools.
|
|
6
|
+
|
|
7
|
+
A **handle** is `artifact:<name>` or a workspace path. Methods that take any file (`image(…)`, attachments, page `attachments`) accept both, also across runs.
|
|
8
|
+
|
|
9
|
+
Limits: `artifacts.read`/`artifacts.write` and `files.read`/`files.write` {{limit:files.read}}; attachment upload/download and binary `request()` responses {{limit:attachments}} (streamed between disk and the network, never held in memory or the sandbox).
|
|
10
|
+
|
|
11
|
+
`artifacts.edit({ name, edits })` takes the edits of `files.edit`: `sdk.docs("files/editing")`. Office documents and spreadsheets: `sdk.docs("libraries/documents")`. Image transforms: `sdk.docs("image/chain")`.
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
# Office documents and spreadsheets
|
|
2
2
|
|
|
3
|
-
Libraries load when the script mentions them. QuickJS has no JIT, so keep data to tens of thousands of rows.
|
|
3
|
+
Libraries load when the script mentions them. QuickJS has no JIT, so keep data to tens of thousands of rows. Workspace files go through `files.*`, generated ones through `artifacts.*` (`sdk.docs("artifacts/handles")`).
|
|
4
4
|
|
|
5
5
|
## Excel and CSV
|
|
6
6
|
|
|
7
|
-
`XLSX` (SheetJS CE 0.20) and `Papa` (Papa Parse 5). Read bytes with `{ type: "array" }`; write with `XLSX.write(wb, { type: "array", bookType: "xlsx" })` straight into `
|
|
7
|
+
`XLSX` (SheetJS CE 0.20) and `Papa` (Papa Parse 5). Read bytes with `{ type: "array" }`; write with `XLSX.write(wb, { type: "array", bookType: "xlsx" })` straight into `artifacts.write`.
|
|
8
8
|
|
|
9
9
|
```ts
|
|
10
|
-
const wb = XLSX.read(await files.read("
|
|
10
|
+
const wb = XLSX.read(await files.read({ path: "budget.xlsx", as: "bytes" }), {
|
|
11
11
|
type: "array",
|
|
12
12
|
});
|
|
13
13
|
const rows = XLSX.utils.sheet_to_json(wb.Sheets[wb.SheetNames[0]]);
|
|
@@ -16,11 +16,14 @@ const rows = XLSX.utils.sheet_to_json(wb.Sheets[wb.SheetNames[0]]);
|
|
|
16
16
|
```ts
|
|
17
17
|
const book = XLSX.utils.book_new();
|
|
18
18
|
XLSX.utils.book_append_sheet(book, XLSX.utils.json_to_sheet(rows), "Sprint");
|
|
19
|
-
const xlsx = await
|
|
20
|
-
"sprint.xlsx",
|
|
21
|
-
XLSX.write(book, { type: "array", bookType: "xlsx" }),
|
|
22
|
-
);
|
|
23
|
-
const csv = await
|
|
19
|
+
const xlsx = await artifacts.write({
|
|
20
|
+
name: "sprint.xlsx",
|
|
21
|
+
data: XLSX.write(book, { type: "array", bookType: "xlsx" }),
|
|
22
|
+
});
|
|
23
|
+
const csv = await artifacts.write({
|
|
24
|
+
name: "sprint.csv",
|
|
25
|
+
data: Papa.unparse(rows),
|
|
26
|
+
});
|
|
24
27
|
// The handles go to any SDK method that takes a file.
|
|
25
28
|
console.log(xlsx, csv);
|
|
26
29
|
```
|
|
@@ -33,8 +36,11 @@ Write with `docx`, read with `mammoth`. Pack with `"uint8array"` (never `toBuffe
|
|
|
33
36
|
const doc = new docx.Document({
|
|
34
37
|
sections: [{ children: [new docx.Paragraph("Hello")] }],
|
|
35
38
|
});
|
|
36
|
-
await
|
|
37
|
-
|
|
39
|
+
await artifacts.write({
|
|
40
|
+
name: "hello.docx",
|
|
41
|
+
data: await docx.Packer.pack(doc, "uint8array"),
|
|
42
|
+
});
|
|
43
|
+
const bytes = await artifacts.read({ name: "hello.docx", as: "bytes" });
|
|
38
44
|
const text = (await mammoth.extractRawText(bytes)).value; // or convertToMarkdown(bytes)
|
|
39
45
|
```
|
|
40
46
|
|
|
@@ -47,8 +53,11 @@ const deck = new PptxGenJS();
|
|
|
47
53
|
const slide = deck.addSlide();
|
|
48
54
|
slide.addText("Q3 review", { x: 1, y: 1, w: 6, h: 1, fontSize: 32 });
|
|
49
55
|
slide.addNotes("Say hi");
|
|
50
|
-
await
|
|
56
|
+
await artifacts.write({
|
|
57
|
+
name: "deck.pptx",
|
|
58
|
+
data: await deck.write({ outputType: "uint8array" }),
|
|
59
|
+
});
|
|
51
60
|
const { slides } = await pptxText(
|
|
52
|
-
await
|
|
61
|
+
await artifacts.read({ name: "deck.pptx", as: "bytes" }),
|
|
53
62
|
); // { index, text, notes }[]
|
|
54
63
|
```
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Editing files
|
|
2
|
+
|
|
3
|
+
`files.edit` changes workspace files; `artifacts.edit({ name, edits, dryRun? })` takes the same edits for one artifact. Format and test afterwards with bash.
|
|
4
|
+
|
|
5
|
+
```js
|
|
6
|
+
files.edit({
|
|
7
|
+
glob: "src/**/*.ts", // or path; an edit may name its own
|
|
8
|
+
edits: [
|
|
9
|
+
{ pattern: /\bfetchUser\b/g, replacement: "loadUser", count: 6 },
|
|
10
|
+
{ oldText: "console.log(", newText: "logger.debug(", all: true },
|
|
11
|
+
{
|
|
12
|
+
path: "src/config.ts",
|
|
13
|
+
from: "// legacy start",
|
|
14
|
+
through: "// legacy end\n",
|
|
15
|
+
},
|
|
16
|
+
],
|
|
17
|
+
});
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
| Edit | Effect | Must match |
|
|
21
|
+
| ------------------------------------------------- | ------------------------------------------------------ | ------------------------------- |
|
|
22
|
+
| `{ oldText, newText }` | Replaces the exact text | once |
|
|
23
|
+
| `{ oldText, newText, all: true, count? }` | Replaces every occurrence | at least once, or `count` times |
|
|
24
|
+
| `{ pattern, replacement, count? }` | Regex; `$1`, `$<name>` as in `String.replace` | once; with a `g` flag as above |
|
|
25
|
+
| `{ from, through, newText? }` | Replaces from `from` through the next `through` | `from` once |
|
|
26
|
+
| `{ from, upTo, newText? }` | Replaces from `from` up to the next `upTo`, keeping it | `from` once |
|
|
27
|
+
| `{ insertBefore, text }`, `{ insertAfter, text }` | Inserts next to the anchor | anchor once |
|
|
28
|
+
|
|
29
|
+
- **Order.** A file's edits apply in list order, each to the result of the previous one. (The Edit tool matches every edit against the original text.)
|
|
30
|
+
- **All or nothing.** Every edit is checked before anything is written; a mismatch fails the call with the edit's index and file, and nothing changes. A `glob` edit skips files without a match but must match at least once in total (or `count` times).
|
|
31
|
+
- **Range edits** delete the range when `newText` is omitted.
|
|
32
|
+
- **Result.** It prints as one line per file, for the first 20 files: lines added and removed, and each edit's matches (`src/api.ts +3 -3: [0] 2, [1] 1`). `result.files` has all of them. `result.diff` is the unified diff, cut at {{limit:edit.diff}} with the rest in `diffFile`. The run's result also states each edit's total matches.
|
|
33
|
+
- **Dry run.** `dryRun: true` checks everything, writes nothing, and prints the diff after the per-file lines.
|
|
34
|
+
- **Limits.** 500 files and {{limit:edit.bytes}} per call; binary files are refused; line endings and a BOM are kept.
|
|
35
|
+
|
|
36
|
+
For logic the edits cannot express, `transform` maps each file's text to its new text, with the same all-or-nothing write. Return `undefined` to leave a file unchanged.
|
|
37
|
+
|
|
38
|
+
```js
|
|
39
|
+
files.edit({
|
|
40
|
+
glob: "src/**/*.ts",
|
|
41
|
+
transform: (text, path) =>
|
|
42
|
+
text.replace(/TODO\((\w+)\)/g, (_, who) => `TODO(@${who.toLowerCase()})`),
|
|
43
|
+
});
|
|
44
|
+
```
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Image transforms
|
|
2
2
|
|
|
3
|
-
`image(handle)` is a chain; bytes stay on the host. Steps build operations (crop runs before resize); `info()` and `save(name)` execute. Handles: `sdk.docs("
|
|
3
|
+
`image(handle)` is a chain; bytes stay on the host. Steps build operations (crop runs before resize); `info()` and `save(name)` execute. Handles: `sdk.docs("artifacts/handles")`.
|
|
4
4
|
|
|
5
5
|
```ts
|
|
6
6
|
const small = await image("./shot.png")
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"./x-B_E8Qayx.js";import{$ as e,Et as t,F as n,H as r,Nt as i,P as a,R as o,Tt as s,U as c,V as l,at as u,bt as d,dt as f,ft as p,gt as m,mt as h,ot as g,pt as _,r as v,tt as y,ut as b,vt as x}from"./index-client-CuxgedVJ.js";import{a as S}from"./workbench-startup-state.svelte-DiVhozSn.js";import{s as C}from"./conversation-connection-
|
|
1
|
+
import"./x-B_E8Qayx.js";import{$ as e,Et as t,F as n,H as r,Nt as i,P as a,R as o,Tt as s,U as c,V as l,at as u,bt as d,dt as f,ft as p,gt as m,mt as h,ot as g,pt as _,r as v,tt as y,ut as b,vt as x}from"./index-client-CuxgedVJ.js";import{a as S}from"./workbench-startup-state.svelte-DiVhozSn.js";import{s as C}from"./conversation-connection-Dm9Zr6Yb.js";import{t as w}from"./workspace-state.svelte-y_9D2lEr.js";import{t as T}from"./square-BZ2jl-M0.js";import{a as E,i as D,o as O,r as k}from"./floating-toolbar-Cqtfs8M7.js";import{t as A}from"./LogStream-DfJ4LiCv.js";import{F as j,L as M}from"./index-B8XniJoh.js";function N(e,t){if(!e)return;let n=Date.parse(e.startedAt),r=e.status===`running`?t:e.finishedAt?Date.parse(e.finishedAt):NaN;return!Number.isFinite(n)||!Number.isFinite(r)||r<n?`Unknown duration`:`${Math.floor((r-n)/1e3)}s`}var P=65536,F=262144;function I(e,t,n=!1){let r=F,i=t;if(e&&t.totalBytes>=e.nextOffset&&t.offset<=e.nextOffset&&t.nextOffset>=e.offset){let n=new TextEncoder,r=new TextDecoder;if(t.offset<e.offset){let a=r.decode(n.encode(t.text).slice(0,e.offset-t.offset));i={...t,text:a+e.text,nextOffset:e.nextOffset}}else{let a=r.decode(n.encode(t.text).slice(Math.max(0,e.nextOffset-t.offset)));i={...t,text:e.text+a,offset:e.offset,nextOffset:Math.max(e.nextOffset,t.nextOffset)}}}let a=new TextEncoder().encode(i.text);if(a.length<=r)return i;if(n){let e=r;for(;e>0&&(a[e]&192)==128;)e--;return{...i,text:new TextDecoder().decode(a.slice(0,e)),nextOffset:i.offset+e}}let o=a.length-r;for(;(a[o]&192)==128;)o++;return{...i,text:new TextDecoder().decode(a.slice(o)),offset:i.offset+o}}var L=class{conversationId;bashId;request;publish;interval;generation=0;active=!1;busy=!1;timer;pending;following=!0;page;bash;constructor(e,t,n,r,i=1e3,a){this.conversationId=e,this.bashId=t,this.request=n,this.publish=r,this.interval=i,this.bash=a}start(){this.active=!0,this.load(`tail`)}stop(){this.active=!1,this.generation++,this.busy=!1,this.pending=void 0,clearTimeout(this.timer)}async load(e=`tail`){if(!this.active)return;if(e===`tail`){let e=!this.following;this.following=!0,clearTimeout(this.timer),e&&this.publish(this)}else if(e===`earlier`)clearTimeout(this.timer);else if(!this.following)return;if(this.busy){e!==`append`&&(this.pending=e);return}clearTimeout(this.timer),this.busy=!0;let t=!1,n=this.generation,r=this.page,i=e===`tail`||!r?void 0:e===`earlier`?Math.max(0,r.offset-P):r.nextOffset;try{let a=await this.request({conversationId:this.conversationId,bashId:this.bashId,offset:i,limit:P});if(!this.active||n!==this.generation)return;this.bash=a.bash,this.page=e===`tail`?a.page:I(this.page,a.page,e===`earlier`),e===`earlier`&&R(r,this.page)&&(this.following=!1),t=e!==`append`||z(r,this.page),this.publish(this)}catch(e){this.active&&n===this.generation&&this.publish(this,e instanceof Error?e.message:String(e))}finally{if(this.active&&n===this.generation){if(this.busy=!1,this.pending){let e=this.pending;this.pending=void 0,this.load(e)}else if(this.following){let e=t&&this.page!==void 0&&this.page.nextOffset<this.page.totalBytes;(e||this.bash?.status===`running`)&&(this.timer=setTimeout(()=>void this.load(`append`),e?0:this.interval))}}}}};function R(e,t){return e!==void 0&&t.nextOffset<e.nextOffset}function z(e,t){return e===void 0||t.nextOffset>e.nextOffset}function B(e){let t=e.endsWith(`\r`)?e.slice(0,-1):e,n=t.lastIndexOf(`\r`);return n===-1?t:t.slice(n+1)}function V(e){if(!e)return[];let t=new TextEncoder,n=[],r=e.text.split(`
|
|
2
2
|
`),i=e.offset,a=0;e.offset>0&&r.length>1&&(i+=t.encode(r[0]).length+1,a=1);let o=r.length-1;for(let e=a;e<=o;e++){let a=r[e];if(e===o&&a===``)break;n.push({key:`${i}`,text:B(a)}),i+=t.encode(a).length+1}return n}var H=c(`<span> </span>`),U=c(`<!> <!> <!>`,1),W=c(`<!> <!>`,1),G=c(`<section class="relative h-full min-h-0 bg-background" aria-label="Background command output"><!></section>`);function K(r,a){t(a,!0);let c=v(a,`detached`,3,!1),m=v(a,`stopping`,3,!1),h=d(()=>V(a.page));var g=G(),y=b(g);{let t=t=>{O(t,{label:`Command controls`,children:(t,r)=>{var i=W(),s=f(i);E(s,{children:(t,r)=>{{let r=d(()=>a.bash?.workingDirectory);k(t,{get title(){return e(r)},children:(e,t)=>{var r=U(),i=f(r),s=e=>{j(e,{get status(){return a.bash.status}})};n(i,e=>{a.bash&&e(s)});var c=_(i,2),d=e=>{var t=H(),n=p(t,!0);u(()=>o(n,a.elapsed)),l(e,t)};n(c,e=>{a.elapsed&&e(d)});var m=_(c,2),h=e=>{var t=H(),n=p(t);u(()=>o(n,`exit ${a.bash.exitCode??``}`)),l(e,t)};n(m,e=>{a.bash?.exitCode!=null&&e(h)}),l(e,r)},$$slots:{default:!0}})}},$$slots:{default:!0}});var c=_(s,2),h=e=>{E(e,{children:(e,t)=>{D(e,{label:`Stop command`,get icon(){return T},tone:`destructive`,get disabled(){return m()},get onclick(){return a.onStop}})},$$slots:{default:!0}})};n(c,e=>{a.bash?.status===`running`&&e(h)}),l(t,i)},$$slots:{default:!0}})},r=d(()=>`async-bash:${a.bashId}`),i=d(()=>a.bash?`No output yet.`:`Loading output…`),s=d(()=>a.bash?.command??a.command),g=d(()=>(a.page?.offset??0)>0);A(y,{get scopeKey(){return e(r)},ariaLabel:`Command output`,get emptyLabel(){return e(i)},get lines(){return e(h)},get command(){return e(s)},get hasMoreBefore(){return e(g)},get detached(){return c()},get loadError(){return a.error},get onLoadEarlier(){return a.onLoadEarlier},get onJumpToLatest(){return a.onJumpToLatest},topEnd:t,$$slots:{topEnd:!0}})}i(g),l(r,g),s()}function q(i,o){t(o,!0);let c=d(()=>w.activeCenterTab?.kind===`async-bash`?w.activeCenterTab:void 0),u=x(void 0),p=x(void 0),_=x(void 0),v=x(void 0),b=x(!1),T=x(!1),E=x(h(Date.now())),D=d(()=>N(e(u),e(E))),O=0;g(()=>{let t=e(c),n=S.progressiveActive,r=y(()=>t?M.commands[t.id]:void 0);if(m(u,r,!0),m(p,void 0),m(_,void 0),m(b,!1),m(T,!1),!t||!n)return;O=y(()=>M.refreshVersions[t.id]??0);let i=new L(t.conversationId,t.id,e=>C(`asyncBash.logs`,e),(n,r)=>{m(u,n.bash??e(u),!0),m(p,n.page,!0),m(_,r,!0),m(T,!n.following),m(E,Date.now(),!0),n.bash&&(M.commands[t.id]=n.bash)},1e3,r);return m(v,i,!0),i.start(),()=>{i.stop(),m(v,void 0)}}),g(()=>{let t=e(c),n=e(v);if(!t||!S.progressiveActive||!n)return;let r=M.refreshVersions[t.id]??0;r!==O&&(O=r,y(()=>void n.load(`tail`)))});async function k(){let t=e(c),n=e(v);if(t&&n&&!e(b)){m(b,!0);try{await C(`asyncBash.cancel`,{bashId:t.id}),e(v)===n&&await n.load(`append`)}catch(t){e(v)===n&&m(_,t instanceof Error?t.message:String(t),!0)}finally{e(v)===n&&m(b,!1)}}}var A=r(),j=f(A),P=t=>{var n=r(),i=f(n);a(i,()=>e(c).id,t=>{K(t,{get bashId(){return e(c).id},get bash(){return e(u)},get command(){return e(c).command},get page(){return e(p)},get error(){return e(_)},get elapsed(){return e(D)},get detached(){return e(T)},get stopping(){return e(b)},onLoadEarlier:()=>e(v)?.load(`earlier`)??Promise.resolve(),onJumpToLatest:()=>e(v)?.load(`tail`)??Promise.resolve(),onStop:()=>void k()})}),l(t,n)};n(j,t=>{e(c)&&t(P)}),l(i,A),s()}export{q as default};
|
package/dist/web/assets/{ConversationListItem-CCaGnyA1.js → ConversationListItem-DALhochc.js}
RENAMED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{n as e}from"./x-B_E8Qayx.js";import{$ as t,Et as n,F as r,H as i,K as a,M as o,N as s,Nt as c,R as l,S as u,Tt as d,U as f,V as p,a as m,at as h,bt as g,dt as _,ft as v,i as y,k as b,pt as x,r as S,ut as C,v as w,x as T}from"./index-client-CuxgedVJ.js";import{t as E}from"./image-DK8kwfuZ.js";import{d as D,
|
|
2
|
-
`)),fe=g(()=>te(f.conversation.title,U()));{let n=g(()=>R(`mx-1 my-0.5 flex-col rounded-md px-2.5 py-2`,!
|
|
3
|
-
`)]),p(e,n)};r(a,e=>{t(q).overflow>0&&e(s)}),c(n),p(e,n)};r(s,e=>{t(q).shown.length&&e(d)}),c(n),p(e,n)};r(a,e=>{(t(Y)||t(q).shown.length)&&e(s)}),p(e,n)},
|
|
1
|
+
import{n as e}from"./x-B_E8Qayx.js";import{$ as t,Et as n,F as r,H as i,K as a,M as o,N as s,Nt as c,R as l,S as u,Tt as d,U as f,V as p,a as m,at as h,bt as g,dt as _,ft as v,i as y,k as b,pt as x,r as S,ut as C,v as w,x as T}from"./index-client-CuxgedVJ.js";import{t as E}from"./image-DK8kwfuZ.js";import{d as D,f as O}from"./channel-3Wv484LF.js";import{z as k}from"./center-tabs.svelte-8YpJhA1o.js";import{t as A}from"./git-pull-request-D4m3cMGB.js";import{t as j}from"./circle-dot-ChSwVw2A.js";import{t as M}from"./hash-DGLDrXlR.js";import{A as N,D as ee,T as P,j as F,w as I}from"./workspace-selectors.svelte-B90FdGfV.js";import{r as L}from"./time-egBWJGDu.js";import{Mt as R}from"./popper-layer-force-mount-GBgxKlXg.js";import{m as z}from"./panel-BW0llJiU.js";import{t as B}from"./item-surface-CEVisA-a.js";import{i as V,t as H}from"./conversation-activity-CZJfUGoL.js";var U=new Set([`$$slots`,`$$events`,`$$legacy`]);function W(t,n){let r=y(n,U),i=[[`circle`,{cx:`12`,cy:`12`,r:`10`}],[`path`,{d:`M8 12h8`}],[`path`,{d:`M12 8v8`}]];e(t,m({name:`circle-plus`},()=>r,{get iconNode(){return i}}))}var G=new Set([`$$slots`,`$$events`,`$$legacy`]);function K(t,n){let r=y(n,G),i=[[`circle`,{cx:`5`,cy:`6`,r:`3`}],[`path`,{d:`M5 9v12`}],[`path`,{d:`m15 9-3-3 3-3`}],[`path`,{d:`M12 6h5a2 2 0 0 1 2 2v3`}],[`path`,{d:`M19 15v6`}],[`path`,{d:`M22 18h-6`}]];e(t,m({name:`git-pull-request-create-arrow`},()=>r,{get iconNode(){return i}}))}function q(e,t){let n=[F(t)?.toLowerCase()??``];return e.conversation.completedAt&&n.push(`done`),e.conversation.pinned&&n.push(`pinned`),[`needs-user`,`error`,`aborted`,`result-ready`].includes(t.indicator)&&n.push(`needs`,`attention`),t.indicator===`error`&&n.push(`error`),t.indicator===`result-ready`&&n.push(`ready`,`review`),n}function J(e,t){let n=e.toLowerCase(),r=n.indexOf(t);if(r>=0)return{score:r===0||/[\s\-_/.(]/.test(n[r-1]??``)?55:45,indexes:Array.from({length:t.length},(e,t)=>r+t)};if(t.length<3)return;let i=e=>e===0||/[\s\-_/.(]/.test(n[e-1]??``),a,o=-1/0;for(let e=n.indexOf(t[0]??``);e>=0;e=n.indexOf(t[0]??``,e+1)){let r=[e],s=i(e)?4:0;for(let e of t.slice(1)){let t=r[r.length-1]??0,a=n[t+1]===e?t+1:-1;if(a>=0)s+=3;else{let r=n.indexOf(e,t+1),o=-1;for(let t=r;t>=0;t=n.indexOf(e,t+1))if(i(t)){o=t;break}a=o>=0?o:r,a>=0&&i(a)&&(s+=4)}if(a<0){s=-1/0;break}r.push(a)}let c=(r[r.length-1]??0)-e;c>t.length*6||(s-=c/4,s>o&&(o=s,a=r))}if(!a)return;let s=a,c=Math.min(35,10+o);return c>=15?{score:c,indexes:s}:void 0}function Y(e,t,n={}){let r=t.trim().toLowerCase().split(/\s+/).filter(Boolean);if(!r.length)return[];let i=[];for(let t of e){let e=q(t,n.activityById?.[t.conversation.id]??H),a=D(t.conversation.title),o=O(t.conversation.title).some(e=>e.type===`image`),s=new Set,c=0,l,u=0;for(let i of r){let r=[J(a,i),n.matchField?.(t,i)];o&&(i===`image`||i===`screenshot`)&&r.push({score:60}),i.length>=2&&e.some(e=>e.startsWith(i))&&r.push({score:60});let d=r.filter(e=>!!e).sort((e,t)=>t.score-e.score)[0];if(!d){c=0;break}c+=d.score,d.referenceKey&&d.score>u&&(l=d.referenceKey,u=d.score);for(let e of d.indexes??[])s.add(e)}c&&i.push({row:t,score:c,titleIndexes:[...s].sort((e,t)=>e-t),referenceKey:l})}i.sort((e,t)=>t.score-e.score||k(e.row.conversation,t.row.conversation));let a=(i[0]?.score??0)*.35;return i.filter(e=>e.score>=a)}function X(e,t,n=0){let r=new Set(t),i=[];for(let t=0;t<e.length;t++){let a=r.has(n+t),o=i[i.length-1];o?.hit===a?o.text+=e[t]:i.push({text:e[t]??``,hit:a})}return i}function te(e,t){let n=0;return O(e).map(e=>{if(e.type===`image`)return n+=D(``).length,e;let r=X(e.text,t,n);return n+=e.text.length,{type:`text`,runs:r}})}var ne=f(`<span class="flex h-4 w-3.5 shrink-0 items-center justify-center"><!></span>`),re=f(`<span class="shrink-0 text-caption tabular-nums text-muted-foreground"> </span>`),ie=f(`<span role="img" aria-label="Image" title="Image" class="inline-flex align-[-2px] text-muted-foreground"><!></span>`),ae=f(`<mark class="rounded-xs bg-primary-strong text-foreground"> </mark>`),oe=f(`<span> </span>`),se=f(`<span><!> <span class="truncate"> </span></span>`),ce=f(`<span class="shrink-0"> </span>`),le=f(`<span class="flex min-w-0 items-center gap-2.5"><!> <!></span>`),ue=f(`<span class="flex min-w-0 items-center gap-2.5 text-caption text-muted-foreground"><!> <!></span>`);function Z(e,f){n(f,!0);let m=S(f,`details`,19,()=>[]),y=S(f,`repoLabels`,19,()=>new Map),O=S(f,`isActive`,3,!1),k=S(f,`isOpen`,3,!1),F=S(f,`faded`,3,!1),U=S(f,`highlight`,19,()=>[]),G=g(()=>f.activity??(f.conversation.completedAt?{...H,indicator:`completed`}:H)),q=g(()=>ee(f.conversation.references,f.matchedReference));function J(e){return e.kind===`pull_request`?e.relationship===`created`?K:A:e.kind===`issue`?e.relationship===`created`?W:j:M}let Y=g(()=>N(t(G))),X=g(()=>f.conversation.lastUserMessageAt??f.conversation.createdAt),Z=g(()=>new Date(t(X)).toLocaleString(void 0,{dateStyle:`medium`,timeStyle:`short`})),de=g(()=>L(t(X))),Q=g(()=>D(f.conversation.title)),$=g(()=>[t(Q),...f.conversation.references.map(I),t(G).statusText??t(G).label??`Idle`,...m(),`${f.conversation.childCount} sub-agents`,t(Z),f.conversation.id].join(`
|
|
2
|
+
`)),fe=g(()=>te(f.conversation.title,U()));{let n=g(()=>R(`mx-1 my-0.5 flex-col rounded-md px-2.5 py-2`,!O()&&`hover:bg-hover`));B(e,{tone:`row`,hover:`none`,get selected(){return O()},get menuItems(){return f.menuItems},get onMenuOpenChange(){return f.onMenuOpenChange},get class(){return t(n)},onclick:()=>f.onOpenConversation?.(f.conversation.id),children:(e,n)=>{{let n=e=>{var n=ne(),r=C(n);V(r,{get activity(){return t(G)},variant:`rail`,get isOpen(){return k()}}),c(n),p(e,n)},d=e=>{var n=re(),r=v(n,!0);h(()=>{w(n,`title`,t(Z)),l(r,t(de))}),p(e,n)},m=e=>{var n=i(),u=_(n);o(u,17,()=>t(fe),s,(e,n)=>{var u=i(),d=_(u),f=e=>{var t=ie(),n=C(t);E(n,{class:`size-3`,"aria-hidden":`true`}),c(t),p(e,t)},m=e=>{var c=i(),u=_(c);o(u,17,()=>t(n).runs,s,(e,n)=>{var o=i(),s=_(o),c=e=>{var r=ae(),i=v(r,!0);h(()=>l(i,t(n).text)),p(e,r)},u=e=>{var r=a();h(()=>l(r,t(n).text)),p(e,r)};r(s,e=>{t(n).hit?e(c):e(u,-1)}),p(e,o)}),p(e,c)};r(d,e=>{t(n).type===`image`?e(f):e(m,-1)}),p(e,u)}),p(e,n)},S=e=>{var n=i(),a=_(n),s=e=>{var n=ue(),i=C(n),a=e=>{var n=oe(),r=v(n,!0);h(e=>{T(n,1,e),l(r,t(Y))},[()=>u(R(`flex shrink-0 items-center gap-1`,t(G).tone===`warning`&&`text-warning`,t(G).tone===`destructive`&&t(G).indicator!==`aborted`&&`text-destructive`,t(G).tone===`success`&&`text-success`,t(G).tone===`info`&&`text-info`))]),p(e,n)};r(i,e=>{t(Y)&&e(a)});var s=x(i,2),d=e=>{var n=le(),i=C(n);o(i,17,()=>t(q).shown,e=>e.resourceKey,(e,n)=>{let r=g(()=>J(t(n)));var i=se(),a=C(i);b(a,()=>t(r),(e,t)=>{t(e,{class:`size-3 shrink-0`,"aria-hidden":`true`})});var o=x(a,2),s=v(o,!0);c(i),h((e,t,n)=>{w(i,`title`,e),T(i,1,t),l(s,n)},[()=>I(t(n)),()=>u(R(`inline-flex min-w-0 items-center gap-1 rounded-sm`,t(n).resourceKey===f.matchedReference&&`bg-primary-strong px-0.5 text-foreground`)),()=>P(t(n),y(),f.currentRepository)]),p(e,i)});var a=x(i,2),s=e=>{var n=ce(),r=v(n);h(e=>{w(n,`title`,e),l(r,`+${t(q).overflow??``}`)},[()=>f.conversation.references.map(I).join(`
|
|
3
|
+
`)]),p(e,n)};r(a,e=>{t(q).overflow>0&&e(s)}),c(n),p(e,n)};r(s,e=>{t(q).shown.length&&e(d)}),c(n),p(e,n)};r(a,e=>{(t(Y)||t(q).shown.length)&&e(s)}),p(e,n)},D=g(()=>R(!(F()&&!O())&&`text-foreground`));z(e,{get label(){return t(Q)},labelLines:2,get dataId(){return f.conversation.id},get title(){return t($)},get ariaLabel(){return t($)},flush:!0,hoverable:!1,class:`py-0`,get active(){return O()},get labelClass(){return t(D)},onclick:e=>{e.stopPropagation(),f.onOpenConversation?.(f.conversation.id)},leading:n,titleTrailing:d,labelContent:m,meta:S,$$slots:{leading:!0,titleTrailing:!0,labelContent:!0,meta:!0}})}},$$slots:{default:!0}})}d()}export{Y as n,Z as t};
|