@xopcai/xopc 0.0.249 → 0.0.250
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/dist/browser-ext/manifest.json +1 -1
- package/dist/extensions/telegram/xopc.extension.json +1 -1
- package/dist/gateway/static/root/assets/{activity-store-B759R_qf.js → activity-store-DfBjTSo9.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-dicebear-BUu7EnwM.js → agent-avatar-dicebear-BN6FJXkJ.js} +1 -1
- package/dist/gateway/static/root/assets/agent-defaults-settings-panel-C7rZH1A2.js +1 -0
- package/dist/gateway/static/root/assets/{agents-DK9HjHO0.js → agents-CgGaoo4z.js} +1 -1
- package/dist/gateway/static/root/assets/{api-Cg0v7Lpn.js → api-zxpcJfgj.js} +1 -1
- package/dist/gateway/static/root/assets/{app-management-settings-panel-C9DkCW_d.js → app-management-settings-panel-D2gMshuS.js} +1 -1
- package/dist/gateway/static/root/assets/{appearance-settings-CFggS95Y.js → appearance-settings-wMu0jSKx.js} +1 -1
- package/dist/gateway/static/root/assets/{apps-page-jOvT-fzU.js → apps-page-KF1Gnv36.js} +1 -1
- package/dist/gateway/static/root/assets/{archive-plugin-BQrilVVv.js → archive-plugin-u6EE3JV8.js} +1 -1
- package/dist/gateway/static/root/assets/{attachment-load-BG0BliqV.js → attachment-load-DbJurnv-.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-page-Bo4RiTkh.js → automations-page-Ew_e5HDn.js} +1 -1
- package/dist/gateway/static/root/assets/automations-workspace-Ch-ldu35.js +6 -0
- package/dist/gateway/static/root/assets/{binary-plugins-BCnyNU0C.js → binary-plugins-DtDFNfPM.js} +1 -1
- package/dist/gateway/static/root/assets/{block-editor-Db8DlVvg.js → block-editor-CnAwmabq.js} +50 -50
- package/dist/gateway/static/root/assets/browser-settings-page-DtVhsHJW.js +8 -0
- package/dist/gateway/static/root/assets/{browser-workflow-inputs-C71vfl0b.js → browser-workflow-inputs-BX1-uM9L.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-workflows-page-vvmSYKsO.js → browser-workflows-page-CcbUOWDF.js} +2 -2
- package/dist/gateway/static/root/assets/capabilities-settings-panel--sXeylhe.js +7 -0
- package/dist/gateway/static/root/assets/channels-settings-AXSBDujZ.js +1 -0
- package/dist/gateway/static/root/assets/{channels-status-swr-CKyV3jY5.js → channels-status-swr-CX-yWwLD.js} +1 -1
- package/dist/gateway/static/root/assets/{chat-terminal-dock-B1Xd6OFB.js → chat-terminal-dock-CryTDNdD.js} +2 -2
- package/dist/gateway/static/root/assets/connectors-page-HBHUWohz.js +2 -0
- package/dist/gateway/static/root/assets/{cron-expression-D-F9vjtE.js → cron-expression-ji5aWrjG.js} +1 -1
- package/dist/gateway/static/root/assets/{date-picker-B2OoYvic.js → date-picker-Dro_w3eX.js} +1 -1
- package/dist/gateway/static/root/assets/{dependency-picker-BiGx9Sbj.js → dependency-picker-Ce19KKnX.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-BNMRqipe.js → desktop-pet-DsSi-3uZ.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-settings-DeYbIV7A.js → desktop-pet-settings-8WQ4woJy.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-debug-page-COyn05ub.js → extension-debug-page-CgvEBfLZ.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-oH43chS2.js → extension-page-DkznBbMj.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-settings-page-BMO59994.js → extension-settings-page-BOjhchK2.js} +1 -1
- package/dist/gateway/static/root/assets/files-BArWTfr7.js +1 -0
- package/dist/gateway/static/root/assets/{gateway-config-api-cimpViGk.js → gateway-config-api-OEruhhX3.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-config-swr-BGdHwT4e.js → gateway-config-swr-CMNbl0FZ.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-settings-BHJtnSic.js → gateway-settings-BgH3A0LO.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-startup-retry-CuaM3b4c.js → gateway-startup-retry-CR7Xg8As.js} +1 -1
- package/dist/gateway/static/root/assets/heartbeat-settings-C97naDkO.js +1 -0
- package/dist/gateway/static/root/assets/home-page-BBKKme4G.js +1 -0
- package/dist/gateway/static/root/assets/{image-generation-api-D7duj7Uj.js → image-generation-api-C5mn73ca.js} +1 -1
- package/dist/gateway/static/root/assets/index-BcaF-dgQ.js +72 -0
- package/dist/gateway/static/root/assets/{index-DGeGmj4k.css → index-DAryGvZ7.css} +1 -1
- package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-D8Zw_lYd.js → keyboard-shortcuts-settings-BYhfzsqe.js} +1 -1
- package/dist/gateway/static/root/assets/{local-app-workbench-page-eBFVWmtH.js → local-app-workbench-page-DNncc2tn.js} +2 -2
- package/dist/gateway/static/root/assets/{local-apps-page-CvPDPRwb.js → local-apps-page-vBlknU7C.js} +1 -1
- package/dist/gateway/static/root/assets/{locale-store-zEL8bkwx.js → locale-store-CF4erhjB.js} +1 -1
- package/dist/gateway/static/root/assets/{logs-page-ClvcWlL6.js → logs-page-CizZInrT.js} +2 -2
- package/dist/gateway/static/root/assets/{management-settings-D8moh99U.js → management-settings-Dnx6mSNe.js} +1 -1
- package/dist/gateway/static/root/assets/{markdown-split-D7V3j0vE.js → markdown-split-DtBtcHWi.js} +1 -1
- package/dist/gateway/static/root/assets/{markdown-view-DGRN-8wP.js → markdown-view-CQvzsE24.js} +1 -1
- package/dist/gateway/static/root/assets/{media-plugins-BLaE5b1Y.js → media-plugins-DrMYeHe7.js} +1 -1
- package/dist/gateway/static/root/assets/messages-Cf5hpZE6.js +3 -0
- package/dist/gateway/static/root/assets/{mobile-pairing-wizard-DiVDuCxl.js → mobile-pairing-wizard-AKgGy3Kx.js} +1 -1
- package/dist/gateway/static/root/assets/note-detail-panel-Bw3jD9Jf.js +5 -0
- package/dist/gateway/static/root/assets/notes-page-Dpqq7Z-J.js +8 -0
- package/dist/gateway/static/root/assets/{page-tabs-BFMGjA60.js → page-tabs-CX9T71by.js} +1 -1
- package/dist/gateway/static/root/assets/{preview-open-alternatives-DNEWZN7H.js → preview-open-alternatives-DvEHoimN.js} +1 -1
- package/dist/gateway/static/root/assets/{product-open-page-Co5u7asH.js → product-open-page-COcr_NUJ.js} +1 -1
- package/dist/gateway/static/root/assets/project-detail-page-BuT6MCTs.js +1 -0
- package/dist/gateway/static/root/assets/projects-page-DXWMxOjf.js +1 -0
- package/dist/gateway/static/root/assets/{registry-api-Cg92zSod.js → registry-api-BsRBlji7.js} +1 -1
- package/dist/gateway/static/root/assets/remote-access-hub-7rBCUWzZ.js +1 -0
- package/dist/gateway/static/root/assets/{runtime-tools-settings-panel-C0ByNmlV.js → runtime-tools-settings-panel-CQ13P-mS.js} +1 -1
- package/dist/gateway/static/root/assets/{schema-form-Dq_VQpuY.js → schema-form-BUVyTpZj.js} +1 -1
- package/dist/gateway/static/root/assets/sessions-page-gmEOYNb4.js +1 -0
- package/dist/gateway/static/root/assets/settings-advanced-gate-DYYoJcl7.js +1 -0
- package/dist/gateway/static/root/assets/{settings-form-section-CZu6FX4k.js → settings-form-section-DVY-8_B9.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-S8ekeUZd.js → settings-page-CdiVYyTl.js} +1 -1
- package/dist/gateway/static/root/assets/{setup-status-panel-BdVmwXMv.js → setup-status-panel-BhenBnUj.js} +1 -1
- package/dist/gateway/static/root/assets/{share-preview-page-D2fEidbn.js → share-preview-page-C88YLKm4.js} +1 -1
- package/dist/gateway/static/root/assets/shares-settings-Dq7xIj0_.js +1 -0
- package/dist/gateway/static/root/assets/skill-reload-api-MDI9Lz6z.js +1 -0
- package/dist/gateway/static/root/assets/{skills-page-AYiPlgZE.js → skills-page-DLir1nM0.js} +1 -1
- package/dist/gateway/static/root/assets/{skills-page.utils-DGzl-ib-.js → skills-page.utils-BMZAfS3G.js} +1 -1
- package/dist/gateway/static/root/assets/{system-settings-panel-5Xd5mIiR.js → system-settings-panel-BM8ivYan.js} +1 -1
- package/dist/gateway/static/root/assets/task-detail-page-P0_RldWv.js +1 -0
- package/dist/gateway/static/root/assets/{theme-store-ZVClZKQ0.js → theme-store-BOgkc_9D.js} +1 -1
- package/dist/gateway/static/root/assets/{tunnel-api-CdZN1Jin.js → tunnel-api-DemxChjo.js} +1 -1
- package/dist/gateway/static/root/assets/{use-autosave-czRI0NBc.js → use-autosave-CV3Ui5hu.js} +1 -1
- package/dist/gateway/static/root/assets/user-model-page-CxfnoRVn.js +2 -0
- package/dist/gateway/static/root/assets/{voice-api-key-field-8YEvA3cU.js → voice-api-key-field-CUoCi4Sq.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-config-api-CopF64lY.js → voice-config-api-C-ryeIxj.js} +1 -1
- package/dist/gateway/static/root/assets/{work-discovery-overlay-keLtqYYJ.js → work-discovery-overlay-BhDlkCMB.js} +1 -1
- package/dist/gateway/static/root/assets/{workflow-run-setup-panel-Dy5WgYMO.js → workflow-run-setup-panel-D8CcPc_C.js} +2 -2
- package/dist/gateway/static/root/assets/workflows-page-Bxn2Dc16.js +5 -0
- package/dist/gateway/static/root/index.html +11 -11
- package/dist/package.js +1 -1
- package/dist/packages/gateway-contract/src/user-message-display.js +18 -0
- package/dist/src/agent/agent-instance-gateway.d.ts +1 -1
- package/dist/src/agent/agent-manager.d.ts +9 -9
- package/dist/src/agent/agent-manager.js +46 -28
- package/dist/src/agent/background-review/prompts.d.ts +1 -1
- package/dist/src/agent/background-review/prompts.js +11 -2
- package/dist/src/agent/context/audit.d.ts +3 -1
- package/dist/src/agent/context/audit.js +32 -6
- package/dist/src/agent/context/coordinator.d.ts +6 -1
- package/dist/src/agent/context/coordinator.js +14 -13
- package/dist/src/agent/context/execution-context.d.ts +6 -47
- package/dist/src/agent/context/execution-context.js +79 -15
- package/dist/src/agent/context/execution-context.types.d.ts +50 -0
- package/dist/src/agent/context/execution-context.types.js +1 -0
- package/dist/src/agent/context/execution-scope.d.ts +5 -1
- package/dist/src/agent/context/execution-scope.js +6 -2
- package/dist/src/agent/context/project-context.d.ts +3 -0
- package/dist/src/agent/context/project-context.js +5 -3
- package/dist/src/agent/external-tools/index.d.ts +1 -0
- package/dist/src/agent/external-tools/index.js +1 -0
- package/dist/src/agent/external-tools/memory-provider.d.ts +1 -0
- package/dist/src/agent/external-tools/memory-provider.js +1 -0
- package/dist/src/agent/inbound/attachment-pipeline.js +5 -1
- package/dist/src/agent/memory/compaction-promotion.d.ts +1 -0
- package/dist/src/agent/memory/compaction-promotion.js +7 -2
- package/dist/src/agent/memory/index.d.ts +1 -1
- package/dist/src/agent/memory/index.js +3 -3
- package/dist/src/agent/memory/memory-config.d.ts +0 -5
- package/dist/src/agent/memory/memory-config.js +1 -8
- package/dist/src/agent/orchestration/context-overflow.js +1 -0
- package/dist/src/agent/service/direct-turn-helpers.d.ts +2 -2
- package/dist/src/agent/service/direct-turn-helpers.js +2 -2
- package/dist/src/agent/service/process-direct-streaming.js +3 -4
- package/dist/src/agent/tools/factory.d.ts +1 -0
- package/dist/src/agent/tools/factory.js +37 -7
- package/dist/src/agent/tools/knowledge-memory-tool.d.ts +6 -0
- package/dist/src/agent/tools/knowledge-memory-tool.js +81 -26
- package/dist/src/agent/tools/session-search-tool.d.ts +1 -0
- package/dist/src/agent/tools/session-search-tool.js +7 -0
- package/dist/src/agent/tools/user-context-tool.d.ts +2 -0
- package/dist/src/agent/tools/user-context-tool.js +21 -4
- package/dist/src/automations/service/automation-service.d.ts +2 -1
- package/dist/src/automations/service/automation-service.js +6 -2
- package/dist/src/cli/commands/doctor/checks/database-schema.js +1 -1
- package/dist/src/connectors/connection-recovery-service.d.ts +1 -0
- package/dist/src/connectors/connection-recovery-service.js +46 -22
- package/dist/src/files/file-service.js +4 -1
- package/dist/src/gateway/hono/routes/connectors.js +17 -3
- package/dist/src/gateway/hono/routes/files.js +23 -2
- package/dist/src/gateway/hono/routes/tasks.js +1 -1
- package/dist/src/gateway/security/gateway-scopes.js +2 -0
- package/dist/src/gateway/service/agent-runner.js +1 -1
- package/dist/src/gateway/service/run-gateway-agent.js +1 -1
- package/dist/src/gateway/service/session-input-coordinator.js +1 -1
- package/dist/src/gateway/service.js +8 -4
- package/dist/src/knowledge-memory/domain.d.ts +1 -0
- package/dist/src/knowledge-memory/index.js +2 -2
- package/dist/src/knowledge-memory/repository.d.ts +4 -1
- package/dist/src/knowledge-memory/repository.js +16 -2
- package/dist/src/notifications/planner.js +7 -3
- package/dist/src/proactive/actions/service.d.ts +0 -1
- package/dist/src/proactive/actions/service.js +1 -10
- package/dist/src/proactive/execution/context.d.ts +6 -8
- package/dist/src/proactive/execution/context.js +78 -32
- package/dist/src/proactive/execution/insight.d.ts +4 -1
- package/dist/src/proactive/execution/insight.js +5 -2
- package/dist/src/proactive/execution/repository.d.ts +1 -0
- package/dist/src/proactive/execution/repository.js +9 -1
- package/dist/src/proactive/execution/types.d.ts +0 -1
- package/dist/src/proactive/execution/worker.js +7 -5
- package/dist/src/proactive/inbox/repository.js +8 -2
- package/dist/src/proactive/inbox/service.js +2 -2
- package/dist/src/proactive/inbox/types.d.ts +1 -0
- package/dist/src/proactive/inbox/worker.d.ts +1 -0
- package/dist/src/proactive/inbox/worker.js +7 -0
- package/dist/src/proactive/index.d.ts +1 -0
- package/dist/src/proactive/index.js +2 -1
- package/dist/src/proactive/maintenance.d.ts +4 -0
- package/dist/src/proactive/maintenance.js +21 -0
- package/dist/src/proactive/scenarios/repository.d.ts +1 -1
- package/dist/src/proactive/scenarios/repository.js +10 -3
- package/dist/src/proactive/scenarios/types.d.ts +7 -0
- package/dist/src/proactive/service.d.ts +7 -0
- package/dist/src/proactive/service.js +17 -1
- package/dist/src/projects/project-service.d.ts +2 -1
- package/dist/src/projects/project-service.js +3 -2
- package/dist/src/session/index.js +1 -1
- package/dist/src/session/store.js +5 -2
- package/dist/src/storage/sqlite/collaboration-rule-repository.d.ts +3 -1
- package/dist/src/storage/sqlite/collaboration-rule-repository.js +1 -1
- package/dist/src/storage/sqlite/config-repository.js +1 -1
- package/dist/src/storage/sqlite/connection-wait-repository.js +2 -2
- package/dist/src/storage/sqlite/index.js +2 -2
- package/dist/src/storage/sqlite/migrations/151_proactive_scope_cleanup.sql +6 -0
- package/dist/src/storage/sqlite/migrations/152_proactive_scenario_contract.sql +140 -0
- package/dist/src/storage/sqlite/migrations/runner.d.ts +1 -1
- package/dist/src/storage/sqlite/migrations/runner.js +3 -3
- package/dist/src/storage/sqlite/migrations/runner.ts +1 -1
- package/dist/src/storage/sqlite/row-mappers.js +2 -2
- package/dist/src/storage/sqlite/schema.js +1 -1
- package/dist/src/storage/sqlite/session-input-repository.js +1 -1
- package/dist/src/storage/sqlite/session-instance-repository.d.ts +2 -0
- package/dist/src/storage/sqlite/session-instance-repository.js +6 -0
- package/dist/src/storage/sqlite/session-repository.d.ts +1 -1
- package/dist/src/storage/sqlite/session-repository.js +3 -5
- package/dist/src/storage/sqlite/transcript-repository.js +2 -1
- package/dist/src/tasks/home-query-service.js +35 -13
- package/dist/src/tasks/project-monitoring-service.d.ts +2 -0
- package/dist/src/tasks/project-monitoring-service.js +4 -1
- package/dist/src/tui/backends/embedded-backend.js +1 -1
- package/dist/src/user-context/access-policy.d.ts +11 -0
- package/dist/src/user-context/access-policy.js +26 -0
- package/dist/src/user-model/capture/executor.d.ts +10 -0
- package/dist/src/user-model/capture/executor.js +99 -3
- package/dist/src/user-model/capture/semantic.d.ts +18 -0
- package/dist/src/user-model/capture/semantic.js +72 -6
- package/dist/src/user-model/goals.d.ts +4 -0
- package/dist/src/user-model/goals.js +4 -2
- package/package.json +3 -3
- package/dist/gateway/static/root/assets/agent-defaults-settings-panel-C1rXNUAG.js +0 -1
- package/dist/gateway/static/root/assets/automations-workspace-BKjKTlW8.js +0 -6
- package/dist/gateway/static/root/assets/browser-settings-page-Dzq18pO1.js +0 -8
- package/dist/gateway/static/root/assets/capabilities-settings-panel-DW4SBQf4.js +0 -7
- package/dist/gateway/static/root/assets/channels-settings-57OGuewD.js +0 -1
- package/dist/gateway/static/root/assets/connectors-page-CT_I3kbR.js +0 -2
- package/dist/gateway/static/root/assets/files-D6vf3S30.js +0 -1
- package/dist/gateway/static/root/assets/heartbeat-settings-DNhrZHqx.js +0 -1
- package/dist/gateway/static/root/assets/home-page-BiHwiBnQ.js +0 -1
- package/dist/gateway/static/root/assets/index-aBs0EfQB.js +0 -72
- package/dist/gateway/static/root/assets/messages-W5P19VTF.js +0 -11
- package/dist/gateway/static/root/assets/note-detail-panel-CEEvR-fV.js +0 -5
- package/dist/gateway/static/root/assets/notes-page-BLqgXNCx.js +0 -8
- package/dist/gateway/static/root/assets/project-detail-page-CIiFJ5tk.js +0 -1
- package/dist/gateway/static/root/assets/projects-page-B3UF-Pfm.js +0 -1
- package/dist/gateway/static/root/assets/remote-access-hub-BUtpkJPG.js +0 -1
- package/dist/gateway/static/root/assets/sessions-page-UgJmG-V4.js +0 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-DDCzpdkl.js +0 -1
- package/dist/gateway/static/root/assets/shares-settings-BdsqnCYj.js +0 -1
- package/dist/gateway/static/root/assets/skill-reload-api-ghzAQKna.js +0 -1
- package/dist/gateway/static/root/assets/task-detail-page-BQAUaCDD.js +0 -1
- package/dist/gateway/static/root/assets/user-model-page-W3GTm6nA.js +0 -2
- package/dist/gateway/static/root/assets/workflows-page-BbAV3h7n.js +0 -5
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{a as t,n,t as r}from"./vendor-react-BOUWij0V.js";import{l as i,p as a}from"./chunk-KS7C4IRE-BaASWQor.js";import{a as o,i as s,n as c,o as l,r as u,s as d,t as f}from"./dist-CpzYSoz7.js";import{t as p}from"./plus-Q2yW6OE7.js";import{t as m}from"./x-B_N4OPjy.js";import{t as h}from"./messages-Cf5hpZE6.js";import{n as g}from"./locale-store-CF4erhjB.js";import{t as _}from"./cn-JdwAhgNB.js";import{t as v}from"./button-CtTvuElV.js";import{t as y}from"./skeleton-BwbyijEw.js";import{$l as b,$o as x,B as S,H as C,Ha as w,N as T,Ql as E,R as D,Tc as O,U as ee,V as te,Yo as k,an as A,cn as j,co as M,cs as N,gs as P,ma as F,ns as I,on as L,os as R,po as z,qs as ne,r as B,rs as V,ru as re,sn as ie,ss as ae,us as oe,zr as H}from"./index-BcaF-dgQ.js";import{n as se}from"./tab-completion-input-D64VNmiA.js";var U=e(t(),1),ce=n(),W=r(),le=12e3;function G(e){let t=(0,ce.c)(104),{variant:n,inputId:r,inputRef:i,intent:a,labels:o,attachments:s,isDragging:c,attachmentBusy:l,attachmentsFull:u,voice:d,chat:f,cancelAction:p,onIntentChange:m,onPickFiles:h,onRemoveAttachment:g,onPaste:y,onDragOver:b,onDragLeave:x,onDrop:C,onSubmit:w}=e,T=n===`inline`,E;t[0]!==s||t[1]!==a?(E=!!a.trim()||s.length>0,t[0]=s,t[1]=a,t[2]=E):E=t[2];let ee=E,te=d.voiceActive&&d.phase!==`error`,k;t[3]!==w||t[4]!==d.voiceActive?(k=e=>{if(d.voiceActive){e.preventDefault();return}w(e)},t[3]=w,t[4]=d.voiceActive,t[5]=k):k=t[5];let A=T?`mx-auto mt-8 w-full max-w-[640px] overflow-hidden rounded-2xl border border-edge bg-surface-base p-2 text-left shadow-surface transition-colors focus-within:border-accent focus-within:ring-2 focus-within:ring-accent/15`:`flex min-h-0 flex-1 flex-col`,j;t[6]===A?j=t[7]:(j=_(`relative`,A),t[6]=A,t[7]=j);let M;t[8]!==T||t[9]!==c||t[10]!==o.dropFiles?(M=c?(0,W.jsx)(`div`,{className:_(`pointer-events-none absolute inset-0 z-10 flex items-center justify-center bg-accent-soft/90 text-sm font-medium text-accent-fg backdrop-blur-[1px]`,T&&`rounded-2xl`),children:o.dropFiles}):null,t[8]=T,t[9]=c,t[10]=o.dropFiles,t[11]=M):M=t[11];let N=!T&&`flex min-h-0 flex-1 flex-col overflow-y-auto px-5 py-4`,P;t[12]===N?P=t[13]:(P=_(N),t[12]=N,t[13]=P);let F=T?`sr-only`:`mb-2 shrink-0 text-sm font-medium text-fg`,I;t[14]!==r||t[15]!==o.intentLabel||t[16]!==F?(I=(0,W.jsx)(`label`,{htmlFor:r,className:F,children:o.intentLabel}),t[14]=r,t[15]=o.intentLabel,t[16]=F,t[17]=I):I=t[17];let L;t[18]!==l||t[19]!==f||t[20]!==d.audioLevel||t[21]!==d.cancelVoiceInput||t[22]!==d.confirmVoiceInput||t[23]!==d.elapsedLabel||t[24]!==d.finalTranscript||t[25]!==d.partialTranscript||t[26]!==d.phase||t[27]!==d.retryVoiceInput||t[28]!==d.voiceActive?(L=d.voiceActive?(0,W.jsx)(ie,{phase:d.phase,elapsedLabel:d.elapsedLabel,audioLevel:d.audioLevel,partialTranscript:d.partialTranscript,finalTranscript:d.finalTranscript,disabled:l,chat:f,onCancel:d.cancelVoiceInput,onConfirm:d.confirmVoiceInput,onRetry:d.retryVoiceInput}):null,t[18]=l,t[19]=f,t[20]=d.audioLevel,t[21]=d.cancelVoiceInput,t[22]=d.confirmVoiceInput,t[23]=d.elapsedLabel,t[24]=d.finalTranscript,t[25]=d.partialTranscript,t[26]=d.phase,t[27]=d.retryVoiceInput,t[28]=d.voiceActive,t[29]=L):L=t[29];let R=te&&`hidden`,z=T?`min-h-24 bg-transparent px-3 py-2`:`min-h-32 flex-1 rounded-xl border border-edge bg-surface-base p-3 focus:border-accent focus:ring-2 focus:ring-accent/20`,B;t[30]!==R||t[31]!==z?(B=_(`w-full resize-none text-sm font-normal leading-6 text-fg outline-none placeholder:text-fg-subtle`,R,z),t[30]=R,t[31]=z,t[32]=B):B=t[32];let V;t[33]===m?V=t[34]:(V=e=>m(e.target.value),t[33]=m,t[34]=V);let re=!T,ae;t[35]!==r||t[36]!==i||t[37]!==a||t[38]!==o.intentPlaceholder||t[39]!==o.intentSuggestion||t[40]!==m||t[41]!==y||t[42]!==B||t[43]!==V||t[44]!==re?(ae=(0,W.jsx)(se,{ref:i,id:r,className:B,value:a,onChange:V,onPaste:y,suggestion:o.intentSuggestion,onAcceptSuggestion:m,onKeyDown:ue,placeholder:o.intentPlaceholder,maxLength:le,autoFocus:re}),t[35]=r,t[36]=i,t[37]=a,t[38]=o.intentPlaceholder,t[39]=o.intentSuggestion,t[40]=m,t[41]=y,t[42]=B,t[43]=V,t[44]=re,t[45]=ae):ae=t[45];let oe=T?`border-b-0 bg-transparent px-3 pb-2 pt-0`:`mt-3 border-b-0 bg-transparent px-0 pb-0`,H;t[46]!==s||t[47]!==g||t[48]!==oe?(H=(0,W.jsx)(S,{attachments:s,topPadded:!1,onRemove:g,className:oe}),t[46]=s,t[47]=g,t[48]=oe,t[49]=H):H=t[49];let U;t[50]!==T||t[51]!==a.length||t[52]!==o.shortcut?(U=T?null:(0,W.jsxs)(`div`,{className:`mt-2 flex shrink-0 items-center justify-between gap-3 text-[11px] text-fg-subtle`,children:[(0,W.jsx)(`span`,{children:o.shortcut}),(0,W.jsxs)(`span`,{className:`tabular-nums`,children:[a.length.toLocaleString(),` / `,le.toLocaleString()]})]}),t[50]=T,t[51]=a.length,t[52]=o.shortcut,t[53]=U):U=t[53];let G;t[54]!==L||t[55]!==ae||t[56]!==H||t[57]!==U||t[58]!==P||t[59]!==I?(G=(0,W.jsxs)(`div`,{className:P,children:[I,L,ae,H,U]}),t[54]=L,t[55]=ae,t[56]=H,t[57]=U,t[58]=P,t[59]=I,t[60]=G):G=t[60];let K=T?`border-edge-subtle px-1 pt-2`:`border-edge px-5 py-4`,de;t[61]===K?de=t[62]:(de=_(`flex shrink-0 items-center gap-2 border-t`,K),t[61]=K,t[62]=de);let fe=!T&&`mr-auto`,pe;t[63]===fe?pe=t[64]:(pe=_(`flex items-center gap-1`,fe),t[63]=fe,t[64]=pe);let me=l||u,q;t[65]===Symbol.for(`react.memo_cache_sentinel`)?(q=(0,W.jsx)(O,{className:`size-4`,"aria-hidden":!0}),t[65]=q):q=t[65];let he;t[66]!==o.attachTitle||t[67]!==h||t[68]!==me?(he=(0,W.jsx)(v,{type:`button`,variant:`ghost`,className:`size-9 rounded-lg p-0`,disabled:me,title:o.attachTitle,"aria-label":o.attachTitle,onClick:h,children:q}),t[66]=o.attachTitle,t[67]=h,t[68]=me,t[69]=he):he=t[69];let J;t[70]!==l||t[71]!==f||t[72]!==d.startVoiceInput||t[73]!==d.voiceActive?(J=d.voiceActive?null:(0,W.jsx)(D,{disabled:l,chat:f,onStart:d.startVoiceInput}),t[70]=l,t[71]=f,t[72]=d.startVoiceInput,t[73]=d.voiceActive,t[74]=J):J=t[74];let ge;t[75]!==pe||t[76]!==he||t[77]!==J?(ge=(0,W.jsxs)(`div`,{className:pe,children:[he,J]}),t[75]=pe,t[76]=he,t[77]=J,t[78]=ge):ge=t[78];let _e;t[79]!==p||t[80]!==T||t[81]!==o.shortcut?(_e=T?(0,W.jsx)(`span`,{className:`hidden text-[11px] text-fg-subtle sm:inline`,children:o.shortcut}):p,t[79]=p,t[80]=T,t[81]=o.shortcut,t[82]=_e):_e=t[82];let Y=T?`ml-auto h-9 rounded-lg px-3.5 text-xs`:`min-w-32`,ve=!ee||l||d.voiceActive,X=T?`size-3.5`:`size-4`,ye;t[83]===X?ye=t[84]:(ye=(0,W.jsx)(ne,{className:X,"aria-hidden":!0}),t[83]=X,t[84]=ye);let Z;t[85]!==o.submit||t[86]!==Y||t[87]!==ve||t[88]!==ye?(Z=(0,W.jsxs)(v,{type:`submit`,variant:`primary`,className:Y,disabled:ve,children:[ye,o.submit]}),t[85]=o.submit,t[86]=Y,t[87]=ve,t[88]=ye,t[89]=Z):Z=t[89];let Q;t[90]!==de||t[91]!==ge||t[92]!==_e||t[93]!==Z?(Q=(0,W.jsxs)(`div`,{className:de,children:[ge,_e,Z]}),t[90]=de,t[91]=ge,t[92]=_e,t[93]=Z,t[94]=Q):Q=t[94];let be;return t[95]!==x||t[96]!==b||t[97]!==C||t[98]!==k||t[99]!==G||t[100]!==Q||t[101]!==j||t[102]!==M?(be=(0,W.jsxs)(`form`,{onSubmit:k,onDragOver:b,onDragLeave:x,onDrop:C,className:j,children:[M,G,Q]}),t[95]=x,t[96]=b,t[97]=C,t[98]=k,t[99]=G,t[100]=Q,t[101]=j,t[102]=M,t[103]=be):be=t[103],be}function ue(e){e.key===`Enter`&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),e.currentTarget.form?.requestSubmit())}function K(e,t){return e.replace(/\{\{(\w+)\}\}/g,(e,n)=>String(t[n]??``))}function de(){let e=(0,ce.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,W.jsxs)(`div`,{className:`space-y-8`,"aria-busy":!0,children:[(0,W.jsxs)(`div`,{className:`space-y-3`,children:[(0,W.jsx)(y,{className:`h-10 w-3/5 rounded-xl`}),(0,W.jsx)(y,{className:`h-5 w-4/5 rounded-lg`})]}),(0,W.jsx)(y,{className:`h-64 rounded-2xl`}),(0,W.jsx)(y,{className:`h-32 rounded-xl`})]}),e[0]=t):t=e[0],t}function fe(e){let t=(0,ce.c)(33),{item:n,busy:r,recommendationLabel:i,dueLabel:a,failureLabel:o,locale:s,onAction:c}=e,l;t[0]!==a||t[1]!==n.dueAt||t[2]!==s?(l=n.dueAt?`${a} ${H(new Date(n.dueAt),s)}`:null,t[0]=a,t[1]=n.dueAt,t[2]=s,t[3]=l):l=t[3];let u=l,d=n.kind===`failure`?o:u,f;t[4]===d?f=t[5]:(f=d?(0,W.jsxs)(`div`,{className:`mb-2 flex items-center gap-2 text-xs font-medium text-warning`,children:[(0,W.jsx)(`span`,{className:`size-1.5 rounded-full bg-warning`,"aria-hidden":!0}),(0,W.jsx)(`span`,{children:d})]}):null,t[4]=d,t[5]=f);let p=!n.openAction,m;t[6]!==n.id||t[7]!==n.openAction||t[8]!==c?(m=()=>n.openAction&&c(n.openAction,n.id),t[6]=n.id,t[7]=n.openAction,t[8]=c,t[9]=m):m=t[9];let h;t[10]===n.title?h=t[11]:(h=(0,W.jsx)(`span`,{className:`block text-lg font-semibold leading-7 tracking-tight text-fg`,children:n.title}),t[10]=n.title,t[11]=h);let g;t[12]===n.summary?g=t[13]:(g=(0,W.jsx)(`span`,{className:`mt-1.5 block text-sm leading-6 text-fg-muted`,children:n.summary}),t[12]=n.summary,t[13]=g);let _;t[14]!==p||t[15]!==m||t[16]!==h||t[17]!==g?(_=(0,W.jsxs)(`button`,{type:`button`,className:`block w-full text-left outline-none focus-visible:rounded-md focus-visible:ring-2 focus-visible:ring-accent`,disabled:p,onClick:m,children:[h,g]}),t[14]=p,t[15]=m,t[16]=h,t[17]=g,t[18]=_):_=t[18];let y;t[19]!==n.recommendation||t[20]!==i?(y=n.recommendation?(0,W.jsxs)(`p`,{className:`mt-3 text-sm leading-6 text-fg-muted`,children:[(0,W.jsxs)(`span`,{className:`font-semibold text-fg`,children:[i,`:`]}),n.recommendation]}):null,t[19]=n.recommendation,t[20]=i,t[21]=y):y=t[21];let b;t[22]!==r||t[23]!==n.id||t[24]!==n.primaryAction||t[25]!==n.secondaryActions||t[26]!==c?(b=n.primaryAction||n.secondaryActions.length>0?(0,W.jsxs)(`div`,{className:`mt-5 flex flex-wrap gap-2`,children:[n.primaryAction?(0,W.jsx)(v,{type:`button`,variant:`primary`,className:`h-9 rounded-lg px-3.5 text-xs`,disabled:r,onClick:()=>c(n.primaryAction,n.id),children:n.primaryAction.label}):null,n.secondaryActions.map(e=>(0,W.jsx)(v,{type:`button`,variant:`secondary`,className:`h-9 rounded-lg px-3.5 text-xs shadow-none`,disabled:r,onClick:()=>c(e,n.id),children:e.label},`${e.type}:${e.label}`))]}):null,t[22]=r,t[23]=n.id,t[24]=n.primaryAction,t[25]=n.secondaryActions,t[26]=c,t[27]=b):b=t[27];let x;return t[28]!==f||t[29]!==_||t[30]!==y||t[31]!==b?(x=(0,W.jsxs)(`article`,{className:`px-5 py-5 sm:px-6 sm:py-6`,children:[f,_,y,b]}),t[28]=f,t[29]=_,t[30]=y,t[31]=b,t[32]=x):x=t[32],x}function pe(e){let t=(0,ce.c)(26),{item:n,onAction:r}=e,i;t[0]===n.kind?i=t[1]:(i=n.kind===`scheduled`?(0,W.jsx)(re,{className:`size-4`,"aria-hidden":!0}):(0,W.jsx)(`span`,{className:`size-1.5 rounded-full bg-success`,"aria-hidden":!0}),t[0]=n.kind,t[1]=i);let a=i,o=!n.openAction,s;t[2]!==n.id||t[3]!==n.openAction||t[4]!==r?(s=()=>n.openAction&&r(n.openAction,n.id),t[2]=n.id,t[3]=n.openAction,t[4]=r,t[5]=s):s=t[5];let c;t[6]===a?c=t[7]:(c=(0,W.jsx)(`span`,{className:`flex size-7 shrink-0 items-center justify-center text-fg-subtle`,children:a}),t[6]=a,t[7]=c);let l;t[8]===n.title?l=t[9]:(l=(0,W.jsx)(`span`,{className:`block truncate text-sm font-medium text-fg`,children:n.title}),t[8]=n.title,t[9]=l);let u;t[10]===n.summary?u=t[11]:(u=(0,W.jsx)(`span`,{className:`mt-0.5 block truncate text-xs text-fg-muted`,children:n.summary}),t[10]=n.summary,t[11]=u);let d;t[12]!==l||t[13]!==u?(d=(0,W.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[l,u]}),t[12]=l,t[13]=u,t[14]=d):d=t[14];let f;t[15]===n.statusLabel?f=t[16]:(f=n.statusLabel?(0,W.jsx)(`span`,{className:`shrink-0 text-xs text-fg-subtle`,children:n.statusLabel}):null,t[15]=n.statusLabel,t[16]=f);let p;t[17]===n.openAction?p=t[18]:(p=n.openAction?(0,W.jsx)(b,{className:`size-4 shrink-0 text-fg-subtle`,"aria-hidden":!0}):null,t[17]=n.openAction,t[18]=p);let m;return t[19]!==o||t[20]!==s||t[21]!==c||t[22]!==d||t[23]!==f||t[24]!==p?(m=(0,W.jsxs)(`button`,{type:`button`,className:`flex min-h-16 w-full items-center gap-3 py-3 text-left outline-none hover:text-fg focus-visible:rounded-md focus-visible:ring-2 focus-visible:ring-accent`,disabled:o,onClick:s,children:[c,d,f,p]}),t[19]=o,t[20]=s,t[21]=c,t[22]=d,t[23]=f,t[24]=p,t[25]=m):m=t[25],m}function me(e){let t=(0,ce.c)(99),{item:n,labels:r,busy:i,onDecide:a,onSnooze:o,onDismiss:s,onInstruct:c,onFeedback:l}=e,[u,d]=(0,U.useState)(``),f=n.judgment,p;t[0]===n.title?p=t[1]:(p=(0,W.jsx)(`h3`,{className:`text-sm font-semibold text-fg`,children:n.title}),t[0]=n.title,t[1]=p);let m;t[2]===n.detail?m=t[3]:(m=(0,W.jsx)(`p`,{className:`mt-2 text-xs leading-5 text-fg-muted`,children:n.detail}),t[2]=n.detail,t[3]=m);let h;t[4]!==p||t[5]!==m?(h=(0,W.jsxs)(`div`,{className:`min-w-0`,children:[p,m]}),t[4]=p,t[5]=m,t[6]=h):h=t[6];let g;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,W.jsx)(ne,{className:`size-4 shrink-0 text-accent`,"aria-hidden":!0}),t[7]=g):g=t[7];let _;t[8]===h?_=t[9]:(_=(0,W.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[h,g]}),t[8]=h,t[9]=_);let y;t[10]!==f.whyNow||t[11]!==r.whyNow?(y=[r.whyNow,f.whyNow],t[10]=f.whyNow,t[11]=r.whyNow,t[12]=y):y=t[12];let b;t[13]!==f.impact||t[14]!==r.impact?(b=[r.impact,f.impact],t[13]=f.impact,t[14]=r.impact,t[15]=b):b=t[15];let x;t[16]!==f.workDone||t[17]!==r.workDone?(x=[r.workDone,f.workDone],t[16]=f.workDone,t[17]=r.workDone,t[18]=x):x=t[18];let S;t[19]!==f.recommendation||t[20]!==r.recommendation?(S=[r.recommendation,f.recommendation],t[19]=f.recommendation,t[20]=r.recommendation,t[21]=S):S=t[21];let C;t[22]!==y||t[23]!==b||t[24]!==x||t[25]!==S?(C=(0,W.jsx)(`div`,{className:`mt-4 grid gap-3 sm:grid-cols-2`,children:[y,b,x,S].map(he)}),t[22]=y,t[23]=b,t[24]=x,t[25]=S,t[26]=C):C=t[26];let w;t[27]!==f.actionError||t[28]!==f.actionStatus||t[29]!==f.dispositionReason||t[30]!==f.proposedActionTitle||t[31]!==r.actionStates||t[32]!==r.policyReason||t[33]!==r.proposedAction?(w=f.dispositionReason?(0,W.jsxs)(`div`,{className:`mt-3 rounded-lg border border-edge-subtle bg-surface-panel/70 p-3 text-xs leading-5`,children:[(0,W.jsx)(`p`,{className:`font-medium text-fg-subtle`,children:r.policyReason}),(0,W.jsx)(`p`,{className:`mt-1 text-fg-muted`,children:f.dispositionReason}),f.proposedActionTitle?(0,W.jsxs)(`p`,{className:`mt-2 text-fg`,children:[(0,W.jsxs)(`span`,{className:`font-medium`,children:[r.proposedAction,`:`]}),f.proposedActionTitle,f.actionStatus?` · ${r.actionStates[f.actionStatus]}`:``]}):null,f.actionError?(0,W.jsx)(`p`,{className:`mt-1 text-danger`,children:f.actionError}):null]}):null,t[27]=f.actionError,t[28]=f.actionStatus,t[29]=f.dispositionReason,t[30]=f.proposedActionTitle,t[31]=r.actionStates,t[32]=r.policyReason,t[33]=r.proposedAction,t[34]=w):w=t[34];let T;t[35]!==i||t[36]!==f.decision||t[37]!==a?(T=f.decision?(0,W.jsxs)(`div`,{className:`mt-4`,children:[(0,W.jsx)(`p`,{className:`text-sm font-medium text-fg`,children:f.decision.question}),(0,W.jsx)(`div`,{className:`mt-2 flex flex-wrap gap-2`,children:f.decision.options.map(e=>(0,W.jsxs)(v,{type:`button`,variant:`secondary`,className:`h-auto min-h-9 flex-col items-start px-3 py-2 text-left`,disabled:i,title:e.consequence,onClick:()=>a(e.id),children:[(0,W.jsx)(`span`,{children:e.label}),(0,W.jsx)(`span`,{className:`text-[10px] font-normal text-fg-muted`,children:e.consequence})]},e.id))})]}):null,t[35]=i,t[36]=f.decision,t[37]=a,t[38]=T):T=t[38];let E;t[39]!==f.evidenceIds.length||t[40]!==r.evidence?(E=(0,W.jsxs)(`summary`,{className:`cursor-pointer font-medium text-fg-subtle`,children:[r.evidence,` (`,f.evidenceIds.length,`)`]}),t[39]=f.evidenceIds.length,t[40]=r.evidence,t[41]=E):E=t[41];let D;t[42]===f.evidenceIds?D=t[43]:(D=f.evidenceIds.map(q),t[42]=f.evidenceIds,t[43]=D);let O;t[44]===D?O=t[45]:(O=(0,W.jsx)(`ul`,{className:`mt-2 space-y-1 text-fg-muted`,children:D}),t[44]=D,t[45]=O);let ee;t[46]!==E||t[47]!==O?(ee=(0,W.jsxs)(`details`,{className:`mt-4 rounded-lg border border-edge-subtle bg-surface-panel/60 px-3 py-2 text-xs`,children:[E,O]}),t[46]=E,t[47]=O,t[48]=ee):ee=t[48];let te;t[49]===l?te=t[50]:(te=()=>l(`useful`),t[49]=l,t[50]=te);let k;t[51]!==i||t[52]!==r.useful||t[53]!==te?(k=(0,W.jsx)(v,{type:`button`,variant:`ghost`,className:`h-8 px-2`,disabled:i,onClick:te,children:r.useful}),t[51]=i,t[52]=r.useful,t[53]=te,t[54]=k):k=t[54];let A;t[55]===l?A=t[56]:(A=()=>l(`not_useful`),t[55]=l,t[56]=A);let j;t[57]!==i||t[58]!==r.notUseful||t[59]!==A?(j=(0,W.jsx)(v,{type:`button`,variant:`ghost`,className:`h-8 px-2`,disabled:i,onClick:A,children:r.notUseful}),t[57]=i,t[58]=r.notUseful,t[59]=A,t[60]=j):j=t[60];let M;t[61]!==i||t[62]!==r.snooze||t[63]!==o?(M=(0,W.jsx)(v,{type:`button`,variant:`ghost`,className:`h-8 px-2`,disabled:i,onClick:o,children:r.snooze}),t[61]=i,t[62]=r.snooze,t[63]=o,t[64]=M):M=t[64];let N;t[65]!==i||t[66]!==r.dismiss||t[67]!==s?(N=(0,W.jsx)(v,{type:`button`,variant:`ghost`,className:`h-8 px-2`,disabled:i,onClick:s,children:r.dismiss}),t[65]=i,t[66]=r.dismiss,t[67]=s,t[68]=N):N=t[68];let P;t[69]!==k||t[70]!==j||t[71]!==M||t[72]!==N?(P=(0,W.jsxs)(`div`,{className:`mt-4 flex flex-wrap gap-2 border-t border-edge-subtle pt-3`,children:[k,j,M,N]}),t[69]=k,t[70]=j,t[71]=M,t[72]=N,t[73]=P):P=t[73];let F;t[74]!==u||t[75]!==c?(F=e=>{e.preventDefault();let t=u.trim();t&&(c(t),d(``))},t[74]=u,t[75]=c,t[76]=F):F=t[76];let I;t[77]===Symbol.for(`react.memo_cache_sentinel`)?(I=e=>d(e.target.value),t[77]=I):I=t[77];let L;t[78]!==u||t[79]!==r.feedbackPlaceholder?(L=(0,W.jsx)(`input`,{className:`min-w-0 flex-1 rounded-lg border border-edge bg-surface-base px-3 py-2 text-xs text-fg outline-none focus:border-accent`,value:u,onChange:I,placeholder:r.feedbackPlaceholder}),t[78]=u,t[79]=r.feedbackPlaceholder,t[80]=L):L=t[80];let R;t[81]!==i||t[82]!==u?(R=i||!u.trim(),t[81]=i,t[82]=u,t[83]=R):R=t[83];let z;t[84]!==r.applyFeedback||t[85]!==R?(z=(0,W.jsx)(v,{type:`submit`,variant:`secondary`,className:`h-9 px-3`,disabled:R,children:r.applyFeedback}),t[84]=r.applyFeedback,t[85]=R,t[86]=z):z=t[86];let B;t[87]!==F||t[88]!==L||t[89]!==z?(B=(0,W.jsxs)(`form`,{className:`mt-3 flex gap-2`,onSubmit:F,children:[L,z]}),t[87]=F,t[88]=L,t[89]=z,t[90]=B):B=t[90];let V;return t[91]!==C||t[92]!==w||t[93]!==T||t[94]!==ee||t[95]!==P||t[96]!==B||t[97]!==_?(V=(0,W.jsxs)(`article`,{className:`rounded-xl border border-accent/25 bg-accent-soft/15 p-4`,children:[_,C,w,T,ee,P,B]}),t[91]=C,t[92]=w,t[93]=T,t[94]=ee,t[95]=P,t[96]=B,t[97]=_,t[98]=V):V=t[98],V}function q(e){return(0,W.jsx)(`li`,{className:`break-all font-mono text-[11px]`,children:e},e)}function he(e){let[t,n]=e;return(0,W.jsxs)(`div`,{className:`rounded-lg bg-surface-panel/80 p-3`,children:[(0,W.jsx)(`p`,{className:`text-[11px] font-medium text-fg-subtle`,children:t}),(0,W.jsx)(`p`,{className:`mt-1 text-xs leading-5 text-fg`,children:n})]},t)}function J(){let e=g(e=>e.language),t=h(e),n=t.projectsPage,r=P(e),_=i(),[y,b]=a(),S=w(e=>e.setPageHeader),D=w(e=>e.clearPageHeader),[O,ne]=(0,U.useState)(null),[re,ie]=(0,U.useState)(!0),[H,se]=(0,U.useState)(null),[ce,le]=(0,U.useState)(!1),[ue,q]=(0,U.useState)(``),[he,J]=(0,U.useState)(null),[ge,_e]=(0,U.useState)(null),[Y,ve]=(0,U.useState)(null),[X,ye]=(0,U.useState)(!1),Z=T({chat:t.chat}),Q=(0,U.useRef)(null),be=M({disabled:X,chat:t.chat,onTranscript:e=>{q(t=>j(t,e)),window.setTimeout(()=>Q.current?.focus(),0)}}),{phase:xe,voiceActive:Se,startVoiceInput:Ce,cancelVoiceInput:we,confirmVoiceInput:Te,retryVoiceInput:Ee}=be,$=(0,U.useCallback)(async(t=!1)=>{t&&ie(!0),se(null);try{ne(await V(e))}catch(e){se(e instanceof Error?e.message:String(e))}finally{ie(!1)}},[e]);(0,U.useEffect)(()=>{$(!0)},[$]),(0,U.useEffect)(()=>{let e,t=t=>{e!==void 0&&window.clearTimeout(e),e=window.setTimeout(()=>{e=void 0,$()},t)},n=()=>t(100),r=()=>t(750),i=[`session-created`,`agent-run-started`,`agent-run-ended`,`automation-run-completed`,`workflow-run-updated`,`workflow-run-error`],a=[`session-updated`,`session-transcript-updated`];return i.forEach(e=>window.addEventListener(e,n)),a.forEach(e=>window.addEventListener(e,r)),()=>{i.forEach(e=>window.removeEventListener(e,n)),a.forEach(e=>window.removeEventListener(e,r)),e!==void 0&&window.clearTimeout(e)}},[$]);let De=(0,U.useCallback)(async e=>{if(!(e.length===0||X)){ye(!0);try{await Z.processFiles(e)}finally{ye(!1)}}},[X,Z.processFiles]),Oe=(0,U.useCallback)(async e=>{let n=C(e.clipboardData);if(n.length===0)return;e.preventDefault();let r=n.filter(ee);if(r.length===0){z(`warning`,t.chat.clipboardFileTypeUnsupported);return}await De(r)},[t.chat.clipboardFileTypeUnsupported,De]),ke=(0,U.useCallback)(e=>{e.dataTransfer.types.includes(`Files`)&&(e.preventDefault(),e.dataTransfer.dropEffect=`copy`,Z.setIsDragging(!0))},[Z.setIsDragging]),Ae=(0,U.useCallback)(e=>{let t=e.relatedTarget;(!(t instanceof Node)||!e.currentTarget.contains(t))&&Z.setIsDragging(!1)},[Z.setIsDragging]),je=(0,U.useCallback)(async e=>{e.preventDefault(),Z.setIsDragging(!1),await De(Array.from(e.dataTransfer.files))},[Z.setIsDragging,De]),Me=(0,U.useCallback)(e=>{e.preventDefault();let t=Z.wireAttachmentsPayload(),n=F(ue,t.length>0?B(t):void 0,{projectScope:`none`});n&&(le(!1),q(``),Z.clearAttachments(),_(n))},[Z.clearAttachments,Z.wireAttachmentsPayload,ue,_]),Ne=Z.attachments.length>=10,Pe={attachTitle:Ne?K(t.chat.maxAttachmentsReached,{max:10}):`${t.chat.attachFile} (${Z.attachments.length}/10)`,dropFiles:t.chat.dropFiles,intentLabel:r.intentLabel,intentPlaceholder:r.intentPlaceholder,intentSuggestion:r.intentSuggestion,shortcut:n.home.submitShortcut,submit:r.newWork},Fe=!!(O&&O.needsUser.length===0&&O.backgroundCount===0),Ie=Fe||ce;(0,U.useEffect)(()=>{!Ie&&Se&&we()},[we,Ie,Se]),(0,U.useEffect)(()=>{let e=e=>{let t=e.detail?.target;t&&t!==`chat`||!Ie||X||(e.preventDefault(),xe===`recording`?Te():xe===`idle`?(Q.current?.focus(),Ce()):xe===`error`&&Ee())},t=e=>{let t=e.detail?.target;t&&t!==`chat`||!Ie||!Se||(e.preventDefault(),we(),Q.current?.focus())};return window.addEventListener(L,e),window.addEventListener(A,t),()=>{window.removeEventListener(L,e),window.removeEventListener(A,t)}},[X,we,Ie,Te,Ee,Ce,Se,xe]);let Le=(0,U.useCallback)(e=>{e||we(),le(e)},[we]),Re=(0,U.useMemo)(()=>Fe?null:(0,W.jsxs)(v,{type:`button`,variant:`primary`,className:`h-9 rounded-lg`,onClick:()=>le(!0),children:[(0,W.jsx)(p,{className:`size-4`,"aria-hidden":!0}),r.newWork]}),[r.newWork,Fe]),ze=(0,U.useCallback)(async(e,t)=>{J(e.id),se(null);try{await t(),await $(),ve(null),b(e=>{let t=new URLSearchParams(e);return t.delete(`judgment`),t},{replace:!0})}catch(e){se(e instanceof Error?e.message:String(e))}finally{J(null)}},[$,b]);(0,U.useEffect)(()=>{let e=y.get(`judgment`);if(!e||!O)return;let t=O.decisions.find(t=>t.judgment?.inboxItemId===e);t&&ve(t)},[O,y]);let Be=(0,U.useCallback)(()=>{ve(null),b(e=>{let t=new URLSearchParams(e);return t.delete(`judgment`),t},{replace:!0})},[b]),Ve=(0,U.useCallback)((e,t)=>{if(e.type===`open`){_(e.href);return}if(e.type===`review_judgment`){let t=O?.decisions.find(t=>t.judgment?.inboxItemId===e.itemId);t&&ve(t);return}_e(t),se(null),(async()=>{try{e.type===`connector_decision`?await ae({kind:`connector_approval`,approvalId:e.approvalId},e.decision):e.type===`retry_run`?await N({kind:e.subjectKind,runId:e.runId}):e.type===`acknowledge_run`&&await k({kind:e.subjectKind,runId:e.runId}),await $()}catch(e){se(e instanceof Error?e.message:String(e))}finally{_e(null)}})()},[O?.decisions,$,_]);(0,U.useLayoutEffect)(()=>(S({startExtra:null,main:(0,W.jsx)(`h1`,{className:`truncate text-base font-semibold tracking-tight text-fg`,children:n.title}),end:Re}),()=>D()),[D,Re,S,n.title]);let He=O?.needsUser.length??0,Ue=O?.backgroundCount??0,We=He>0?K(n.home.attentionTitle,{count:He}):Ue>0?n.home.clearTitle:n.home.idleTitle,Ge=He>0?Ue>0?K(n.home.attentionIntroWithBackground,{count:Ue}):n.home.attentionIntro:Ue>0?K(n.home.clearIntro,{count:Ue}):n.home.idleIntro;return(0,W.jsxs)(`main`,{className:`mx-auto flex w-full max-w-[920px] flex-1 flex-col px-4 py-8 sm:px-6 lg:px-8 lg:py-12`,children:[(0,W.jsx)(`input`,{ref:Z.fileInputRef,type:`file`,multiple:!0,accept:te,className:`hidden`,onChange:e=>{let t=e.target.files;t&&De(Array.from(t)),e.target.value=``}}),(0,W.jsx)(f,{open:ce,onOpenChange:Le,children:(0,W.jsxs)(l,{children:[(0,W.jsx)(o,{className:`fixed inset-0 z-[80] bg-scrim backdrop-blur-[2px]`}),(0,W.jsxs)(u,{className:`fixed left-1/2 top-1/2 z-[90] flex h-[min(31rem,calc(100dvh-1.5rem))] w-[min(36rem,calc(100vw-1.5rem))] -translate-x-1/2 -translate-y-1/2 flex-col overflow-hidden rounded-xl border border-edge bg-surface-panel shadow-float focus:outline-none`,children:[(0,W.jsxs)(`div`,{className:`flex shrink-0 items-start gap-4 border-b border-edge px-5 py-4`,children:[(0,W.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,W.jsx)(d,{className:`text-base font-semibold text-fg`,children:r.dialogTitle}),(0,W.jsx)(s,{className:`mt-1 text-sm leading-5 text-fg-muted`,children:r.dialogDescription})]}),(0,W.jsx)(c,{asChild:!0,children:(0,W.jsx)(v,{type:`button`,variant:`ghost`,className:`-mr-2 -mt-1 size-8 shrink-0 rounded-lg p-0`,title:n.cancel,"aria-label":n.cancel,children:(0,W.jsx)(m,{className:`size-4`,"aria-hidden":!0})})})]}),(0,W.jsx)(G,{variant:`dialog`,inputId:`new-conversation-intent`,inputRef:Q,intent:ue,labels:{...Pe,submit:r.submit},attachments:Z.attachments,isDragging:Z.isDragging,attachmentBusy:X,attachmentsFull:Ne,voice:be,chat:t.chat,cancelAction:(0,W.jsx)(c,{asChild:!0,children:(0,W.jsx)(v,{type:`button`,variant:`ghost`,children:n.cancel})}),onIntentChange:q,onPickFiles:()=>Z.fileInputRef.current?.click(),onRemoveAttachment:Z.removeAttachment,onPaste:e=>void Oe(e),onDragOver:ke,onDragLeave:Ae,onDrop:e=>void je(e),onSubmit:Me})]})]})}),(0,W.jsx)(f,{open:!!Y,onOpenChange:e=>{e||Be()},children:(0,W.jsxs)(l,{children:[(0,W.jsx)(o,{className:`fixed inset-0 z-[80] bg-scrim backdrop-blur-[2px]`}),(0,W.jsxs)(u,{className:`fixed left-1/2 top-1/2 z-[90] flex h-[min(42rem,calc(100dvh-1.5rem))] w-[min(42rem,calc(100vw-1.5rem))] -translate-x-1/2 -translate-y-1/2 flex-col overflow-hidden rounded-xl border border-edge bg-surface-panel shadow-float focus:outline-none`,children:[(0,W.jsxs)(`div`,{className:`flex shrink-0 items-center justify-between gap-3 border-b border-edge px-4 py-3`,children:[(0,W.jsx)(d,{className:`text-sm font-semibold text-fg`,children:r.needsAttention}),(0,W.jsx)(c,{asChild:!0,children:(0,W.jsx)(v,{type:`button`,variant:`ghost`,className:`size-8 p-0`,title:n.cancel,"aria-label":n.cancel,children:(0,W.jsx)(m,{className:`size-4`,"aria-hidden":!0})})})]}),(0,W.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto p-4`,children:Y?.judgment?(0,W.jsx)(me,{item:Y,labels:r,busy:he===Y.id,onDecide:e=>void ze(Y,()=>x(Y.judgment.inboxItemId,e)),onSnooze:()=>void ze(Y,()=>oe(Y.judgment.inboxItemId,`snoozed`)),onDismiss:()=>void ze(Y,()=>oe(Y.judgment.inboxItemId,`resolved`)),onInstruct:e=>void ze(Y,()=>R(Y.judgment.inboxItemId,e)),onFeedback:e=>void ze(Y,()=>I(Y.judgment.inboxItemId,e))}):null})]})]})}),H?(0,W.jsxs)(`div`,{className:`mb-6 flex items-center justify-between gap-3 rounded-xl border border-danger/25 bg-danger-soft px-4 py-3 text-sm text-danger`,children:[(0,W.jsx)(`span`,{children:H}),(0,W.jsx)(v,{type:`button`,variant:`ghost`,className:`h-8 px-2`,onClick:()=>void $(),children:n.home.retry})]}):null,re?(0,W.jsx)(de,{}):O?(0,W.jsxs)(`div`,{className:Fe?`flex min-h-[calc(100dvh-10rem)] items-center justify-center pb-[12vh]`:``,children:[(0,W.jsxs)(`section`,{className:Fe?`w-full max-w-2xl text-center`:`max-w-3xl`,children:[(0,W.jsx)(`h2`,{className:`text-3xl font-semibold tracking-[-0.035em] text-fg sm:text-[2.5rem] sm:leading-[1.12]`,children:We}),(0,W.jsx)(`p`,{className:Fe?`mx-auto mt-3 max-w-xl text-sm leading-6 text-fg-muted sm:text-base sm:leading-7`:`mt-3 max-w-2xl text-sm leading-6 text-fg-muted sm:text-base sm:leading-7`,children:Ge}),Fe?(0,W.jsx)(G,{variant:`inline`,inputId:`idle-conversation-intent`,inputRef:Q,intent:ue,labels:Pe,attachments:Z.attachments,isDragging:Z.isDragging,attachmentBusy:X,attachmentsFull:Ne,voice:be,chat:t.chat,onIntentChange:q,onPickFiles:()=>Z.fileInputRef.current?.click(),onRemoveAttachment:Z.removeAttachment,onPaste:e=>void Oe(e),onDragOver:ke,onDragLeave:Ae,onDrop:e=>void je(e),onSubmit:Me}):null]}),O.needsUser.length>0?(0,W.jsxs)(`section`,{className:`mt-10`,"aria-labelledby":`home-needs-user-title`,children:[(0,W.jsxs)(`div`,{className:`mb-3 flex items-center gap-2 px-1`,children:[(0,W.jsx)(E,{className:`size-4 text-warning`,"aria-hidden":!0}),(0,W.jsx)(`h2`,{id:`home-needs-user-title`,className:`text-sm font-semibold text-fg`,children:n.home.needsUserTitle})]}),(0,W.jsx)(`div`,{className:`divide-y divide-edge-subtle overflow-hidden rounded-2xl border border-edge-subtle bg-surface-base`,children:O.needsUser.map(t=>(0,W.jsx)(fe,{item:t,busy:ge===t.id,recommendationLabel:n.home.recommendationLabel,dueLabel:n.home.dueLabel,failureLabel:r.runAttention,locale:e,onAction:Ve},t.id))})]}):null,O.background.length>0?(0,W.jsxs)(`section`,{className:`mt-10`,"aria-labelledby":`home-background-title`,children:[(0,W.jsxs)(`div`,{className:`flex items-center justify-between gap-3 px-1`,children:[(0,W.jsx)(`h2`,{id:`home-background-title`,className:`text-sm font-semibold text-fg`,children:n.home.backgroundTitle}),(0,W.jsx)(`span`,{className:`text-xs text-fg-subtle`,children:K(n.home.backgroundCount,{count:O.backgroundCount})})]}),(0,W.jsx)(`div`,{className:`mt-2 divide-y divide-edge-subtle border-y border-edge-subtle`,children:O.background.map(e=>(0,W.jsx)(pe,{item:e,onAction:Ve},e.id))}),(0,W.jsx)(`p`,{className:`mt-5 text-xs leading-5 text-fg-subtle`,children:n.home.autoArchiveNote})]}):null]}):null]})}export{J as HomePage};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e,r as t}from"./locale-store-
|
|
1
|
+
import{a as e,r as t}from"./locale-store-CF4erhjB.js";async function n(){let n=await e(t(`/api/image-generation/catalog`));if(!Array.isArray(n.payload?.providers))throw Error(`Invalid image provider catalog`);return n.payload.providers}async function r(){let n=await e(t(`/api/image-generation/custom-providers`));if(!Array.isArray(n.payload?.providers))throw Error(`Invalid custom image provider list`);return n.payload.providers}async function i(n,r){await e(t(`/api/image-generation/custom-providers/${encodeURIComponent(n)}`),{method:`PUT`,body:JSON.stringify(r)})}async function a(n){await e(t(`/api/image-generation/custom-providers/${encodeURIComponent(n)}`),{method:`DELETE`})}async function o(n,r){await e(t(`/api/image-generation/providers/${encodeURIComponent(n)}/credential`),{method:`PUT`,body:JSON.stringify({apiKey:r})})}async function s(n,r){let i=await e(t(`/api/image-generation/providers/${encodeURIComponent(n)}/test`),{method:`POST`,body:JSON.stringify({modelId:r})});if(!Array.isArray(i.payload?.images))throw Error(`Invalid image generation test response`);return{images:i.payload.images}}export{o as a,i,r as n,s as o,n as r,a as t};
|