@loicngr/kobo 1.7.1 → 1.7.2
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/server/services/agent/engines/claude-code/engine.js +6 -0
- package/dist/server/services/agent/engines/claude-code/resolve-binary.js +50 -0
- package/dist/server/services/agent/orchestrator.js +14 -5
- package/dist/server/services/dev-server-service.js +2 -2
- package/dist/server/services/pr-watcher-service.js +63 -13
- package/dist/server/services/settings-service.js +27 -0
- package/dist/server/services/workspace-service.js +21 -0
- package/dist/server/utils/git-ops.js +12 -4
- package/package.json +1 -1
- package/src/client/dist/spa/assets/{ActivityFeed-Chn8aZvi.js → ActivityFeed-B85xav_e.js} +1 -1
- package/src/client/dist/spa/assets/ClosePopup-BP025_cK.js +1 -0
- package/src/client/dist/spa/assets/{CreatePage-BGtqoZ8d.js → CreatePage-DyR33jFM.js} +2 -2
- package/src/client/dist/spa/assets/{DiffViewer-qjJ-biOw.js → DiffViewer-CqhpTkym.js} +3 -3
- package/src/client/dist/spa/assets/{HealthPage-CKyf7ky6.js → HealthPage-CkHv5qMK.js} +1 -1
- package/src/client/dist/spa/assets/MainLayout-l91ohFQA.js +37 -0
- package/src/client/dist/spa/assets/{QBadge-fsQ2AokU.js → QBadge-DWH42dbo.js} +1 -1
- package/src/client/dist/spa/assets/{QBtn-DHwAb18J.js → QBtn-a6jxWjmW.js} +1 -1
- package/src/client/dist/spa/assets/{QCheckbox-CcY7ZSk9.js → QCheckbox-D5jfsxLV.js} +1 -1
- package/src/client/dist/spa/assets/{QChip-BhT0W2Dg.js → QChip-ByxK0Tuf.js} +1 -1
- package/src/client/dist/spa/assets/QExpansionItem-BaQJkGb-.js +1 -0
- package/src/client/dist/spa/assets/{QIcon-B0-pH3Qs.js → QIcon-BJuyqdsT.js} +1 -1
- package/src/client/dist/spa/assets/QInput-Cm5-AGQ4.js +1 -0
- package/src/client/dist/spa/assets/{QItemLabel-DWwenW2S.js → QItemLabel-DrTxqTqV.js} +1 -1
- package/src/client/dist/spa/assets/{QItemSection-KFAnxzMK.js → QItemSection-5YpFpPDm.js} +1 -1
- package/src/client/dist/spa/assets/{QList-NmIE6Rd9.js → QList-D0FtnQJI.js} +1 -1
- package/src/client/dist/spa/assets/QMenu-DgWZe7Uh.js +1 -0
- package/src/client/dist/spa/assets/QPage-ChUKoaKe.js +1 -0
- package/src/client/dist/spa/assets/{QRadio-DaZhdLCg.js → QRadio-B3aKjCVu.js} +1 -1
- package/src/client/dist/spa/assets/QScrollArea-usfgatuS.js +1 -0
- package/src/client/dist/spa/assets/{QSpace-COlmM_4F.js → QSpace-CLtL3aPy.js} +1 -1
- package/src/client/dist/spa/assets/{QSpinnerDots-DwtnRN2r.js → QSpinnerDots-CszPQQ9J.js} +1 -1
- package/src/client/dist/spa/assets/QTabPanels-CjpZTIJg.js +1 -0
- package/src/client/dist/spa/assets/{QToggle-CGpiJLDJ.js → QToggle-1-N9qWq4.js} +1 -1
- package/src/client/dist/spa/assets/QTooltip-D_hSPb7r.js +1 -0
- package/src/client/dist/spa/assets/{SearchPage-Ce8Uc7Ol.js → SearchPage-B1WhFCUf.js} +1 -1
- package/src/client/dist/spa/assets/SettingsPage-B7S5fXGG.js +1 -0
- package/src/client/dist/spa/assets/SettingsPage-kHd651y8.css +1 -0
- package/src/client/dist/spa/assets/TouchPan-1PETKHN0.js +1 -0
- package/src/client/dist/spa/assets/WorkspacePage-D3MBshNH.js +4 -0
- package/src/client/dist/spa/assets/{WorkspacePage-DQxGe62K.css → WorkspacePage-d_B0-LNG.css} +1 -1
- package/src/client/dist/spa/assets/{build-path-tree-DRViYT3t.js → build-path-tree-w3SEPAbh.js} +1 -1
- package/src/client/dist/spa/assets/{cssMode-uAfRqG2Q.js → cssMode-B6CD4qMI.js} +1 -1
- package/src/client/dist/spa/assets/{documents-D6A3wRry.js → documents-kx0vLfSG.js} +1 -1
- package/src/client/dist/spa/assets/{editor.api-5GUlxvcL.js → editor.api-wizjkvCK.js} +1 -1
- package/src/client/dist/spa/assets/{editor.main-CSTJjBIa.js → editor.main-Bn6fpPLF.js} +3 -3
- package/src/client/dist/spa/assets/expand-template-Cu5GSLCM.js +1 -0
- package/src/client/dist/spa/assets/{formatters-ejxELb0M.js → formatters-BD0_hovB.js} +1 -1
- package/src/client/dist/spa/assets/{freemarker2-BxBnI8Nb.js → freemarker2-DW-DFUis.js} +1 -1
- package/src/client/dist/spa/assets/{handlebars-DrbIsXmT.js → handlebars-CSSQFRHS.js} +1 -1
- package/src/client/dist/spa/assets/{html-DH7u_g5l.js → html-Ba5lfQna.js} +1 -1
- package/src/client/dist/spa/assets/{htmlMode-BlY9QO3f.js → htmlMode-ocrlHn5h.js} +1 -1
- package/src/client/dist/spa/assets/i18n-CqK8B0Nz.js +1 -0
- package/src/client/dist/spa/assets/index-DE3PxEjy.js +2 -0
- package/src/client/dist/spa/assets/{javascript-B-AL31ke.js → javascript-DL3j24x3.js} +1 -1
- package/src/client/dist/spa/assets/{jsonMode-Dx7CA4ag.js → jsonMode-CtFp2BJe.js} +1 -1
- package/src/client/dist/spa/assets/{liquid--H7Vomnm.js → liquid-B_GGNnlJ.js} +1 -1
- package/src/client/dist/spa/assets/marked.esm-D4t0_2pc.js +60 -0
- package/src/client/dist/spa/assets/{mdx-BOackeU6.js → mdx-BXe8MrIz.js} +1 -1
- package/src/client/dist/spa/assets/models-BMOYJtwv.js +1 -0
- package/src/client/dist/spa/assets/{monaco.contribution-ydrMjZwK.js → monaco.contribution-DSSRKV2r.js} +2 -2
- package/src/client/dist/spa/assets/notifications-CG-oL2m2.js +1 -0
- package/src/client/dist/spa/assets/{python-BWGSV-nk.js → python-DPtBXcrE.js} +1 -1
- package/src/client/dist/spa/assets/{razor-BGnl83cS.js → razor-y1p5VjhT.js} +1 -1
- package/src/client/dist/spa/assets/{tsMode-Chjqq1f3.js → tsMode-CV2CQlAd.js} +1 -1
- package/src/client/dist/spa/assets/{typescript-By7Y7PAP.js → typescript-DsjWQLAN.js} +1 -1
- package/src/client/dist/spa/assets/use-checkbox-D7zmRxGI.js +1 -0
- package/src/client/dist/spa/assets/{use-id-CDuXkR0Z.js → use-id-CuaR1RiE.js} +1 -1
- package/src/client/dist/spa/assets/use-panel-D2MjPZiL.js +1 -0
- package/src/client/dist/spa/assets/{xml-DoAeCRiy.js → xml-AQhpP8em.js} +1 -1
- package/src/client/dist/spa/assets/{yaml-DlT7YOhG.js → yaml-zZFlU7RD.js} +1 -1
- package/src/client/dist/spa/index.html +11 -13
- package/src/client/dist/spa/sounds/ca_va_peter.mp3 +0 -0
- package/src/client/dist/spa/sounds/dry-fart.mp3 +0 -0
- package/src/client/dist/spa/sounds/faaah.mp3 +0 -0
- package/src/client/dist/spa/sounds/for-shure.mp3 +0 -0
- package/src/client/dist/spa/sounds/travail_termine.mp3 +0 -0
- package/src/client/dist/spa/assets/ClosePopup-BUlGXTqh.js +0 -1
- package/src/client/dist/spa/assets/MainLayout-Br3jmaOw.js +0 -37
- package/src/client/dist/spa/assets/QExpansionItem-BnIPCzXR.js +0 -1
- package/src/client/dist/spa/assets/QInput-D4WJro4e.js +0 -1
- package/src/client/dist/spa/assets/QMenu-0LsqhRZT.js +0 -1
- package/src/client/dist/spa/assets/QPage-Cu7zkfc6.js +0 -1
- package/src/client/dist/spa/assets/QResizeObserver-Cf79V-VZ.js +0 -1
- package/src/client/dist/spa/assets/QScrollArea-BDCKOKuE.js +0 -1
- package/src/client/dist/spa/assets/QTabPanels-Ctnrqvp9.js +0 -1
- package/src/client/dist/spa/assets/QTooltip-B3CmRx4j.js +0 -1
- package/src/client/dist/spa/assets/SettingsPage-8N0X7B7o.css +0 -1
- package/src/client/dist/spa/assets/SettingsPage-BaaSJ3eJ.js +0 -1
- package/src/client/dist/spa/assets/WorkspacePage-wZUUTDzp.js +0 -4
- package/src/client/dist/spa/assets/expand-template-zA3pTyIP.js +0 -1
- package/src/client/dist/spa/assets/i18n-B41j--A3.js +0 -1
- package/src/client/dist/spa/assets/index-DoYBJtQA.js +0 -2
- package/src/client/dist/spa/assets/is-BbsvEMaT.js +0 -1
- package/src/client/dist/spa/assets/marked.esm-DLCrAGtO.js +0 -60
- package/src/client/dist/spa/assets/models-BPfFBcxr.js +0 -1
- package/src/client/dist/spa/assets/settings-lT4GB-uB.js +0 -1
- package/src/client/dist/spa/assets/symbols-BVRrMH2r.js +0 -1
- package/src/client/dist/spa/assets/use-checkbox-DzHmcu7s.js +0 -1
- package/src/client/dist/spa/assets/use-panel-DWX2aNMM.js +0 -1
- /package/src/client/dist/spa/assets/{_plugin-vue_export-helper-B8bB5DBd.js → _plugin-vue_export-helper-Cj6tcsj6.js} +0 -0
- /package/src/client/dist/spa/assets/{abap-DzK-OTGh.js → abap-DiwvWnMr.js} +0 -0
- /package/src/client/dist/spa/assets/{apex-Bj60_dRt.js → apex-CmtZjKlf.js} +0 -0
- /package/src/client/dist/spa/assets/{azcli-B6NwaBAZ.js → azcli-DL2My_i-.js} +0 -0
- /package/src/client/dist/spa/assets/{bat-bf7wXV68.js → bat-B-nC98wG.js} +0 -0
- /package/src/client/dist/spa/assets/{bicep-C_bg8UgA.js → bicep-Ju5MwOgh.js} +0 -0
- /package/src/client/dist/spa/assets/{cameligo-CTWw4D4B.js → cameligo-8Eu1TyBr.js} +0 -0
- /package/src/client/dist/spa/assets/{clojure-CgdPoH0r.js → clojure-u-RpMkH3.js} +0 -0
- /package/src/client/dist/spa/assets/{coffee-gHQfdA5M.js → coffee-CdA7bbTe.js} +0 -0
- /package/src/client/dist/spa/assets/{cpp-BM4Jj4aW.js → cpp-CzNFP8ks.js} +0 -0
- /package/src/client/dist/spa/assets/{csharp-D8-bh4Cd.js → csharp-j1LThmcE.js} +0 -0
- /package/src/client/dist/spa/assets/{csp-CXBxRx0n.js → csp-CLRC61y6.js} +0 -0
- /package/src/client/dist/spa/assets/{css-DKjIxrmY.js → css-r6rC_7P2.js} +0 -0
- /package/src/client/dist/spa/assets/{cypher-C5e5inIh.js → cypher-CW08XVUh.js} +0 -0
- /package/src/client/dist/spa/assets/{dart-BhRHHm4x.js → dart-Cs9aL5T_.js} +0 -0
- /package/src/client/dist/spa/assets/{dockerfile-DW5REF8E.js → dockerfile-BWM0M184.js} +0 -0
- /package/src/client/dist/spa/assets/{ecl-Bw4Hg3n_.js → ecl-MJJuer5P.js} +0 -0
- /package/src/client/dist/spa/assets/{elixir-DHmoBvpZ.js → elixir-D2AIuXqn.js} +0 -0
- /package/src/client/dist/spa/assets/{flow9-BsFExz3v.js → flow9-B2H24giC.js} +0 -0
- /package/src/client/dist/spa/assets/{fsharp-BaeLhgfq.js → fsharp-CMk2OIJN.js} +0 -0
- /package/src/client/dist/spa/assets/{go-Bd-NFKIC.js → go-BrMkuJg0.js} +0 -0
- /package/src/client/dist/spa/assets/{graphql-DZVerJfy.js → graphql-PSR1UKGv.js} +0 -0
- /package/src/client/dist/spa/assets/{hcl-CAVzrZfH.js → hcl-DAQrbDOW.js} +0 -0
- /package/src/client/dist/spa/assets/{ini-CyXdX58t.js → ini-0TG5BxW0.js} +0 -0
- /package/src/client/dist/spa/assets/{java-B5pNgvhy.js → java-rgorz17v.js} +0 -0
- /package/src/client/dist/spa/assets/{julia-XRhmV3AN.js → julia-C8VMdHm8.js} +0 -0
- /package/src/client/dist/spa/assets/{kobo-commands-DiUm1Y34.js → kobo-commands-w8VepGvD.js} +0 -0
- /package/src/client/dist/spa/assets/{kotlin-DOd3J5vr.js → kotlin-CllWo3gX.js} +0 -0
- /package/src/client/dist/spa/assets/{less-veZSnyw6.js → less-Cgca25AP.js} +0 -0
- /package/src/client/dist/spa/assets/{lexon-QWGkuK0H.js → lexon-D0GHdBaw.js} +0 -0
- /package/src/client/dist/spa/assets/{lua-CYGpjuO5.js → lua-DmRsNG-P.js} +0 -0
- /package/src/client/dist/spa/assets/{m3-yNnrZkdc.js → m3-BgL5dNKT.js} +0 -0
- /package/src/client/dist/spa/assets/{markdown-BCSWEPSX.js → markdown-BuJfycGS.js} +0 -0
- /package/src/client/dist/spa/assets/{mips-OpYmcC30.js → mips-C9m_93PR.js} +0 -0
- /package/src/client/dist/spa/assets/{msdax-2oxoTO9Z.js → msdax-CpFHC9OI.js} +0 -0
- /package/src/client/dist/spa/assets/{mysql-5KlC-K_9.js → mysql-qFvltsqN.js} +0 -0
- /package/src/client/dist/spa/assets/{objective-c-CcDCgtLx.js → objective-c-Bnmr858J.js} +0 -0
- /package/src/client/dist/spa/assets/{pascal-BZGsbaEV.js → pascal-WP0_D5AO.js} +0 -0
- /package/src/client/dist/spa/assets/{pascaligo-DtD5qU3G.js → pascaligo-Blom4Rij.js} +0 -0
- /package/src/client/dist/spa/assets/{perl-C1jNNS3E.js → perl-B-vk8g64.js} +0 -0
- /package/src/client/dist/spa/assets/{pgsql-CT0fhiZa.js → pgsql-Cgvz6v67.js} +0 -0
- /package/src/client/dist/spa/assets/{php-D6DrXoPM.js → php-8a3Lrw9m.js} +0 -0
- /package/src/client/dist/spa/assets/{pla-b3-HN2pF.js → pla-DuFqEZ8V.js} +0 -0
- /package/src/client/dist/spa/assets/{postiats-Bin2ApVS.js → postiats-DkLtSgkp.js} +0 -0
- /package/src/client/dist/spa/assets/{powerquery-7ASnn-ZG.js → powerquery-BJ1aNepW.js} +0 -0
- /package/src/client/dist/spa/assets/{powershell-t4p7sU1H.js → powershell-rE98k687.js} +0 -0
- /package/src/client/dist/spa/assets/{protobuf-BUGeWa_j.js → protobuf-CUheFacr.js} +0 -0
- /package/src/client/dist/spa/assets/{pug-BuKcgC9s.js → pug-LDcAMD8w.js} +0 -0
- /package/src/client/dist/spa/assets/{qsharp-DSMtI_O7.js → qsharp-DUKSQoR1.js} +0 -0
- /package/src/client/dist/spa/assets/{r-DMlFgn7A.js → r-D-QApv87.js} +0 -0
- /package/src/client/dist/spa/assets/{redis-cXItkC5u.js → redis-SXdDyWR9.js} +0 -0
- /package/src/client/dist/spa/assets/{redshift-BZVbW7HE.js → redshift-Y6lsCryn.js} +0 -0
- /package/src/client/dist/spa/assets/{restructuredtext-BzjxwS8h.js → restructuredtext-edObr9a8.js} +0 -0
- /package/src/client/dist/spa/assets/{ruby-C5nyLV4l.js → ruby-CNnUfF-8.js} +0 -0
- /package/src/client/dist/spa/assets/{rust-BcmMsHdf.js → rust-IHUZWzBr.js} +0 -0
- /package/src/client/dist/spa/assets/{sb-Dnb1iy6B.js → sb-DrUvY44N.js} +0 -0
- /package/src/client/dist/spa/assets/{scala-anMIFYpA.js → scala-B4hbXGLM.js} +0 -0
- /package/src/client/dist/spa/assets/{scheme-BItQTe08.js → scheme-BGrd12j3.js} +0 -0
- /package/src/client/dist/spa/assets/{scss-BOv51BJ5.js → scss-x5G1ES4U.js} +0 -0
- /package/src/client/dist/spa/assets/{shell-BsRYRTNN.js → shell-DOehe2Y8.js} +0 -0
- /package/src/client/dist/spa/assets/{solidity-BtuLgGDx.js → solidity-BeRvcwWV.js} +0 -0
- /package/src/client/dist/spa/assets/{sophia-B0Vkc5MF.js → sophia-DZbkUNjy.js} +0 -0
- /package/src/client/dist/spa/assets/{sparql-B7lvkZQM.js → sparql-B7_oi5-h.js} +0 -0
- /package/src/client/dist/spa/assets/{sql-DvP5MpA3.js → sql-CTlsFWVE.js} +0 -0
- /package/src/client/dist/spa/assets/{st-GVUeyB3U.js → st-DJVEJdPE.js} +0 -0
- /package/src/client/dist/spa/assets/{swift-DSPIoCjm.js → swift-CwhT3fYa.js} +0 -0
- /package/src/client/dist/spa/assets/{systemverilog-Icj2-k23.js → systemverilog-BQN63pkN.js} +0 -0
- /package/src/client/dist/spa/assets/{tcl-Cd8KQcm-.js → tcl-DqwfpskA.js} +0 -0
- /package/src/client/dist/spa/assets/{touch-Co9pfjUU.js → touch-HRdTUO2o.js} +0 -0
- /package/src/client/dist/spa/assets/{twig-CBHmt8z3.js → twig-BiyenUgc.js} +0 -0
- /package/src/client/dist/spa/assets/{typespec-Ckc037mq.js → typespec-CWOJribt.js} +0 -0
- /package/src/client/dist/spa/assets/{use-quasar-Cc4smfg5.js → use-quasar-Sdcq6zzV.js} +0 -0
- /package/src/client/dist/spa/assets/{vb-B97GW9Wb.js → vb-Cq5F87m3.js} +0 -0
- /package/src/client/dist/spa/assets/{vue-i18n-eUDnMrPl.js → vue-i18n-BcfTCFFS.js} +0 -0
- /package/src/client/dist/spa/assets/{wgsl-DIKmb3YH.js → wgsl-BAvW2lVr.js} +0 -0
- /package/src/client/dist/spa/{notification.mp3 → sounds/hey.mp3} +0 -0
|
@@ -4,6 +4,7 @@ import { CLAUDE_CODE_CAPABILITIES } from './capabilities.js';
|
|
|
4
4
|
import { createMapperState, mapSdkMessage } from './event-mapper.js';
|
|
5
5
|
import { buildClaudeOptions } from './options-builder.js';
|
|
6
6
|
import { buildPreCompactCustomInstructions } from './precompact-hook.js';
|
|
7
|
+
import { resolveClaudeBinaryPath } from './resolve-binary.js';
|
|
7
8
|
function toMcpServersMap(specs) {
|
|
8
9
|
if (!specs || specs.length === 0)
|
|
9
10
|
return undefined;
|
|
@@ -112,6 +113,11 @@ export function createClaudeCodeEngine() {
|
|
|
112
113
|
},
|
|
113
114
|
});
|
|
114
115
|
sdkOptions.abortController = abortController;
|
|
116
|
+
// Override the SDK's libc-blind binary resolution on Linux glibc — see
|
|
117
|
+
// resolve-binary.ts for the full rationale. No-op on macOS/Windows/musl.
|
|
118
|
+
const explicitBinary = resolveClaudeBinaryPath();
|
|
119
|
+
if (explicitBinary)
|
|
120
|
+
sdkOptions.pathToClaudeCodeExecutable = explicitBinary;
|
|
115
121
|
const q = query({ prompt: effectivePrompt, options: sdkOptions });
|
|
116
122
|
let discoveredSessionId;
|
|
117
123
|
// A throwing onEvent handler (e.g. DB query against a closed connection
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { createRequire } from 'node:module';
|
|
2
|
+
const localRequire = createRequire(import.meta.url);
|
|
3
|
+
/**
|
|
4
|
+
* Detect the live host's platform/arch/libc from `process`. `glibcVersionRuntime`
|
|
5
|
+
* lives in the diagnostic report header on glibc systems and is absent on musl.
|
|
6
|
+
* Available since Node 12; Kōbō requires Node ≥ 20 (see AGENTS.md).
|
|
7
|
+
*/
|
|
8
|
+
export function detectPlatform() {
|
|
9
|
+
const report = process.report;
|
|
10
|
+
const glibcVersion = report?.getReport().header?.glibcVersionRuntime;
|
|
11
|
+
return {
|
|
12
|
+
platform: process.platform,
|
|
13
|
+
arch: process.arch,
|
|
14
|
+
isGlibc: typeof glibcVersion === 'string' && glibcVersion.length > 0,
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Resolve an explicit path to the Claude CLI binary that matches the host
|
|
19
|
+
* libc — or `undefined` to fall back to the SDK's built-in resolution.
|
|
20
|
+
*
|
|
21
|
+
* Why this exists: on Linux glibc systems npm installs both
|
|
22
|
+
* `@anthropic-ai/claude-agent-sdk-linux-${arch}` (glibc) and
|
|
23
|
+
* `@anthropic-ai/claude-agent-sdk-linux-${arch}-musl` because npm doesn't
|
|
24
|
+
* filter `optionalDependencies` by the `libc` field. The SDK's internal
|
|
25
|
+
* resolver tries the musl variant first and returns its path; that binary
|
|
26
|
+
* then ENOENTs at exec because its dynamic linker (`/lib/ld-musl-*.so.1`)
|
|
27
|
+
* is absent on glibc systems, surfacing the misleading "Claude Code native
|
|
28
|
+
* binary not found" error.
|
|
29
|
+
*
|
|
30
|
+
* Returning the explicit glibc path here overrides the SDK's choice and
|
|
31
|
+
* sidesteps the bug.
|
|
32
|
+
*
|
|
33
|
+
* On every other platform (musl Linux, macOS, Windows, unknown libc, or
|
|
34
|
+
* unsupported arch), this returns `undefined` so the SDK keeps its default
|
|
35
|
+
* resolution behaviour.
|
|
36
|
+
*/
|
|
37
|
+
export function resolveClaudeBinaryPath(probe = detectPlatform(), resolveFn = (id) => localRequire.resolve(id)) {
|
|
38
|
+
if (probe.platform !== 'linux')
|
|
39
|
+
return undefined;
|
|
40
|
+
if (!probe.isGlibc)
|
|
41
|
+
return undefined;
|
|
42
|
+
if (probe.arch !== 'x64' && probe.arch !== 'arm64')
|
|
43
|
+
return undefined;
|
|
44
|
+
try {
|
|
45
|
+
return resolveFn(`@anthropic-ai/claude-agent-sdk-linux-${probe.arch}/claude`);
|
|
46
|
+
}
|
|
47
|
+
catch {
|
|
48
|
+
return undefined;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
@@ -590,11 +590,20 @@ function onSessionEnded(workspaceId, agentSessionId, exitCode, reason, resumeFai
|
|
|
590
590
|
// `resumeFailed` is benign: stale id cleared, next iteration starts fresh.
|
|
591
591
|
const isErrorOutcome = !resumeFailed && (reason === 'error' || (exitCode !== null && exitCode !== 0));
|
|
592
592
|
const targetStatus = isErrorOutcome ? 'error' : 'completed';
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
593
|
+
// Skip the transition when the workspace is already in a terminal state.
|
|
594
|
+
// This happens when stopAgent (or an equivalent caller) synchronously
|
|
595
|
+
// normalised the status before the engine's async stop emitted session:ended
|
|
596
|
+
// — typically `awaiting-user → idle`. Without this guard we'd attempt e.g.
|
|
597
|
+
// `idle → completed` and log a benign error on every such manual stop.
|
|
598
|
+
const currentStatus = currentWorkspace?.status;
|
|
599
|
+
const alreadyTerminal = currentStatus === 'idle' || currentStatus === 'completed' || currentStatus === 'error' || currentStatus === 'quota';
|
|
600
|
+
if (!alreadyTerminal) {
|
|
601
|
+
try {
|
|
602
|
+
updateWorkspaceStatus(workspaceId, targetStatus);
|
|
603
|
+
}
|
|
604
|
+
catch (err) {
|
|
605
|
+
console.error('[orchestrator] Failed to update workspace status on exit:', err);
|
|
606
|
+
}
|
|
598
607
|
}
|
|
599
608
|
try {
|
|
600
609
|
markWorkspaceUnread(workspaceId);
|
|
@@ -164,7 +164,7 @@ export function startDevServer(workspaceId) {
|
|
|
164
164
|
const instanceName = sanitizeBranchName(workspace.workingBranch);
|
|
165
165
|
// Execute as bash script (supports multi-line scripts)
|
|
166
166
|
const worktreePath = workspace.worktreePath;
|
|
167
|
-
const cwd = existsSync(worktreePath) ? worktreePath : workspace.projectPath;
|
|
167
|
+
const cwd = worktreePath && existsSync(worktreePath) ? worktreePath : workspace.projectPath;
|
|
168
168
|
const proc = spawn('bash', ['-c', settings.devServer.startCommand], {
|
|
169
169
|
cwd,
|
|
170
170
|
env: {
|
|
@@ -230,7 +230,7 @@ export function stopDevServer(workspaceId) {
|
|
|
230
230
|
const config = resolveInstance(workspace.projectPath, workspace.workingBranch);
|
|
231
231
|
const instanceName = config?.instanceName ?? sanitizeBranchName(workspace.workingBranch);
|
|
232
232
|
const worktreePath = workspace.worktreePath;
|
|
233
|
-
const cwd = existsSync(worktreePath) ? worktreePath : workspace.projectPath;
|
|
233
|
+
const cwd = worktreePath && existsSync(worktreePath) ? worktreePath : workspace.projectPath;
|
|
234
234
|
// Kill tracked process first (covers Node servers and any spawned process)
|
|
235
235
|
const tracked = trackedProcesses.get(workspaceId);
|
|
236
236
|
if (tracked) {
|
|
@@ -2,7 +2,7 @@ import { getPrStatusAsync } from '../utils/git-ops.js';
|
|
|
2
2
|
import { stopDevServer } from './dev-server-service.js';
|
|
3
3
|
import { destroyTerminal } from './terminal-service.js';
|
|
4
4
|
import { emitEphemeral } from './websocket-service.js';
|
|
5
|
-
import { archiveWorkspace, listWorkspaces } from './workspace-service.js';
|
|
5
|
+
import { archiveWorkspace, listWorkspaces, updateWorkspaceSourceBranch } from './workspace-service.js';
|
|
6
6
|
// ── PR Watcher ────────────────────────────────────────────────────────────────
|
|
7
7
|
// Polls GitHub every POLL_INTERVAL_MS to detect merged/closed PRs and
|
|
8
8
|
// automatically archive the corresponding workspace.
|
|
@@ -14,8 +14,7 @@ import { archiveWorkspace, listWorkspaces } from './workspace-service.js';
|
|
|
14
14
|
const POLL_INTERVAL_MS = 30 * 1000; // 30 seconds
|
|
15
15
|
let timer = null;
|
|
16
16
|
let checking = false;
|
|
17
|
-
|
|
18
|
-
const lastKnownState = new Map();
|
|
17
|
+
const lastKnownPr = new Map();
|
|
19
18
|
/**
|
|
20
19
|
* Read-only snapshot of PR states known to the watcher, keyed by workspace id.
|
|
21
20
|
* Used by the drawer to show a small PR-open indicator without N separate
|
|
@@ -25,17 +24,24 @@ const lastKnownState = new Map();
|
|
|
25
24
|
*/
|
|
26
25
|
export function getAllPrStates() {
|
|
27
26
|
const out = {};
|
|
28
|
-
for (const [id,
|
|
29
|
-
out[id] = state;
|
|
27
|
+
for (const [id, known] of lastKnownPr) {
|
|
28
|
+
out[id] = known.state;
|
|
30
29
|
}
|
|
31
30
|
return out;
|
|
32
31
|
}
|
|
33
|
-
|
|
32
|
+
/**
|
|
33
|
+
* Test-only escape hatch — drops the in-memory cache so each test starts
|
|
34
|
+
* from a clean slate. Not part of the public API.
|
|
35
|
+
*/
|
|
36
|
+
export function _resetForTest() {
|
|
37
|
+
lastKnownPr.clear();
|
|
38
|
+
}
|
|
39
|
+
export async function checkPrStatuses() {
|
|
34
40
|
const workspaces = listWorkspaces(false); // non-archived only
|
|
35
41
|
// Clean up entries for workspaces that no longer exist
|
|
36
|
-
for (const id of
|
|
42
|
+
for (const id of lastKnownPr.keys()) {
|
|
37
43
|
if (!workspaces.some((ws) => ws.id === id)) {
|
|
38
|
-
|
|
44
|
+
lastKnownPr.delete(id);
|
|
39
45
|
}
|
|
40
46
|
}
|
|
41
47
|
for (const ws of workspaces) {
|
|
@@ -46,10 +52,15 @@ async function checkPrStatuses() {
|
|
|
46
52
|
const pr = await getPrStatusAsync(ws.projectPath, ws.workingBranch);
|
|
47
53
|
if (!pr)
|
|
48
54
|
continue;
|
|
49
|
-
const prev =
|
|
50
|
-
|
|
51
|
-
//
|
|
52
|
-
|
|
55
|
+
const prev = lastKnownPr.get(ws.id);
|
|
56
|
+
// We delay updating `lastKnownPr` until after the actions succeed.
|
|
57
|
+
// Setting it eagerly would poison the cache: if updateWorkspaceSourceBranch
|
|
58
|
+
// throws (transient DB issue, race with workspace deletion), the cache
|
|
59
|
+
// already holds the new base and the user never sees the toast — the
|
|
60
|
+
// next tick computes `prev.base === pr.base` and treats it as no-op.
|
|
61
|
+
// Archive on a transition FROM OPEN to CLOSED/MERGED. Skips the
|
|
62
|
+
// base-change detection below — archiving wins.
|
|
63
|
+
if (prev?.state === 'OPEN' && (pr.state === 'MERGED' || pr.state === 'CLOSED')) {
|
|
53
64
|
console.log(`[pr-watcher] PR ${pr.state.toLowerCase()} for workspace '${ws.name}' — archiving`);
|
|
54
65
|
// Best-effort cleanup (same as manual archive): stop dev server + terminal.
|
|
55
66
|
// Agent is already not running here (guarded above).
|
|
@@ -66,12 +77,51 @@ async function checkPrStatuses() {
|
|
|
66
77
|
// Terminal may not exist — ignore
|
|
67
78
|
}
|
|
68
79
|
archiveWorkspace(ws.id);
|
|
69
|
-
|
|
80
|
+
lastKnownPr.delete(ws.id);
|
|
70
81
|
emitEphemeral(ws.id, 'workspace:archived', {
|
|
71
82
|
reason: `PR ${pr.state.toLowerCase()}`,
|
|
72
83
|
prUrl: pr.url,
|
|
73
84
|
});
|
|
85
|
+
continue; // do not run base-change detection on a workspace we just archived
|
|
86
|
+
}
|
|
87
|
+
// Base-branch change detection. Only relevant for OPEN PRs — closed/
|
|
88
|
+
// merged PRs don't accept base changes. Skip if the GitHub response
|
|
89
|
+
// didn't include a baseRefName (defensive against malformed data).
|
|
90
|
+
if (pr.state !== 'OPEN' || !pr.base) {
|
|
91
|
+
// Still update the cache for the state — keeps the OPEN→CLOSED/MERGED
|
|
92
|
+
// archiving logic working on the next tick.
|
|
93
|
+
lastKnownPr.set(ws.id, { state: pr.state, base: prev?.base });
|
|
94
|
+
continue;
|
|
95
|
+
}
|
|
96
|
+
// Comparison baseline:
|
|
97
|
+
// - If we've seen this workspace before, use the previous `base`.
|
|
98
|
+
// - Otherwise (first sight after boot/unarchive), compare with the
|
|
99
|
+
// `sourceBranch` recorded in the database — that catches base changes
|
|
100
|
+
// that happened while Kobo was offline.
|
|
101
|
+
const previousBase = prev?.base ?? ws.sourceBranch;
|
|
102
|
+
if (previousBase === pr.base) {
|
|
103
|
+
// No-op path: still record the base so subsequent ticks have a baseline.
|
|
104
|
+
lastKnownPr.set(ws.id, { state: pr.state, base: pr.base });
|
|
105
|
+
continue;
|
|
106
|
+
}
|
|
107
|
+
console.log(`[pr-watcher] PR base changed for workspace '${ws.name}': ${previousBase} → ${pr.base}`);
|
|
108
|
+
try {
|
|
109
|
+
updateWorkspaceSourceBranch(ws.id, pr.base);
|
|
110
|
+
}
|
|
111
|
+
catch (err) {
|
|
112
|
+
console.error(`[pr-watcher] updateWorkspaceSourceBranch failed for '${ws.name}':`, err instanceof Error ? err.message : err);
|
|
113
|
+
// Don't poison the cache: leave the previous entry (or absence) so
|
|
114
|
+
// the next tick retries the detection.
|
|
115
|
+
continue;
|
|
74
116
|
}
|
|
117
|
+
// Both the persistence and the emit are part of "we successfully
|
|
118
|
+
// observed a base change" — only NOW commit the new state to the cache.
|
|
119
|
+
lastKnownPr.set(ws.id, { state: pr.state, base: pr.base });
|
|
120
|
+
emitEphemeral(ws.id, 'pr:base-changed', {
|
|
121
|
+
oldBase: previousBase,
|
|
122
|
+
newBase: pr.base,
|
|
123
|
+
prUrl: pr.url,
|
|
124
|
+
});
|
|
75
125
|
}
|
|
76
126
|
catch (err) {
|
|
77
127
|
console.error(`[pr-watcher] Failed to check PR for workspace '${ws.name}':`, err instanceof Error ? err.message : err);
|
|
@@ -200,6 +200,25 @@ const settingsMigrations = [
|
|
|
200
200
|
global.worktreesPath = sanitizeWorktreesPath(global.worktreesPath);
|
|
201
201
|
},
|
|
202
202
|
},
|
|
203
|
+
{
|
|
204
|
+
version: 12,
|
|
205
|
+
name: 'add-audio-notification-sound',
|
|
206
|
+
migrate({ global }) {
|
|
207
|
+
if (typeof global.audioNotificationSound !== 'string' || global.audioNotificationSound.length === 0) {
|
|
208
|
+
global.audioNotificationSound = 'hey.mp3';
|
|
209
|
+
}
|
|
210
|
+
},
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
version: 13,
|
|
214
|
+
name: 'add-audio-notification-volume',
|
|
215
|
+
migrate({ global }) {
|
|
216
|
+
const v = global.audioNotificationVolume;
|
|
217
|
+
if (typeof v !== 'number' || Number.isNaN(v) || v < 0 || v > 1) {
|
|
218
|
+
global.audioNotificationVolume = 1;
|
|
219
|
+
}
|
|
220
|
+
},
|
|
221
|
+
},
|
|
203
222
|
];
|
|
204
223
|
/** Current settings schema version — always equals the highest migration version. */
|
|
205
224
|
export const SETTINGS_SCHEMA_VERSION = settingsMigrations.length > 0 ? settingsMigrations[settingsMigrations.length - 1].version : 0;
|
|
@@ -234,6 +253,8 @@ function defaultSettings() {
|
|
|
234
253
|
editorCommand: '',
|
|
235
254
|
browserNotifications: true,
|
|
236
255
|
audioNotifications: true,
|
|
256
|
+
audioNotificationSound: 'hey.mp3',
|
|
257
|
+
audioNotificationVolume: 1,
|
|
237
258
|
notionStatusProperty: '',
|
|
238
259
|
notionInProgressStatus: '',
|
|
239
260
|
defaultPermissionMode: 'plan',
|
|
@@ -457,6 +478,8 @@ export function updateGlobalSettings(data) {
|
|
|
457
478
|
'editorCommand',
|
|
458
479
|
'browserNotifications',
|
|
459
480
|
'audioNotifications',
|
|
481
|
+
'audioNotificationSound',
|
|
482
|
+
'audioNotificationVolume',
|
|
460
483
|
'notionStatusProperty',
|
|
461
484
|
'notionInProgressStatus',
|
|
462
485
|
'defaultPermissionMode',
|
|
@@ -473,6 +496,10 @@ export function updateGlobalSettings(data) {
|
|
|
473
496
|
.filter((t) => t.length > 0 && t.length <= 50)))
|
|
474
497
|
: settings.global.tags;
|
|
475
498
|
}
|
|
499
|
+
if (filtered.audioNotificationVolume !== undefined) {
|
|
500
|
+
const v = Number(filtered.audioNotificationVolume);
|
|
501
|
+
filtered.audioNotificationVolume = Number.isFinite(v) ? Math.max(0, Math.min(1, v)) : 1;
|
|
502
|
+
}
|
|
476
503
|
if (filtered.worktreesPath !== undefined) {
|
|
477
504
|
filtered.worktreesPath = validateWorktreesPath(filtered.worktreesPath, { allowEmpty: false });
|
|
478
505
|
ensureGlobalWorktreesRootExists(filtered.worktreesPath);
|
|
@@ -217,6 +217,27 @@ export function updateWorkingBranch(id, workingBranch) {
|
|
|
217
217
|
}
|
|
218
218
|
return getWorkspace(id);
|
|
219
219
|
}
|
|
220
|
+
/**
|
|
221
|
+
* Update the source branch in the database. Called by the PR watcher when
|
|
222
|
+
* GitHub reports a different `baseRefName` for the workspace's PR.
|
|
223
|
+
* Does NOT touch the worktree — the user (or the agent) decides when to
|
|
224
|
+
* rebase the local branch onto the new base.
|
|
225
|
+
*/
|
|
226
|
+
export function updateWorkspaceSourceBranch(id, sourceBranch) {
|
|
227
|
+
const sanitized = sourceBranch.trim();
|
|
228
|
+
if (!sanitized) {
|
|
229
|
+
throw new Error('Source branch cannot be empty');
|
|
230
|
+
}
|
|
231
|
+
const db = getDb();
|
|
232
|
+
const now = new Date().toISOString();
|
|
233
|
+
const result = db
|
|
234
|
+
.prepare('UPDATE workspaces SET source_branch = ?, updated_at = ? WHERE id = ?')
|
|
235
|
+
.run(sanitized, now, id);
|
|
236
|
+
if (result.changes === 0) {
|
|
237
|
+
throw new Error(`Workspace '${id}' not found`);
|
|
238
|
+
}
|
|
239
|
+
return getWorkspace(id);
|
|
240
|
+
}
|
|
220
241
|
/** Update the on-disk worktree path. Used by rename / resync-branch on owned worktrees. */
|
|
221
242
|
export function updateWorktreePath(id, newPath) {
|
|
222
243
|
const db = getDb();
|
|
@@ -355,14 +355,18 @@ export function getPrUrl(repoPath, branchName) {
|
|
|
355
355
|
/** Get the state and URL of the PR for a branch. Returns null if no PR exists. */
|
|
356
356
|
export function getPrStatus(repoPath, branchName) {
|
|
357
357
|
try {
|
|
358
|
-
const raw = execFileSync('gh', ['pr', 'view', branchName, '--json', 'state,url'], {
|
|
358
|
+
const raw = execFileSync('gh', ['pr', 'view', branchName, '--json', 'state,url,baseRefName'], {
|
|
359
359
|
cwd: repoPath,
|
|
360
360
|
encoding: 'utf-8',
|
|
361
361
|
}).trim();
|
|
362
362
|
if (!raw)
|
|
363
363
|
return null;
|
|
364
364
|
const parsed = JSON.parse(raw);
|
|
365
|
-
return {
|
|
365
|
+
return {
|
|
366
|
+
state: parsed.state,
|
|
367
|
+
url: parsed.url,
|
|
368
|
+
base: parsed.baseRefName || undefined,
|
|
369
|
+
};
|
|
366
370
|
}
|
|
367
371
|
catch {
|
|
368
372
|
return null;
|
|
@@ -662,7 +666,7 @@ export async function getPrUrlAsync(repoPath, branchName) {
|
|
|
662
666
|
/** Async version of getPrStatus. Returns null if no PR exists. */
|
|
663
667
|
export async function getPrStatusAsync(repoPath, branchName) {
|
|
664
668
|
try {
|
|
665
|
-
const { stdout } = await execFileAsync('gh', ['pr', 'view', branchName, '--json', 'state,url'], {
|
|
669
|
+
const { stdout } = await execFileAsync('gh', ['pr', 'view', branchName, '--json', 'state,url,baseRefName'], {
|
|
666
670
|
cwd: repoPath,
|
|
667
671
|
encoding: 'utf-8',
|
|
668
672
|
});
|
|
@@ -670,7 +674,11 @@ export async function getPrStatusAsync(repoPath, branchName) {
|
|
|
670
674
|
if (!raw)
|
|
671
675
|
return null;
|
|
672
676
|
const parsed = JSON.parse(raw);
|
|
673
|
-
return {
|
|
677
|
+
return {
|
|
678
|
+
state: parsed.state,
|
|
679
|
+
url: parsed.url,
|
|
680
|
+
base: parsed.baseRefName || undefined,
|
|
681
|
+
};
|
|
674
682
|
}
|
|
675
683
|
catch {
|
|
676
684
|
return null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@loicngr/kobo",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.2",
|
|
4
4
|
"description": "Kōbō — multi-workspace agent manager for Claude Code. Orchestrates isolated git worktrees with dev servers, Notion integration, and MCP tools.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "GPL-3.0-or-later",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{E as e,F as t,H as n,L as r,M as i,Q as a,U as o,_t as s,bt as c,d as l,f as u,g as d,h as f,l as p,p as m,r as h,rt as g,u as _,v,yt as y}from"./runtime-core.esm-bundler-C3IgBgY5.js";import{
|
|
1
|
+
import{E as e,F as t,H as n,L as r,M as i,Q as a,U as o,_t as s,bt as c,d as l,f as u,g as d,h as f,l as p,p as m,r as h,rt as g,u as _,v,yt as y}from"./runtime-core.esm-bundler-C3IgBgY5.js";import{U as b,l as x,t as S}from"./QIcon-BJuyqdsT.js";import{c as C,s as w}from"./notifications-CG-oL2m2.js";import{t as T}from"./QBtn-a6jxWjmW.js";import{n as E}from"./vue-i18n-BcfTCFFS.js";import{d as D,g as O,l as k,p as A}from"./index-DE3PxEjy.js";import{t as j}from"./QSpinnerDots-CszPQQ9J.js";import{t as M}from"./QTooltip-D_hSPb7r.js";import{t as N}from"./QExpansionItem-BaQJkGb-.js";import{t as ee}from"./QScrollArea-usfgatuS.js";import{n as P,t as F}from"./marked.esm-D4t0_2pc.js";import{t as I}from"./documents-kx0vLfSG.js";import{t as L}from"./_plugin-vue_export-helper-Cj6tcsj6.js";function te(e,t,n=!0){let r=[],i=new Map,a=new Map;for(let n=0;n<e.length;n++){let o=e[n],s=t?.[n];switch(o.kind){case`message:text`:{let e=i.get(o.messageId);if(e)e.text+=o.text,e.streaming=o.streaming;else{let e={type:`text`,messageId:o.messageId,text:o.text,streaming:o.streaming,ts:s};i.set(o.messageId,e),r.push(e)}break}case`message:end`:{let e=i.get(o.messageId);e&&(e.streaming=!1);break}case`message:thinking`:r.push({type:`thinking`,messageId:o.messageId,text:o.text,ts:s});break;case`tool:call`:{let e={type:`tool`,toolCallId:o.toolCallId,name:o.name,input:o.input,ts:s};a.set(o.toolCallId,e),r.push(e);break}case`tool:result`:{let e=a.get(o.toolCallId);e&&(e.result={output:o.output,isError:o.isError});break}case`session:started`:r.push({type:`session`,kind:`started`,detail:{engineSessionId:o.engineSessionId,model:o.model},ts:s});break;case`session:ended`:r.push({type:`session`,kind:`ended`,detail:{reason:o.reason,exitCode:o.exitCode},ts:s});break;case`session:compacted`:r.push({type:`session`,kind:`compacted`,ts:s});break;case`session:brainstorm-complete`:case`session:user-input-requested`:case`message:raw`:case`skills:discovered`:case`usage`:case`rate_limit`:case`subagent:progress`:case`error`:break;default:}}let o=null;for(let e of r)e.type===`text`&&e.streaming&&(o&&(o.streaming=!1),o=e);return o&&!n&&(o.streaming=!1),r}function ne(e,t){if(t.length===0)return e;let n=t.map(e=>({type:`user`,content:e.content,sender:e.sender,ts:e.ts})),r=[...e,...n];r.sort((e,t)=>{let n=e.ts??``,r=t.ts??``;return n===r?0:n?r?n<r?-1:1:-1:1});let i;for(let e of r)e.type===`user`&&e.sender!==`system-prompt`&&e.ts&&(!i||e.ts>i)&&(i=e.ts);if(i)for(let e of r)e.type===`text`&&e.streaming&&(!e.ts||e.ts<i)&&(e.streaming=!1);return r}function R(e){switch(e.type){case`user`:return e.sender===`system-prompt`?`system-prompt`:`user`;case`session`:return`session`;default:return`agent`}}function re(e){let t=[],n=null;for(let r of e){let e=R(r),i=e===`session`||e===`system-prompt`;!n||n.speaker!==e||i?(n={speaker:e,ts:r.ts,items:[r]},t.push(n),i&&(n=null)):n.items.push(r)}return t}var z={class:`text-caption text-grey-6`},B=v({__name:`SessionEventItem`,props:{item:{}},setup(e){let n=e,r=p(()=>{switch(n.item.kind){case`started`:return`session.started`;case`ended`:return`session.ended`;case`compacted`:return`session.compacted`;default:return`session.started`}});return(e,n)=>(t(),m(`span`,z,c(e.$t(r.value)),1))}});function V(e,t){if(t.length===0||e.length===0)return e;let n=[...t].sort((e,t)=>t.length-e.length),r=new DOMParser().parseFromString(`<div>${e}</div>`,`text/html`),i=r.body.firstChild;if(!i)return e;function a(e){if(e.nodeType===Node.TEXT_NODE){H(e,n,r);return}if(e.nodeName===`A`)return;let t=Array.from(e.childNodes);for(let e of t)a(e)}return a(i),i.innerHTML}function H(e,t,n){let r=e.textContent??``;if(!t.some(e=>r.includes(e)))return;let i=n.createDocumentFragment(),a=0;for(;a<r.length;){let e=ie(r,a,t);if(!e){i.appendChild(n.createTextNode(r.slice(a)));break}e.index>a&&i.appendChild(n.createTextNode(r.slice(a,e.index)));let o=n.createElement(`a`);o.className=`document-link`,o.setAttribute(`data-document-path`,e.path),o.setAttribute(`href`,`#`),o.textContent=e.path,i.appendChild(o),a=e.index+e.path.length}e.parentNode?.replaceChild(i,e)}function ie(e,t,n){let r=null;for(let i of n){let n=e.indexOf(i,t);n<0||(!r||n<r.index||n===r.index&&i.length>r.path.length)&&(r={index:n,path:i})}return r}var U=[`innerHTML`],W=L(v({__name:`TextMessageItem`,props:{item:{}},setup(e){let n=e,r=I(),i=k(),a=p(()=>{let e=i.selectedWorkspaceId;return e?r.documentsFor(e).map(e=>e.path):[]}),o=p(()=>{let e=V(F.parse(n.item.text,{async:!1,breaks:!0,gfm:!0}),a.value);return P.sanitize(e,{ADD_ATTR:[`data-document-path`]})});function s(e){let t=e.target?.closest(`.document-link`);if(!t)return;e.preventDefault();let n=t.getAttribute(`data-document-path`),a=i.selectedWorkspaceId;!n||!a||r.openDocumentByPath(a,n)}return(n,r)=>(t(),m(`div`,{class:`markdown-message`,onClick:s},[_(`div`,{innerHTML:o.value},null,8,U),e.item.streaming?(t(),l(x,{key:0,size:`xs`,class:`q-ml-xs`})):u(``,!0)]))}}),[[`__scopeId`,`data-v-e9f9bd11`]]),G={key:0,class:`text-caption text-grey-5`,style:{"font-style":`italic`}},ae=[`innerHTML`],oe={key:1,style:{"white-space":`pre-wrap`}},K=L(v({__name:`ThinkingItem`,props:{item:{}},setup(e){let n=e,r=p(()=>n.item.text.trim().slice(0,100)),i=p(()=>n.item.text.trim().length>0),a=p(()=>n.item.text.trim().length>100),s=p(()=>{let e=F.parse(n.item.text,{async:!1,breaks:!0,gfm:!0});return P.sanitize(e)});return(n,d)=>i.value?(t(),m(`div`,G,[a.value?(t(),l(N,{key:0,dense:``,"dense-toggle":``,label:r.value,"header-class":`text-grey-5 text-caption`,style:{"font-style":`italic`}},{default:o(()=>[_(`div`,{class:`q-py-xs markdown-thinking`,innerHTML:s.value},null,8,ae)]),_:1},8,[`label`])):(t(),m(`span`,oe,c(e.item.text),1))])):u(``,!0)}}),[[`__scopeId`,`data-v-4e64694c`]]);function se(e,t){let n=e.split(`
|
|
2
2
|
`),r=t.split(`
|
|
3
3
|
`),i=n.length,a=r.length,o=Array.from({length:i+1},()=>Array(a+1).fill(0));for(let e=i-1;e>=0;e--)for(let t=a-1;t>=0;t--)n[e]===r[t]?o[e][t]=o[e+1][t+1]+1:o[e][t]=Math.max(o[e+1][t],o[e][t+1]);let s=[],c=0,l=0;for(;c<i&&l<a;)n[c]===r[l]?(s.push({type:`context`,content:n[c]}),c++,l++):o[c+1][l]>=o[c][l+1]?(s.push({type:`del`,content:n[c]}),c++):(s.push({type:`add`,content:r[l]}),l++);for(;c<i;)s.push({type:`del`,content:n[c++]});for(;l<a;)s.push({type:`add`,content:r[l++]});return s}function ce(e,t){if(!t||typeof t!=`object`)return null;let n=t;if(e===`Edit`){let e=n.file_path;if(!e)return null;let t=n.old_string??``,r=n.new_string??``;return{toolName:`Edit`,filePath:e,oldString:t,newString:r,replaceAll:n.replace_all??!1,additions:r?r.split(`
|
|
4
4
|
`).length:0,deletions:t?t.split(`
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{F as e,b as t}from"./QIcon-BJuyqdsT.js";import{C as n,w as r}from"./notifications-CG-oL2m2.js";function i(e){if(e===!1)return 0;if(e===!0||e===void 0)return 1;let t=parseInt(e,10);return isNaN(t)?0:t}var a=e({name:`close-popup`,beforeMount(e,{value:a}){let o={depth:i(a),handler(t){o.depth!==0&&setTimeout(()=>{let i=r(e);i!==void 0&&n(i,t,o.depth)})},handlerKey(e){t(e,13)===!0&&o.handler(e)}};e.__qclosepopup=o,e.addEventListener(`click`,o.handler),e.addEventListener(`keyup`,o.handlerKey)},updated(e,{value:t,oldValue:n}){t!==n&&(e.__qclosepopup.depth=i(t))},beforeUnmount(e){let t=e.__qclosepopup;e.removeEventListener(`click`,t.handler),e.removeEventListener(`keyup`,t.handlerKey),delete e.__qclosepopup}});export{a as t};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{E as e,F as t,H as n,L as r,M as ee,N as te,Q as i,T as ne,U as a,_t as re,bt as o,d as s,f as c,g as l,h as u,l as d,p as f,r as ie,rt as p,u as m,v as ae,vt as oe,x as se}from"./runtime-core.esm-bundler-C3IgBgY5.js";import{
|
|
2
|
-
`)[0]??``).substring(0,80)||`workspace`}function xn(e){let t=(e.split(`/`).pop()??``).split(`-`);t.length>1&&/^[0-9a-f]{12,}$/i.test(t[t.length-1])&&t.pop();let n=t.join(`-`).toLowerCase(),r=n.match(/tk-(\d+)/);if(r){let e=`TK-${r[1]}`,t=n.replace(/tk-\d+/i,``).replace(/-+/g,`-`).replace(/^-|-$/g,``).substring(0,40);return t?`${e}--${t}`:e}return n.substring(0,50)||`task-${Date.now()}`}function Sn(){return A.value&&!V.value?E(`createPage.validationNotionUrl`):K.value&&!Y.value?E(`createPage.sentryValidation`):!A.value&&!K.value&&!O.value.trim()?E(`createPage.validationDescription`):!A.value&&!K.value&&(!bn()||bn()===`workspace`)&&!D.value.trim()&&!O.value.trim()?E(`createPage.validationName`):M.value.trim()?N.value?null:E(`createPage.validationBranch`):E(`createPage.validationPath`)}async function Cn(){let e=Sn();if(e){w.notify({type:`negative`,message:e,position:`top`});return}if(X.value&&!Z.value){w.notify({type:`negative`,message:E(`createPage.pickWorktreeRequired`),position:`top`});return}Ht.value=!0;try{let e=bn(),t;t=A.value&&V.value?xn(rn()):e===`workspace`?`task-${Date.now()}`:yn(e);let n=`${jt.value}/${t}`,r={name:e,projectPath:M.value.trim(),sourceBranch:N.value,...X.value&&Z.value?{worktreePath:Z.value,skipSetupScript:!0}:{workingBranch:n},engine:F.value,model:j.value,reasoningEffort:At.value,...A.value&&V.value?{notionUrl:rn()}:{},...K.value&&Y.value?{sentryUrl:J.value.trim()}:{},...on.value&&U.value.length>0?{tasks:U.value}:{},...on.value&&W.value.length>0?{acceptanceCriteria:W.value}:{},...P.value&&!X.value?{skipSetupScript:!0}:{},...O.value.trim()?{description:O.value.trim()}:{},...q.value?{autoLoop:!0}:{},agentPermissionMode:q.value&&I.value===`plan`?`bypass`:I.value},ee=await Dt.createWorkspace(r);ge().subscribe(ee.id),Dt.selectWorkspace(ee.id),ve.push({name:`workspace`,params:{id:ee.id}})}catch{w.notify({type:`negative`,message:E(`createPage.errorCreating`),position:`top`})}finally{Ht.value=!1}}return(e,n)=>(t(),s(Se,{class:`create-page flex flex-center column`},{default:a(()=>[m(`div`,De,[m(`div`,Oe,o(e.$t(`createPage.title`)),1),m(`div`,ke,[m(`div`,Ae,[m(`span`,je,[l(h,{name:`auto_awesome`,size:`14px`,color:`indigo-4`}),m(`span`,Me,o(Nt.value?.displayName??e.$t(`createPage.claudeCode`)),1)]),l(ye),l(_,{flat:``,dense:``,"no-caps":``,size:`sm`,color:A.value?`green-4`:`grey-5`,class:`notion-toggle-btn text-caption rounded-borders`,disable:X.value,onClick:dn},{default:a(()=>[l(h,{name:`description`,size:`14px`,class:`q-mr-xs`}),u(` `+o(A.value?e.$t(`createPage.notionEnabled`):e.$t(`createPage.importNotion`)),1)]),_:1},8,[`color`,`disable`]),l(_,{flat:``,dense:``,"no-caps":``,size:`sm`,color:K.value?`red-4`:`grey-5`,class:`sentry-toggle-btn text-caption rounded-borders q-ml-sm`,disable:X.value,onClick:fn},{default:a(()=>[l(h,{name:`bug_report`,size:`14px`,class:`q-mr-xs`}),u(` `+o(K.value?e.$t(`createPage.sentryEnabled`):e.$t(`createPage.importSentry`)),1)]),_:1},8,[`color`,`disable`])]),l(g,{color:`grey-9`}),l(ue,{name:`slide`},{default:a(()=>[A.value?(t(),f(`div`,Ne,[l(v,{modelValue:k.value,"onUpdate:modelValue":n[0]||=e=>k.value=e,borderless:``,dense:``,placeholder:e.$t(`createPage.notionPlaceholder`),class:`notion-url-input`,"input-class":`notion-url-input-inner`},{prepend:a(()=>[l(h,{name:`link`,size:`16px`,color:V.value?`green-4`:`grey-6`},null,8,[`color`])]),_:1},8,[`modelValue`,`placeholder`]),k.value.trim()&&!V.value?(t(),f(`div`,Pe,o(e.$t(`createPage.notionValidation`)),1)):c(``,!0),V.value?(t(),f(`div`,Fe,o(e.$t(`createPage.notionAutoExtract`)),1)):c(``,!0),V.value&&nn.value?(t(),f(`div`,Ie,[m(`div`,Le,[l(h,{name:`info`,size:`14px`,color:`indigo-4`,class:`q-mr-xs`}),u(` `+o(e.$t(`createPage.notionPanelChoiceLabel`)),1)]),m(`div`,Re,[m(`button`,{type:`button`,class:re([`peek-card col`,{"peek-card--active":H.value===`panel`}]),onClick:n[1]||=e=>H.value=`panel`},[l(h,{name:`article`,size:`22px`,class:`peek-card-icon`}),m(`div`,ze,[m(`div`,Be,o(e.$t(`createPage.notionPanelOption`)),1),m(`div`,Ve,o(e.$t(`createPage.notionPanelOptionDesc`)),1)]),H.value===`panel`?(t(),s(h,{key:0,name:`check_circle`,size:`18px`,color:`indigo-4`,class:`peek-card-check`})):c(``,!0)],2),m(`button`,{type:`button`,class:re([`peek-card col`,{"peek-card--active":H.value===`parent`}]),onClick:n[2]||=e=>H.value=`parent`},[l(h,{name:`folder_open`,size:`22px`,class:`peek-card-icon`}),m(`div`,He,[m(`div`,Ue,o(e.$t(`createPage.notionParentOption`)),1),m(`div`,We,o(e.$t(`createPage.notionParentOptionDesc`)),1)]),H.value===`parent`?(t(),s(h,{key:0,name:`check_circle`,size:`18px`,color:`indigo-4`,class:`peek-card-check`})):c(``,!0)],2)])])):c(``,!0)])):c(``,!0)]),_:1}),A.value?(t(),s(g,{key:0,color:`grey-9`})):c(``,!0),l(ue,{name:`slide`},{default:a(()=>[K.value?(t(),f(`div`,Ge,[l(v,{modelValue:J.value,"onUpdate:modelValue":n[3]||=e=>J.value=e,borderless:``,dense:``,placeholder:e.$t(`createPage.sentryPlaceholder`),class:`sentry-url-input`,"input-class":`sentry-url-input-inner`},{prepend:a(()=>[l(h,{name:`link`,size:`16px`,color:Y.value?`red-4`:`grey-6`},null,8,[`color`])]),_:1},8,[`modelValue`,`placeholder`]),J.value.trim()&&!Y.value?(t(),f(`div`,Ke,o(e.$t(`createPage.sentryValidation`)),1)):c(``,!0),Y.value?(t(),f(`div`,qe,o(e.$t(`createPage.sentryAutoExtract`)),1)):c(``,!0)])):c(``,!0)]),_:1}),K.value?(t(),s(g,{key:1,color:`grey-9`})):c(``,!0),m(`div`,Je,[l(v,{modelValue:D.value,"onUpdate:modelValue":n[4]||=e=>D.value=e,borderless:``,dense:``,placeholder:A.value&&V.value?e.$t(`createPage.workspaceName`):e.$t(`createPage.workspaceNamePlaceholder`),class:`name-input`,"input-class":`name-input-inner`},null,8,[`modelValue`,`placeholder`])]),l(g,{color:`grey-9`}),m(`div`,Ye,[l(v,{ref_key:`descriptionRef`,ref:kt,modelValue:O.value,"onUpdate:modelValue":n[5]||=e=>O.value=e,type:`textarea`,borderless:``,autogrow:``,rows:3,placeholder:A.value?e.$t(`createPage.instructions`):e.$t(`createPage.instructionsPlaceholder`),class:`create-textarea`,"input-class":`create-textarea-input`,onKeydown:[$t,ce(le(Cn,[`ctrl`]),[`enter`]),ce(le(Cn,[`meta`]),[`enter`])]},null,8,[`modelValue`,`placeholder`,`onKeydown`]),p(Kt)&&p(z).length>0?(t(),s(Ce,{key:0,class:`create-slash-popup`,"grouped-dropdown":p(qt),"flat-dropdown":p(z),"selected-index":p(R),onSelect:Qt},null,8,[`grouped-dropdown`,`flat-dropdown`,`selected-index`])):c(``,!0)]),l(g,{color:`grey-9`}),on.value?(t(),f(ie,{key:2},[m(`div`,Xe,o(e.$t(`createPage.manualHint`)),1),l(_e,{dark:``,dense:``,label:e.$t(`createPage.tasks`,{count:U.value.length}),"header-class":`text-grey-4 manual-expansion-header`,class:`manual-expansion q-mx-sm`},{default:a(()=>[m(`div`,Ze,[m(`div`,Qe,[l(v,{modelValue:G.value,"onUpdate:modelValue":n[6]||=e=>G.value=e,dark:``,dense:``,borderless:``,placeholder:e.$t(`createPage.addTask`),class:`col manual-input`,"input-class":`manual-input-inner`,onKeydown:ce(le(sn,[`prevent`]),[`enter`])},null,8,[`modelValue`,`placeholder`,`onKeydown`]),l(_,{flat:``,dense:``,round:``,icon:`add`,color:`indigo-4`,disable:!G.value.trim(),onClick:sn},{default:a(()=>[l(S,null,{default:a(()=>[u(o(e.$t(`tooltip.addTask`)),1)]),_:1})]),_:1},8,[`disable`])]),(t(!0),f(ie,null,r(U.value,(n,r)=>(t(),f(`div`,{key:`task-${r}`,class:`row items-center q-py-xs manual-item`},[m(`span`,$e,o(n),1),l(_,{flat:``,dense:``,round:``,icon:`close`,size:`xs`,color:`grey-6`,onClick:e=>cn(r)},{default:a(()=>[l(S,null,{default:a(()=>[u(o(e.$t(`tooltip.removeTask`)),1)]),_:1})]),_:1},8,[`onClick`])]))),128))])]),_:1},8,[`label`]),l(_e,{dark:``,dense:``,label:e.$t(`createPage.acceptanceCriteria`,{count:W.value.length}),"header-class":`text-grey-4 manual-expansion-header`,class:`manual-expansion q-mx-sm q-mb-sm`},{default:a(()=>[m(`div`,et,[m(`div`,tt,[l(v,{modelValue:an.value,"onUpdate:modelValue":n[7]||=e=>an.value=e,dark:``,dense:``,borderless:``,placeholder:e.$t(`createPage.addCriterion`),class:`col manual-input`,"input-class":`manual-input-inner`,onKeydown:ce(le(ln,[`prevent`]),[`enter`])},null,8,[`modelValue`,`placeholder`,`onKeydown`]),l(_,{flat:``,dense:``,round:``,icon:`add`,color:`indigo-4`,disable:!an.value.trim(),onClick:ln},{default:a(()=>[l(S,null,{default:a(()=>[u(o(e.$t(`tooltip.addCriterion`)),1)]),_:1})]),_:1},8,[`disable`])]),(t(!0),f(ie,null,r(W.value,(n,r)=>(t(),f(`div`,{key:`crit-${r}`,class:`row items-center q-py-xs manual-item`},[m(`span`,nt,o(n),1),l(_,{flat:``,dense:``,round:``,icon:`close`,size:`xs`,color:`grey-6`,onClick:e=>un(r)},{default:a(()=>[l(S,null,{default:a(()=>[u(o(e.$t(`tooltip.removeCriterion`)),1)]),_:1})]),_:1},8,[`onClick`])]))),128))])]),_:1},8,[`label`]),l(g,{color:`grey-9`})],64)):c(``,!0),m(`div`,rt,[m(`div`,it,[Pt.value.length>0?(t(),f(`div`,at,[l(C,{modelValue:F.value,"onUpdate:modelValue":n[8]||=e=>F.value=e,options:Pt.value,dense:``,borderless:``,class:`bottom-select rounded-borders`,"hide-dropdown-icon":``,"emit-value":``,"map-options":``,"option-value":`value`,"option-label":`label`},{selected:a(()=>[m(`span`,ot,[l(h,{name:`hub`,size:`12px`,color:`grey-5`,class:`q-mr-xs`}),u(` `+o(Pt.value.find(e=>e.value===F.value)?.label??F.value)+` `,1),l(h,{name:`expand_more`,size:`12px`,color:`grey-5`})])]),default:a(()=>[l(S,null,{default:a(()=>[u(o(e.$t(`engine.select`)),1)]),_:1})]),_:1},8,[`modelValue`,`options`])])):c(``,!0),m(`div`,st,[l(C,{modelValue:j.value,"onUpdate:modelValue":n[9]||=e=>j.value=e,options:en.value,dense:``,borderless:``,class:`bottom-select rounded-borders model-select`,"hide-dropdown-icon":``,"emit-value":``,"map-options":``,"option-value":`value`,"option-label":`label`},{selected:a(()=>[m(`span`,ct,[u(o(en.value.find(e=>e.value===j.value)?.label??j.value)+` `,1),l(h,{name:`expand_more`,size:`12px`,color:`grey-5`})])]),option:a(({opt:e,itemProps:t})=>[l(y,ne(t,{class:`model-option`}),{default:a(()=>[l(b,null,{default:a(()=>[l(x,{class:`text-white`},{default:a(()=>[u(o(e.label),1)]),_:2},1024),l(x,{caption:``,class:`text-grey-5`},{default:a(()=>[u(o(e.description),1)]),_:2},1024)]),_:2},1024)]),_:2},1040)]),_:1},8,[`modelValue`,`options`])]),m(`div`,lt,[l(C,{modelValue:At.value,"onUpdate:modelValue":n[10]||=e=>At.value=e,options:tn.value,dense:``,borderless:``,class:`bottom-select rounded-borders`,"hide-dropdown-icon":``,"emit-value":``,"map-options":``,"option-value":`value`,"option-label":`label`},{selected:a(()=>[m(`span`,ut,[l(h,{name:`psychology`,size:`12px`,color:`grey-5`,class:`q-mr-xs`}),u(` `+o(tn.value.find(e=>e.value===At.value)?.label??At.value)+` `,1),l(h,{name:`expand_more`,size:`12px`,color:`grey-5`})])]),option:a(({opt:e,itemProps:t})=>[l(y,oe(se(t)),{default:a(()=>[l(b,null,{default:a(()=>[l(x,{class:`text-white`},{default:a(()=>[u(o(e.label),1)]),_:2},1024),l(x,{caption:``,class:`text-grey-5`},{default:a(()=>[u(o(e.description),1)]),_:2},1024)]),_:2},1024)]),_:2},1040)]),_:1},8,[`modelValue`,`options`])]),m(`div`,dt,[l(C,{modelValue:I.value,"onUpdate:modelValue":n[11]||=e=>I.value=e,options:zt.value,disable:q.value,dense:``,borderless:``,class:`bottom-select rounded-borders`,"hide-dropdown-icon":``,"emit-value":``,"map-options":``,"option-value":`value`,"option-label":`label`,"option-disable":e=>e.disabled===!0},{selected:a(()=>[m(`span`,ft,[l(h,{name:Rt.value,size:`12px`,color:`amber-6`,class:`q-mr-xs`},null,8,[`name`]),u(` `+o(zt.value.find(e=>e.value===I.value)?.label??I.value)+` `,1),q.value?c(``,!0):(t(),s(h,{key:0,name:`expand_more`,size:`12px`,color:`grey-5`}))])]),default:a(()=>[l(S,null,{default:a(()=>[u(o(q.value?e.$t(`agentPermissionMode.autoLoopLocked`):e.$t(`agentPermissionMode.tooltip`)),1)]),_:1})]),_:1},8,[`modelValue`,`options`,`disable`,`option-disable`])])]),m(`div`,pt,[m(`div`,mt,[l(_,{flat:``,dense:``,size:`sm`,"no-caps":``,icon:q.value?`autorenew`:`sync_disabled`,color:q.value?`amber-4`:`grey-5`,label:e.$t(`autoLoop.startInMode`),class:`skip-setup-btn`,onClick:n[12]||=e=>q.value=!q.value},{default:a(()=>[l(S,null,{default:a(()=>[u(o(e.$t(`autoLoop.startInMode`)),1)]),_:1})]),_:1},8,[`icon`,`color`,`label`])]),m(`div`,ht,[l(_,{flat:``,dense:``,size:`sm`,"no-caps":``,icon:P.value?`play_disabled`:`play_circle`,color:P.value?`orange-4`:`grey-5`,label:e.$t(`createPage.skipSetupScript`),class:`skip-setup-btn`,onClick:n[13]||=e=>P.value=!P.value},{default:a(()=>[l(S,null,{default:a(()=>[u(o(e.$t(`createPage.skipSetupScript`)),1)]),_:1})]),_:1},8,[`icon`,`color`,`label`])]),m(`div`,gt,[l(_,{flat:``,dense:``,size:`sm`,"no-caps":``,icon:`folder_open`,color:X.value?`cyan-4`:`grey-5`,label:X.value?e.$t(`createPage.attachWorktreeEnabled`):e.$t(`createPage.attachWorktreeToggle`),class:`skip-setup-btn`,onClick:hn},null,8,[`color`,`label`])])]),m(`div`,_t,[m(`div`,vt,[l(C,{modelValue:M.value,"onUpdate:modelValue":n[14]||=e=>M.value=e,options:Ot.value,dense:``,borderless:``,"use-input":``,"fill-input":``,"hide-selected":``,"input-debounce":`0`,"new-value-mode":`add`,class:`bottom-select rounded-borders repo-select`,"hide-dropdown-icon":``,"input-class":M.value?``:`repo-input-empty`,placeholder:e.$t(`createPage.projectPath`),behavior:p(T).projectPaths.length>0?`menu`:`dialog`,onFilter:vn,onInputValue:n[15]||=e=>{M.value=e}},{prepend:a(()=>[l(h,{name:`folder`,size:`14px`,color:`grey-5`})]),"no-option":a(()=>[l(y,null,{default:a(()=>[l(b,{class:`text-grey-6 text-caption`},{default:a(()=>[u(o(e.$t(`createPage.enterPath`)),1)]),_:1})]),_:1})]),_:1},8,[`modelValue`,`options`,`input-class`,`placeholder`,`behavior`])]),X.value?c(``,!0):(t(),f(`div`,yt,[l(C,{modelValue:jt.value,"onUpdate:modelValue":n[16]||=e=>jt.value=e,options:Ft,"emit-value":``,"map-options":``,dense:``,borderless:``,class:`bottom-select rounded-borders branch-type-select`,"hide-dropdown-icon":``},{selected:a(()=>[m(`span`,bt,[l(h,{name:`account_tree`,size:`12px`,color:`grey-5`,class:`q-mr-xs`}),u(` `+o(jt.value)+`/ `,1),l(h,{name:`expand_more`,size:`12px`,color:`grey-5`})])]),default:a(()=>[l(S,null,{default:a(()=>[u(o(e.$t(`createPage.branchType`)),1)]),_:1})]),_:1},8,[`modelValue`])])),X.value?(t(),f(`div`,xt,[l(C,{modelValue:Z.value,"onUpdate:modelValue":n[17]||=e=>Z.value=e,options:Q.value,"option-label":`branch`,"option-value":`path`,"emit-value":``,"map-options":``,"use-input":``,dense:``,borderless:``,class:`bottom-select rounded-borders worktree-select`,"hide-dropdown-icon":``,loading:pn.value,disable:!M.value.trim()||pn.value},{selected:a(()=>[m(`span`,St,[l(h,{name:`folder_open`,size:`12px`,color:`cyan-5`,class:`q-mr-xs`}),u(` `+o(Z.value?Q.value.find(e=>e.path===Z.value)?.branch??Z.value:e.$t(`createPage.worktreePickerLabel`))+` `,1),l(h,{name:`expand_more`,size:`12px`,color:`grey-5`})])]),option:a(e=>[l(y,oe(se(e.itemProps)),{default:a(()=>[l(b,null,{default:a(()=>[l(x,null,{default:a(()=>[u(o(e.opt.branch),1)]),_:2},1024),l(x,{caption:``},{default:a(()=>[u(o(e.opt.path),1)]),_:2},1024)]),_:2},1024)]),_:2},1040)]),"no-option":a(()=>[l(y,null,{default:a(()=>[l(b,{class:`text-grey-6 text-caption`},{default:a(()=>[u(o(M.value.trim()?e.$t(`createPage.noOrphanWorktrees`):e.$t(`createPage.enterPath`)),1)]),_:1})]),_:1})]),_:1},8,[`modelValue`,`options`,`loading`,`disable`])])):c(``,!0),m(`div`,Ct,[l(C,{modelValue:N.value,"onUpdate:modelValue":n[18]||=e=>N.value=e,options:Bt.value,dense:``,borderless:``,class:`bottom-select rounded-borders branch-select`,"hide-dropdown-icon":``,"use-input":``,"input-debounce":`0`,loading:Vt.value,disable:!M.value.trim()||Vt.value,onFilter:Ut},{selected:a(()=>[m(`span`,wt,[l(h,{name:`call_split`,size:`12px`,color:`grey-5`,class:`q-mr-xs`}),u(` `+o(N.value??e.$t(`createPage.branch`))+` `,1),l(h,{name:`expand_more`,size:`12px`,color:`grey-5`})])]),"no-option":a(()=>[l(y,null,{default:a(()=>[l(b,{class:`text-grey-6 text-caption`},{default:a(()=>[u(o(M.value.trim()?e.$t(`createPage.noBranches`):e.$t(`createPage.enterPath`)),1)]),_:1})]),_:1})]),_:1},8,[`modelValue`,`options`,`loading`,`disable`])])])]),m(`div`,Tt,[l(_,{label:e.$t(`createPage.create`),"no-caps":``,unelevated:``,class:`create-btn text-weight-bold rounded-borders`,loading:Ht.value,disable:Ht.value||X.value&&!Z.value,onClick:Cn},null,8,[`label`,`loading`,`disable`])])]),m(`div`,Et,o(A.value?e.$t(`createPage.notionExtractHint`):e.$t(`createPage.notionImportHint`)),1)])]),_:1}))}}),[[`__scopeId`,`data-v-56d6cf98`]]);export{w as default};
|
|
1
|
+
import{E as e,F as t,H as n,L as r,M as ee,N as te,Q as i,T as ne,U as a,_t as re,bt as o,d as s,f as c,g as l,h as u,l as d,p as f,r as ie,rt as p,u as m,v as ae,vt as oe,x as se}from"./runtime-core.esm-bundler-C3IgBgY5.js";import{H as ce,R as le,U as ue,t as h}from"./QIcon-BJuyqdsT.js";import{r as g}from"./use-id-CuaR1RiE.js";import{s as de}from"./notifications-CG-oL2m2.js";import{t as _}from"./QBtn-a6jxWjmW.js";import{n as fe}from"./vue-i18n-BcfTCFFS.js";import{t as v}from"./QInput-Cm5-AGQ4.js";import{a as pe,h as me,l as he,s as ge}from"./index-DE3PxEjy.js";import{n as y,t as b}from"./QItemSection-5YpFpPDm.js";import{t as x}from"./QItemLabel-DrTxqTqV.js";import{t as S}from"./QTooltip-D_hSPb7r.js";import{t as _e}from"./QExpansionItem-BaQJkGb-.js";import{t as ve}from"./_plugin-vue_export-helper-Cj6tcsj6.js";import{t as ye}from"./QSpace-CLtL3aPy.js";import{t as be}from"./use-quasar-Sdcq6zzV.js";import{n as C,t as xe}from"./models-BMOYJtwv.js";import{t as Se}from"./QPage-ChUKoaKe.js";import{i as Ce,n as we,r as Te,t as Ee}from"./expand-template-Cu5GSLCM.js";var De={class:`create-inner`},Oe={class:`create-title text-center text-weight-bold q-mb-lg text-grey-3`},ke={class:`create-card rounded-borders`},Ae={class:`card-top-bar row items-center q-px-md q-py-xs`},je={class:`model-badge cursor-default row items-center q-gutter-xs`},Me={class:`text-indigo-3 text-weight-medium text-caption`},Ne={key:0,class:`notion-url-wrap`},Pe={key:0,class:`notion-error text-caption q-px-md q-pb-xs text-red-5`},Fe={key:1,class:`notion-valid text-caption q-px-md q-pb-xs text-green-4`},Ie={key:2,class:`notion-peek-choice q-px-md q-pb-sm`},Le={class:`text-caption text-grey-4 q-mb-sm`},Re={class:`row q-gutter-sm`},ze={class:`peek-card-text`},Be={class:`peek-card-title`},Ve={class:`peek-card-desc`},He={class:`peek-card-text`},Ue={class:`peek-card-title`},We={class:`peek-card-desc`},Ge={key:0,class:`sentry-url-wrap`},Ke={key:0,class:`sentry-error text-caption q-px-md q-pb-xs text-red-5`},qe={key:1,class:`sentry-valid text-caption q-px-md q-pb-xs text-red-4`},Je={class:`card-name-wrap`},Ye={class:`card-textarea-wrap`},Xe={class:`manual-hint q-px-md q-py-sm text-caption text-grey-6`},Ze={class:`q-pa-sm manual-section-body`},Qe={class:`row items-center q-gutter-sm q-mb-sm`},$e={class:`col text-caption text-grey-4`},et={class:`q-pa-sm manual-section-body`},tt={class:`row items-center q-gutter-sm q-mb-sm`},nt={class:`col text-caption text-grey-4`},rt={class:`card-bottom-bar`},it={class:`row q-col-gutter-xs q-px-xs`},at={key:0,class:`col-12 col-sm-6 col-md-3`},ot={class:`bottom-select-label row items-center no-wrap`},st={class:`col-12 col-sm-6 col-md-3`},ct={class:`bottom-select-label row items-center no-wrap`},lt={class:`col-12 col-sm-6 col-md-3`},ut={class:`bottom-select-label row items-center no-wrap`},dt={class:`col-12 col-md-3`},ft={class:`bottom-select-label row items-center no-wrap`},pt={class:`row q-col-gutter-xs q-pa-xs col-12 items-center justify-center`},mt={class:`col-12 col-md-auto`},ht={class:`col-12 col-md-auto`},gt={class:`col-12 col-md-auto`},_t={class:`row q-col-gutter-xs q-px-xs bottom-row-git`},vt={class:`col-12 col-md-4`},yt={key:0,class:`col-12 col-md-4`},bt={class:`bottom-select-label row items-center no-wrap`},xt={key:1,class:`col-12 col-md-4`},St={class:`bottom-select-label row items-center no-wrap`},Ct={class:`col-12 col-md-4`},wt={class:`bottom-select-label row items-center no-wrap`},Tt={class:`row justify-center q-px-sm q-py-sm`},Et={class:`create-hint text-center text-body2 q-mt-md text-grey-8`},w=ve(ae({__name:`CreatePage`,setup(ae){let ve=pe(),w=be(),Dt=he(),T=de(),{t:E}=fe(),Ot=i([]),D=i(``),O=i(``),kt=i(null),k=i(``),A=i(!1),j=i(`claude-opus-4-7`),At=i(`auto`),M=i(``),N=i(null),jt=i(`feature`),P=i(!1),Mt=i([]),F=i(`claude-code`),Nt=d(()=>Mt.value.find(e=>e.id===F.value)),Pt=d(()=>Mt.value.map(e=>({value:e.id,label:e.displayName}))),Ft=[{label:`feature/`,value:`feature`},{label:`fix/`,value:`fix`},{label:`hotfix/`,value:`hotfix`},{label:`chore/`,value:`chore`},{label:`refactor/`,value:`refactor`},{label:`docs/`,value:`docs`},{label:`test/`,value:`test`}],It=[`plan`,`bypass`,`strict`,`interactive`];function Lt(e){let t=e?T.getProjectByPath(e):void 0,n=t?.agentPermissionMode;if(typeof n==`string`&&It.includes(n))return n;let r=T.global.defaultPermissionMode;return It.includes(r)?r:r===`plan`?`plan`:t?.dangerouslySkipPermissions??T.global.dangerouslySkipPermissions??!0?`bypass`:`interactive`}let I=i(Lt(``)),Rt=d(()=>{switch(I.value){case`plan`:return`visibility`;case`bypass`:return`flash_on`;case`strict`:return`lock`;case`interactive`:return`security`}}),zt=d(()=>(Nt.value?.capabilities.permissionModes??It).map(e=>({value:e,label:E(`agentPermissionMode.${e}`),disabled:e===`plan`&&q.value}))),L=i([]),Bt=i([]),Vt=i(!1),Ht=i(!1);function Ut(e,t){t(()=>{Bt.value=e?L.value.filter(t=>t.toLowerCase().includes(e.toLowerCase())):L.value})}let Wt=me();function Gt(){return kt.value?.nativeEl??null}let{showSkills:Kt,selectedSkillIndex:R,groupedDropdown:qt,flatDropdown:z,fetchSkills:Jt,detectSlashFragment:Yt,replaceFragmentWith:Xt,closeDropdown:Zt}=Te(O,Gt,{excludeKoboCommands:!0});Jt(),n(O,async()=>{await e(),await Yt()});function Qt(e){if(e.type===`template`){let t=Wt.templates.find(t=>t.slug===e.name);if(!t)return;Xt(we(t.content,Ee({workspace:null,gitStats:null,sessionName:null}))),Zt();return}Xt(`/${e.name} `),Zt()}function $t(e){!Kt.value||z.value.length===0||(e.key===`ArrowDown`?(e.preventDefault(),R.value=(R.value+1)%z.value.length):e.key===`ArrowUp`?(e.preventDefault(),R.value=(R.value-1+z.value.length)%z.value.length):e.key===`Enter`&&!e.shiftKey&&!e.ctrlKey&&!e.metaKey?(e.preventDefault(),Qt(z.value[R.value])):e.key===`Escape`&&(e.preventDefault(),Zt()))}let en=d(()=>xe.map(e=>({label:E(e.i18nLabelKey),value:e.value,description:E(e.i18nDescriptionKey)})));function B(e){let t=e.indexOf(`:`);return t>=0?e.slice(t+1).trim():e}let tn=d(()=>[{label:B(E(`reasoning.auto`)),value:`auto`,description:E(`reasoning.autoDescription`)},{label:B(E(`reasoning.low`)),value:`low`,description:E(`reasoning.lowDescription`)},{label:B(E(`reasoning.medium`)),value:`medium`,description:E(`reasoning.mediumDescription`)},{label:B(E(`reasoning.high`)),value:`high`,description:E(`reasoning.highDescription`)},{label:B(E(`reasoning.xhigh`)),value:`xhigh`,description:E(`reasoning.xhighDescription`)},{label:B(E(`reasoning.max`)),value:`max`,description:E(`reasoning.maxDescription`)}]),V=d(()=>k.value.trim().startsWith(`https://www.notion.so/`)),nn=d(()=>/[?&]p=[0-9a-f]{32}(?:[&#]|$)/i.test(k.value)),H=i(`panel`);function rn(){let e=k.value.trim();return H.value===`parent`&&nn.value?e.replace(/([?&])p=[0-9a-f]{32}(?=[&#]|$)/i,`$1`).replace(/([?&])pm=[a-z]+(?=[&#]|$)/i,`$1`).replace(/[?&]+$/,``).replace(/\?&/,`?`):e}let U=i([]),W=i([]),G=i(``),an=i(``),on=d(()=>!A.value||!V.value);function sn(){let e=G.value.trim();e&&(U.value.push(e),G.value=``)}function cn(e){U.value.splice(e,1)}function ln(){let e=an.value.trim();e&&(W.value.push(e),an.value=``)}function un(e){W.value.splice(e,1)}function dn(){A.value=!A.value,A.value||(k.value=``)}let K=i(!1),q=i(!1);n(()=>q.value,e=>{e&&I.value!==`bypass`&&(I.value=`bypass`,w.notify({type:`info`,message:E(`agentPermissionMode.autoLoopLocked`),timeout:4e3}))});let J=i(``),Y=d(()=>/\/issues\/\d+/.test(J.value.trim()));function fn(){K.value=!K.value,K.value||(J.value=``)}let X=i(!1),Z=i(null),Q=i([]),pn=i(!1);async function mn(){if(!M.value.trim()){Q.value=[];return}pn.value=!0;try{Q.value=await Dt.fetchOrphanWorktrees(M.value.trim())}catch{Q.value=[]}finally{pn.value=!1}}function hn(){X.value=!X.value,X.value?(A.value=!1,k.value=``,K.value=!1,J.value=``,P.value=!0,mn()):Z.value=null}n(M,()=>{Z.value=null,X.value&&mn()}),n(Z,e=>{if(!e)return;let t=Q.value.find(t=>t.path===e);t&&(N.value=t.suggestedSourceBranch),P.value=!0});async function gn(e){if(!e.trim()){L.value=[],N.value=null;return}Vt.value=!0;try{let t=await fetch(`/api/git/branches?path=${encodeURIComponent(e.trim())}`);if(!t.ok)throw Error(`HTTP ${t.status}`);let n=await t.json();L.value=n.local??n.branches??[],L.value.length>0&&!N.value&&(N.value=L.value[0]??null)}catch{L.value=[],N.value=null}finally{Vt.value=!1}}function _n(e){let t=T.getProjectByPath(e);t&&(t.defaultSourceBranch&&(N.value=t.defaultSourceBranch),t.defaultModel?j.value=t.defaultModel:T.global.defaultModel&&(j.value=T.global.defaultModel)),I.value=Lt(e)}let $=null;n(M,e=>{$&&clearTimeout($),$=setTimeout(()=>{N.value=null,gn(e),_n(e)},500)});function vn(e,t){t(()=>{Ot.value=T.projectPaths.filter(t=>t.toLowerCase().includes(e.toLowerCase()))})}ee(async()=>{await T.fetchSettings(),I.value=Lt(M.value);try{let e=await fetch(`/api/engines`);e.ok&&(Mt.value=await e.json())}catch{}}),te(()=>{$&&clearTimeout($)});function yn(e){return e.normalize(`NFD`).replace(/[\u0300-\u036f]/g,``).toLowerCase().replace(/[^a-z0-9\s-]/g,``).trim().replace(/\s+/g,`-`).replace(/-+/g,`-`).substring(0,50)}function bn(){return D.value.trim()?D.value.trim().substring(0,80):!A.value&&!K.value&&O.value.trim()&&(O.value.trim().split(`
|
|
2
|
+
`)[0]??``).substring(0,80)||`workspace`}function xn(e){let t=(e.split(`/`).pop()??``).split(`-`);t.length>1&&/^[0-9a-f]{12,}$/i.test(t[t.length-1])&&t.pop();let n=t.join(`-`).toLowerCase(),r=n.match(/tk-(\d+)/);if(r){let e=`TK-${r[1]}`,t=n.replace(/tk-\d+/i,``).replace(/-+/g,`-`).replace(/^-|-$/g,``).substring(0,40);return t?`${e}--${t}`:e}return n.substring(0,50)||`task-${Date.now()}`}function Sn(){return A.value&&!V.value?E(`createPage.validationNotionUrl`):K.value&&!Y.value?E(`createPage.sentryValidation`):!A.value&&!K.value&&!O.value.trim()?E(`createPage.validationDescription`):!A.value&&!K.value&&(!bn()||bn()===`workspace`)&&!D.value.trim()&&!O.value.trim()?E(`createPage.validationName`):M.value.trim()?N.value?null:E(`createPage.validationBranch`):E(`createPage.validationPath`)}async function Cn(){let e=Sn();if(e){w.notify({type:`negative`,message:e,position:`top`});return}if(X.value&&!Z.value){w.notify({type:`negative`,message:E(`createPage.pickWorktreeRequired`),position:`top`});return}Ht.value=!0;try{let e=bn(),t;t=A.value&&V.value?xn(rn()):e===`workspace`?`task-${Date.now()}`:yn(e);let n=`${jt.value}/${t}`,r={name:e,projectPath:M.value.trim(),sourceBranch:N.value,...X.value&&Z.value?{worktreePath:Z.value,skipSetupScript:!0}:{workingBranch:n},engine:F.value,model:j.value,reasoningEffort:At.value,...A.value&&V.value?{notionUrl:rn()}:{},...K.value&&Y.value?{sentryUrl:J.value.trim()}:{},...on.value&&U.value.length>0?{tasks:U.value}:{},...on.value&&W.value.length>0?{acceptanceCriteria:W.value}:{},...P.value&&!X.value?{skipSetupScript:!0}:{},...O.value.trim()?{description:O.value.trim()}:{},...q.value?{autoLoop:!0}:{},agentPermissionMode:q.value&&I.value===`plan`?`bypass`:I.value},ee=await Dt.createWorkspace(r);ge().subscribe(ee.id),Dt.selectWorkspace(ee.id),ve.push({name:`workspace`,params:{id:ee.id}})}catch{w.notify({type:`negative`,message:E(`createPage.errorCreating`),position:`top`})}finally{Ht.value=!1}}return(e,n)=>(t(),s(Se,{class:`create-page flex flex-center column`},{default:a(()=>[m(`div`,De,[m(`div`,Oe,o(e.$t(`createPage.title`)),1),m(`div`,ke,[m(`div`,Ae,[m(`span`,je,[l(h,{name:`auto_awesome`,size:`14px`,color:`indigo-4`}),m(`span`,Me,o(Nt.value?.displayName??e.$t(`createPage.claudeCode`)),1)]),l(ye),l(_,{flat:``,dense:``,"no-caps":``,size:`sm`,color:A.value?`green-4`:`grey-5`,class:`notion-toggle-btn text-caption rounded-borders`,disable:X.value,onClick:dn},{default:a(()=>[l(h,{name:`description`,size:`14px`,class:`q-mr-xs`}),u(` `+o(A.value?e.$t(`createPage.notionEnabled`):e.$t(`createPage.importNotion`)),1)]),_:1},8,[`color`,`disable`]),l(_,{flat:``,dense:``,"no-caps":``,size:`sm`,color:K.value?`red-4`:`grey-5`,class:`sentry-toggle-btn text-caption rounded-borders q-ml-sm`,disable:X.value,onClick:fn},{default:a(()=>[l(h,{name:`bug_report`,size:`14px`,class:`q-mr-xs`}),u(` `+o(K.value?e.$t(`createPage.sentryEnabled`):e.$t(`createPage.importSentry`)),1)]),_:1},8,[`color`,`disable`])]),l(g,{color:`grey-9`}),l(le,{name:`slide`},{default:a(()=>[A.value?(t(),f(`div`,Ne,[l(v,{modelValue:k.value,"onUpdate:modelValue":n[0]||=e=>k.value=e,borderless:``,dense:``,placeholder:e.$t(`createPage.notionPlaceholder`),class:`notion-url-input`,"input-class":`notion-url-input-inner`},{prepend:a(()=>[l(h,{name:`link`,size:`16px`,color:V.value?`green-4`:`grey-6`},null,8,[`color`])]),_:1},8,[`modelValue`,`placeholder`]),k.value.trim()&&!V.value?(t(),f(`div`,Pe,o(e.$t(`createPage.notionValidation`)),1)):c(``,!0),V.value?(t(),f(`div`,Fe,o(e.$t(`createPage.notionAutoExtract`)),1)):c(``,!0),V.value&&nn.value?(t(),f(`div`,Ie,[m(`div`,Le,[l(h,{name:`info`,size:`14px`,color:`indigo-4`,class:`q-mr-xs`}),u(` `+o(e.$t(`createPage.notionPanelChoiceLabel`)),1)]),m(`div`,Re,[m(`button`,{type:`button`,class:re([`peek-card col`,{"peek-card--active":H.value===`panel`}]),onClick:n[1]||=e=>H.value=`panel`},[l(h,{name:`article`,size:`22px`,class:`peek-card-icon`}),m(`div`,ze,[m(`div`,Be,o(e.$t(`createPage.notionPanelOption`)),1),m(`div`,Ve,o(e.$t(`createPage.notionPanelOptionDesc`)),1)]),H.value===`panel`?(t(),s(h,{key:0,name:`check_circle`,size:`18px`,color:`indigo-4`,class:`peek-card-check`})):c(``,!0)],2),m(`button`,{type:`button`,class:re([`peek-card col`,{"peek-card--active":H.value===`parent`}]),onClick:n[2]||=e=>H.value=`parent`},[l(h,{name:`folder_open`,size:`22px`,class:`peek-card-icon`}),m(`div`,He,[m(`div`,Ue,o(e.$t(`createPage.notionParentOption`)),1),m(`div`,We,o(e.$t(`createPage.notionParentOptionDesc`)),1)]),H.value===`parent`?(t(),s(h,{key:0,name:`check_circle`,size:`18px`,color:`indigo-4`,class:`peek-card-check`})):c(``,!0)],2)])])):c(``,!0)])):c(``,!0)]),_:1}),A.value?(t(),s(g,{key:0,color:`grey-9`})):c(``,!0),l(le,{name:`slide`},{default:a(()=>[K.value?(t(),f(`div`,Ge,[l(v,{modelValue:J.value,"onUpdate:modelValue":n[3]||=e=>J.value=e,borderless:``,dense:``,placeholder:e.$t(`createPage.sentryPlaceholder`),class:`sentry-url-input`,"input-class":`sentry-url-input-inner`},{prepend:a(()=>[l(h,{name:`link`,size:`16px`,color:Y.value?`red-4`:`grey-6`},null,8,[`color`])]),_:1},8,[`modelValue`,`placeholder`]),J.value.trim()&&!Y.value?(t(),f(`div`,Ke,o(e.$t(`createPage.sentryValidation`)),1)):c(``,!0),Y.value?(t(),f(`div`,qe,o(e.$t(`createPage.sentryAutoExtract`)),1)):c(``,!0)])):c(``,!0)]),_:1}),K.value?(t(),s(g,{key:1,color:`grey-9`})):c(``,!0),m(`div`,Je,[l(v,{modelValue:D.value,"onUpdate:modelValue":n[4]||=e=>D.value=e,borderless:``,dense:``,placeholder:A.value&&V.value?e.$t(`createPage.workspaceName`):e.$t(`createPage.workspaceNamePlaceholder`),class:`name-input`,"input-class":`name-input-inner`},null,8,[`modelValue`,`placeholder`])]),l(g,{color:`grey-9`}),m(`div`,Ye,[l(v,{ref_key:`descriptionRef`,ref:kt,modelValue:O.value,"onUpdate:modelValue":n[5]||=e=>O.value=e,type:`textarea`,borderless:``,autogrow:``,rows:3,placeholder:A.value?e.$t(`createPage.instructions`):e.$t(`createPage.instructionsPlaceholder`),class:`create-textarea`,"input-class":`create-textarea-input`,onKeydown:[$t,ce(ue(Cn,[`ctrl`]),[`enter`]),ce(ue(Cn,[`meta`]),[`enter`])]},null,8,[`modelValue`,`placeholder`,`onKeydown`]),p(Kt)&&p(z).length>0?(t(),s(Ce,{key:0,class:`create-slash-popup`,"grouped-dropdown":p(qt),"flat-dropdown":p(z),"selected-index":p(R),onSelect:Qt},null,8,[`grouped-dropdown`,`flat-dropdown`,`selected-index`])):c(``,!0)]),l(g,{color:`grey-9`}),on.value?(t(),f(ie,{key:2},[m(`div`,Xe,o(e.$t(`createPage.manualHint`)),1),l(_e,{dark:``,dense:``,label:e.$t(`createPage.tasks`,{count:U.value.length}),"header-class":`text-grey-4 manual-expansion-header`,class:`manual-expansion q-mx-sm`},{default:a(()=>[m(`div`,Ze,[m(`div`,Qe,[l(v,{modelValue:G.value,"onUpdate:modelValue":n[6]||=e=>G.value=e,dark:``,dense:``,borderless:``,placeholder:e.$t(`createPage.addTask`),class:`col manual-input`,"input-class":`manual-input-inner`,onKeydown:ce(ue(sn,[`prevent`]),[`enter`])},null,8,[`modelValue`,`placeholder`,`onKeydown`]),l(_,{flat:``,dense:``,round:``,icon:`add`,color:`indigo-4`,disable:!G.value.trim(),onClick:sn},{default:a(()=>[l(S,null,{default:a(()=>[u(o(e.$t(`tooltip.addTask`)),1)]),_:1})]),_:1},8,[`disable`])]),(t(!0),f(ie,null,r(U.value,(n,r)=>(t(),f(`div`,{key:`task-${r}`,class:`row items-center q-py-xs manual-item`},[m(`span`,$e,o(n),1),l(_,{flat:``,dense:``,round:``,icon:`close`,size:`xs`,color:`grey-6`,onClick:e=>cn(r)},{default:a(()=>[l(S,null,{default:a(()=>[u(o(e.$t(`tooltip.removeTask`)),1)]),_:1})]),_:1},8,[`onClick`])]))),128))])]),_:1},8,[`label`]),l(_e,{dark:``,dense:``,label:e.$t(`createPage.acceptanceCriteria`,{count:W.value.length}),"header-class":`text-grey-4 manual-expansion-header`,class:`manual-expansion q-mx-sm q-mb-sm`},{default:a(()=>[m(`div`,et,[m(`div`,tt,[l(v,{modelValue:an.value,"onUpdate:modelValue":n[7]||=e=>an.value=e,dark:``,dense:``,borderless:``,placeholder:e.$t(`createPage.addCriterion`),class:`col manual-input`,"input-class":`manual-input-inner`,onKeydown:ce(ue(ln,[`prevent`]),[`enter`])},null,8,[`modelValue`,`placeholder`,`onKeydown`]),l(_,{flat:``,dense:``,round:``,icon:`add`,color:`indigo-4`,disable:!an.value.trim(),onClick:ln},{default:a(()=>[l(S,null,{default:a(()=>[u(o(e.$t(`tooltip.addCriterion`)),1)]),_:1})]),_:1},8,[`disable`])]),(t(!0),f(ie,null,r(W.value,(n,r)=>(t(),f(`div`,{key:`crit-${r}`,class:`row items-center q-py-xs manual-item`},[m(`span`,nt,o(n),1),l(_,{flat:``,dense:``,round:``,icon:`close`,size:`xs`,color:`grey-6`,onClick:e=>un(r)},{default:a(()=>[l(S,null,{default:a(()=>[u(o(e.$t(`tooltip.removeCriterion`)),1)]),_:1})]),_:1},8,[`onClick`])]))),128))])]),_:1},8,[`label`]),l(g,{color:`grey-9`})],64)):c(``,!0),m(`div`,rt,[m(`div`,it,[Pt.value.length>0?(t(),f(`div`,at,[l(C,{modelValue:F.value,"onUpdate:modelValue":n[8]||=e=>F.value=e,options:Pt.value,dense:``,borderless:``,class:`bottom-select rounded-borders`,"hide-dropdown-icon":``,"emit-value":``,"map-options":``,"option-value":`value`,"option-label":`label`},{selected:a(()=>[m(`span`,ot,[l(h,{name:`hub`,size:`12px`,color:`grey-5`,class:`q-mr-xs`}),u(` `+o(Pt.value.find(e=>e.value===F.value)?.label??F.value)+` `,1),l(h,{name:`expand_more`,size:`12px`,color:`grey-5`})])]),default:a(()=>[l(S,null,{default:a(()=>[u(o(e.$t(`engine.select`)),1)]),_:1})]),_:1},8,[`modelValue`,`options`])])):c(``,!0),m(`div`,st,[l(C,{modelValue:j.value,"onUpdate:modelValue":n[9]||=e=>j.value=e,options:en.value,dense:``,borderless:``,class:`bottom-select rounded-borders model-select`,"hide-dropdown-icon":``,"emit-value":``,"map-options":``,"option-value":`value`,"option-label":`label`},{selected:a(()=>[m(`span`,ct,[u(o(en.value.find(e=>e.value===j.value)?.label??j.value)+` `,1),l(h,{name:`expand_more`,size:`12px`,color:`grey-5`})])]),option:a(({opt:e,itemProps:t})=>[l(y,ne(t,{class:`model-option`}),{default:a(()=>[l(b,null,{default:a(()=>[l(x,{class:`text-white`},{default:a(()=>[u(o(e.label),1)]),_:2},1024),l(x,{caption:``,class:`text-grey-5`},{default:a(()=>[u(o(e.description),1)]),_:2},1024)]),_:2},1024)]),_:2},1040)]),_:1},8,[`modelValue`,`options`])]),m(`div`,lt,[l(C,{modelValue:At.value,"onUpdate:modelValue":n[10]||=e=>At.value=e,options:tn.value,dense:``,borderless:``,class:`bottom-select rounded-borders`,"hide-dropdown-icon":``,"emit-value":``,"map-options":``,"option-value":`value`,"option-label":`label`},{selected:a(()=>[m(`span`,ut,[l(h,{name:`psychology`,size:`12px`,color:`grey-5`,class:`q-mr-xs`}),u(` `+o(tn.value.find(e=>e.value===At.value)?.label??At.value)+` `,1),l(h,{name:`expand_more`,size:`12px`,color:`grey-5`})])]),option:a(({opt:e,itemProps:t})=>[l(y,oe(se(t)),{default:a(()=>[l(b,null,{default:a(()=>[l(x,{class:`text-white`},{default:a(()=>[u(o(e.label),1)]),_:2},1024),l(x,{caption:``,class:`text-grey-5`},{default:a(()=>[u(o(e.description),1)]),_:2},1024)]),_:2},1024)]),_:2},1040)]),_:1},8,[`modelValue`,`options`])]),m(`div`,dt,[l(C,{modelValue:I.value,"onUpdate:modelValue":n[11]||=e=>I.value=e,options:zt.value,disable:q.value,dense:``,borderless:``,class:`bottom-select rounded-borders`,"hide-dropdown-icon":``,"emit-value":``,"map-options":``,"option-value":`value`,"option-label":`label`,"option-disable":e=>e.disabled===!0},{selected:a(()=>[m(`span`,ft,[l(h,{name:Rt.value,size:`12px`,color:`amber-6`,class:`q-mr-xs`},null,8,[`name`]),u(` `+o(zt.value.find(e=>e.value===I.value)?.label??I.value)+` `,1),q.value?c(``,!0):(t(),s(h,{key:0,name:`expand_more`,size:`12px`,color:`grey-5`}))])]),default:a(()=>[l(S,null,{default:a(()=>[u(o(q.value?e.$t(`agentPermissionMode.autoLoopLocked`):e.$t(`agentPermissionMode.tooltip`)),1)]),_:1})]),_:1},8,[`modelValue`,`options`,`disable`,`option-disable`])])]),m(`div`,pt,[m(`div`,mt,[l(_,{flat:``,dense:``,size:`sm`,"no-caps":``,icon:q.value?`autorenew`:`sync_disabled`,color:q.value?`amber-4`:`grey-5`,label:e.$t(`autoLoop.startInMode`),class:`skip-setup-btn`,onClick:n[12]||=e=>q.value=!q.value},{default:a(()=>[l(S,null,{default:a(()=>[u(o(e.$t(`autoLoop.startInMode`)),1)]),_:1})]),_:1},8,[`icon`,`color`,`label`])]),m(`div`,ht,[l(_,{flat:``,dense:``,size:`sm`,"no-caps":``,icon:P.value?`play_disabled`:`play_circle`,color:P.value?`orange-4`:`grey-5`,label:e.$t(`createPage.skipSetupScript`),class:`skip-setup-btn`,onClick:n[13]||=e=>P.value=!P.value},{default:a(()=>[l(S,null,{default:a(()=>[u(o(e.$t(`createPage.skipSetupScript`)),1)]),_:1})]),_:1},8,[`icon`,`color`,`label`])]),m(`div`,gt,[l(_,{flat:``,dense:``,size:`sm`,"no-caps":``,icon:`folder_open`,color:X.value?`cyan-4`:`grey-5`,label:X.value?e.$t(`createPage.attachWorktreeEnabled`):e.$t(`createPage.attachWorktreeToggle`),class:`skip-setup-btn`,onClick:hn},null,8,[`color`,`label`])])]),m(`div`,_t,[m(`div`,vt,[l(C,{modelValue:M.value,"onUpdate:modelValue":n[14]||=e=>M.value=e,options:Ot.value,dense:``,borderless:``,"use-input":``,"fill-input":``,"hide-selected":``,"input-debounce":`0`,"new-value-mode":`add`,class:`bottom-select rounded-borders repo-select`,"hide-dropdown-icon":``,"input-class":M.value?``:`repo-input-empty`,placeholder:e.$t(`createPage.projectPath`),behavior:p(T).projectPaths.length>0?`menu`:`dialog`,onFilter:vn,onInputValue:n[15]||=e=>{M.value=e}},{prepend:a(()=>[l(h,{name:`folder`,size:`14px`,color:`grey-5`})]),"no-option":a(()=>[l(y,null,{default:a(()=>[l(b,{class:`text-grey-6 text-caption`},{default:a(()=>[u(o(e.$t(`createPage.enterPath`)),1)]),_:1})]),_:1})]),_:1},8,[`modelValue`,`options`,`input-class`,`placeholder`,`behavior`])]),X.value?c(``,!0):(t(),f(`div`,yt,[l(C,{modelValue:jt.value,"onUpdate:modelValue":n[16]||=e=>jt.value=e,options:Ft,"emit-value":``,"map-options":``,dense:``,borderless:``,class:`bottom-select rounded-borders branch-type-select`,"hide-dropdown-icon":``},{selected:a(()=>[m(`span`,bt,[l(h,{name:`account_tree`,size:`12px`,color:`grey-5`,class:`q-mr-xs`}),u(` `+o(jt.value)+`/ `,1),l(h,{name:`expand_more`,size:`12px`,color:`grey-5`})])]),default:a(()=>[l(S,null,{default:a(()=>[u(o(e.$t(`createPage.branchType`)),1)]),_:1})]),_:1},8,[`modelValue`])])),X.value?(t(),f(`div`,xt,[l(C,{modelValue:Z.value,"onUpdate:modelValue":n[17]||=e=>Z.value=e,options:Q.value,"option-label":`branch`,"option-value":`path`,"emit-value":``,"map-options":``,"use-input":``,dense:``,borderless:``,class:`bottom-select rounded-borders worktree-select`,"hide-dropdown-icon":``,loading:pn.value,disable:!M.value.trim()||pn.value},{selected:a(()=>[m(`span`,St,[l(h,{name:`folder_open`,size:`12px`,color:`cyan-5`,class:`q-mr-xs`}),u(` `+o(Z.value?Q.value.find(e=>e.path===Z.value)?.branch??Z.value:e.$t(`createPage.worktreePickerLabel`))+` `,1),l(h,{name:`expand_more`,size:`12px`,color:`grey-5`})])]),option:a(e=>[l(y,oe(se(e.itemProps)),{default:a(()=>[l(b,null,{default:a(()=>[l(x,null,{default:a(()=>[u(o(e.opt.branch),1)]),_:2},1024),l(x,{caption:``},{default:a(()=>[u(o(e.opt.path),1)]),_:2},1024)]),_:2},1024)]),_:2},1040)]),"no-option":a(()=>[l(y,null,{default:a(()=>[l(b,{class:`text-grey-6 text-caption`},{default:a(()=>[u(o(M.value.trim()?e.$t(`createPage.noOrphanWorktrees`):e.$t(`createPage.enterPath`)),1)]),_:1})]),_:1})]),_:1},8,[`modelValue`,`options`,`loading`,`disable`])])):c(``,!0),m(`div`,Ct,[l(C,{modelValue:N.value,"onUpdate:modelValue":n[18]||=e=>N.value=e,options:Bt.value,dense:``,borderless:``,class:`bottom-select rounded-borders branch-select`,"hide-dropdown-icon":``,"use-input":``,"input-debounce":`0`,loading:Vt.value,disable:!M.value.trim()||Vt.value,onFilter:Ut},{selected:a(()=>[m(`span`,wt,[l(h,{name:`call_split`,size:`12px`,color:`grey-5`,class:`q-mr-xs`}),u(` `+o(N.value??e.$t(`createPage.branch`))+` `,1),l(h,{name:`expand_more`,size:`12px`,color:`grey-5`})])]),"no-option":a(()=>[l(y,null,{default:a(()=>[l(b,{class:`text-grey-6 text-caption`},{default:a(()=>[u(o(M.value.trim()?e.$t(`createPage.noBranches`):e.$t(`createPage.enterPath`)),1)]),_:1})]),_:1})]),_:1},8,[`modelValue`,`options`,`loading`,`disable`])])])]),m(`div`,Tt,[l(_,{label:e.$t(`createPage.create`),"no-caps":``,unelevated:``,class:`create-btn text-weight-bold rounded-borders`,loading:Ht.value,disable:Ht.value||X.value&&!Z.value,onClick:Cn},null,8,[`label`,`loading`,`disable`])])]),m(`div`,Et,o(A.value?e.$t(`createPage.notionExtractHint`):e.$t(`createPage.notionImportHint`)),1)])]),_:1}))}}),[[`__scopeId`,`data-v-56d6cf98`]]);export{w as default};
|