@sma1lboy/kobe 0.9.14 → 0.9.15
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/cli/index.js +5 -5
- package/dist/cli/kobe-run.js +5 -5
- package/dist/cli/rove-run.js +5 -5
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -297,9 +297,9 @@ ${Q}`,X);this.line=J,this.column=z,this.codeblock=Q}}});function RW(Z,X){let J=Z
|
|
|
297
297
|
`}function v$0(){if(gk)return;gk=!0;try{process.stderr.write(`[rove] client log write failed; continuing without it
|
|
298
298
|
`)}catch{}}async function f$0(Z){try{let{size:X}=await x$0(Z);if(!sC(X,mW))return;await I$0(Z,`${Z}.old`)}catch{}}function ck(Z){let X=QE();kk=kk.then(async()=>{await f$0(X);try{await bk(X,Z)}catch(J){if(J?.code==="ENOENT")await P$0(y$0(X),{recursive:!0}),await bk(X,Z);else throw J}}).catch(()=>v$0())}function cZ(Z,X){ck(uk(Z,X))}function d4(Z,X){let J=w$0(X);ck(uk(Z,J.stack??J.message))}function lk(){if($E||qE)return;$E=(Z)=>d4("crash-net",Z),qE=(Z)=>d4("crash-net",Z),process.on("unhandledRejection",$E),process.on("uncaughtException",qE)}var mk="client",gk=!1,kk,$E,qE;var lZ=h(()=>{rC();j7();kk=Promise.resolve()});var UE={};o1(UE,{RpcTimeoutError:()=>HE,KobeDaemonClient:()=>a5});import{connect as b$0}from"net";import{StringDecoder as g$0}from"string_decoder";function k$0(){let Z=process.env.KOBE_RPC_TIMEOUT_MS?.trim();if(Z){let X=Number.parseInt(Z,10);if(Number.isFinite(X))return X}return 20000}class a5{socketPath;socket=null;buffer="";nextId=1;pending=new Map;handlers=new Map;lifecycleHandlers=new Map;connecting=null;disposed=!1;constructor(Z){this.socketPath=Z}connect(){if(this.socket)return Promise.resolve();if(this.disposed)return Promise.reject(Error("daemon client disposed"));if(this.connecting)return this.connecting;let Z=this.openSocket();this.connecting=Z;let X=()=>{if(this.connecting===Z)this.connecting=null};return Z.then(X,X),Z}get isDisposed(){return this.disposed}close(){this.disposed=!0,this.socket?.end(),this.socket=null,this.failPending()}forceDisconnect(){let Z=this.socket;if(!Z)return;this.socket=null,Z.destroy(),this.failPending()}failPending(){if(this.pending.size===0)return;let Z=Error("daemon connection closed");for(let X of this.pending.values()){if(X.timer)clearTimeout(X.timer);X.reject(Z)}this.pending.clear()}on(Z,X){let J=this.handlers.get(Z);if(!J)J=new Set,this.handlers.set(Z,J);return J.add(X),()=>{if(J?.delete(X),J?.size===0)this.handlers.delete(Z)}}onChannel(Z,X){return this.on(Z,(J)=>X(J.payload))}subscribe(Z={}){let X={};if(Z.channels)X.channels=Z.channels;if(Z.role)X.role=Z.role;return this.request("subscribe",X)}onLifecycle(Z,X){let J=this.lifecycleHandlers.get(Z);if(!J)J=new Set,this.lifecycleHandlers.set(Z,J);return J.add(X),()=>{if(J?.delete(X),J?.size===0)this.lifecycleHandlers.delete(Z)}}async request(Z,X){await this.connect();let J=this.socket;if(!J)throw Error("daemon connection is not open");let z=String(this.nextId++),Q=new Promise((Y,G)=>{let $={resolve:(K)=>Y(K),reject:G},U=k$0();if(U>0&&!m$0.has(Z))$.timer=setTimeout(()=>this.onRequestTimeout(z,Z,U),U);this.pending.set(z,$)});return J.write(PQ({type:"request",id:z,name:Z,payload:X})),Q}onRequestTimeout(Z,X,J){let z=this.pending.get(Z);if(!z)return;this.pending.delete(Z),z.reject(new HE(X,J)),this.forceDisconnect(),this.emitLifecycle("close")}openSocket(){return new Promise((Z,X)=>{let J=b$0(this.socketPath);this.socket=J;let z=()=>{J.off("error",Q),J.on("error",()=>J.destroy()),Z()},Q=(G)=>{if(J.off("connect",z),this.socket===J)this.socket=null;X(G)};J.once("connect",z),J.once("error",Q);let Y=new g$0("utf8");this.buffer="",J.on("data",(G)=>this.onData(Y.write(G))),J.on("close",()=>this.onSocketClose(J))})}onSocketClose(Z){if(this.socket!==Z)return;this.socket=null,this.failPending(),this.emitLifecycle("close")}emitLifecycle(Z){for(let X of this.lifecycleHandlers.get(Z)??[])try{X()}catch(J){console.error(`[rove] lifecycle handler for "${Z}" threw:`,J)}}onData(Z){this.buffer+=Z;let X=this.buffer.indexOf(`
|
|
299
299
|
`);while(X!==-1){let J=this.buffer.slice(0,X);if(this.buffer=this.buffer.slice(X+1),J.trim().length>0)this.onLine(J);X=this.buffer.indexOf(`
|
|
300
|
-
`)}}onLine(Z){let X;try{X=JSON.parse(Z)}catch(z){d4("client-frame",z);return}if(X.type==="event"){this.emit(X);return}if(X.type!=="response")return;let J=this.pending.get(X.id);if(!J)return;if(this.pending.delete(X.id),J.timer)clearTimeout(J.timer);if(X.error){let z=Error(X.error.message);if(X.error.name)z.name=X.error.name;J.reject(z)}else J.resolve(X.payload)}emit(Z){for(let X of this.handlers.get(Z.name)??[])try{X(Z)}catch(J){d4("client-event",J)}for(let X of this.handlers.get("*")??[])try{X(Z)}catch(J){d4("client-event",J)}}}var HE,m$0;var g6=h(()=>{o8();lZ();HE=class HE extends Error{constructor(Z,X){super(`daemon rpc "${Z}" timed out after ${X}ms (daemon wedged?)`);this.name="RpcTimeoutError"}};m$0=new Set(["task.ensureWorktree","task.ensureMain","worktree.discoverAdoptable","worktree.adopt","worktree.archiveRemoved","worktree.list","worktree.remove"])});function W5(Z){if(!Z.client)throw new t0("daemon required","BAD_DAEMON");return Z.client}async function F4(Z,X,J){return W5(Z).request(X,J)}async function pk(){let[{KobeDaemonClient:Z},{defaultPtyHostSocketPath:X}]=await Promise.all([Promise.resolve().then(() => (g6(),UE)),Promise.resolve().then(() => (j7(),GE))]),J=new Z(X());try{return await J.connect(),await J.request("pty.list",{})}catch{return{sessions:[]}}finally{J.close()}}var $8=h(()=>{a8()});function h$0(){lC();let Z=[...Kk()];for(let X of kN()){let J=O1(X);Z.push({id:X,name:J.displayName,command:J.defaultCommand.join(" "),protocol:P9,builtin:!1})}return Z}async function u$0(Z){let X=Z.args.require("command"),J=I9(X);return await F4(Z,"task.setCommand",{taskId:Z.args.require("task-id"),command:X,vendor:J}),{ok:!0,command:X,protocol:J,...J===P9?{generic:!0}:{}}}var dk,ik;var KE=h(()=>{aU();E2();pC();e4();E8();$8();dk={name:"engine-list",summary:"List every engine Rove can launch \u2014 built-ins, registered presets, and engines contributed by enabled plugins \u2014 each with its RAW launch command, exactly as it runs. Copy one into `add --command` / `send --tab new --command` verbatim, or edit its flags first. `protocol` is the adapter Rove speaks to it (history, trust, delivery); `generic` = none, which still runs fine but loses transcript reads. Returns { engines }.",flags:[],offline:!0,handler:async()=>({engines:h$0()})};ik={name:"set-command",summary:"Set a task's engine launch command (takes effect on the next session rebuild). The protocol Rove speaks to it is derived from the command \u2014 the result reports which one, `generic` when the command names no engine Rove knows.",flags:[w1.taskId(),{...w1.command(),required:!0}],handler:u$0}});var uW;var nk=h(()=>{uW={$schema:"https://json.schemastore.org/package.json",name:"@sma1lboy/rove",version:"0.9.14",description:"Rove \u2014 the agent multiplexer for your terminal. Run coding agents on parallel tasks with isolated worktrees and persistent sessions.",keywords:["terminal","tui","cli","multiplexer","ai-agents","coding-agent","ai-coding-assistant","agentic-ai","parallel-agents","git-worktree","claude-code","codex","llm","developer-tools"],type:"module",packageManager:"bun@1.3.13",bin:{kobe:"dist/cli/kobe.js",rove:"dist/cli/rove.js"},files:["dist/cli","dist/web-ui","dist/skills","dist/*.wav","README.md","LICENSE"],publishConfig:{access:"public"},repository:{type:"git",url:"git+https://github.com/Sma1lboy/rove.git"},homepage:"https://rove.run",bugs:{url:"https://github.com/Sma1lboy/rove/issues"},engines:{bun:">=1.3.11"},scripts:{dev:"ROVE_DEV=1 bun --conditions=browser ./src/cli/rove.ts","dev:kobe":"KOBE_DEV=1 bun --conditions=browser ./src/cli/kobe.ts","dev:mock":"KOBE_DEV=1 bun ./src/tui-react/mock/host.tsx","dev:mock-react":"KOBE_DEV=1 bun ./src/tui-react/mock/host.tsx","dev:mock-react-task-dialogs":"KOBE_DEV=1 bun ./src/tui-react/component/mock-dialogs-host.tsx","dev:mock-react-filetree":"KOBE_DEV=1 bun ./src/tui-react/panes/filetree/mock-host.tsx","dev:mock-react-sidebar":"KOBE_DEV=1 bun ./src/tui-react/panes/sidebar/mock-host.tsx","dev:mock-react-terminal":"KOBE_DEV=1 bun ./src/tui-react/panes/terminal/mock-host.tsx","dev:mock-react-dialogs":"KOBE_DEV=1 bun ./src/tui-react/mock/dialogs-host.tsx","dev:mock-react-workspace":"KOBE_DEV=1 bun ./src/tui-react/workspace/mock-host.tsx","dev:sandbox":"bun run scripts/dev-sandbox.ts run","dev:sandbox:reset":"bun run scripts/dev-sandbox.ts reset",build:"bun run scripts/build.ts","build:with-web":"bun run build",compile:"bun run scripts/compile.ts",typecheck:"tsc --noEmit","check-i18n":"bun run scripts/check-i18n.ts",test:"bun run test:fast && bun run test:socket","perf:golden":"bun scripts/perf-golden.ts","pty:soak":"bun scripts/pty-soak.ts","test:fast":"vitest run --passWithNoTests --minWorkers=1 --maxWorkers=8","test:socket":"KOBE_INCLUDE_SOCKET=1 vitest run test/daemon --pool forks --minWorkers=1 --maxWorkers=4 --passWithNoTests","test:socket:coverage":"KOBE_INCLUDE_SOCKET=1 KOBE_COVERAGE_DAEMON=1 vitest run test/daemon --coverage --pool forks --minWorkers=1 --maxWorkers=4 --passWithNoTests","test:behavior":"KOBE_INCLUDE_BEHAVIOR=1 vitest run test/behavior --pool forks --minWorkers=1 --maxWorkers=1 --retry=2 --passWithNoTests","test:render":"bun test test/render --coverage --coverage-reporter=text --coverage-reporter=lcov --coverage-dir=coverage-render",coverage:"vitest run --coverage --passWithNoTests",bench:"vitest bench --run",lint:"biome check .",knip:"knip-bun",postinstall:"bun run scripts/check-preview-deps.ts || true",prepublishOnly:"bun run typecheck && bun run build","plugin-sandbox":"bun run scripts/plugin-sandbox.ts"},"//":"biome.json + bunfig.toml live at the monorepo root since they apply repo-wide; bun.lock also lives at root (workspace-shared).",dependencies:{"@ansi-tools/parser":"^1.0.15","@opentui/core":"0.4.3","@opentui/react":"0.4.3","@xterm/addon-serialize":"^0.14.0","@xterm/addon-unicode11":"^0.9.0","@xterm/headless":"^6.0.0","node-pty":"^1.1.0",react:"^19.2.8",ws:"^8.18.0"},devDependencies:{"@biomejs/biome":"1.9.4","@sma1lboy/kobe-daemon":"0.7.17","@tsconfig/bun":"1.0.10","@types/bun":"1.3.14","@types/node":"25.6.2","@types/react":"^19.2.0","@vitest/coverage-v8":"2.1.9",knip:"^6.14.2","kobe-web":"workspace:*","react-devtools-core":"^7.0.1",typescript:"5.8.2",vitest:"2.1.9"},trustedDependencies:[]}});var ok={};o1(ok,{repoSlug:()=>vQ,releasePageUrl:()=>DE,recommendedGlobalInstallCommand:()=>ME,isNewerSemver:()=>VE,fetchReleaseSummaries:()=>WK,fetchReleaseNotesRange:()=>WE,fetchReleaseNotes:()=>NE,compareSemver:()=>J3,checkLatestVersion:()=>fQ,breakingVersionsCrossed:()=>NK,UPDATE_SCRIPT_URL:()=>cW,UPDATE_COMMAND:()=>k9,PACKAGE_NAME:()=>BE,CURRENT_VERSION:()=>e1,BREAKING_VERSIONS:()=>pZ});function vQ(){let Z=uW.repository?.url;if(!Z)return null;let X=Z.match(/github\.com[:/]([^/]+)\/([^/.]+)/);if(!X||!X[1]||!X[2])return null;return`${X[1]}/${X[2]}`}function ME(){return`npm install -g ${BE}@latest`}function NK(Z,X,J=pZ){let[z,Q]=J3(Z,X)<=0?[Z,X]:[X,Z];return J.filter((Y)=>J3(Y,z)>0&&J3(Y,Q)<=0)}async function l$0(Z){let X=new AbortController,J=setTimeout(()=>X.abort(),lW);try{let z=Z.replace("/","%2F"),Q=await fetch(`https://registry.npmjs.org/${z}/latest`,{signal:X.signal,headers:{accept:"application/json"}});if(!Q.ok)return null;let Y=await Q.json();if(typeof Y.version!=="string")return null;return Y.version}catch{return null}finally{clearTimeout(J)}}function VE(Z,X){return J3(Z,X)>0}function J3(Z,X){let J=(Y)=>Y.split("-")[0]??Y,z=J(Z).split(".").map((Y)=>Number.parseInt(Y,10)),Q=J(X).split(".").map((Y)=>Number.parseInt(Y,10));for(let Y=0;Y<3;Y++){let G=z[Y]??0,$=Q[Y]??0;if(Number.isNaN(G)||Number.isNaN($))return 0;if(G>$)return 1;if(G<$)return-1}return 0}async function fQ(Z={}){let X=process.env.KOBE_FAKE_UPDATE;if(X)return{current:e1,latest:X,hasUpdate:VE(X,e1)};if(cG()&&!Z.force)return null;let J=await l$0(BE);if(!J)return null;return{current:e1,latest:J,hasUpdate:VE(J,e1)}}function ak(Z){if(typeof Z!=="string")return null;return Z.match(/^v(\d+\.\d+\.\d+)$/)?.[1]??null}async function NE(Z){let X=vQ();if(!X)return null;let J=`v${Z}`,z=new AbortController,Q=setTimeout(()=>z.abort(),lW);try{let Y=await fetch(`https://api.github.com/repos/${X}/releases/tags/${J}`,{signal:z.signal,headers:{accept:"application/vnd.github+json","x-github-api-version":"2022-11-28"}});if(!Y.ok)return null;let G=await Y.json();if(typeof G.body!=="string"||typeof G.html_url!=="string")return null;return{body:G.body,url:G.html_url,version:Z}}catch{return null}finally{clearTimeout(Q)}}async function WE(Z){let X=vQ();if(!X)return[];let J=Z.limit??100,z=new AbortController,Q=setTimeout(()=>z.abort(),lW);try{let Y=await fetch(`https://api.github.com/repos/${X}/releases?per_page=${J}`,{signal:z.signal,headers:{accept:"application/vnd.github+json","x-github-api-version":"2022-11-28"}});if(!Y.ok)return[];let G=await Y.json();if(!Array.isArray(G))return[];return G.map(($)=>{let U=ak($.tag_name);if(!U||typeof $.html_url!=="string"||typeof $.body!=="string")return null;if(J3(U,Z.current)<=0)return null;if(J3(U,Z.latest)>0)return null;return{version:U,url:$.html_url,body:$.body}}).filter(($)=>$!==null)}catch{return[]}finally{clearTimeout(Q)}}async function WK(Z=12){let X=vQ();if(!X)return[];let J=new AbortController,z=setTimeout(()=>J.abort(),lW);try{let Q=await fetch(`https://api.github.com/repos/${X}/releases?per_page=${Z}`,{signal:J.signal,headers:{accept:"application/vnd.github+json","x-github-api-version":"2022-11-28"}});if(!Q.ok)return[];let Y=await Q.json();if(!Array.isArray(Y))return[];return Y.map((G)=>{let $=ak(G.tag_name);if(!$||typeof G.html_url!=="string")return null;return{version:$,url:G.html_url}}).filter((G)=>G!==null)}catch{return[]}finally{clearTimeout(z)}}function DE(Z){let X=vQ();if(!X)return null;return`https://github.com/${X}/releases/tag/v${Z}`}var e1,BE,cW="https://raw.githubusercontent.com/Sma1lboy/rove/main/scripts/update.sh",k9,pZ,lW=3000;var I2=h(()=>{nk();T5();e1=uW.version,BE=uW.name;k9=`curl -fsSL ${cW} | sh`;pZ=[]});function sk(Z){for(let[X,J]of Object.entries(dZ))if(J.includes(Z))return X;return"other"}function OE(Z){if(!Z.values)return;if(Z.name!=="vendor")return Z.values;let X=A8().filter((J)=>!Z.values.includes(J));return X.length>0?[...Z.values,...X]:Z.values}function p$0(Z){let X=OE(Z);return{name:Z.name,type:Z.type,required:Z.required??!1,...X?{values:X}:{},...Z.default!==void 0?{default:Z.default}:{},...Z.placeholder?{placeholder:Z.placeholder}:{},description:Z.description}}function DK(Z){return{name:Z.name,group:sk(Z.name),summary:Z.summary,offline:Z.offline??!1,flags:Z.flags.map(p$0)}}function dW(){let Z=E1();return{apiVersion:pW,kobeVersion:e1,hint:`Compact index. Drill into ONE verb: \`${Z} api schema --verb <name>\` (or \`${Z} api <verb> --help\`). One group: \`--group <g>\`. Whole spec: \`--all\`.`,groups:dZ,verbs:iZ.map((X)=>({name:X.name,group:sk(X.name),summary:X.summary})),globalFlags:rk,aliases:M$}}function tk(Z){let X=dZ[Z];if(!X)throw new t0(`unknown group: ${Z}. Groups: ${Object.keys(dZ).join(", ")}`,"BAD_FLAG");return{group:Z,verbs:X.map((J)=>{let z=hJ(J);return{name:J,summary:z?.summary??""}})}}function iW(){return{apiVersion:pW,kobeVersion:e1,output:{success:"one JSON object on stdout, newline-terminated, exit 0",error:'{"error":{"message","code"}} on stderr, exit != 0',pretty:"--pretty indents stdout JSON"},globalFlags:rk,aliases:M$,groups:dZ,verbs:iZ.map(DK)}}function d$0(Z){return Z.flags.map((X)=>{let J=X.type==="enum"&&X.values?OE(X).join("|"):X.placeholder??(X.type==="bool"?"":"X"),z=J?`--${X.name} ${J}`:`--${X.name}`;return X.required?z:`[${z}]`}).join(" ")}function jE(Z){let X=[`${E1()} api ${Z.name} ${d$0(Z)}`.trimEnd(),"",Z.summary,""],J=Object.entries(M$).find(([,z])=>z===Z.name)?.[0];if(J)X.push(`Alias: ${J}`,"");if(Z.flags.length>0){X.push("Flags:");for(let z of Z.flags){let Q=z.required?" (required)":"",Y=z.default!==void 0?` [default: ${z.default}]`:"",G=z.type==="enum"&&z.values?` {${OE(z).join("|")}}`:"";X.push(` --${z.name}${G}${Q}${Y} ${z.description}`)}X.push("")}return X.push("Global: [--pretty] [--help]"),X.join(`
|
|
300
|
+
`)}}onLine(Z){let X;try{X=JSON.parse(Z)}catch(z){d4("client-frame",z);return}if(X.type==="event"){this.emit(X);return}if(X.type!=="response")return;let J=this.pending.get(X.id);if(!J)return;if(this.pending.delete(X.id),J.timer)clearTimeout(J.timer);if(X.error){let z=Error(X.error.message);if(X.error.name)z.name=X.error.name;J.reject(z)}else J.resolve(X.payload)}emit(Z){for(let X of this.handlers.get(Z.name)??[])try{X(Z)}catch(J){d4("client-event",J)}for(let X of this.handlers.get("*")??[])try{X(Z)}catch(J){d4("client-event",J)}}}var HE,m$0;var g6=h(()=>{o8();lZ();HE=class HE extends Error{constructor(Z,X){super(`daemon rpc "${Z}" timed out after ${X}ms (daemon wedged?)`);this.name="RpcTimeoutError"}};m$0=new Set(["task.ensureWorktree","task.ensureMain","worktree.discoverAdoptable","worktree.adopt","worktree.archiveRemoved","worktree.list","worktree.remove"])});function W5(Z){if(!Z.client)throw new t0("daemon required","BAD_DAEMON");return Z.client}async function F4(Z,X,J){return W5(Z).request(X,J)}async function pk(){let[{KobeDaemonClient:Z},{defaultPtyHostSocketPath:X}]=await Promise.all([Promise.resolve().then(() => (g6(),UE)),Promise.resolve().then(() => (j7(),GE))]),J=new Z(X());try{return await J.connect(),await J.request("pty.list",{})}catch{return{sessions:[]}}finally{J.close()}}var $8=h(()=>{a8()});function h$0(){lC();let Z=[...Kk()];for(let X of kN()){let J=O1(X);Z.push({id:X,name:J.displayName,command:J.defaultCommand.join(" "),protocol:P9,builtin:!1})}return Z}async function u$0(Z){let X=Z.args.require("command"),J=I9(X);return await F4(Z,"task.setCommand",{taskId:Z.args.require("task-id"),command:X,vendor:J}),{ok:!0,command:X,protocol:J,...J===P9?{generic:!0}:{}}}var dk,ik;var KE=h(()=>{aU();E2();pC();e4();E8();$8();dk={name:"engine-list",summary:"List every engine Rove can launch \u2014 built-ins, registered presets, and engines contributed by enabled plugins \u2014 each with its RAW launch command, exactly as it runs. Copy one into `add --command` / `send --tab new --command` verbatim, or edit its flags first. `protocol` is the adapter Rove speaks to it (history, trust, delivery); `generic` = none, which still runs fine but loses transcript reads. Returns { engines }.",flags:[],offline:!0,handler:async()=>({engines:h$0()})};ik={name:"set-command",summary:"Set a task's engine launch command (takes effect on the next session rebuild). The protocol Rove speaks to it is derived from the command \u2014 the result reports which one, `generic` when the command names no engine Rove knows.",flags:[w1.taskId(),{...w1.command(),required:!0}],handler:u$0}});var uW;var nk=h(()=>{uW={$schema:"https://json.schemastore.org/package.json",name:"@sma1lboy/rove",version:"0.9.15",description:"Rove \u2014 the agent multiplexer for your terminal. Run coding agents on parallel tasks with isolated worktrees and persistent sessions.",keywords:["terminal","tui","cli","multiplexer","ai-agents","coding-agent","ai-coding-assistant","agentic-ai","parallel-agents","git-worktree","claude-code","codex","llm","developer-tools"],type:"module",packageManager:"bun@1.3.13",bin:{kobe:"dist/cli/kobe.js",rove:"dist/cli/rove.js"},files:["dist/cli","dist/web-ui","dist/skills","dist/*.wav","README.md","LICENSE"],publishConfig:{access:"public"},repository:{type:"git",url:"git+https://github.com/Sma1lboy/rove.git"},homepage:"https://rove.run",bugs:{url:"https://github.com/Sma1lboy/rove/issues"},engines:{bun:">=1.3.11"},scripts:{dev:"ROVE_DEV=1 bun --conditions=browser ./src/cli/rove.ts","dev:kobe":"KOBE_DEV=1 bun --conditions=browser ./src/cli/kobe.ts","dev:mock":"KOBE_DEV=1 bun ./src/tui-react/mock/host.tsx","dev:mock-react":"KOBE_DEV=1 bun ./src/tui-react/mock/host.tsx","dev:mock-react-task-dialogs":"KOBE_DEV=1 bun ./src/tui-react/component/mock-dialogs-host.tsx","dev:mock-react-filetree":"KOBE_DEV=1 bun ./src/tui-react/panes/filetree/mock-host.tsx","dev:mock-react-sidebar":"KOBE_DEV=1 bun ./src/tui-react/panes/sidebar/mock-host.tsx","dev:mock-react-terminal":"KOBE_DEV=1 bun ./src/tui-react/panes/terminal/mock-host.tsx","dev:mock-react-dialogs":"KOBE_DEV=1 bun ./src/tui-react/mock/dialogs-host.tsx","dev:mock-react-workspace":"KOBE_DEV=1 bun ./src/tui-react/workspace/mock-host.tsx","dev:sandbox":"bun run scripts/dev-sandbox.ts run","dev:sandbox:reset":"bun run scripts/dev-sandbox.ts reset",build:"bun run scripts/build.ts","build:with-web":"bun run build",compile:"bun run scripts/compile.ts",typecheck:"tsc --noEmit","check-i18n":"bun run scripts/check-i18n.ts",test:"bun run test:fast && bun run test:socket","perf:golden":"bun scripts/perf-golden.ts","pty:soak":"bun scripts/pty-soak.ts","test:fast":"vitest run --passWithNoTests --minWorkers=1 --maxWorkers=8","test:socket":"KOBE_INCLUDE_SOCKET=1 vitest run test/daemon --pool forks --minWorkers=1 --maxWorkers=4 --passWithNoTests","test:socket:coverage":"KOBE_INCLUDE_SOCKET=1 KOBE_COVERAGE_DAEMON=1 vitest run test/daemon --coverage --pool forks --minWorkers=1 --maxWorkers=4 --passWithNoTests","test:behavior":"KOBE_INCLUDE_BEHAVIOR=1 vitest run test/behavior --pool forks --minWorkers=1 --maxWorkers=1 --retry=2 --passWithNoTests","test:render":"bun test test/render --coverage --coverage-reporter=text --coverage-reporter=lcov --coverage-dir=coverage-render",coverage:"vitest run --coverage --passWithNoTests",bench:"vitest bench --run",lint:"biome check .",knip:"knip-bun",postinstall:"bun run scripts/check-preview-deps.ts || true",prepublishOnly:"bun run typecheck && bun run build","plugin-sandbox":"bun run scripts/plugin-sandbox.ts"},"//":"biome.json + bunfig.toml live at the monorepo root since they apply repo-wide; bun.lock also lives at root (workspace-shared).",dependencies:{"@ansi-tools/parser":"^1.0.15","@opentui/core":"0.4.3","@opentui/react":"0.4.3","@xterm/addon-serialize":"^0.14.0","@xterm/addon-unicode11":"^0.9.0","@xterm/headless":"^6.0.0","node-pty":"^1.1.0",react:"^19.2.8",ws:"^8.18.0"},devDependencies:{"@biomejs/biome":"1.9.4","@sma1lboy/kobe-daemon":"0.7.17","@tsconfig/bun":"1.0.10","@types/bun":"1.3.14","@types/node":"25.6.2","@types/react":"^19.2.0","@vitest/coverage-v8":"2.1.9",knip:"^6.14.2","kobe-web":"workspace:*","react-devtools-core":"^7.0.1",typescript:"5.8.2",vitest:"2.1.9"},trustedDependencies:[]}});var ok={};o1(ok,{repoSlug:()=>vQ,releasePageUrl:()=>DE,recommendedGlobalInstallCommand:()=>ME,isNewerSemver:()=>VE,fetchReleaseSummaries:()=>WK,fetchReleaseNotesRange:()=>WE,fetchReleaseNotes:()=>NE,compareSemver:()=>J3,checkLatestVersion:()=>fQ,breakingVersionsCrossed:()=>NK,UPDATE_SCRIPT_URL:()=>cW,UPDATE_COMMAND:()=>k9,PACKAGE_NAME:()=>BE,CURRENT_VERSION:()=>e1,BREAKING_VERSIONS:()=>pZ});function vQ(){let Z=uW.repository?.url;if(!Z)return null;let X=Z.match(/github\.com[:/]([^/]+)\/([^/.]+)/);if(!X||!X[1]||!X[2])return null;return`${X[1]}/${X[2]}`}function ME(){return`npm install -g ${BE}@latest`}function NK(Z,X,J=pZ){let[z,Q]=J3(Z,X)<=0?[Z,X]:[X,Z];return J.filter((Y)=>J3(Y,z)>0&&J3(Y,Q)<=0)}async function l$0(Z){let X=new AbortController,J=setTimeout(()=>X.abort(),lW);try{let z=Z.replace("/","%2F"),Q=await fetch(`https://registry.npmjs.org/${z}/latest`,{signal:X.signal,headers:{accept:"application/json"}});if(!Q.ok)return null;let Y=await Q.json();if(typeof Y.version!=="string")return null;return Y.version}catch{return null}finally{clearTimeout(J)}}function VE(Z,X){return J3(Z,X)>0}function J3(Z,X){let J=(Y)=>Y.split("-")[0]??Y,z=J(Z).split(".").map((Y)=>Number.parseInt(Y,10)),Q=J(X).split(".").map((Y)=>Number.parseInt(Y,10));for(let Y=0;Y<3;Y++){let G=z[Y]??0,$=Q[Y]??0;if(Number.isNaN(G)||Number.isNaN($))return 0;if(G>$)return 1;if(G<$)return-1}return 0}async function fQ(Z={}){let X=process.env.KOBE_FAKE_UPDATE;if(X)return{current:e1,latest:X,hasUpdate:VE(X,e1)};if(cG()&&!Z.force)return null;let J=await l$0(BE);if(!J)return null;return{current:e1,latest:J,hasUpdate:VE(J,e1)}}function ak(Z){if(typeof Z!=="string")return null;return Z.match(/^v(\d+\.\d+\.\d+)$/)?.[1]??null}async function NE(Z){let X=vQ();if(!X)return null;let J=`v${Z}`,z=new AbortController,Q=setTimeout(()=>z.abort(),lW);try{let Y=await fetch(`https://api.github.com/repos/${X}/releases/tags/${J}`,{signal:z.signal,headers:{accept:"application/vnd.github+json","x-github-api-version":"2022-11-28"}});if(!Y.ok)return null;let G=await Y.json();if(typeof G.body!=="string"||typeof G.html_url!=="string")return null;return{body:G.body,url:G.html_url,version:Z}}catch{return null}finally{clearTimeout(Q)}}async function WE(Z){let X=vQ();if(!X)return[];let J=Z.limit??100,z=new AbortController,Q=setTimeout(()=>z.abort(),lW);try{let Y=await fetch(`https://api.github.com/repos/${X}/releases?per_page=${J}`,{signal:z.signal,headers:{accept:"application/vnd.github+json","x-github-api-version":"2022-11-28"}});if(!Y.ok)return[];let G=await Y.json();if(!Array.isArray(G))return[];return G.map(($)=>{let U=ak($.tag_name);if(!U||typeof $.html_url!=="string"||typeof $.body!=="string")return null;if(J3(U,Z.current)<=0)return null;if(J3(U,Z.latest)>0)return null;return{version:U,url:$.html_url,body:$.body}}).filter(($)=>$!==null)}catch{return[]}finally{clearTimeout(Q)}}async function WK(Z=12){let X=vQ();if(!X)return[];let J=new AbortController,z=setTimeout(()=>J.abort(),lW);try{let Q=await fetch(`https://api.github.com/repos/${X}/releases?per_page=${Z}`,{signal:J.signal,headers:{accept:"application/vnd.github+json","x-github-api-version":"2022-11-28"}});if(!Q.ok)return[];let Y=await Q.json();if(!Array.isArray(Y))return[];return Y.map((G)=>{let $=ak(G.tag_name);if(!$||typeof G.html_url!=="string")return null;return{version:$,url:G.html_url}}).filter((G)=>G!==null)}catch{return[]}finally{clearTimeout(z)}}function DE(Z){let X=vQ();if(!X)return null;return`https://github.com/${X}/releases/tag/v${Z}`}var e1,BE,cW="https://raw.githubusercontent.com/Sma1lboy/rove/main/scripts/update.sh",k9,pZ,lW=3000;var I2=h(()=>{nk();T5();e1=uW.version,BE=uW.name;k9=`curl -fsSL ${cW} | sh`;pZ=[]});function sk(Z){for(let[X,J]of Object.entries(dZ))if(J.includes(Z))return X;return"other"}function OE(Z){if(!Z.values)return;if(Z.name!=="vendor")return Z.values;let X=A8().filter((J)=>!Z.values.includes(J));return X.length>0?[...Z.values,...X]:Z.values}function p$0(Z){let X=OE(Z);return{name:Z.name,type:Z.type,required:Z.required??!1,...X?{values:X}:{},...Z.default!==void 0?{default:Z.default}:{},...Z.placeholder?{placeholder:Z.placeholder}:{},description:Z.description}}function DK(Z){return{name:Z.name,group:sk(Z.name),summary:Z.summary,offline:Z.offline??!1,flags:Z.flags.map(p$0)}}function dW(){let Z=E1();return{apiVersion:pW,kobeVersion:e1,hint:`Compact index. Drill into ONE verb: \`${Z} api schema --verb <name>\` (or \`${Z} api <verb> --help\`). One group: \`--group <g>\`. Whole spec: \`--all\`.`,groups:dZ,verbs:iZ.map((X)=>({name:X.name,group:sk(X.name),summary:X.summary})),globalFlags:rk,aliases:M$}}function tk(Z){let X=dZ[Z];if(!X)throw new t0(`unknown group: ${Z}. Groups: ${Object.keys(dZ).join(", ")}`,"BAD_FLAG");return{group:Z,verbs:X.map((J)=>{let z=hJ(J);return{name:J,summary:z?.summary??""}})}}function iW(){return{apiVersion:pW,kobeVersion:e1,output:{success:"one JSON object on stdout, newline-terminated, exit 0",error:'{"error":{"message","code"}} on stderr, exit != 0',pretty:"--pretty indents stdout JSON"},globalFlags:rk,aliases:M$,groups:dZ,verbs:iZ.map(DK)}}function d$0(Z){return Z.flags.map((X)=>{let J=X.type==="enum"&&X.values?OE(X).join("|"):X.placeholder??(X.type==="bool"?"":"X"),z=J?`--${X.name} ${J}`:`--${X.name}`;return X.required?z:`[${z}]`}).join(" ")}function jE(Z){let X=[`${E1()} api ${Z.name} ${d$0(Z)}`.trimEnd(),"",Z.summary,""],J=Object.entries(M$).find(([,z])=>z===Z.name)?.[0];if(J)X.push(`Alias: ${J}`,"");if(Z.flags.length>0){X.push("Flags:");for(let z of Z.flags){let Q=z.required?" (required)":"",Y=z.default!==void 0?` [default: ${z.default}]`:"",G=z.type==="enum"&&z.values?` {${OE(z).join("|")}}`:"";X.push(` --${z.name}${G}${Q}${Y} ${z.description}`)}X.push("")}return X.push("Global: [--pretty] [--help]"),X.join(`
|
|
301
301
|
`)}function OK(){let Z=E1(),X=iZ.map((J)=>` ${J.name.padEnd(18)} ${J.summary}`);return[`usage: ${Z} api <verb> [flags] [--pretty] [--help]`,"",`Explore the full surface (names, flags, types) with: ${Z} api schema`,"","verbs:",...X,"","Output is one JSON object on stdout (exit 0); errors are JSON on stderr (exit != 0)."].join(`
|
|
302
|
-
`)}var pW=2,rk;var FE=h(()=>{s4();I2();Q5();a8();nW();rk=[{name:"pretty",type:"bool",description:"Pretty-print stdout JSON."},{name:"help",type:"bool",description:"Show usage for the verb and exit."}]});function Jm(Z){let X=Z.args.str("precheck");if(X===void 0)return{};if(X.length===0)return{precheck:null};return{precheck:{command:X,timeoutSeconds:Z.args.int("precheck-timeout")??120}}}var ek,Zm,Xm,zm;var Qm=h(()=>{E8();$8();ek={name:"schedule",type:"string",placeholder:"CRON",description:"Five-field cron in the daemon host's local time, e.g. '0 9 * * MON-FRI'."},Zm=[{name:"precheck",type:"string",placeholder:"CMD",description:"Shell command run in the repo BEFORE the engine starts. Non-zero exit skips the run without spawning an agent \u2014 the cheap way to avoid burning a turn when nothing changed."},{name:"precheck-timeout",type:"int",placeholder:"SEC",description:"Seconds before the precheck is killed and the run skipped (default 120)."}],Xm={name:"grace",type:"int",placeholder:"MIN",description:"How late a missed occurrence may still run when the daemon was down (default 60). Only the most recent missed occurrence is ever run."};zm=[{name:"routine-list",summary:"List scheduled routines with their next run time.",flags:[],handler:(Z)=>F4(Z,"automation.list",{})},{name:"routine-create",summary:"Schedule a prompt. Each firing creates a fresh task (worktree + engine) and delivers it. An enabled routine keeps the daemon alive so it fires with no TUI attached.",flags:[w1.repo(),{name:"name",type:"string",required:!0,placeholder:"N",description:"Routine name."},w1.prompt(!0,"Text delivered as the new session's first message."),{...ek,required:!0},w1.vendor(),{name:"base-branch",type:"string",placeholder:"B",description:"Base ref each run's worktree branches from."},...Zm,Xm,{name:"disabled",type:"bool",description:"Create it paused instead of active."}],handler:(Z)=>F4(Z,"automation.create",{repo:Z.args.requirePath("repo"),name:Z.args.require("name"),prompt:Z.args.require("prompt"),schedule:Z.args.require("schedule"),...Z.args.vendor()?{vendor:Z.args.vendor()}:{},...Z.args.str("base-branch")?{baseRef:Z.args.str("base-branch")}:{},...Jm(Z),...Z.args.int("grace")!==void 0?{missedRunGraceMinutes:Z.args.int("grace")}:{},...Z.args.bool("disabled")?{enabled:!1}:{}})},{name:"routine-update",summary:"Change a routine. A new --schedule re-anchors its next run; --precheck '' clears the precheck.",flags:[{name:"id",type:"string",required:!0,placeholder:"ID",description:"Routine id."},{name:"name",type:"string",placeholder:"N",description:"New name."},w1.prompt(!1,"New prompt."),ek,w1.vendor(),{name:"base-branch",type:"string",placeholder:"B",description:"New base ref ('' to clear)."},...Zm,Xm],handler:(Z)=>F4(Z,"automation.update",{id:Z.args.require("id"),...Z.args.str("name")!==void 0?{name:Z.args.str("name")}:{},...Z.args.str("prompt")!==void 0?{prompt:Z.args.str("prompt")}:{},...Z.args.str("schedule")!==void 0?{schedule:Z.args.str("schedule")}:{},...Z.args.vendor()?{vendor:Z.args.vendor()}:{},...Z.args.str("base-branch")!==void 0?{baseRef:Z.args.str("base-branch")}:{},...Jm(Z),...Z.args.int("grace")!==void 0?{missedRunGraceMinutes:Z.args.int("grace")}:{}})},{name:"routine-set-enabled",summary:"Pause or resume a routine. Disabling the last active one releases the daemon's keep-alive hold.",flags:[{name:"id",type:"string",required:!0,placeholder:"ID",description:"Routine id."},{name:"enabled",type:"bool",required:!0,description:"true to resume, false to pause."}],handler:(Z)=>F4(Z,"automation.update",{id:Z.args.require("id"),enabled:Z.args.bool("enabled")})},{name:"routine-delete",summary:"Delete a routine and its run history. Tasks it already created are untouched.",flags:[{name:"id",type:"string",required:!0,placeholder:"ID",description:"Routine id."}],handler:(Z)=>F4(Z,"automation.delete",{id:Z.args.require("id")})},{name:"routine-run-now",summary:"Run a routine immediately, skipping its precheck (asking for it IS the answer). Does not shift its schedule.",flags:[{name:"id",type:"string",required:!0,placeholder:"ID",description:"Routine id."}],handler:(Z)=>F4(Z,"automation.runNow",{id:Z.args.require("id")})},{name:"routine-runs",summary:"Run history, newest first. Statuses: dispatched, skipped_precheck (nothing to do), skipped_missed, skipped_unavailable, dispatch_failed.",flags:[{name:"id",type:"string",required:!0,placeholder:"ID",description:"Routine id."}],handler:(Z)=>F4(Z,"automation.runs",{id:Z.args.require("id")})}]});function i$0(Z,X){let J="",z=Z;for(let Q=X-1;Q>=0;Q--){let Y=z%32;J="0123456789ABCDEFGHJKMNPQRSTVWXYZ"[Y]+J,z=(z-Y)/32}return J}function Gm(Z){let X=new Uint8Array(Z);crypto.getRandomValues(X);let J=Array(Z);for(let z=0;z<Z;z++)J[z]=(X[z]??0)&31;return J}function n$0(Z){for(let X=Z.length-1;X>=0;X--){let J=Z[X]??0;if(J<31)return Z[X]=J+1,!0;Z[X]=0}return!1}function a$0(Z){let X="";for(let J of Z)X+="0123456789ABCDEFGHJKMNPQRSTVWXYZ"[J]??"0";return X}function jK(Z=Date.now()){let X,J;if(Z>LE)J=Z,X=Gm(16);else{J=LE;let z=Ym.slice();if(!n$0(z))X=Gm(16);else X=z}return LE=J,Ym=X,i$0(J,10)+a$0(X)}var LE=-1,Ym;var _E=h(()=>{Ym=Array(16).fill(0)});import{readFile as o$0,stat as s$0,unlink as $m}from"fs/promises";function qm(Z,X){return new Promise((J,z)=>{let Q=Z;Q.once("error",z),Z.listen(X,()=>{Q.removeListener("error",z),J()})})}async function nZ(Z){try{let X=await o$0(Z,"utf8"),J=Number(X.trim());return Number.isFinite(J)?J:null}catch{return null}}function Hm(Z){let X=Z.watchMs??r$0,J=null,z=!1,Q=null,Y=async()=>{try{let K=await s$0(Z.socketPath);return{dev:K.dev,ino:K.ino}}catch(K){return K.code==="ENOENT"?null:"error"}},G=()=>{if(Q)clearInterval(Q);Q=null},$=async()=>{if(J===null||z)return;let K=await Y();if(K==="error")return;if(K===null||K.dev!==J.dev||K.ino!==J.ino)z=!0},U=async()=>{if(J===null||z)return;if(await $(),!z)return;G(),Z.onLost()};return{async arm(){let K=await Y();if(K===null||K==="error")return;if(J=K,X>0)Q=setInterval(()=>void U(),X),Q.unref?.()},async release(K){if(G(),await $(),J!==null&&z){K.unref();return}await new Promise((M)=>K.close(()=>M())),await $m(Z.socketPath).catch(()=>{}),await $m(Z.pidPath).catch(()=>{})}}}var r$0=5000;var FK=()=>{};import{unlink as Um}from"fs/promises";function aW(Z){try{return process.kill(Z,0),!0}catch(X){return X.code==="EPERM"}}async function aZ(Z,X){let J=await nZ(X),z=J!==null&&J!==process.pid?J:null,Q=z!==null&&aW(z),Y=Q?"graceful":"absent",G=new a5(Z),$=G.request("daemon.stop").catch(()=>{return}),U=new Promise((K)=>setTimeout(K,2000));if(await Promise.race([$,U]),G.close(),Q&&z!==null){let K=Date.now()+5000,M=!1;while(Date.now()<K){try{process.kill(z,0)}catch{break}if(!M&&Date.now()-(K-5000)>2000){try{process.kill(z,"SIGTERM")}catch{}Y="sigterm",M=!0}await new Promise((D)=>setTimeout(D,50))}try{process.kill(z,0),process.kill(z,"SIGKILL"),Y="sigkill",await new Promise((D)=>setTimeout(D,100))}catch{}}return await Um(Z).catch(()=>{}),await Um(X).catch(()=>{}),{pid:J,method:Y}}var LK=h(()=>{g6();FK()});var jm={};o1(jm,{tryAcquireSpawnLock:()=>Om,testDaemonResponds:()=>uJ,spawnDetachedDaemon:()=>oW,resolveKobeSpawn:()=>sW,probeDaemonSocket:()=>cJ,ensureDaemonReachable:()=>W$,detachOptions:()=>Wm,connectOrStartDaemon:()=>lJ,connectIfRunning:()=>m9,autospawnDaemonEnv:()=>Dm});import{spawn as t$0}from"child_process";import{closeSync as Km,existsSync as e$0,mkdirSync as Vm,openSync as Bm,statSync as Zq0,unlinkSync as Mm}from"fs";import{dirname as AE,resolve as N$}from"path";import{fileURLToPath as Xq0}from"url";function Wm(Z=process.platform){return Z==="win32"?{windowsHide:!0}:{detached:!0}}function oW(Z,X,J,z){let Q="ignore",Y;try{Vm(AE(z),{recursive:!0}),Y=Bm(z,"a"),Q=["ignore",Y,Y]}catch{Q="ignore"}if(t$0(Z,[...X],{...Wm(),stdio:Q,env:J}).unref(),Y!==void 0)try{Km(Y)}catch{}}function Qq0(Z=process.env){return typeof Z.KOBE_TASK_ID==="string"&&Z.KOBE_TASK_ID!==""}function Dm(Z=process.env){let{KOBE_TASK_ID:X,KOBE_TAB_ID:J,KOBE_TUI:z,KOBE_TERMINAL_PTY:Q,ROVE_TASK_ID:Y,ROVE_TAB_ID:G,ROVE_TUI:$,ROVE_TERMINAL_PTY:U,...K}=Z;return{...K,KOBE_DAEMON_AUTOSPAWNED:"1",ROVE_DAEMON_AUTOSPAWNED:"1"}}function Om(Z,X=Yq0){let J=()=>{return Vm(AE(Z),{recursive:!0}),Km(Bm(Z,"wx")),!0};try{return J()}catch{try{if(Date.now()-Zq0(Z).mtimeMs<=X)return!1;return Mm(Z),J()}catch{return!1}}}async function W$(){let Z=G8(),X=await cJ(Z);if(X==="alive")return Z;if(X==="wedged"&&Qq0())throw Error(`rove: daemon at ${Z} is not answering hello (busy or wedged); not restarting it from inside an engine session \u2014 retry, or run \`rove daemon restart\` from a regular shell`);let J=`${X3()}.spawn-lock`;if(!Om(J)){let z=Date.now()+Gq0;while(Date.now()<z){if(await uJ(Z))return Z;await new Promise((Q)=>setTimeout(Q,150))}throw Error(`rove: another process is starting the daemon but it never became reachable at ${Z}; check ${b6()} or run \`rove doctor\``)}try{if(await cJ(Z)==="alive")return Z;let z=await nZ(X3());if(z!==null&&z!==process.pid&&aW(z)){let $=Date.now()+zq0;while(Date.now()<$){if(await new Promise((U)=>setTimeout(U,250)),await uJ(Z))return Z;if(!aW(z))break}}await aZ(Z,X3()).catch(()=>{});let[Q,...Y]=sW(Jq0);oW(Q,Y,Dm(),b6());let G=Date.now()+5000;while(Date.now()<G){if(await uJ(Z))return Z;await new Promise(($)=>setTimeout($,100))}throw Error(`rove: daemon did not start (or stayed wedged) at ${Z}; check ${b6()} or run \`rove doctor\``)}finally{try{Mm(J)}catch{}}}async function lJ(){let Z=await W$(),X=new a5(Z);return await X.connect(),X}async function m9(){let Z=G8();if(!await uJ(Z))return null;let X=new a5(Z);return await X.connect(),X}async function cJ(Z,X=Nm){let J=new a5(Z);try{await J.connect()}catch{return J.close(),"absent"}let z=J.request("hello",{protocolVersion:T2}).then(()=>!0).catch(()=>!0),Q,Y=new Promise(($)=>{Q=setTimeout(()=>$(!1),X)}),G=await Promise.race([z,Y]);if(Q)clearTimeout(Q);return J.close(),G?"alive":"wedged"}async function uJ(Z,X=Nm){return await cJ(Z,X)==="alive"}function sW(Z,X=process.env){let J=Xq0(import.meta.url);if(J.startsWith("/$bunfs")||J.startsWith("B:\\~BUN"))return[process.execPath,...Z];let z=AE(J),Q=X.ROVE_INVOKED_AS===p8?p8:w3,Y=[N$(z,`../cli/${Q}.ts`),N$(z,`../../../kobe/src/cli/${Q}.ts`),N$(z,`../cli/${Q}.js`),N$(z,"../cli/index.ts"),N$(z,"../../../kobe/src/cli/index.ts"),N$(z,"../cli/index.js")],G=Y.find(($)=>e$0($));if(G)return[process.execPath,G,...Z];throw Error(`${Q}: could not locate ${Q} entry near ${z}; checked ${Y.join(", ")}`)}var Jq0,Nm=3000,zq0=15000,Yq0=40000,Gq0=30000;var z3=h(()=>{LK();j7();o8();FK();g6();Jq0=["daemon","start"]});import{existsSync as Fm}from"fs";import{rename as $q0,rm as qq0}from"fs/promises";import{basename as Hq0,delimiter as Uq0,dirname as Lm,join as Kq0,resolve as CE}from"path";import{fileURLToPath as Vq0}from"url";function EE(Z=process.env,X=Fm,J=process.platform){let z=(Z.PATH??Z.Path??"").split(Uq0).filter((Y)=>Y.length>0),Q=J==="win32"?(Z.PATHEXT??".EXE;.CMD;.BAT").split(";").filter((Y)=>Y.length>0):[""];for(let Y of z)for(let G of Q){let $=Kq0(Y,`node${G}`);if(X($))return $}return null}async function Dq0(Z,X,J){let{build:z,rename:Q,discard:Y}=J??{build:(U)=>Bun.build(U),rename:$q0,discard:(U)=>qq0(U,{force:!0})},G=`${X}.${process.pid}.tmp`,$=await z({entrypoints:[Z],outdir:Lm(G),target:"node",format:"esm",naming:Hq0(G),external:["node-pty"]});if(!$.success)return await Y(G).catch(()=>{}),$;return await Q(G,X),$}async function Oq0(Z={}){let X=Z.platform??process.platform;if(X!=="win32")return null;let J=Z.moduleDir??Lm(Vq0(import.meta.url)),z=Z.exists??Fm,Q=Z.bundle??Dq0,Y=EE(Z.env??process.env,z,X);if(!Y)throw Error("Rove: the Windows PTY host runs under node, but no node was found on PATH. "+"Install Node.js (https://nodejs.org) and restart Rove \u2014 engine and terminal sessions cannot start without it.");let G=CE(J,Mq0);if(z(G))return[Y,G];let $=CE(J,Wq0);if(!z($))throw Error(`Rove: no Windows PTY host found (looked for ${G} and ${$})`);let U=CE(J,Nq0),K=await Q($,U);if(!K.success)throw Error(`Rove: could not build the Windows PTY host \u2014 ${K.logs.map(String).join("; ")}`);return[Y,U]}async function rW(){let Z=s8();if(await uJ(Z))return Z;await aZ(Z,uZ()).catch(()=>{});let[X,...J]=await Oq0()??sW(Bq0);oW(X??"",J,process.env,yQ());let z=Date.now()+5000;while(Date.now()<z){if(await uJ(Z))return Z;await new Promise((Q)=>setTimeout(Q,100))}throw Error(`rove: pty host did not start (or stayed wedged) at ${Z}`)}async function _m(Z,X){let J=s8(X),z=new a5(J);try{await z.connect(),await z.request("pty.sweep",{liveTaskIds:Z})}catch{}finally{z.close()}}async function Am(Z){let X=new a5(s8(Z));try{return await X.connect(),(await X.request("pty.list")).sessions?.some((z)=>z.alive===!0)??!1}catch{return!1}finally{X.close()}}var Bq0,Mq0="pty-host-node.mjs",Nq0="../../.cache/pty-host-node.mjs",Wq0="../daemon/pty-host-node-entry.ts";var _K=h(()=>{LK();j7();z3();g6();Bq0=["pty-host"]});function Em(Z){return typeof Z==="string"&&jq0.test(Z)?Z.toLowerCase():null}function Q3(Z){if(typeof Z!=="object"||Z===null||Array.isArray(Z))return null;let X=Z,J=Em(X.foreground),z=Em(X.background);return J&&z?{foreground:J,background:z}:null}function Fq0(Z){let X=Z.slice(1);return[X.slice(0,2),X.slice(2,4),X.slice(4,6)].map((J)=>J.repeat(2)).join("/")}function tW(Z,X){let J=Z===10?X.foreground:X.background;return`\x1B]${Z};rgb:${Fq0(J)}\x1B\\`}function Lq0(Z){let X=Cm[0].length+1,J=Math.max(0,Z.length-X);for(let z=J;z<Z.length;z++){let Q=Z.slice(z);if(Cm.some((Y)=>Y.startsWith(Q)||Q===`${Y}\x1B`))return Q}return""}function Rm(Z,X){let J=Z+X,z=[],Q=0;RE.lastIndex=0;for(let Y=RE.exec(J);Y;Y=RE.exec(J))z.push(Y[1]==="10"?10:11),Q=Y.index+Y[0].length;return{slots:z,carry:Lq0(J.slice(Q))}}var oZ,jq0,RE,Cm;var sZ=h(()=>{oZ={foreground:"#eae7df",background:"#141413"},jq0=/^#[0-9a-f]{6}$/i,RE=/\x1b\](10|11);\?(?:\x07|\x1b\\)/g,Cm=["\x1B]10;?","\x1B]11;?"]});var eW;var TE=h(()=>{eW={$schema:"https://opencode.ai/theme.json",defs:{darkBg:"#141413",darkBgRaised:"#1A1917",darkBgInset:"#2B2A27",darkBgMenu:"#33312E",darkBorderSubtle:"#2B2A27",darkBorder:"#3A3835",darkBorderActive:"#5C5853",darkText:"#EAE7DF",darkTextMuted:"#A9A39A",darkTextSubtle:"#6B665F",darkPrimary:"#CC785C",darkSecondary:"#D4967E",darkAccent:"#CC785C",darkAccentHover:"#E0AB96",darkRed:"#D47563",darkOrange:"#D97757",darkYellow:"#E8C96B",darkGreen:"#9ACA86",darkBlue:"#61AAF2",darkViolet:"#9B87F5",darkTerracotta:"#BF4D43",lightBg:"#FAF9F5",lightBgRaised:"#F0EEE6",lightBgInset:"#EAE7DF",lightBgMenu:"#E2DED4",lightBorderSubtle:"#EAE7DF",lightBorder:"#D9D5CC",lightBorderActive:"#A9A39A",lightText:"#1A1917",lightTextMuted:"#6B665F",lightTextSubtle:"#8D877D",lightPrimary:"#C96442",lightSecondary:"#B85F3D",lightAccent:"#CC785C",lightAccentHover:"#B85F3D",lightRed:"#A84B3A",lightOrange:"#C96442",lightYellow:"#8A6220",lightGreen:"#2E7C4C",lightBlue:"#207FDE",lightViolet:"#7B5BB6",lightTerracotta:"#BF4D43"},theme:{primary:{dark:"darkPrimary",light:"lightPrimary"},secondary:{dark:"darkSecondary",light:"lightSecondary"},accent:{dark:"darkAccent",light:"lightAccent"},error:{dark:"darkRed",light:"lightRed"},warning:{dark:"darkYellow",light:"lightYellow"},success:{dark:"darkGreen",light:"lightGreen"},info:{dark:"darkBlue",light:"lightBlue"},text:{dark:"darkText",light:"lightText"},textMuted:{dark:"darkTextMuted",light:"lightTextMuted"},background:{dark:"darkBg",light:"lightBg"},backgroundPanel:{dark:"darkBgRaised",light:"lightBgRaised"},backgroundElement:{dark:"darkBgInset",light:"lightBgInset"},backgroundMenu:{dark:"darkBgMenu",light:"lightBgMenu"},backgroundDialog:{dark:"darkBgRaised",light:"lightBgRaised"},border:{dark:"darkBorder",light:"lightBorder"},borderActive:{dark:"darkBorderActive",light:"lightBorderActive"},borderSubtle:{dark:"darkBorderSubtle",light:"lightBorderSubtle"},diffAdded:{dark:"darkGreen",light:"lightGreen"},diffRemoved:{dark:"darkRed",light:"lightRed"},diffContext:{dark:"darkTextMuted",light:"lightTextSubtle"},diffHunkHeader:{dark:"darkTextMuted",light:"lightTextSubtle"},diffHighlightAdded:{dark:"#B5E0A0",light:"#1F6638"},diffHighlightRemoved:{dark:"#E89180",light:"#8A3A2C"},diffAddedBg:{dark:"#1F2A1F",light:"#E5EEDF"},diffRemovedBg:{dark:"#2A1F1C",light:"#F5DAD3"},diffContextBg:{dark:"darkBgRaised",light:"lightBgRaised"},diffLineNumber:{dark:"darkTextSubtle",light:"lightTextSubtle"},diffAddedLineNumberBg:{dark:"#1A2419",light:"#D5E2CC"},diffRemovedLineNumberBg:{dark:"#241915",light:"#EBC8BE"},markdownText:{dark:"darkText",light:"lightText"},markdownHeading:{dark:"darkPrimary",light:"lightPrimary"},markdownLink:{dark:"darkAccent",light:"lightAccent"},markdownLinkText:{dark:"darkBlue",light:"lightBlue"},markdownCode:{dark:"darkSecondary",light:"lightSecondary"},markdownBlockQuote:{dark:"darkTextMuted",light:"lightTextMuted"},markdownEmph:{dark:"darkYellow",light:"lightYellow"},markdownStrong:{dark:"darkPrimary",light:"lightPrimary"},markdownHorizontalRule:{dark:"darkTextMuted",light:"lightTextMuted"},markdownListItem:{dark:"darkAccent",light:"lightAccent"},markdownListEnumeration:{dark:"darkBlue",light:"lightBlue"},markdownImage:{dark:"darkAccent",light:"lightAccent"},markdownImageText:{dark:"darkBlue",light:"lightBlue"},markdownCodeBlock:{dark:"darkText",light:"lightText"},markdownQuote:{dark:"darkTextMuted",light:"lightTextMuted"},syntaxComment:{dark:"darkTextSubtle",light:"lightTextSubtle"},syntaxKeyword:{dark:"darkPrimary",light:"lightPrimary"},syntaxFunction:{dark:"darkBlue",light:"lightBlue"},syntaxVariable:{dark:"darkText",light:"lightText"},syntaxString:{dark:"darkGreen",light:"lightGreen"},syntaxNumber:{dark:"darkOrange",light:"lightOrange"},syntaxType:{dark:"darkViolet",light:"lightViolet"},syntaxOperator:{dark:"darkSecondary",light:"lightSecondary"},syntaxPunctuation:{dark:"darkText",light:"lightText"},selectedListItemText:{dark:"darkBg",light:"lightBg"}}}});var ZD;var SE=h(()=>{ZD={$schema:"https://opencode.ai/theme.json",defs:{darkStep1:"#0a0a0a",darkStep2:"#111111",darkStep3:"#181818",darkStep4:"#1f1f1f",darkStep5:"#2a2a2a",darkStep6:"#363636",darkStep7:"#444444",darkStep8:"#5a5a5a",darkStep9:"#7a7a7a",darkStep10:"#9a9a9a",darkStep11:"#909090",darkStep12:"#e8e8e8",darkAccent:"#7da5c8",darkAccentBright:"#9bc3e3",darkRed:"#e06c75",darkOrange:"#d6a668",darkGreen:"#7fd88f",darkCyan:"#7da5c8",darkYellow:"#d6a668",lightStep1:"#fafafa",lightStep2:"#f3f3f3",lightStep3:"#ececec",lightStep4:"#e2e2e2",lightStep5:"#d4d4d4",lightStep6:"#bdbdbd",lightStep7:"#9c9c9c",lightStep8:"#7c7c7c",lightStep9:"#5b5b5b",lightStep10:"#404040",lightStep11:"#6c6c6c",lightStep12:"#1a1a1a",lightAccent:"#3d6f9f",lightAccentBright:"#1a4f87",lightRed:"#c9343a",lightOrange:"#a06b1a",lightGreen:"#3d9a57",lightCyan:"#3d6f9f",lightYellow:"#a06b1a"},theme:{primary:{dark:"darkStep12",light:"lightStep12"},secondary:{dark:"darkAccentBright",light:"lightAccentBright"},accent:{dark:"darkAccent",light:"lightAccent"},error:{dark:"darkRed",light:"lightRed"},warning:{dark:"darkOrange",light:"lightOrange"},success:{dark:"darkGreen",light:"lightGreen"},info:{dark:"darkCyan",light:"lightCyan"},text:{dark:"darkStep12",light:"lightStep12"},textMuted:{dark:"darkStep11",light:"lightStep11"},background:{dark:"darkStep1",light:"lightStep1"},backgroundPanel:{dark:"darkStep2",light:"lightStep2"},backgroundElement:{dark:"darkStep3",light:"lightStep3"},backgroundMenu:{dark:"darkStep4",light:"lightStep4"},border:{dark:"darkStep6",light:"lightStep6"},borderActive:{dark:"darkStep8",light:"lightStep8"},borderSubtle:{dark:"darkStep4",light:"lightStep4"},diffAdded:{dark:"#7fd88f",light:"#3d9a57"},diffRemoved:{dark:"#e06c75",light:"#c9343a"},diffContext:{dark:"darkStep10",light:"lightStep10"},diffHunkHeader:{dark:"darkStep10",light:"lightStep10"},diffHighlightAdded:{dark:"#9be5ad",light:"#2d7a3f"},diffHighlightRemoved:{dark:"#f08490",light:"#a82530"},diffAddedBg:{dark:"#15241a",light:"#d8efdc"},diffRemovedBg:{dark:"#2a1518",light:"#f5dadc"},diffContextBg:{dark:"darkStep2",light:"lightStep2"},diffLineNumber:{dark:"darkStep9",light:"lightStep9"},diffAddedLineNumberBg:{dark:"#0f1c14",light:"#c5deca"},diffRemovedLineNumberBg:{dark:"#221012",light:"#e5c5c8"},markdownText:{dark:"darkStep12",light:"lightStep12"},markdownHeading:{dark:"darkStep12",light:"lightStep12"},markdownLink:{dark:"darkAccent",light:"lightAccent"},markdownCode:{dark:"darkAccentBright",light:"lightAccentBright"},markdownCodeBlock:{dark:"darkStep12",light:"lightStep12"},markdownQuote:{dark:"darkStep11",light:"lightStep11"},selectedListItemText:{dark:"darkStep1",light:"lightStep1"}}}});var XD;var PE=h(()=>{XD={$schema:"https://opencode.ai/theme.json",defs:{darkStep1:"#1a1b26",darkStep2:"#1e2030",darkStep3:"#222436",darkStep4:"#292e42",darkStep5:"#3b4261",darkStep6:"#545c7e",darkStep7:"#737aa2",darkStep8:"#9099b2",darkStep9:"#82aaff",darkStep10:"#89b4fa",darkStep11:"#828bb8",darkStep12:"#c8d3f5",darkRed:"#ff757f",darkOrange:"#ff966c",darkYellow:"#ffc777",darkGreen:"#c3e88d",darkCyan:"#86e1fc",darkPurple:"#c099ff",lightStep1:"#e1e2e7",lightStep2:"#d5d6db",lightStep3:"#c8c9ce",lightStep4:"#b9bac1",lightStep5:"#a8aecb",lightStep6:"#9699a8",lightStep7:"#737a8c",lightStep8:"#5a607d",lightStep9:"#2e7de9",lightStep10:"#1a6ce7",lightStep11:"#8990a3",lightStep12:"#3760bf",lightRed:"#f52a65",lightOrange:"#b15c00",lightYellow:"#8c6c3e",lightGreen:"#587539",lightCyan:"#007197",lightPurple:"#9854f1"},theme:{primary:{dark:"darkStep9",light:"lightStep9"},secondary:{dark:"darkPurple",light:"lightPurple"},accent:{dark:"darkOrange",light:"lightOrange"},error:{dark:"darkRed",light:"lightRed"},warning:{dark:"darkOrange",light:"lightOrange"},success:{dark:"darkGreen",light:"lightGreen"},info:{dark:"darkStep9",light:"lightStep9"},text:{dark:"darkStep12",light:"lightStep12"},textMuted:{dark:"darkStep11",light:"lightStep11"},background:{dark:"darkStep1",light:"lightStep1"},backgroundPanel:{dark:"darkStep2",light:"lightStep2"},backgroundElement:{dark:"darkStep3",light:"lightStep3"},border:{dark:"darkStep7",light:"lightStep7"},borderActive:{dark:"darkStep8",light:"lightStep8"},borderSubtle:{dark:"darkStep6",light:"lightStep6"},diffAdded:{dark:"#4fd6be",light:"#1e725c"},diffRemoved:{dark:"#c53b53",light:"#c53b53"},diffContext:{dark:"#828bb8",light:"#7086b5"},diffHunkHeader:{dark:"#828bb8",light:"#7086b5"},diffHighlightAdded:{dark:"#b8db87",light:"#4db380"},diffHighlightRemoved:{dark:"#e26a75",light:"#f52a65"},diffAddedBg:{dark:"#20303b",light:"#d5e5d5"},diffRemovedBg:{dark:"#37222c",light:"#f7d8db"},diffContextBg:{dark:"darkStep2",light:"lightStep2"},diffLineNumber:{dark:"#8f909a",light:"#59595b"},diffAddedLineNumberBg:{dark:"#1b2b34",light:"#c5d5c5"},diffRemovedLineNumberBg:{dark:"#2d1f26",light:"#e7c8cb"},markdownText:{dark:"darkStep12",light:"lightStep12"},markdownHeading:{dark:"darkPurple",light:"lightPurple"},markdownLink:{dark:"darkStep9",light:"lightStep9"},markdownLinkText:{dark:"darkCyan",light:"lightCyan"},markdownCode:{dark:"darkGreen",light:"lightGreen"},markdownBlockQuote:{dark:"darkYellow",light:"lightYellow"},markdownEmph:{dark:"darkYellow",light:"lightYellow"},markdownStrong:{dark:"darkOrange",light:"lightOrange"},markdownHorizontalRule:{dark:"darkStep11",light:"lightStep11"},markdownListItem:{dark:"darkStep9",light:"lightStep9"},markdownListEnumeration:{dark:"darkCyan",light:"lightCyan"},markdownImage:{dark:"darkStep9",light:"lightStep9"},markdownImageText:{dark:"darkCyan",light:"lightCyan"},markdownCodeBlock:{dark:"darkStep12",light:"lightStep12"},syntaxComment:{dark:"darkStep11",light:"lightStep11"},syntaxKeyword:{dark:"darkPurple",light:"lightPurple"},syntaxFunction:{dark:"darkStep9",light:"lightStep9"},syntaxVariable:{dark:"darkRed",light:"lightRed"},syntaxString:{dark:"darkGreen",light:"lightGreen"},syntaxNumber:{dark:"darkOrange",light:"lightOrange"},syntaxType:{dark:"darkYellow",light:"lightYellow"},syntaxOperator:{dark:"darkCyan",light:"lightCyan"},syntaxPunctuation:{dark:"darkStep12",light:"lightStep12"}}}});var JD;var IE=h(()=>{TE();SE();PE();JD={claude:eW,conductor:ZD,tokyonight:XD}});import{RGBA as pJ}from"@opentui/core";function Tm(Z){return Boolean(AK[Z])}function CK(Z,X="dark"){let J=Z.defs??{};function z(U,K=[]){if(typeof U==="string"){if(U==="transparent"||U==="none")return pJ.fromInts(0,0,0,0);if(U.startsWith("#"))return pJ.fromHex(U);if(K.includes(U))return pJ.fromInts(0,0,0);let M=J[U]??Z.theme[U];if(M===void 0)return pJ.fromInts(0,0,0);return z(M,[...K,U])}return z(U[X],K)}let Q={};for(let[U,K]of Object.entries(Z.theme))Q[U]=z(K);let Y=Q.text??pJ.fromHex("#ffffff"),G=Q.background??pJ.fromHex("#000000");return{...{primary:Q.primary??Y,secondary:Q.secondary??Y,accent:Q.accent??Q.primary??Y,error:Q.error??Y,warning:Q.warning??Y,success:Q.success??Y,info:Q.info??Y,text:Y,textMuted:Q.textMuted??Y,background:G,backgroundPanel:Q.backgroundPanel??G,backgroundElement:Q.backgroundElement??G,backgroundMenu:Q.backgroundMenu??Q.backgroundElement??G,backgroundDialog:Q.backgroundDialog??Q.backgroundPanel??G,border:Q.border??Y,borderActive:Q.borderActive??Q.border??Y,borderSubtle:Q.borderSubtle??Q.border??Y,diffAdded:Q.diffAdded??Q.success??Y,diffRemoved:Q.diffRemoved??Q.error??Y,diffContext:Q.diffContext??Q.textMuted??Y,diffHunkHeader:Q.diffHunkHeader??Q.textMuted??Y,diffAddedBg:Q.diffAddedBg??G,diffRemovedBg:Q.diffRemovedBg??G,selectedListItemText:Q.selectedListItemText??G},...Q}}function Sm(Z,X,J){let z={...Z,focusAccent:Z[X]??Z.primary};if(!J)return z;let[Q,Y,G]=Z.background.toInts(),[$,U,K]=Z.backgroundPanel.toInts();return{...z,background:pJ.fromInts(Q,Y,G,0),backgroundPanel:pJ.fromInts($,U,K,0)}}var AK,rZ="claude",dJ;var EK=h(()=>{IE();AK=JD;dJ=["primary","success","info"]});function Eq0(Z){let X=/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/.exec(Z);if(!X)return null;let J=X[1];if(J.length===3){let[z,Q,Y]=J;return`#${z}${z}${Q}${Q}${Y}${Y}`.toLowerCase()}return`#${J.slice(0,6)}`.toLowerCase()}function xE(Z,X,J="dark"){let z=Z.defs??{};function Q(G,$){if(typeof G==="string"){if(G==="transparent"||G==="none")return null;if(G.startsWith("#"))return Eq0(G);if($.includes(G))return null;let K=z[G]??Z.theme[G];if(K===void 0)return null;return Q(K,[...$,G])}if(!G||typeof G!=="object")return null;let U=G[J];return typeof U==="string"?Q(U,$):null}let Y=Z.theme[X];if(Y===void 0)return null;return Q(Y,[X])}function zD(Z){return typeof Z==="object"&&Z!==null&&!Array.isArray(Z)}function QD(Z){if(!zD(Z))return{ok:!1,reason:"theme must be a JSON object at the top level"};let X=Z;if(!("theme"in X))return{ok:!1,reason:"missing required key `theme`"};let J=X.theme;if(!zD(J))return{ok:!1,reason:"`theme` must be an object map"};if("defs"in X&&X.defs!==void 0){if(!zD(X.defs))return{ok:!1,reason:"`defs` must be an object map"};for(let[z,Q]of Object.entries(X.defs))if(typeof Q!=="string")return{ok:!1,reason:`defs.${z} must be a string (hex like "#abc" or a ref name)`}}for(let[z,Q]of Object.entries(J)){if(typeof Q==="string")continue;if(!zD(Q))return{ok:!1,reason:`theme.${z} must be a string or a { dark, light } object (got ${Q===null?"null":Array.isArray(Q)?"array":typeof Q})`};let Y=Q;if(typeof Y.dark!=="string")return{ok:!1,reason:`theme.${z}.dark must be a string`};if(typeof Y.light!=="string")return{ok:!1,reason:`theme.${z}.light must be a string`}}if("$schema"in X&&X.$schema!==void 0&&typeof X.$schema!=="string")return{ok:!1,reason:"`$schema` must be a string when present"};return{ok:!0,theme:X}}var yE=()=>{};import{readFileSync as Rq0,readdirSync as Tq0}from"fs";import{join as Pm}from"path";function D$(){return Pm(W7(),"themes")}function RK(){let Z=D$(),X;try{X=Tq0(Z)}catch{return[]}let J=[];for(let z of X){if(!z.endsWith(".json"))continue;let Q=Pm(Z,z),Y;try{let U=Rq0(Q,"utf8");Y=JSON.parse(U)}catch(U){let K=J1(U);console.warn(`[rove] skipping user theme ${Q}: invalid JSON \u2014 ${K}`);continue}let G=QD(Y);if(!G.ok){console.warn(`[rove] skipping user theme ${Q}: ${G.reason}`);continue}let $=z.slice(0,-5);J.push({name:$,theme:G.theme})}return J}var YD=h(()=>{T5();yE()});var Im,xm;var ym=h(()=>{Im={title:"ROUTINES",holdingDaemon:"keeping the daemon awake",notHolding:"none active",paused:"paused",newTitle:"New routine",fieldName:"name",fieldRepo:"repo",fieldPrompt:"prompt",fieldSchedule:"schedule (five-field cron)",namePlaceholder:"weekday dependency audit",promptPlaceholder:"Audit dependencies and summarize risky changes.",needRepo:"Open a project first \u2014 a routine runs in one.",cronInvalid:"not a five-field cron",cronField:{minute:"min",hour:"hour",dayOfMonth:"day",month:"month",dayOfWeek:"weekday"},cronNever:"valid, but never fires",missing:{name:"Give it a name.",repo:"Pick a project.",prompt:"Say what it should do.",schedule:"That schedule will not run."},empty:"No routines scheduled.",emptyHint:"Press n to create one.",precheck:"precheck: {command}",recentRuns:"RECENT RUNS",noRuns:"Not run yet.",noSelection:"A routine runs its prompt in a project on a schedule.",running:"Running {name}\u2026",ranWith:"{name}: {status}",runNow:"[ run now ]",runNowHint:"try it without waiting for the schedule",deleteTitle:"Delete routine?",deleteBody:"{name} and its run history will be removed. Tasks it already created are untouched.",deleteButton:"Delete"},xm={title:"\u4F8B\u884C\u4EFB\u52A1",holdingDaemon:"\u6B63\u5728\u4FDD\u6301\u5B88\u62A4\u8FDB\u7A0B\u5E38\u9A7B",notHolding:"\u65E0\u542F\u7528\u9879",paused:"\u5DF2\u6682\u505C",newTitle:"\u65B0\u5EFA\u4F8B\u884C\u4EFB\u52A1",fieldName:"\u540D\u79F0",fieldRepo:"\u4ED3\u5E93",fieldPrompt:"\u63D0\u793A\u8BCD",fieldSchedule:"\u8C03\u5EA6\uFF08\u4E94\u6BB5 cron\uFF09",namePlaceholder:"\u5DE5\u4F5C\u65E5\u4F9D\u8D56\u5BA1\u8BA1",promptPlaceholder:"\u5BA1\u8BA1\u4F9D\u8D56\u5E76\u603B\u7ED3\u6709\u98CE\u9669\u7684\u53D8\u66F4\u3002",needRepo:"\u5148\u6253\u5F00\u4E00\u4E2A\u9879\u76EE\u2014\u2014\u4F8B\u884C\u4EFB\u52A1\u8981\u8DD1\u5728\u67D0\u4E2A\u9879\u76EE\u91CC\u3002",cronInvalid:"\u4E0D\u662F\u5408\u6CD5\u7684\u4E94\u6BB5 cron",cronField:{minute:"\u5206",hour:"\u65F6",dayOfMonth:"\u65E5",month:"\u6708",dayOfWeek:"\u661F\u671F"},cronNever:"\u8BED\u6CD5\u5408\u6CD5\uFF0C\u4F46\u6C38\u8FDC\u4E0D\u4F1A\u89E6\u53D1",missing:{name:"\u8D77\u4E2A\u540D\u5B57\u3002",repo:"\u9009\u4E00\u4E2A\u9879\u76EE\u3002",prompt:"\u8BF4\u660E\u5B83\u8981\u505A\u4EC0\u4E48\u3002",schedule:"\u8FD9\u4E2A\u8C03\u5EA6\u4E0D\u4F1A\u89E6\u53D1\u3002"},empty:"\u8FD8\u6CA1\u6709\u4F8B\u884C\u4EFB\u52A1\u3002",emptyHint:"\u6309 n \u65B0\u5EFA\u4E00\u6761\u3002",precheck:"\u9884\u68C0\uFF1A{command}",recentRuns:"\u6700\u8FD1\u6267\u884C",noRuns:"\u5C1A\u672A\u6267\u884C\u3002",noSelection:"\u4F8B\u884C\u4EFB\u52A1\u4F1A\u6309\u8C03\u5EA6\u5728\u67D0\u4E2A\u9879\u76EE\u91CC\u8DD1\u5B83\u7684\u63D0\u793A\u8BCD\u3002",running:"\u6B63\u5728\u8FD0\u884C {name}\u2026",ranWith:"{name}\uFF1A{status}",runNow:"[ \u7ACB\u5373\u8FD0\u884C ]",runNowHint:"\u4E0D\u7B49\u8C03\u5EA6\uFF0C\u76F4\u63A5\u8BD5\u4E00\u6B21",deleteTitle:"\u5220\u9664\u8FD9\u6761\u4F8B\u884C\u4EFB\u52A1\uFF1F",deleteBody:"\u5C06\u5220\u9664 {name} \u53CA\u5176\u6267\u884C\u8BB0\u5F55\u3002\u5B83\u5DF2\u7ECF\u521B\u5EFA\u7684\u4EFB\u52A1\u4E0D\u53D7\u5F71\u54CD\u3002",deleteButton:"\u5220\u9664"}});var wm,vm;var fm=h(()=>{wm={cancel:"Cancel",next:"next",create:"create",confirm:"Confirm",paneCrash:{title:"This pane crashed",hint:"Reload it from the Tasks pane (the error was logged to client.log)."},rename:{defaultTitle:"Rename task",defaultFieldLabel:"title",footerHint:"enter {submitLabel} \xB7 esc cancel",defaultSubmitLabel:"rename"},prompt:{fieldLabel:"input",submitLabel:"submit"}},vm={cancel:"\u53D6\u6D88",next:"\u4E0B\u4E00\u6B65",create:"\u521B\u5EFA",confirm:"\u786E\u8BA4",paneCrash:{title:"\u6B64\u9762\u677F\u5DF2\u5D29\u6E83",hint:"\u8BF7\u4ECE\u4EFB\u52A1\u9762\u677F\u91CD\u65B0\u52A0\u8F7D\uFF08\u9519\u8BEF\u5DF2\u8BB0\u5F55\u5230 client.log\uFF09\u3002"},rename:{defaultTitle:"\u91CD\u547D\u540D\u4EFB\u52A1",defaultFieldLabel:"\u540D\u79F0",footerHint:"enter {submitLabel} \xB7 esc \u53D6\u6D88",defaultSubmitLabel:"\u91CD\u547D\u540D"},prompt:{fieldLabel:"\u8F93\u5165",submitLabel:"\u63D0\u4EA4"}}});var bm,gm;var km=h(()=>{bm={fix:{hint:"{count} finding(s) above have a known fix \u2014 run `{command}` to review them one by one",none:"fix: nothing to fix \u2014 no known remediation applies to this report",header:"fixes \u2014 each one asks before running:",willRun:"will run: {command}",confirmPrompt:"apply this fix? [y/N] ",done:"\u2713 done",failed:"\u2717 exited with code {code}",skipped:"\xB7 skipped",nonInteractive:"no interactive terminal \u2014 nothing was executed; run the commands above yourself",manualHeader:"manual steps \u2014 doctor prints these but never runs them:",daemonRestartWhy:"safe to run: engine sessions live in the separate PTY host and survive a daemon restart",daemonStale:"restart the daemon \u2014 it is running an older build than this CLI",daemonDown:"start the daemon \u2014 it is not running",hooksDown:"restart the daemon to re-establish the engine hook channel",inspectStale:"restart the daemon \u2014 it predates the hook-channel check",skillInstallWhy:"safe to run: installs skill files only; re-running is idempotent",skillMissing:"install the Rove agent skill",skillStale:"update the Rove agent skill to the version this build expects",resetWhy:"stops the daemon, the PTY host, and every live session \u2014 not undoable, so doctor only prints it",resetDaemonWedged:"the daemon process is alive but unreachable (wedged)",resetPty:"the PTY host is unreachable or not running",resetLegacy:"pre-v0.8 tmux sessions are still holding processes and memory",engineTabs:"engine tabs may hold a stale daemon socket path",engineTabsAction:"close and reopen the affected engine tabs in the TUI",engineTabsWhy:"kills that tab's live engine session \u2014 your call, not doctor's",humanOnlyWhy:"doctor does not install software or log in to accounts for you",git:"git is not on PATH",gitAction:"install git with your OS package manager",noEngine:"no usable engine \u2014 no engine CLI is both installed and logged in",noEngineAction:"install the claude, codex, or copilot CLI and log in",windowsNode:"Node.js is missing \u2014 the Windows PTY host cannot start",windowsNodeAction:"install Node.js from https://nodejs.org"}},gm={fix:{hint:"\u4E0A\u9762\u6709 {count} \u9879\u53D1\u73B0\u5B58\u5728\u5DF2\u77E5\u4FEE\u6CD5 \u2014 \u8FD0\u884C `{command}` \u9010\u6761\u67E5\u770B",none:"fix: \u65E0\u53EF\u4FEE\u9879 \u2014 \u672C\u6B21\u62A5\u544A\u6CA1\u6709\u5339\u914D\u5230\u5DF2\u77E5\u4FEE\u6CD5",header:"\u4FEE\u590D\u9879 \u2014 \u6BCF\u4E00\u6761\u90FD\u4F1A\u5148\u8BE2\u95EE\u518D\u6267\u884C:",willRun:"\u5C06\u6267\u884C: {command}",confirmPrompt:"\u6267\u884C\u8FD9\u6761\u4FEE\u590D\u5417? [y/N] ",done:"\u2713 \u5B8C\u6210",failed:"\u2717 \u9000\u51FA\u7801 {code}",skipped:"\xB7 \u5DF2\u8DF3\u8FC7",nonInteractive:"\u6CA1\u6709\u4EA4\u4E92\u7EC8\u7AEF \u2014 \u672A\u6267\u884C\u4EFB\u4F55\u547D\u4EE4; \u8BF7\u81EA\u884C\u8FD0\u884C\u4E0A\u9762\u7684\u547D\u4EE4",manualHeader:"\u4EBA\u5DE5\u6B65\u9AA4 \u2014 doctor \u53EA\u6253\u5370, \u6C38\u8FDC\u4E0D\u4F1A\u66FF\u4F60\u6267\u884C:",daemonRestartWhy:"\u53EF\u5B89\u5168\u6267\u884C: \u5F15\u64CE\u4F1A\u8BDD\u5728\u72EC\u7ACB\u7684 PTY host \u91CC, daemon \u91CD\u542F\u540E\u4ECD\u7136\u5B58\u6D3B",daemonStale:"\u91CD\u542F daemon \u2014 \u5B83\u8FD0\u884C\u7684\u6784\u5EFA\u6BD4\u5F53\u524D CLI \u65E7",daemonDown:"\u542F\u52A8 daemon \u2014 \u5B83\u5F53\u524D\u6CA1\u6709\u5728\u8FD0\u884C",hooksDown:"\u91CD\u542F daemon \u4EE5\u91CD\u5EFA\u5F15\u64CE hook \u901A\u9053",inspectStale:"\u91CD\u542F daemon \u2014 \u5B83\u7684\u7248\u672C\u65E9\u4E8E hook \u901A\u9053\u68C0\u67E5",skillInstallWhy:"\u53EF\u5B89\u5168\u6267\u884C: \u53EA\u5199\u5165 skill \u6587\u4EF6; \u91CD\u590D\u8FD0\u884C\u662F\u5E42\u7B49\u7684",skillMissing:"\u5B89\u88C5 Rove agent skill",skillStale:"\u628A Rove agent skill \u66F4\u65B0\u5230\u5F53\u524D\u6784\u5EFA\u671F\u671B\u7684\u7248\u672C",resetWhy:"\u4F1A\u505C\u6389 daemon\u3001PTY host \u548C\u6240\u6709\u6D3B\u52A8\u4F1A\u8BDD \u2014 \u4E0D\u53EF\u64A4\u9500, \u6240\u4EE5 doctor \u53EA\u6253\u5370",resetDaemonWedged:"daemon \u8FDB\u7A0B\u5B58\u6D3B\u4F46\u65E0\u6CD5\u8FDE\u63A5 (\u5361\u6B7B)",resetPty:"PTY host \u65E0\u6CD5\u8FDE\u63A5\u6216\u6CA1\u6709\u5728\u8FD0\u884C",resetLegacy:"v0.8 \u4E4B\u524D\u7684 tmux \u4F1A\u8BDD\u4ECD\u5360\u7528\u8FDB\u7A0B\u548C\u5185\u5B58",engineTabs:"\u5F15\u64CE tab \u53EF\u80FD\u6301\u6709\u8FC7\u671F\u7684 daemon socket \u8DEF\u5F84",engineTabsAction:"\u5728 TUI \u91CC\u5173\u95ED\u5E76\u91CD\u5F00\u53D7\u5F71\u54CD\u7684\u5F15\u64CE tab",engineTabsWhy:"\u4F1A\u6740\u6389\u8BE5 tab \u7684\u6D3B\u52A8\u5F15\u64CE\u4F1A\u8BDD \u2014 \u7531\u4F60\u51B3\u5B9A, doctor \u4E0D\u4EE3\u52B3",humanOnlyWhy:"doctor \u4E0D\u4F1A\u66FF\u4F60\u5B89\u88C5\u8F6F\u4EF6\u6216\u767B\u5F55\u8D26\u53F7",git:"PATH \u4E0A\u627E\u4E0D\u5230 git",gitAction:"\u7528\u4F60\u7684\u7CFB\u7EDF\u5305\u7BA1\u7406\u5668\u5B89\u88C5 git",noEngine:"\u6CA1\u6709\u53EF\u7528\u5F15\u64CE \u2014 \u6CA1\u6709\u4EFB\u4F55\u5F15\u64CE CLI \u540C\u65F6\u6EE1\u8DB3\u5DF2\u5B89\u88C5\u4E14\u5DF2\u767B\u5F55",noEngineAction:"\u5B89\u88C5 claude\u3001codex \u6216 copilot CLI \u5E76\u767B\u5F55",windowsNode:"\u7F3A\u5C11 Node.js \u2014 Windows PTY host \u65E0\u6CD5\u542F\u52A8",windowsNodeAction:"\u4ECE https://nodejs.org \u5B89\u88C5 Node.js"}}});var mm,hm;var um=h(()=>{mm={tabs:{all:"All",changes:"Changes"},actions:{zen:"Zen",createPR:"Ask agent to create PR"},legend:{changes:"M modified \xB7 A added \xB7 D deleted \xB7 ? untracked"},scope:{working:"scope: working tree",branch:"scope: vs {base}",toggleHint:"b to toggle"},empty:{noTask:"(no task \u2014 press n to create)",noFiles:"(empty worktree)",noChanges:"(no changes \u2014 clean worktree)"},error:{retryHint:"press r to retry",notGitRepo:"not a git repository",pathMissing:"worktree path is missing",permissionDenied:"permission denied",gitNotInstalled:"git is not installed",gitFailed:"git command failed"},toast:{prOnTargetBranch:"Already on the target branch ({branch}) \u2014 ask the agent to create the PR from a task branch"}},hm={tabs:{all:"\u5168\u90E8",changes:"\u6539\u52A8"},actions:{zen:"\u4E13\u6CE8\u6A21\u5F0F",createPR:"\u8BA9 agent \u521B\u5EFA PR"},legend:{changes:"M \u5DF2\u4FEE\u6539 \xB7 A \u5DF2\u6DFB\u52A0 \xB7 D \u5DF2\u5220\u9664 \xB7 ? \u672A\u8DDF\u8E2A"},scope:{working:"\u8303\u56F4\uFF1A\u5DE5\u4F5C\u533A\u6539\u52A8",branch:"\u8303\u56F4\uFF1A\u5BF9\u6BD4 {base}",toggleHint:"\u6309 b \u5207\u6362"},empty:{noTask:"\uFF08\u6682\u65E0\u4EFB\u52A1 \u2014 \u6309 n \u521B\u5EFA\uFF09",noFiles:"\uFF08worktree \u4E3A\u7A7A\uFF09",noChanges:"\uFF08\u65E0\u6539\u52A8 \u2014 worktree \u5E72\u51C0\uFF09"},error:{retryHint:"\u6309 r \u91CD\u8BD5",notGitRepo:"\u4E0D\u662F git \u4ED3\u5E93",pathMissing:"worktree \u8DEF\u5F84\u4E0D\u5B58\u5728",permissionDenied:"\u6743\u9650\u4E0D\u8DB3",gitNotInstalled:"\u672A\u5B89\u88C5 git",gitFailed:"git \u547D\u4EE4\u5931\u8D25"},toast:{prOnTargetBranch:"\u5F53\u524D\u5C31\u5728\u76EE\u6807\u5206\u652F\uFF08{branch}\uFF09\u2014 \u8BF7\u5728\u4EFB\u52A1\u5206\u652F\u4E0A\u8BA9 agent \u521B\u5EFA PR"}}});var cm,lm;var pm=h(()=>{cm={title:"Rove \u2014 keybindings",esc:"esc",commandLayer:"{prefix} \u2014 more Rove commands",escCancel:"esc cancel",focused:"Focused: {surface}",allBindings:"All keybinding contexts",grammar:"Use keys here \xB7 one-press Rove shortcuts \xB7 {prefix} for more commands",disabled:"prefix disabled",here:"HERE \u2014 only in {surface}",direct:"ONE PRESS \u2014 Rove shortcuts",afterPrefix:"AFTER PREFIX \u2014 more Rove commands",otherPane:"OTHER PANE \u2014 {surface}"},lm={title:"Rove \u2014 \u5FEB\u6377\u952E",esc:"esc",commandLayer:"{prefix} \u2014 \u66F4\u591A Rove \u547D\u4EE4",escCancel:"esc \u53D6\u6D88",focused:"\u5F53\u524D\u7126\u70B9\uFF1A{surface}",allBindings:"\u6240\u6709\u5FEB\u6377\u952E\u4E0A\u4E0B\u6587",grammar:"\u5F53\u524D\u533A\u57DF\u76F4\u63A5\u6309 \xB7 Rove \u5355\u6B21\u5FEB\u6377\u952E \xB7 {prefix} \u6253\u5F00\u66F4\u591A\u547D\u4EE4",disabled:"Prefix \u5DF2\u7981\u7528",here:"\u5F53\u524D\u533A\u57DF \u2014 \u4EC5\u5728{surface}",direct:"\u4E00\u6B21\u6309\u4E0B \u2014 Rove \u5FEB\u6377\u952E",afterPrefix:"\u6309\u4E0B Prefix \u540E \u2014 \u66F4\u591A Rove \u547D\u4EE4",otherPane:"\u5176\u4ED6\u533A\u57DF \u2014 {surface}"}});var dm,im;var nm=h(()=>{dm={status:{commands:"{key} commands",help:"{key} help",sidebar:"{key} sidebar",settings:"settings"},pane:{move:"move",open:"open",fold:"fold",diff:"diff"}},im={status:{commands:"{key} \u547D\u4EE4",help:"{key} \u5E2E\u52A9",sidebar:"{key} \u4FA7\u680F",settings:"\u8BBE\u7F6E"},pane:{move:"\u79FB\u52A8",open:"\u6253\u5F00",fold:"\u6298\u53E0",diff:"\u5DEE\u5F02"}}});var am,om;var sm=h(()=>{am={empty:"No engine history for this task.",loading:"loading\u2026",earlier:"\u2026 {count} earlier messages",sessionLabel:"Session",liveTag:"\u25CF LIVE",hint:"[ ] session \xB7 j/k scroll \xB7 \u23CE expand",hintExpanded:"[ ] session \xB7 j/k scroll \xB7 \u23CE collapse",role:{user:"USER",assistant:"ASSISTANT",system:"SYSTEM"},thinking:"thinking"},om={empty:"\u6B64\u4EFB\u52A1\u6CA1\u6709\u5F15\u64CE\u5386\u53F2\u8BB0\u5F55\u3002",loading:"\u52A0\u8F7D\u4E2D\u2026",earlier:"\u2026 \u4E4B\u524D\u8FD8\u6709 {count} \u6761\u6D88\u606F",sessionLabel:"\u4F1A\u8BDD",liveTag:"\u25CF \u5B9E\u65F6",hint:"[ ] \u4F1A\u8BDD \xB7 j/k \u6EDA\u52A8 \xB7 \u23CE \u5C55\u5F00",hintExpanded:"[ ] \u4F1A\u8BDD \xB7 j/k \u6EDA\u52A8 \xB7 \u23CE \u6536\u8D77",role:{user:"\u7528\u6237",assistant:"\u52A9\u624B",system:"\u7CFB\u7EDF"},thinking:"\u601D\u8003"}});var rm,tm;var em=h(()=>{rm={title:"Kanban",hint:"tab project \xB7 \u2190\u2193\u2191\u2192 card \xB7 enter detail \xB7 n new \xB7 d delete \xB7 r refresh \xB7 esc close",loading:"Loading issues\u2026",noRepos:"No projects yet \u2014 create a task first.",empty:"No issues \u2014 agents file them via `rove api issue-create`.",columnEmpty:"No cards",column:{backlog:"Backlog",inProgress:"In progress",parked:"Parked",done:"Done"},more:"+{count} more",attention:"{count} need you",turnComplete:"turn done",detail:{status:{open:"open",doing:"doing",hold:"hold",done:"done"},created:"created {date}",linked:"linked to a session",titleLabel:"TITLE",description:"DESCRIPTION",noDescription:"No description.",attachHint:"paste a path / ctrl+v screenshot \u2192 inserts an image placeholder",engine:"ENGINE",workspace:"WORKSPACE",placement:{worktree:"New worktree task \u2014 its own workspace",projectWorktree:"New worktree \u2014 as a chattab in the project workspace",project:"Project checkout \u2014 a new chattab, no worktree"},jumpLabel:"AFTER START",jump:{stay:"Stay on the board",follow:"Jump to the session"},startLegend:"enter/ctrl+enter start \xB7 tab fields \xB7 \u2190\u2192 engine \xB7 \u2191\u2193 workspace \xB7 esc save & close",sessionLabel:"SESSION",openAction:"Open the linked session \u21B5",openLegend:"enter/ctrl+enter open the linked session \xB7 tab fields \xB7 esc save & close",eventsLabel:"EVENTS",eventsLoading:"Loading events\u2026",eventsNone:"No engine events recorded yet.",doneNote:"Done stories have nothing left to start \xB7 esc save & close",startedBackground:"Started in background: {title}",newStory:"NEW STORY",createLegend:"ctrl+s save \xB7 enter/ctrl+enter save & start \xB7 tab fields \xB7 esc cancel"},confirmDelete:{title:"Delete story #{id}?",body:"\u201C{title}\u201D will be removed from the tracker. A linked task, branch, or worktree is left untouched."}},tm={title:"\u770B\u677F",hint:"tab \u5207\u9879\u76EE \xB7 \u2190\u2193\u2191\u2192 \u9009\u5361\u7247 \xB7 enter \u8BE6\u60C5 \xB7 n \u65B0\u5EFA \xB7 d \u5220\u9664 \xB7 r \u5237\u65B0 \xB7 esc \u5173\u95ED",loading:"\u6B63\u5728\u52A0\u8F7D issues\u2026",noRepos:"\u8FD8\u6CA1\u6709\u9879\u76EE\u2014\u2014\u5148\u521B\u5EFA\u4E00\u4E2A\u4EFB\u52A1\u3002",empty:"\u6682\u65E0 issue\u2014\u2014agent \u53EF\u901A\u8FC7 `rove api issue-create` \u521B\u5EFA\u3002",columnEmpty:"\u6682\u65E0\u5361\u7247",column:{backlog:"\u5F85\u529E",inProgress:"\u8FDB\u884C\u4E2D",parked:"\u6401\u7F6E",done:"\u5DF2\u5B8C\u6210"},more:"\u8FD8\u6709 {count} \u6761",attention:"{count} \u5F20\u7B49\u4F60\u5904\u7406",turnComplete:"\u56DE\u5408\u5B8C\u6210",detail:{status:{open:"\u5F85\u529E",doing:"\u8FDB\u884C\u4E2D",hold:"\u6401\u7F6E",done:"\u5DF2\u5B8C\u6210"},created:"\u521B\u5EFA\u4E8E {date}",linked:"\u5DF2\u5173\u8054\u4F1A\u8BDD",titleLabel:"\u6807\u9898",description:"\u63CF\u8FF0",noDescription:"\u6682\u65E0\u63CF\u8FF0\u3002",attachHint:"\u7C98\u8D34\u8DEF\u5F84 / ctrl+v \u8D34\u622A\u56FE \u2192 \u63D2\u5165\u56FE\u7247\u5360\u4F4D\u884C",engine:"\u5F15\u64CE",workspace:"\u5DE5\u4F5C\u533A",placement:{worktree:"\u65B0\u5EFA worktree \u4EFB\u52A1\u2014\u2014\u72EC\u7ACB\u5DE5\u4F5C\u533A",projectWorktree:"\u65B0\u5EFA worktree\u2014\u2014\u4F5C\u4E3A\u9879\u76EE\u5DE5\u4F5C\u533A\u91CC\u7684 chattab",project:"\u9879\u76EE\u4E3B\u76EE\u5F55\u2014\u2014\u65B0\u5F00 chattab,\u4E0D\u5EFA worktree"},jumpLabel:"\u542F\u52A8\u540E",jump:{stay:"\u7559\u5728\u770B\u677F",follow:"\u8DF3\u8F6C\u5230\u4F1A\u8BDD"},startLegend:"enter/ctrl+enter \u542F\u52A8 \xB7 tab \u5207\u5B57\u6BB5 \xB7 \u2190\u2192 \u5F15\u64CE \xB7 \u2191\u2193 \u5DE5\u4F5C\u533A \xB7 esc \u4FDD\u5B58\u5173\u95ED",sessionLabel:"\u4F1A\u8BDD",openAction:"\u6253\u5F00\u5173\u8054\u4F1A\u8BDD \u21B5",openLegend:"enter/ctrl+enter \u6253\u5F00\u5DF2\u5173\u8054\u4F1A\u8BDD \xB7 tab \u5207\u5B57\u6BB5 \xB7 esc \u4FDD\u5B58\u5173\u95ED",eventsLabel:"\u4E8B\u4EF6",eventsLoading:"\u6B63\u5728\u52A0\u8F7D\u4E8B\u4EF6\u2026",eventsNone:"\u6682\u65E0\u5F15\u64CE\u4E8B\u4EF6\u8BB0\u5F55\u3002",doneNote:"\u5DF2\u5B8C\u6210\u7684 story \u65E0\u9700\u542F\u52A8 \xB7 esc \u4FDD\u5B58\u5173\u95ED",startedBackground:"\u5DF2\u5728\u540E\u53F0\u542F\u52A8:{title}",newStory:"\u65B0\u5EFA STORY",createLegend:"ctrl+s \u4EC5\u4FDD\u5B58 \xB7 enter/ctrl+enter \u4FDD\u5B58\u5E76\u542F\u52A8 \xB7 tab \u5207\u5B57\u6BB5 \xB7 esc \u53D6\u6D88"},confirmDelete:{title:"\u5220\u9664 story #{id}?",body:"\u300C{title}\u300D\u5C06\u4ECE tracker \u4E2D\u79FB\u9664\u3002\u5DF2\u5173\u8054\u7684\u4EFB\u52A1\u3001\u5206\u652F\u3001worktree \u4E0D\u53D7\u5F71\u54CD\u3002"}}});var Zh,Xh;var Jh=h(()=>{Zh={category:{Global:"Global",Sidebar:"Sidebar",Workspace:"Workspace",Navigation:"Navigation","Tasks pane":"Tasks pane",Files:"Files",Terminal:"Terminal",Dialog:"Dialog",Views:"Views",Tasks:"Tasks",Sessions:"Sessions",Attention:"Attention",Tools:"Tools"},desc:{"help.open":"Show keybindings help","task.new":"New task","task.openEditor":"Open active Task directory in editor","task.moveMode":"Reorder sidebar rows (then j/k \u2014 tab, task, or project)","settings.open":"Open settings","settings.open.sidebar":"Open settings","inbox.show":"Open attention Inbox","worktrees.open.sidebar":"Open worktrees","kanban.open":"Open kanban (issues board)","automations.open":"Open automations (scheduled tasks)","workItems.open":"Open GitHub issues (external tracker)","app.quit":"Quit (with confirm)","focus.sidebar":"Back to sidebar (tasks)","focus.previous":"Focus previous pane (files \u2192 workspace \u2192 sidebar)","focus.next":"Focus next pane (sidebar \u2192 workspace \u2192 files)","workspace.zenToggle":"Toggle zen mode","attention.next":"Jump to the next attention item","chat.interrupt":"Interrupt current turn (esc while streaming)","sidebar.nav":"Move cursor up/down","sidebar.select":"Open the selected task","sidebar.tree.open":"Open the row under the cursor","sidebar.goto":"Top / bottom of list (gg or shift-G)","sidebar.rename":"Rename task","sidebar.localMerge":"Reorder row (Shift+M, then j/k \u2014 tab, task, or project)","sidebar.pin":"Pin / unpin task at top (Shift+P)","sidebar.sort":"Switch task sort (default \u2194 recent)","sidebar.delete":"Delete task (with confirm)","sidebar.search.enter":"Search tasks (fuzzy filter)","sidebar.search.nav":"Move highlight in search results","sidebar.search.submit":"Select search match and exit search","sidebar.search.cancel":"Cancel search (restore prior selection)","tasks.openWorktree":"Open selected Task directory in your editor","tasks.renameBranch":"Rename the selected task's git branch","tasks.cycleEngine":"Cycle engine vendor \u2014 applies on reopen","tasks.update":"Open the update page (when a new version is available)","tasks.focusEngine":"Focus the engine pane of the current window","tasks.jump":"Jump to the task showing that digit","chat.send":"Send message (composer)","chat.newline":"Newline in composer","chat.cycle-mode":"Cycle permission mode (composer)","chat.steer":"Steer (interrupt + send) \u2014 mid-stream only","chat.tab.new":"New chat tab","chat.tab.chooseEngine":"New conversation \u2014 engine/shell picker with destination + context toggles","chat.tab.fork":"Fork this chat into a new tab (same Task directory, keeps the conversation)","chat.fork.new":"Quick-fork: create child task seeded with current repo/branch/model","chat.tab.close":"Close chat tab","chat.tab.rename":"Rename active chat tab","chat.tab.cycle-next":"Next chat tab","chat.tab.cycle-prev":"Previous chat tab","workspace.split.right":"Split right","workspace.split.down":"Split down","workspace.split.focus-next":"Focus next split","workspace.split.close":"Close active split (tab when unsplit)","workspace.split.rename":"Rename active split (tab when unsplit)","files.nav":"Move cursor up/down","files.hierarchy":"Collapse / expand tree level","files.open":"Open file in configured editor (diff when supported)","files.tab":"Switch tab (cycle All / Changes)","files.refresh":"Refresh","files.scope":"Toggle Changes scope (working \u2194 branch vs base)","files.diff":"Open a read-only diff in a workspace tab","files.openExternal":"Open file in system default app (audio / video / pdf preview)","files.mention":"Inject @<path> mention into the engine pane","files.createPR":"Ask the agent to create a PR from the current task","diff.review.cursor":"Move the line cursor over the diff","diff.review.range":"Toggle range anchor at the cursor","diff.review.note":"Add a review note at the cursor","diff.review.send":"Send all unsent review notes to the engine","inbox.nav":"Move through attention items","inbox.open":"Open the selected attention item","inbox.delete":"Remove the selected attention item","terminal.scroll-up":"Scroll scrollback up","terminal.scroll-down":"Scroll scrollback down","terminal.reset":"Reset terminal \u2014 kill the current shell and respawn","dialog.cancel":"Close the top dialog (esc)","dialog.newtask.tab.cycle":"Switch New Task tab (Existing / New Repo)"}},Xh={category:{Global:"\u5168\u5C40",Sidebar:"\u4FA7\u8FB9\u680F",Workspace:"\u5DE5\u4F5C\u533A",Navigation:"\u5BFC\u822A","Tasks pane":"\u4EFB\u52A1\u9762\u677F",Files:"\u6587\u4EF6",Terminal:"\u7EC8\u7AEF",Dialog:"\u5BF9\u8BDD\u6846",Views:"\u89C6\u56FE",Tasks:"\u4EFB\u52A1",Sessions:"\u4F1A\u8BDD",Attention:"\u63D0\u9192",Tools:"\u5DE5\u5177"},desc:{"help.open":"\u663E\u793A\u5FEB\u6377\u952E\u5E2E\u52A9","task.new":"\u65B0\u5EFA\u4EFB\u52A1","task.openEditor":"\u5728\u7F16\u8F91\u5668\u4E2D\u6253\u5F00\u5F53\u524D Task \u7684\u76EE\u5F55","task.moveMode":"\u8C03\u6574\u4FA7\u8FB9\u680F\u884C\u987A\u5E8F\uFF08\u7136\u540E j/k\u2014\u2014tab / \u4EFB\u52A1 / \u9879\u76EE\uFF09","settings.open":"\u6253\u5F00\u8BBE\u7F6E","settings.open.sidebar":"\u6253\u5F00\u8BBE\u7F6E","inbox.show":"\u6253\u5F00\u63D0\u9192\u6536\u4EF6\u7BB1","worktrees.open.sidebar":"\u6253\u5F00 worktrees","kanban.open":"\u6253\u5F00\u770B\u677F\uFF08issues\uFF09","automations.open":"\u6253\u5F00\u81EA\u52A8\u5316\uFF08\u5B9A\u65F6\u4EFB\u52A1\uFF09","workItems.open":"\u6253\u5F00 GitHub issues\uFF08\u5916\u90E8\u8DDF\u8E2A\u5668\uFF09","app.quit":"\u9000\u51FA\uFF08\u9700\u786E\u8BA4\uFF09","focus.sidebar":"\u8FD4\u56DE\u4FA7\u8FB9\u680F\uFF08\u4EFB\u52A1\u5217\u8868\uFF09","focus.previous":"\u805A\u7126\u4E0A\u4E00\u4E2A\u9762\u677F\uFF08\u6587\u4EF6 \u2192 \u5DE5\u4F5C\u533A \u2192 \u4FA7\u8FB9\u680F\uFF09","focus.next":"\u805A\u7126\u4E0B\u4E00\u4E2A\u9762\u677F\uFF08\u4FA7\u8FB9\u680F \u2192 \u5DE5\u4F5C\u533A \u2192 \u6587\u4EF6\uFF09","workspace.zenToggle":"\u5207\u6362\u7985\u6A21\u5F0F","attention.next":"\u8DF3\u5230\u4E0B\u4E00\u4E2A\u9700\u8981\u6CE8\u610F\u7684\u9879\u76EE","chat.interrupt":"\u4E2D\u65AD\u5F53\u524D\u8F6E\u6B21\uFF08\u6D41\u5F0F\u8F93\u51FA\u4E2D\u6309 esc\uFF09","sidebar.nav":"\u4E0A\u4E0B\u79FB\u52A8\u5149\u6807","sidebar.select":"\u6253\u5F00\u9009\u4E2D\u7684\u4EFB\u52A1","sidebar.tree.open":"\u6253\u5F00\u5149\u6807\u6240\u5728\u884C","sidebar.goto":"\u8DF3\u5230\u5217\u8868\u9876\u90E8 / \u5E95\u90E8\uFF08gg \u6216 shift-G\uFF09","sidebar.rename":"\u91CD\u547D\u540D\u4EFB\u52A1","sidebar.localMerge":"\u8C03\u6574\u5F53\u524D\u884C\u987A\u5E8F\uFF08Shift+M\uFF0C\u7136\u540E j/k\u2014\u2014tab / \u4EFB\u52A1 / \u9879\u76EE\uFF09","sidebar.pin":"\u7F6E\u9876 / \u53D6\u6D88\u7F6E\u9876\u4EFB\u52A1\uFF08Shift+P\uFF09","sidebar.sort":"\u5207\u6362\u4EFB\u52A1\u6392\u5E8F\u65B9\u5F0F\uFF08\u9ED8\u8BA4 \u2194 \u6700\u8FD1\uFF09","sidebar.delete":"\u5220\u9664\u4EFB\u52A1\uFF08\u9700\u786E\u8BA4\uFF09","sidebar.search.enter":"\u641C\u7D22\u4EFB\u52A1\uFF08\u6A21\u7CCA\u8FC7\u6EE4\uFF09","sidebar.search.nav":"\u5728\u641C\u7D22\u7ED3\u679C\u4E2D\u79FB\u52A8\u9AD8\u4EAE","sidebar.search.submit":"\u9009\u4E2D\u641C\u7D22\u5339\u914D\u9879\u5E76\u9000\u51FA\u641C\u7D22","sidebar.search.cancel":"\u53D6\u6D88\u641C\u7D22\uFF08\u6062\u590D\u4E4B\u524D\u7684\u9009\u4E2D\u9879\uFF09","tasks.openWorktree":"\u5728\u7F16\u8F91\u5668\u4E2D\u6253\u5F00\u9009\u4E2D Task \u7684\u76EE\u5F55","tasks.renameBranch":"\u91CD\u547D\u540D\u9009\u4E2D\u4EFB\u52A1\u7684 git \u5206\u652F","tasks.cycleEngine":"\u5FAA\u73AF\u5207\u6362\u5F15\u64CE\u5382\u5546\u2014\u2014\u91CD\u65B0\u6253\u5F00\u540E\u751F\u6548","tasks.update":"\u6253\u5F00\u66F4\u65B0\u9875\u9762\uFF08\u6709\u65B0\u7248\u672C\u65F6\uFF09","tasks.focusEngine":"\u805A\u7126\u5F53\u524D\u7A97\u53E3\u7684\u5F15\u64CE\u9762\u677F","tasks.jump":"\u8DF3\u5230\u663E\u793A\u5BF9\u5E94\u6570\u5B57\u7684\u4EFB\u52A1","chat.send":"\u53D1\u9001\u6D88\u606F\uFF08\u8F93\u5165\u6846\uFF09","chat.newline":"\u5728\u8F93\u5165\u6846\u4E2D\u6362\u884C","chat.cycle-mode":"\u5FAA\u73AF\u5207\u6362\u6743\u9650\u6A21\u5F0F\uFF08\u8F93\u5165\u6846\uFF09","chat.steer":"\u5F15\u5BFC\uFF08\u4E2D\u65AD\u5E76\u53D1\u9001\uFF09\u2014\u2014\u4EC5\u9650\u6D41\u5F0F\u8F93\u51FA\u4E2D","chat.tab.new":"\u65B0\u5EFA\u804A\u5929\u6807\u7B7E\u9875","chat.tab.chooseEngine":"\u65B0\u5EFA\u5BF9\u8BDD \u2014\u2014 \u9009\u62E9\u5F15\u64CE\u6216 shell\uFF0C\u53EF\u5207\u6362\u843D\u70B9\u4E0E\u4E0A\u4E0B\u6587","chat.tab.fork":"\u6D3E\u751F\u5F53\u524D\u5BF9\u8BDD\u5230\u65B0\u6807\u7B7E\u9875\uFF08\u540C\u4E00 Task \u76EE\u5F55\uFF0C\u5E26\u4E0A\u5DF2\u6709\u5BF9\u8BDD\uFF09","chat.fork.new":"\u5FEB\u901F\u6D3E\u751F\uFF1A\u4EE5\u5F53\u524D\u4ED3\u5E93/\u5206\u652F/\u6A21\u578B\u521B\u5EFA\u5B50\u4EFB\u52A1","chat.tab.close":"\u5173\u95ED\u804A\u5929\u6807\u7B7E\u9875","chat.tab.rename":"\u91CD\u547D\u540D\u5F53\u524D\u804A\u5929\u6807\u7B7E\u9875","chat.tab.cycle-next":"\u4E0B\u4E00\u4E2A\u804A\u5929\u6807\u7B7E\u9875","chat.tab.cycle-prev":"\u4E0A\u4E00\u4E2A\u804A\u5929\u6807\u7B7E\u9875","workspace.split.right":"\u5411\u53F3\u5206\u5C4F","workspace.split.down":"\u5411\u4E0B\u5206\u5C4F","workspace.split.focus-next":"\u805A\u7126\u4E0B\u4E00\u4E2A\u5206\u5C4F","workspace.split.close":"\u5173\u95ED\u5F53\u524D\u5206\u5C4F\uFF08\u672A\u5206\u5C4F\u65F6\u5173\u95ED\u6807\u7B7E\u9875\uFF09","workspace.split.rename":"\u91CD\u547D\u540D\u5F53\u524D\u5206\u5C4F\uFF08\u672A\u5206\u5C4F\u65F6\u91CD\u547D\u540D\u6807\u7B7E\u9875\uFF09","files.nav":"\u4E0A\u4E0B\u79FB\u52A8\u5149\u6807","files.hierarchy":"\u6298\u53E0 / \u5C55\u5F00\u6811\u5C42\u7EA7","files.open":"\u5728\u5DF2\u914D\u7F6E\u7684\u7F16\u8F91\u5668\u4E2D\u6253\u5F00\u6587\u4EF6\uFF08\u652F\u6301\u65F6\u663E\u793A diff\uFF09","files.tab":"\u5207\u6362\u6807\u7B7E\u9875\uFF08\u5FAA\u73AF \u5168\u90E8 / \u53D8\u66F4\uFF09","files.refresh":"\u5237\u65B0","files.scope":"\u5207\u6362\u53D8\u66F4\u8303\u56F4\uFF08\u5DE5\u4F5C\u533A \u2194 \u5206\u652F\u5BF9\u6BD4 base\uFF09","files.diff":"\u5728\u5DE5\u4F5C\u533A\u6807\u7B7E\u9875\u4E2D\u6253\u5F00\u53EA\u8BFB diff","files.openExternal":"\u5728\u7CFB\u7EDF\u9ED8\u8BA4\u5E94\u7528\u4E2D\u6253\u5F00\u6587\u4EF6\uFF08\u97F3\u9891 / \u89C6\u9891 / pdf \u9884\u89C8\uFF09","files.mention":"\u5C06 @<path> \u63D0\u53CA\u6CE8\u5165\u5F15\u64CE\u9762\u677F","files.createPR":"\u8BA9 agent \u4ECE\u5F53\u524D\u4EFB\u52A1\u521B\u5EFA PR","diff.review.cursor":"\u5728 diff \u4E2D\u79FB\u52A8\u884C\u5149\u6807","diff.review.range":"\u5728\u5149\u6807\u5904\u5207\u6362\u8303\u56F4\u951A\u70B9","diff.review.note":"\u5728\u5149\u6807\u5904\u6DFB\u52A0\u5BA1\u9605\u5907\u6CE8","diff.review.send":"\u5C06\u6240\u6709\u672A\u53D1\u9001\u7684\u5BA1\u9605\u5907\u6CE8\u53D1\u7ED9\u5F15\u64CE","inbox.nav":"\u5728\u63D0\u9192\u9879\u76EE\u4E4B\u95F4\u79FB\u52A8","inbox.open":"\u6253\u5F00\u9009\u4E2D\u7684\u63D0\u9192\u9879\u76EE","inbox.delete":"\u79FB\u9664\u9009\u4E2D\u7684\u63D0\u9192\u9879\u76EE","terminal.scroll-up":"\u5411\u4E0A\u6EDA\u52A8\u56DE\u6EDA","terminal.scroll-down":"\u5411\u4E0B\u6EDA\u52A8\u56DE\u6EDA","terminal.reset":"\u91CD\u7F6E\u7EC8\u7AEF\u2014\u2014\u5173\u95ED\u5F53\u524D shell \u5E76\u91CD\u65B0\u542F\u52A8","dialog.cancel":"\u5173\u95ED\u9876\u5C42\u5BF9\u8BDD\u6846\uFF08esc\uFF09","dialog.newtask.tab.cycle":"\u5207\u6362\u65B0\u5EFA\u4EFB\u52A1\u6807\u7B7E\u9875\uFF08\u73B0\u6709\u4ED3\u5E93 / \u65B0\u4ED3\u5E93\uFF09"}}});var zh,Qh;var Yh=h(()=>{zh={title:"New task",tabs:{existing:"For Existing",clone:"For New Repo",adopt:"Adopt Worktree"},field:{engine:"engine",repo:"repo",fromBranch:"from branch",gitUrl:"git url",parentDir:"parent dir",folderName:"folder name",baseBranch:"base branch",adoptFilter:"filter (path glob)"},placeholder:{folderName:"auto from url",adoptFilter:"* \u2014 type e.g. feature-* to narrow"},hint:{engineCycle:"ctrl+e",remembered:"(remembered \u2014 next clone defaults to this dir)",currentDir:"(current dir)",noBranchesFound:"(no local branches found \u2014 typed text will be used as ref)",noMatchBranch:"(no match \u2014 typed text will be used as ref)",scanningWorktrees:"scanning worktrees\u2026"},picker:{moreAbove:"\u2191 {count} more",moreBelow:"\u2193 {count} more"},adopt:{repoLine:"repo: {path}",repoNone:"(none)",noUnlinked:"no unlinked worktrees \u2014 every git worktree here is already a task",noMatch:"no worktrees match the filter",hintSelected:"{count} selected \xB7 enter toggles \xB7 ctrl+a all \xB7 Create imports",hintDefault:"enter toggles \xB7 ctrl+a all \xB7 Create imports the highlighted row",summaryAll:"Adopted {count} worktree(s)",summaryPartial:"Adopted {done}/{total} worktrees \u2014 the rest failed (see log)",summaryNone:"Couldn't adopt any worktree: {error}"},clone:{progressFallback:"Cloning\u2026",progressInto:"Cloning into {target}\u2026"},button:{create:"[ Create ]",createFocused:"\u25B8 [ Create ]",cloning:"[ Cloning\u2026 ]"},error:{gitUrlRequired:"git URL is required",gitUrlInvalid:"does not look like a git URL: {url}",folderRequired:"folder name is required",folderHasSeparator:"folder name cannot contain path separators",parentRequired:"parent directory is required",parentNotFound:"parent directory does not exist: {path}",parentNotDir:"not a directory: {path}",targetExists:"target already exists: {path}",cloneFailed:"git clone failed: {error}",noAdoptable:"no adoptable worktrees to import"}},Qh={title:"\u65B0\u5EFA\u4EFB\u52A1",tabs:{existing:"\u5DF2\u6709\u4ED3\u5E93",clone:"\u514B\u9686\u65B0\u4ED3\u5E93",adopt:"\u63A5\u7BA1 Worktree"},field:{engine:"\u5F15\u64CE",repo:"\u4ED3\u5E93",fromBranch:"\u57FA\u51C6\u5206\u652F",gitUrl:"git \u5730\u5740",parentDir:"\u7236\u76EE\u5F55",folderName:"\u6587\u4EF6\u5939\u540D",baseBranch:"\u57FA\u51C6\u5206\u652F",adoptFilter:"\u8FC7\u6EE4\uFF08\u8DEF\u5F84 glob\uFF09"},placeholder:{folderName:"\u81EA\u52A8\u4ECE\u5730\u5740\u63A8\u5BFC",adoptFilter:"* \u2014 \u8F93\u5165\u5982 feature-* \u6765\u7F29\u5C0F\u8303\u56F4"},hint:{engineCycle:"ctrl+e",remembered:"\uFF08\u5DF2\u8BB0\u4F4F \u2014 \u4E0B\u6B21\u514B\u9686\u9ED8\u8BA4\u4F7F\u7528\u6B64\u76EE\u5F55\uFF09",currentDir:"\uFF08\u5F53\u524D\u76EE\u5F55\uFF09",noBranchesFound:"\uFF08\u672A\u627E\u5230\u672C\u5730\u5206\u652F \u2014 \u5C06\u76F4\u63A5\u4F7F\u7528\u8F93\u5165\u6587\u672C\u4F5C\u4E3A ref\uFF09",noMatchBranch:"\uFF08\u65E0\u5339\u914D \u2014 \u5C06\u76F4\u63A5\u4F7F\u7528\u8F93\u5165\u6587\u672C\u4F5C\u4E3A ref\uFF09",scanningWorktrees:"\u6B63\u5728\u626B\u63CF worktree\u2026"},picker:{moreAbove:"\u2191 \u8FD8\u6709 {count} \u9879",moreBelow:"\u2193 \u8FD8\u6709 {count} \u9879"},adopt:{repoLine:"\u4ED3\u5E93\uFF1A{path}",repoNone:"\uFF08\u65E0\uFF09",noUnlinked:"\u6CA1\u6709\u672A\u5173\u8054\u7684 worktree \u2014 \u6B64\u4ED3\u5E93\u6240\u6709 git worktree \u5747\u5DF2\u662F\u4EFB\u52A1",noMatch:"\u6CA1\u6709 worktree \u5339\u914D\u6B64\u8FC7\u6EE4\u6761\u4EF6",hintSelected:"\u5DF2\u9009 {count} \u9879 \xB7 enter \u5207\u6362\u9009\u4E2D \xB7 ctrl+a \u5168\u9009 \xB7 \u521B\u5EFA \u5BFC\u5165",hintDefault:"enter \u5207\u6362\u9009\u4E2D \xB7 ctrl+a \u5168\u9009 \xB7 \u521B\u5EFA \u5C06\u5BFC\u5165\u9AD8\u4EAE\u884C",summaryAll:"\u5DF2\u63A5\u7BA1 {count} \u4E2A worktree",summaryPartial:"\u5DF2\u63A5\u7BA1 {done}/{total} \u4E2A worktree \u2014 \u5176\u4F59\u5931\u8D25\uFF08\u8BE6\u89C1\u65E5\u5FD7\uFF09",summaryNone:"\u6CA1\u6709 worktree \u63A5\u7BA1\u6210\u529F\uFF1A{error}"},clone:{progressFallback:"\u514B\u9686\u4E2D\u2026",progressInto:"\u6B63\u5728\u514B\u9686\u5230 {target}\u2026"},button:{create:"[ \u521B\u5EFA ]",createFocused:"\u25B8 [ \u521B\u5EFA ]",cloning:"[ \u514B\u9686\u4E2D\u2026 ]"},error:{gitUrlRequired:"git \u5730\u5740\u4E0D\u80FD\u4E3A\u7A7A",gitUrlInvalid:"\u4E0D\u50CF\u662F\u6709\u6548\u7684 git \u5730\u5740\uFF1A{url}",folderRequired:"\u6587\u4EF6\u5939\u540D\u4E0D\u80FD\u4E3A\u7A7A",folderHasSeparator:"\u6587\u4EF6\u5939\u540D\u4E0D\u80FD\u5305\u542B\u8DEF\u5F84\u5206\u9694\u7B26",parentRequired:"\u7236\u76EE\u5F55\u4E0D\u80FD\u4E3A\u7A7A",parentNotFound:"\u7236\u76EE\u5F55\u4E0D\u5B58\u5728\uFF1A{path}",parentNotDir:"\u4E0D\u662F\u76EE\u5F55\uFF1A{path}",targetExists:"\u76EE\u6807\u8DEF\u5F84\u5DF2\u5B58\u5728\uFF1A{path}",cloneFailed:"git clone \u5931\u8D25\uFF1A{error}",noAdoptable:"\u6CA1\u6709\u53EF\u63A5\u7BA1\u7684 worktree"}}});var Gh,$h;var qh=h(()=>{Gh={title:"Welcome to Rove",subtitle:"Two quick questions before your first launch.",completionsQuestion:"Install shell completions for {shell}?",completionsExplain:"Tab-completes rove subcommands. One line is added to your shell config.",skillQuestion:"Install the Rove agent skill?",skillExplain:"Teaches coding agents to drive Rove from the shell via `rove api`.",optionYes:"Yes (recommended)",optionNo:"No",legend:"\u2191\u2193 select \xB7 enter confirm \xB7 q skip setup",keysTitle:"Keyboard basics",keysBare:"Bare keys act in the focused pane \u2014 {nav} moves, {open} opens.",keysOnePress:"A few one-press chords are Rove's own \u2014 {newTab} new tab, {focusNext} next pane.",keysPrefix:"{prefix} opens the command map \u2014 hold it a beat and a guide appears.",keysHelp:"{help} shows the full live reference anytime.",keysLegend:"enter finish",appliedCompletions:"\u2713 completions hooked into {path} (takes effect in new shells)",skippedCompletions:"\xB7 completions skipped \u2014 run `{command}` anytime",installingSkill:"installing the Rove agent skill ({command})\u2026",skillFailed:"! skill install failed \u2014 retry with `{command}`",skippedSkill:"\xB7 agent skill skipped \u2014 run `{command}` anytime",ready:"You're ready to go!",readyHint:"Run `rove` to launch the TUI."},$h={title:"\u6B22\u8FCE\u4F7F\u7528 Rove",subtitle:"\u9996\u6B21\u542F\u52A8\u524D\uFF0C\u5148\u56DE\u7B54\u4E24\u4E2A\u5C0F\u95EE\u9898\u3002",completionsQuestion:"\u4E3A {shell} \u5B89\u88C5 shell \u8865\u5168\u5417\uFF1F",completionsExplain:"\u8BA9 rove \u5B50\u547D\u4EE4\u652F\u6301 Tab \u8865\u5168\uFF0C\u4F1A\u5728\u4F60\u7684 shell \u914D\u7F6E\u91CC\u52A0\u4E00\u884C\u3002",skillQuestion:"\u5B89\u88C5 Rove agent skill \u5417\uFF1F",skillExplain:"\u6559\u4F1A\u7F16\u7801 agent \u901A\u8FC7 `rove api` \u5728\u547D\u4EE4\u884C\u9A71\u52A8 Rove\u3002",optionYes:"\u5B89\u88C5\uFF08\u63A8\u8350\uFF09",optionNo:"\u8DF3\u8FC7",legend:"\u2191\u2193 \u9009\u62E9 \xB7 enter \u786E\u8BA4 \xB7 q \u8DF3\u8FC7\u8BBE\u7F6E",keysTitle:"\u952E\u76D8\u57FA\u7840",keysBare:"\u88F8\u952E\u4F5C\u7528\u4E8E\u5F53\u524D\u805A\u7126\u9762\u677F \u2014 {nav} \u79FB\u52A8\uFF0C{open} \u6253\u5F00\u3002",keysOnePress:"\u5C11\u91CF\u5355\u6B21\u5FEB\u6377\u952E\u5C5E\u4E8E Rove \u81EA\u5DF1 \u2014 {newTab} \u65B0\u6807\u7B7E\u9875\uFF0C{focusNext} \u5207\u6362\u9762\u677F\u3002",keysPrefix:"{prefix} \u6253\u5F00\u547D\u4EE4\u5C42 \u2014 \u6309\u4F4F\u7A0D\u7B49\u4F1A\u51FA\u73B0\u547D\u4EE4\u6307\u5357\u3002",keysHelp:"\u968F\u65F6\u6309 {help} \u67E5\u770B\u5B8C\u6574\u7684\u5B9E\u65F6\u952E\u4F4D\u8868\u3002",keysLegend:"enter \u5B8C\u6210",appliedCompletions:"\u2713 \u8865\u5168\u5DF2\u5199\u5165 {path}\uFF08\u65B0\u5F00\u7684 shell \u751F\u6548\uFF09",skippedCompletions:"\xB7 \u5DF2\u8DF3\u8FC7\u8865\u5168 \u2014 \u4E4B\u540E\u53EF\u968F\u65F6\u8FD0\u884C `{command}`",installingSkill:"\u6B63\u5728\u5B89\u88C5 Rove agent skill\uFF08{command}\uFF09\u2026",skillFailed:"! skill \u5B89\u88C5\u5931\u8D25 \u2014 \u53EF\u7528 `{command}` \u91CD\u8BD5",skippedSkill:"\xB7 \u5DF2\u8DF3\u8FC7 agent skill \u2014 \u4E4B\u540E\u53EF\u968F\u65F6\u8FD0\u884C `{command}`",ready:"\u4E00\u5207\u5C31\u7EEA\uFF01",readyHint:"\u8FD0\u884C `rove` \u542F\u52A8 TUI\u3002"}});var Hh,Uh;var Kh=h(()=>{Hh={preview:{diffVsHead:"diff vs HEAD",diffVsBase:"diff vs {base}",file:"file",image:"image",binary:"binary file",closeHint:"\xB7 q to close",loading:"loading\u2026",noTextPreview:"no text preview",openHint:"o open in system viewer",review:{noteDialogTitle:"Review note \u2014 {location}",noteFieldLabel:"note",noteSubmitLabel:"add note",notePlaceholder:"what should the agent change here?",count:"{total} notes \xB7 {unsent} unsent",keysHint:"j/k line \xB7 v range \xB7 c note \xB7 s send"}}},Uh={preview:{diffVsHead:"\u4E0E HEAD \u5BF9\u6BD4",diffVsBase:"\u4E0E {base} \u5BF9\u6BD4",file:"\u6587\u4EF6",image:"\u56FE\u7247",binary:"\u4E8C\u8FDB\u5236\u6587\u4EF6",closeHint:"\xB7 q \u5173\u95ED",loading:"\u52A0\u8F7D\u4E2D\u2026",noTextPreview:"\u65E0\u6587\u672C\u9884\u89C8",openHint:"o \u7528\u7CFB\u7EDF\u67E5\u770B\u5668\u6253\u5F00",review:{noteDialogTitle:"\u8BC4\u5BA1\u5907\u6CE8 \u2014 {location}",noteFieldLabel:"\u5907\u6CE8",noteSubmitLabel:"\u6DFB\u52A0\u5907\u6CE8",notePlaceholder:"\u5E0C\u671B agent \u5728\u8FD9\u91CC\u6539\u4EC0\u4E48\uFF1F",count:"{total} \u6761\u5907\u6CE8 \xB7 {unsent} \u6761\u672A\u53D1\u9001",keysHint:"j/k \u884C \xB7 v \u8303\u56F4 \xB7 c \u5907\u6CE8 \xB7 s \u53D1\u9001"}}}});var Vh,Bh;var Mh=h(()=>{Vh={title:"Quick task \xB7 {repoLabel}",esc:"esc",promptLabel:"prompt",promptPlaceholder:"what should this task do?",engineLabel:"engine",branchLabel:"branch"},Bh={title:"\u5FEB\u901F\u4EFB\u52A1 \xB7 {repoLabel}",esc:"esc",promptLabel:"\u63D0\u793A\u8BCD",promptPlaceholder:"\u8FD9\u4E2A\u4EFB\u52A1\u8981\u505A\u4EC0\u4E48\uFF1F",engineLabel:"\u5F15\u64CE",branchLabel:"\u5206\u652F"}});var Nh,Wh;var Dh=h(()=>{Nh={title:"Settings",esc:"esc",nav:{default:"j/k pick \xB7 h/l switch level \xB7 enter activate \xB7 esc close",feedback:"tab next field \xB7 enter sends on Send \xB7 esc close"},sections:{general:"General",engines:"Engines",plugins:"Plugins",keys:"Keybindings",feedback:"Feedback",dev:"Dev"},general:{usage:"USAGE",theme:"Theme",themeHint:"l to enter list \xB7 j/k to highlight \xB7 enter to apply",language:"Language",languageHint:"Display language for Rove's UI. l to enter list \xB7 j/k to highlight \xB7 enter to apply.",transparent:"Transparent background",transparentHint:"Drops the renderer's bg fill so the host terminal shows through. `t` toggles.",on:"[x] on",off:"[ ] off",focusAccent:"Focus accent",focusAccentHint:"Color of focused pane title, \u258C marker, and split borders.",accentPrimary:"Primary (brand accent)",accentSuccess:"Success (legacy green)",accentInfo:"Info (cool blue)",appearance:"Appearance",appearanceHint:"How split panes draw.",splitBox:"Box frames",splitLine:"Divider line",notifications:"Notifications",notificationsHint:"When a background tab finishes or pauses on an approval. The tab-chip unread dot is always on.",toast:"Toast",toastHint:"bottom-right popup",sound:"Sound",soundHint:"bell + chime + an OSC 9 desktop notification (rides SSH)",crossTask:"Cross-task",crossTaskHint:"also for a task you switched away from",keyHints:"Keyboard hints",keyHintsHint:"The status-bar reminder and the first-use hints in the sidebar and files panes.",keyHintsShow:"Show keyboard hints",keyHintsShowHint:"re-enabling relights hints dismissed by use",zen:"Zen mode",zenHint:"The `zen` chip and `prefix`+z hide Files, keeping the Tasks rail and workspace.",zenDefaultOn:"Start in zen mode",zenKeepTasks:"Keep Tasks pane",zenKeepTasksHint:"legacy \u2014 no layout effect today",editor:"Editor",editorHint:"What enter opens a file with in the file tree \u2014 diff mode when the editor supports it, the read-only preview when it isn't installed.",editorRow:"editor: < {kind} >",editorRowHint:"auto follows $VISUAL / $EDITOR, else nvim / vim / emacs / nano",editorCustom:"custom: {cmd}",editorCustomUnset:"(unset \u2014 enter to edit)",worktree:"Worktree location",worktreeHint:"Where new task worktrees are created. New tasks only.",worktreeBase:"location: < {kind} >",worktreeBaseHint:"custom takes `~`, a relative path, or a leading `$project_dir`",worktreeKindDefault:"default ~/.rove/worktrees",worktreeKindNext:"next to project",worktreeKindCustom:"custom",worktreeCustom:"custom: {path}",worktreeCustomUnset:"(unset \u2014 enter to edit)",worktreeBaseTitle:"Custom worktree location (blank = default; $project_dir = project root)",worktreeBaseField:"path",terminal:"Terminal",terminalHint:"Applies to terminals opened after the change.",scrollbackRow:"scrollback: {rows} rows",scrollbackRowHint:"100\u2013100000 \xB7 larger costs proportionally more CPU per redraw",scrollbackTitle:"Terminal scrollback rows (100\u2013100000)",scrollbackField:"rows",scrollbackInvalidTitle:"Not a number",scrollbackInvalidBody:"Scrollback must be a number of rows (e.g. 1000). Keeping the previous setting.",tabStripRow:"tab strip: {mode}",tabStripMode:{never:"off \u2014 the sidebar tree lists tabs",multipleOnly:"only with 2+ tabs",always:"always"}},engines:{title:"Engines",hint:"Every engine Rove can launch, with what detection found under each one: where its binary is, and for the engines with an account detector whether you are logged in. [x] = offered when picking an engine for a task; (\u25CF) = the global default (per-project picks, e.g. Ctrl+Shift+T, override it) \u2014 click either, or use the keys below. Override a launch command when the binary isn't on PATH or to pass default flags. space on/off \xB7 enter edit command \xB7 r rename \xB7 x reset/remove \xB7 d set default.",customTag:" (custom)",addEngine:"+ Add engine"},accounts:{checking:"Checking\u2026",notLoggedIn:"\u25CB Not logged in",loggedIn:"\u25CF Logged in: {email}",apiKeyConfigured:"\u25CF API key configured",chatgptLogin:"\u25CF ChatGPT login: {email}",tokenConfigured:"\u25CF Token configured ({source})",detected:"\u25CF Login detected"},plugins:{title:"Plugins",hint:"Plugins registered in ~/.kobe/plugins.json. enter (or click) toggles one on or off \u2014 the daemon watches the file, so the change applies live. Rows indented under a plugin are the settings it declares; enter edits one, and the value reaches the plugin on its next run. Install and remove them from the shell: `rove plugin install <owner/repo>`, `rove plugin link <dir>`.",empty:"No plugins registered. Install one with `rove plugin install <owner/repo>` \u2014 browse the `rove-plugin` topic on GitHub.",sourceLink:"linked {path}",sourceGithub:"{spec}",updateAvailable:"update available \u2014 rove plugin update",declares:"{actions} actions \xB7 {events} events \xB7 {panes} panes",manifestUnreadable:"manifest unreadable",lastRun:"\xB7 last run {label} {status} {ago} ago",neverRun:"\xB7 never run",runOk:"ok",runFailed:"failed to start",runExit:"exit {code}",settingUnset:"(unset \u2014 enter to edit)",settingInvalidTitle:"Not a number",settingInvalidBody:"{label} only accepts a number. Keeping the previous value."},keybindings:{title:"Keybindings",hint:"Rebind direct and prefix chords in your own YAML file; changes reload live. Press F1 anywhere for the live keymap with every binding id.",configFile:"Config file",notCreated:" (not created yet)",prefixTitle:"Command layer ({prefix})",prefixHint:"Bare keys act in the focused pane; a small one-press set covers frequent Rove actions; {prefix} opens the command layer ({timeout}ms second-stroke window). Prefix bindings keep their pane scope and modal rules.",tapPresentation:"Prefix tap",tapPresentationHint:"Choose whether the complete guide also marks controls already on screen.",tapPresentationLocal:"On-screen entries + complete guide (default)",tapPresentationGuide:"Complete guide only",prefixDisabled:"disabled",fixed:"Fixed (not rebindable): {ids}.",createHint:"No overrides file yet. Rove can write one for you, fully commented \u2014 nothing is rebound until you uncomment a line.",createFile:"[enter] Create keybindings.yaml",overridesApplied:"Overrides applied",none:"none",unbound:"(unbound)",defaultKeys:"default: {keys}",warnings:"Warnings"},feedback:{title:"Feedback",hint:"Sends a GitHub Discussion to the Rove repo through `gh`. Requires `gh auth login`; category defaults to Feedback.",titleLabel:"title",titlePlaceholder:"Short summary",descriptionLabel:"description",descriptionPlaceholder:"What happened? (enter for a new line \xB7 tab to Send)",send:"[enter] Send to GitHub Discussions"},dev:{reset:"Reset UI state",resetHint:"Clears ~/.config/rove/state.json and ~/.rove/tasks.json, then quits Rove \u2014 relaunch to start fresh. Working session list, pane sizes, theme, model picks all reset. Worktrees on disk and engine session history are not touched.",resetButton:"[enter] Reset",restart:"Restart backend",restartHint:"Stops the Rove daemon and quits this Rove window so the next launch spawns a fresh daemon \u2014 picks up daemon / orchestrator / engine edits without a process kill. Other attached Rove windows will lose their connection too.",restartButton:"[enter] Restart",doctorHint:"Daemon wedged or unresponsive? From a shell, run `rove daemon restart`, then relaunch Rove. Hosted engine sessions stay alive across a daemon restart.",experimental:"Experimental",remoteHint:"Remote projects (SSH): register a project whose git worktrees live on another host, driven from this local Rove. Unfinished \u2014 Hosted PTY engine launch over SSH is not implemented, and file/diff panes still degrade. Enables `rove add --remote`.",remote:"Remote projects",autoStatusHint:"Auto status flow: a backlog task moves to in_progress when its engine starts a turn, and new sessions get a system-prompt note telling the agent to set in_review itself when the work is done. Never touches done/canceled.",autoStatus:"Auto status flow",dispatcherHint:"Field-notes dispatcher: task sessions file one-line gotchas (`rove api note`), the daemon forwards each to the repo's main session, and that session relays them to the in-flight tasks that benefit (`rove api dispatch`). Web-hosted sessions receive the relays today.",dispatcher:"Field-notes dispatcher"}},Wh={title:"\u8BBE\u7F6E",esc:"esc",nav:{default:"j/k \u9009\u62E9 \xB7 h/l \u5207\u6362\u5C42\u7EA7 \xB7 enter \u786E\u8BA4 \xB7 esc \u5173\u95ED",feedback:"tab \u4E0B\u4E00\u9879 \xB7 enter \u5728\u53D1\u9001\u9879\u53D1\u9001 \xB7 esc \u5173\u95ED"},sections:{general:"\u901A\u7528",engines:"\u5F15\u64CE",plugins:"\u63D2\u4EF6",keys:"\u5FEB\u6377\u952E",feedback:"\u53CD\u9988",dev:"\u5F00\u53D1"},general:{usage:"\u7528\u91CF",theme:"\u4E3B\u9898",themeHint:"l \u8FDB\u5165\u5217\u8868 \xB7 j/k \u9AD8\u4EAE \xB7 enter \u5E94\u7528",language:"\u8BED\u8A00",languageHint:"Rove \u754C\u9762\u7684\u663E\u793A\u8BED\u8A00\u3002l \u8FDB\u5165\u5217\u8868 \xB7 j/k \u9AD8\u4EAE \xB7 enter \u5E94\u7528\u3002",transparent:"\u900F\u660E\u80CC\u666F",transparentHint:"\u53BB\u6389\u6E32\u67D3\u5668\u7684\u80CC\u666F\u586B\u5145\uFF0C\u8BA9\u5BBF\u4E3B\u7EC8\u7AEF\u900F\u51FA\u6765\u3002\u6309 `t` \u5207\u6362\u3002",on:"[x] \u5F00",off:"[ ] \u5173",focusAccent:"\u805A\u7126\u5F3A\u8C03\u8272",focusAccentHint:"\u805A\u7126\u9762\u677F\u6807\u9898\u3001\u258C \u6807\u8BB0\u548C\u5206\u9694\u8FB9\u6846\u7684\u989C\u8272\u3002",accentPrimary:"\u4E3B\u8272\uFF08\u54C1\u724C\u5F3A\u8C03\u8272\uFF09",accentSuccess:"\u6210\u529F\u8272\uFF08\u4F20\u7EDF\u7EFF\uFF09",accentInfo:"\u4FE1\u606F\u8272\uFF08\u51B7\u84DD\uFF09",appearance:"\u5916\u89C2",appearanceHint:"\u5206\u5C4F\u9762\u677F\u600E\u4E48\u753B\u8FB9\u3002",splitBox:"\u65B9\u6846\u8FB9\u6846",splitLine:"\u5355\u7EBF\u5206\u9694",notifications:"\u901A\u77E5",notificationsHint:"\u540E\u53F0\u6807\u7B7E\u5B8C\u6210\u6216\u5728\u5BA1\u6279\u5904\u6682\u505C\u65F6\u89E6\u53D1\u3002\u6807\u7B7E\u4E0A\u7684\u672A\u8BFB\u5706\u70B9\u59CB\u7EC8\u5F00\u542F\u3002",toast:"Toast \u5F39\u7A97",toastHint:"\u53F3\u4E0B\u89D2\u5F39\u7A97",sound:"\u58F0\u97F3",soundHint:"\u54CD\u94C3 + \u63D0\u793A\u97F3 + OSC 9 \u684C\u9762\u901A\u77E5\uFF08\u7ECF SSH \u76F4\u8FBE\u672C\u5730\uFF09",crossTask:"\u8DE8\u4EFB\u52A1",crossTaskHint:"\u4F60\u5DF2\u5207\u8D70\u7684\u4EFB\u52A1\u4E5F\u901A\u77E5",keyHints:"\u952E\u76D8\u63D0\u793A",keyHintsHint:"\u72B6\u6001\u680F\u63D0\u9192\uFF0C\u4EE5\u53CA\u4FA7\u680F\u548C\u6587\u4EF6\u9762\u677F\u7684\u9996\u7528\u63D0\u793A\u3002",keyHintsShow:"\u663E\u793A\u952E\u76D8\u63D0\u793A",keyHintsShowHint:"\u91CD\u65B0\u5F00\u542F\u4F1A\u70B9\u4EAE\u5DF2\u56E0\u4F7F\u7528\u800C\u7184\u706D\u7684\u63D0\u793A",zen:"\u7985\u6A21\u5F0F",zenHint:"`zen` \u6807\u8BB0\u548C `prefix`+z \u9690\u85CF Files\uFF0C\u4FDD\u7559 Tasks \u4FA7\u680F\u4E0E workspace\u3002",zenDefaultOn:"\u542F\u52A8\u5373\u8FDB\u5165\u7985\u6A21\u5F0F",zenKeepTasks:"\u4FDD\u7559 Tasks \u9762\u677F",zenKeepTasksHint:"\u65E7\u8BBE\u7F6E \u2014 \u5F53\u524D\u4E0D\u6539\u53D8\u5E03\u5C40",editor:"\u7F16\u8F91\u5668",editorHint:"\u6587\u4EF6\u6811\u91CC\u6309 enter \u7528\u4EC0\u4E48\u6253\u5F00\u6587\u4EF6\u2014\u2014\u652F\u6301\u65F6\u8D70\u7F16\u8F91\u5668 diff \u6A21\u5F0F\uFF0C\u672A\u5B89\u88C5\u65F6\u56DE\u9000\u5230\u53EA\u8BFB\u9884\u89C8\u3002",editorRow:"\u7F16\u8F91\u5668: < {kind} >",editorRowHint:"auto \u8DDF\u968F $VISUAL / $EDITOR\uFF0C\u5426\u5219 nvim / vim / emacs / nano",editorCustom:"\u81EA\u5B9A\u4E49: {cmd}",editorCustomUnset:"(\u672A\u8BBE\u7F6E \u2014 enter \u7F16\u8F91)",worktree:"\u5DE5\u4F5C\u6811\u4F4D\u7F6E",worktreeHint:"\u65B0\u4EFB\u52A1\u5DE5\u4F5C\u6811\u7684\u521B\u5EFA\u4F4D\u7F6E\u3002\u4EC5\u5BF9\u65B0\u4EFB\u52A1\u751F\u6548\u3002",worktreeBase:"\u4F4D\u7F6E: < {kind} >",worktreeBaseHint:"\u81EA\u5B9A\u4E49\u53EF\u586B `~`\u3001\u76F8\u5BF9\u8DEF\u5F84\u6216\u4EE5 `$project_dir` \u5F00\u5934",worktreeKindDefault:"\u9ED8\u8BA4 ~/.rove/worktrees",worktreeKindNext:"\u9879\u76EE\u65C1\u8FB9",worktreeKindCustom:"\u81EA\u5B9A\u4E49",worktreeCustom:"\u81EA\u5B9A\u4E49: {path}",worktreeCustomUnset:"(\u672A\u8BBE\u7F6E \u2014 enter \u7F16\u8F91)",worktreeBaseTitle:"\u81EA\u5B9A\u4E49\u5DE5\u4F5C\u6811\u4F4D\u7F6E\uFF08\u7559\u7A7A = \u9ED8\u8BA4\uFF1B$project_dir = \u9879\u76EE\u6839\u76EE\u5F55\uFF09",worktreeBaseField:"\u8DEF\u5F84",terminal:"\u7EC8\u7AEF",terminalHint:"\u5BF9\u4FEE\u6539\u540E\u65B0\u6253\u5F00\u7684\u7EC8\u7AEF\u751F\u6548\u3002",scrollbackRow:"\u56DE\u6EDA\u884C\u6570: {rows} \u884C",scrollbackRowHint:"100\u2013100000 \xB7 \u8C03\u5927\u4F1A\u6309\u6BD4\u4F8B\u589E\u52A0\u6BCF\u6B21\u91CD\u7ED8\u7684 CPU",scrollbackTitle:"\u7EC8\u7AEF\u56DE\u6EDA\u884C\u6570\uFF08100\u2013100000\uFF09",scrollbackField:"\u884C\u6570",scrollbackInvalidTitle:"\u4E0D\u662F\u6570\u5B57",scrollbackInvalidBody:"\u56DE\u6EDA\u884C\u6570\u5FC5\u987B\u662F\u6570\u5B57\uFF08\u5982 1000\uFF09\u3002\u4FDD\u7559\u539F\u8BBE\u7F6E\u3002",tabStripRow:"\u6807\u7B7E\u680F: {mode}",tabStripMode:{never:"\u5173\u95ED \u2014 \u6807\u7B7E\u5728\u5DE6\u4FA7\u6811\u91CC",multipleOnly:"\u4EC5 2 \u4E2A\u4EE5\u4E0A\u6807\u7B7E\u65F6\u663E\u793A",always:"\u59CB\u7EC8\u663E\u793A"}},engines:{title:"\u5F15\u64CE",hint:"Rove \u80FD\u542F\u52A8\u7684\u6240\u6709\u5F15\u64CE\uFF0C\u6BCF\u4E2A\u4E0B\u9762\u8DDF\u7740\u672C\u5730\u63A2\u6D4B\u5230\u7684\u60C5\u51B5\uFF1A\u4E8C\u8FDB\u5236\u5728\u54EA\uFF0C\u4EE5\u53CA\u5BF9\u6709\u8D26\u6237\u63A2\u6D4B\u5668\u7684\u5F15\u64CE\u662F\u5426\u5DF2\u767B\u5F55\u3002[x] = \u4E3A\u4EFB\u52A1\u9009\u5F15\u64CE\u65F6\u4F1A\u5217\u51FA\u5B83\uFF1B(\u25CF) = \u5168\u5C40\u9ED8\u8BA4\u5F15\u64CE\uFF08\u5404\u9879\u76EE\u81EA\u5DF1\u7684\u9009\u62E9\u4F1A\u8986\u76D6\u5B83\uFF0C\u5982 Ctrl+Shift+T\uFF09\u2014\u2014\u4E24\u8005\u90FD\u53EF\u76F4\u63A5\u70B9\uFF0C\u4E5F\u53EF\u7528\u4E0B\u9762\u7684\u6309\u952E\u3002\u4E8C\u8FDB\u5236\u4E0D\u5728 PATH \u4E0A\u3001\u6216\u8981\u4F20\u9ED8\u8BA4\u53C2\u6570\u65F6\uFF0C\u8986\u76D6\u5B83\u7684\u542F\u52A8\u547D\u4EE4\u3002space \u5F00/\u5173 \xB7 enter \u7F16\u8F91\u547D\u4EE4 \xB7 r \u91CD\u547D\u540D \xB7 x \u91CD\u7F6E/\u79FB\u9664 \xB7 d \u8BBE\u4E3A\u9ED8\u8BA4\u3002",customTag:" (\u81EA\u5B9A\u4E49)",addEngine:"+ \u6DFB\u52A0\u5F15\u64CE"},accounts:{checking:"\u68C0\u67E5\u4E2D\u2026",notLoggedIn:"\u25CB \u672A\u767B\u5F55",loggedIn:"\u25CF \u5DF2\u767B\u5F55: {email}",apiKeyConfigured:"\u25CF \u5DF2\u914D\u7F6E API key",chatgptLogin:"\u25CF ChatGPT \u767B\u5F55: {email}",tokenConfigured:"\u25CF \u5DF2\u914D\u7F6E Token ({source})",detected:"\u25CF \u68C0\u6D4B\u5230\u767B\u5F55"},plugins:{title:"\u63D2\u4EF6",hint:"\u5728 ~/.kobe/plugins.json \u91CC\u6CE8\u518C\u7684\u63D2\u4EF6\u3002enter\uFF08\u6216\u70B9\u51FB\uFF09\u5207\u6362\u542F\u7528/\u7981\u7528\u2014\u2014daemon \u76D1\u542C\u8BE5\u6587\u4EF6\uFF0C\u6539\u52A8\u5B9E\u65F6\u751F\u6548\u3002\u63D2\u4EF6\u4E0B\u65B9\u7F29\u8FDB\u7684\u884C\u662F\u5B83\u58F0\u660E\u7684\u8BBE\u7F6E\u9879\uFF0Center \u7F16\u8F91\uFF0C\u65B0\u503C\u5728\u63D2\u4EF6\u4E0B\u6B21\u8FD0\u884C\u65F6\u751F\u6548\u3002\u5B89\u88C5\u4E0E\u79FB\u9664\u5728 shell \u91CC\u505A\uFF1A`rove plugin install <owner/repo>`\u3001`rove plugin link <dir>`\u3002",empty:"\u5C1A\u672A\u6CE8\u518C\u4EFB\u4F55\u63D2\u4EF6\u3002\u7528 `rove plugin install <owner/repo>` \u5B89\u88C5\u4E00\u4E2A\u2014\u2014\u53EF\u5728 GitHub \u7684 `rove-plugin` \u8BDD\u9898\u4E0B\u6D4F\u89C8\u3002",sourceLink:"\u672C\u5730\u94FE\u63A5 {path}",sourceGithub:"{spec}",updateAvailable:"\u6709\u65B0\u7248\u672C \u2014 rove plugin update",declares:"{actions} \u4E2A\u52A8\u4F5C \xB7 {events} \u4E2A\u4E8B\u4EF6 \xB7 {panes} \u4E2A\u9762\u677F",manifestUnreadable:"manifest \u65E0\u6CD5\u89E3\u6790",lastRun:"\xB7 \u4E0A\u6B21\u8FD0\u884C {label} {status} {ago}\u524D",neverRun:"\xB7 \u5C1A\u672A\u8FD0\u884C\u8FC7",runOk:"\u6210\u529F",runFailed:"\u542F\u52A8\u5931\u8D25",runExit:"\u9000\u51FA\u7801 {code}",settingUnset:"(\u672A\u8BBE\u7F6E \u2014 enter \u7F16\u8F91)",settingInvalidTitle:"\u4E0D\u662F\u6570\u5B57",settingInvalidBody:"{label} \u53EA\u63A5\u53D7\u6570\u5B57\uFF0C\u4FDD\u7559\u539F\u503C\u3002"},keybindings:{title:"\u5FEB\u6377\u952E",hint:"\u5728\u4F60\u81EA\u5DF1\u7684 YAML \u6587\u4EF6\u91CC\u91CD\u7ED1\u5B9A\u76F4\u63A5\u6309\u952E\u548C prefix \u7EC4\u5408\uFF1B\u4FEE\u6539\u4F1A\u5B9E\u65F6\u52A0\u8F7D\u3002\u4EFB\u610F\u4F4D\u7F6E\u6309 F1 \u67E5\u770B\u5E26\u6BCF\u4E2A\u7ED1\u5B9A id \u7684\u5B9E\u65F6\u952E\u4F4D\u8868\u3002",configFile:"\u914D\u7F6E\u6587\u4EF6",notCreated:" (\u5C1A\u672A\u521B\u5EFA)",prefixTitle:"\u547D\u4EE4\u5C42\uFF08{prefix}\uFF09",prefixHint:"\u88F8\u952E\u4F5C\u7528\u4E8E\u5F53\u524D\u805A\u7126\u9762\u677F\uFF1B\u5C11\u91CF\u5355\u6B21\u5FEB\u6377\u952E\u8986\u76D6\u9AD8\u9891 Rove \u64CD\u4F5C\uFF1B{prefix} \u6253\u5F00\u547D\u4EE4\u5C42\uFF08\u7B2C\u4E8C\u51FB\u7A97\u53E3 {timeout}ms\uFF09\u3002Prefix \u7ED1\u5B9A\u4FDD\u6301\u539F\u6709\u7684\u9762\u677F\u4F5C\u7528\u57DF\u548C modal \u89C4\u5219\u3002",tapPresentation:"\u70B9\u6309 Prefix",tapPresentationHint:"\u9009\u62E9\u5B8C\u6574\u6307\u5357\u662F\u5426\u540C\u65F6\u6807\u8BB0\u5F53\u524D\u5C4F\u5E55\u4E0A\u7684\u5165\u53E3\u3002",tapPresentationLocal:"\u5C4F\u5E55\u5165\u53E3 + \u5B8C\u6574\u6307\u5357\uFF08\u9ED8\u8BA4\uFF09",tapPresentationGuide:"\u4EC5\u5B8C\u6574\u6307\u5357",prefixDisabled:"\u5DF2\u7981\u7528",fixed:"\u56FA\u5B9A\uFF08\u4E0D\u53EF\u91CD\u7ED1\u5B9A\uFF09\uFF1A{ids}\u3002",createHint:"\u8FD8\u6CA1\u6709\u8986\u76D6\u6587\u4EF6\u3002Rove \u53EF\u4EE5\u5E2E\u4F60\u5199\u4E00\u4EFD\u5E26\u5B8C\u6574\u6CE8\u91CA\u7684\u2014\u2014\u5728\u4F60\u53D6\u6D88\u6CE8\u91CA\u4E4B\u524D\u4E0D\u4F1A\u6539\u52A8\u4EFB\u4F55\u6309\u952E\u3002",createFile:"[enter] \u521B\u5EFA keybindings.yaml",overridesApplied:"\u5DF2\u5E94\u7528\u7684\u8986\u76D6",none:"\u65E0",unbound:"(\u5DF2\u89E3\u7ED1)",defaultKeys:"\u9ED8\u8BA4: {keys}",warnings:"\u8B66\u544A"},feedback:{title:"\u53CD\u9988",hint:"\u901A\u8FC7 `gh` \u5411 Rove \u4ED3\u5E93\u53D1\u4E00\u6761 GitHub Discussion\u3002\u9700\u8981 `gh auth login`\uFF1B\u5206\u7C7B\u9ED8\u8BA4\u4E3A Feedback\u3002",titleLabel:"\u6807\u9898",titlePlaceholder:"\u7B80\u77ED\u6982\u62EC",descriptionLabel:"\u63CF\u8FF0",descriptionPlaceholder:"\u53D1\u751F\u4E86\u4EC0\u4E48\uFF1F(enter \u6362\u884C \xB7 tab \u8DF3\u5230\u53D1\u9001)",send:"[enter] \u53D1\u9001\u5230 GitHub Discussions"},dev:{reset:"\u91CD\u7F6E UI \u72B6\u6001",resetHint:"\u6E05\u7A7A ~/.config/rove/state.json \u548C ~/.rove/tasks.json\uFF0C\u7136\u540E\u9000\u51FA Rove\u2014\u2014\u91CD\u65B0\u542F\u52A8\u5373\u53EF\u4ECE\u5934\u5F00\u59CB\u3002\u5DE5\u4F5C\u4F1A\u8BDD\u5217\u8868\u3001\u9762\u677F\u5C3A\u5BF8\u3001\u4E3B\u9898\u3001\u6A21\u578B\u9009\u62E9\u90FD\u4F1A\u91CD\u7F6E\u3002\u78C1\u76D8\u4E0A\u7684 worktree \u548C\u5F15\u64CE\u4F1A\u8BDD\u5386\u53F2\u4E0D\u53D7\u5F71\u54CD\u3002",resetButton:"[enter] \u91CD\u7F6E",restart:"\u91CD\u542F\u540E\u7AEF",restartHint:"\u505C\u6B62 Rove daemon \u5E76\u9000\u51FA\u5F53\u524D Rove \u7A97\u53E3\uFF0C\u4E0B\u6B21\u542F\u52A8\u4F1A\u62C9\u8D77\u4E00\u4E2A\u5168\u65B0\u7684 daemon\u2014\u2014\u65E0\u9700\u6740\u8FDB\u7A0B\u5373\u53EF\u5E94\u7528 daemon / orchestrator / engine \u7684\u6539\u52A8\u3002\u5176\u4ED6\u5DF2\u8FDE\u63A5\u7684 Rove \u7A97\u53E3\u4E5F\u4F1A\u65AD\u5F00\u8FDE\u63A5\u3002",restartButton:"[enter] \u91CD\u542F",doctorHint:"daemon \u5361\u4F4F\u6216\u65E0\u54CD\u5E94\uFF1F\u5728 shell \u91CC\u8FD0\u884C `rove daemon restart`\uFF0C\u7136\u540E\u91CD\u65B0\u542F\u52A8 Rove\u3002Hosted PTY \u5F15\u64CE\u4F1A\u8BDD\u4E0D\u4F1A\u56E0 daemon \u91CD\u542F\u800C\u9000\u51FA\u3002",experimental:"\u5B9E\u9A8C\u6027",remoteHint:"\u8FDC\u7A0B\u9879\u76EE\uFF08SSH\uFF09\uFF1A\u6CE8\u518C\u4E00\u4E2A git worktree + \u5F15\u64CE\u90FD\u901A\u8FC7 SSH \u8DD1\u5728\u53E6\u4E00\u53F0\u4E3B\u673A\u4E0A\u3001\u7531\u672C\u5730 Rove \u9A71\u52A8\u7684\u9879\u76EE\u3002\u5C1A\u672A\u5B8C\u6210\u2014\u2014\u6587\u4EF6/diff \u9762\u677F\u5BF9\u8FDC\u7A0B\u4ECD\u4F1A\u964D\u7EA7\u3002\u542F\u7528 `rove add --remote`\u3002",remote:"\u8FDC\u7A0B\u9879\u76EE",autoStatusHint:"\u81EA\u52A8\u72B6\u6001\u6D41\u8F6C\uFF1Abacklog \u4EFB\u52A1\u5728\u5176\u5F15\u64CE\u5F00\u59CB\u4E00\u8F6E\u65F6\u79FB\u5230 in_progress\uFF0C\u65B0\u4F1A\u8BDD\u4F1A\u62FF\u5230\u4E00\u6761\u7CFB\u7EDF\u63D0\u793A\uFF0C\u544A\u8BC9 agent \u5B8C\u6210\u540E\u81EA\u884C\u8BBE\u4E3A in_review\u3002\u7EDD\u4E0D\u89E6\u78B0 done/canceled\u3002",autoStatus:"\u81EA\u52A8\u72B6\u6001\u6D41\u8F6C",dispatcherHint:"\u73B0\u573A\u7B14\u8BB0\u8C03\u5EA6\u5668\uFF1A\u4EFB\u52A1\u4F1A\u8BDD\u63D0\u4EA4\u4E00\u884C\u7ECF\u9A8C\uFF08`rove api note`\uFF09\uFF0Cdaemon \u5C06\u6BCF\u6761\u8F6C\u53D1\u7ED9\u4ED3\u5E93\u7684\u4E3B\u4F1A\u8BDD\uFF0C\u4E3B\u4F1A\u8BDD\u518D\u628A\u5B83\u4EEC\u8F6C\u8FBE\u7ED9\u80FD\u53D7\u76CA\u7684\u8FDB\u884C\u4E2D\u4EFB\u52A1\uFF08`rove api dispatch`\uFF09\u3002\u76EE\u524D\u7531 Web \u6258\u7BA1\u7684\u4F1A\u8BDD\u4F1A\u6536\u5230\u8F6C\u8FBE\u3002",dispatcher:"\u73B0\u573A\u7B14\u8BB0\u8C03\u5EA6\u5668"}}});var Oh,jh;var Fh=h(()=>{Oh={nav:{workspace:"Workspace",kanban:"Kanban",automations:"Routines",issues:"Issues"},header:{projects:"PROJECTS",tasks:"TASKS",scratch:"SCRATCH"},search:{placeholder:"fuzzy filter"},menu:{open:"Open",openTab:"Open tab",closeTab:"Close tab",newChat:"New conversation",newShell:"New shell",newTask:"New task",rename:"Rename",pin:"Pin",unpin:"Unpin",reorder:"Reorder row",delete:"Delete"},moveChip:" move",recentJump:"Recent: {title}",empty:{noMatchSearch:"No matching tasks \u2014 esc to clear.",noActiveProject:"No active tasks for this project.",noActive:"No active tasks \u2014 create one above."},activity:{rateLimited:"rate limited",permissionNeeded:"needs permission",error:"error"},subtitle:{noTracking:"no activity tracking",materializing:"materializing",deleting:"deleting",deleteFailed:"delete failed"},hints:{headerFolded:"\u2500\u2500 keys ?\u25B8 \u2500\u2500",headerUnfolded:"\u2500\u2500 keys ?\u25BE \u2500\u2500",fullHelp:"full help",newTask:"new task",settings:"settings",open:"open",focusEngine:"focus engine",openWorktree:"open wt",delete:"delete",views:"views",project:"project",reorder:"reorder",done:"done"},reBranch:{title:"Set branch",fieldLabel:"branch",hintNoBranches:"(no local branches \u2014 type a new name)",hintNoMatch:"(no match \u2014 enter renames to this branch)",footer:"\u2191\u2193 pick \xB7 enter set \xB7 esc cancel"},toast:{noDaemonWorktree:"No daemon running \u2014 can't create the worktree",noDaemonOpen:"No daemon running \u2014 can't open this task",noEditor:"No editor found \u2014 set ROVE_OPEN_EDITOR (e.g. 'code', 'cursor', 'nvim')",openWorktreeFailed:"Couldn't open worktree with {label}",sessionStartFailed:"Couldn't start this task's session",moveTaskFailed:"Couldn't move task: {message}",alreadyLatest:"Already on the latest version (v{version})",worktreeErrorNotGit:"This project isn't a git repo yet \u2014 a task needs a git branch. Run `git init` (+ a first commit) in the project, then open the task. Non-git support is coming.",worktreeErrorGeneric:"Couldn't create the worktree: {message}",scratchAdopted:"Adopted into {repo} \u2014 save it as a project from New Task if you want it in the picker",scratchOpenFailed:"Couldn't open a scratch shell: {message}",scratchCloseFailed:"Couldn't close the scratch task: {message}",worktreeGoneTitle:'Worktree for "{title}" is gone',worktreeGoneBody:"Closed {count} tab(s). The branch {branch} is still there \u2014 reopen the task to re-create its worktree."}},jh={nav:{workspace:"\u5DE5\u4F5C\u533A",kanban:"\u770B\u677F",automations:"\u4F8B\u884C\u4EFB\u52A1",issues:"\u8BAE\u9898"},header:{projects:"\u9879\u76EE",tasks:"\u4EFB\u52A1",scratch:"\u4E34\u65F6"},search:{placeholder:"\u6A21\u7CCA\u641C\u7D22"},menu:{open:"\u6253\u5F00",openTab:"\u6253\u5F00\u8BE5\u6807\u7B7E\u9875",closeTab:"\u5173\u95ED\u8BE5\u6807\u7B7E\u9875",newChat:"\u65B0\u5EFA\u4F1A\u8BDD",newShell:"\u65B0\u5EFA\u7EC8\u7AEF",newTask:"\u65B0\u5EFA\u4EFB\u52A1",rename:"\u91CD\u547D\u540D",pin:"\u7F6E\u9876",unpin:"\u53D6\u6D88\u7F6E\u9876",reorder:"\u91CD\u65B0\u6392\u5E8F",delete:"\u5220\u9664"},moveChip:" \u79FB\u52A8",recentJump:"\u6700\u8FD1:{title}",empty:{noMatchSearch:"\u65E0\u5339\u914D\u4EFB\u52A1\u2014\u2014\u6309 esc \u6E05\u9664\u3002",noActiveProject:"\u8BE5\u9879\u76EE\u6682\u65E0\u6D3B\u8DC3\u4EFB\u52A1\u3002",noActive:"\u6682\u65E0\u6D3B\u8DC3\u4EFB\u52A1\u2014\u2014\u5728\u4E0A\u65B9\u65B0\u5EFA\u3002"},activity:{rateLimited:"\u8BF7\u6C42\u53D7\u9650",permissionNeeded:"\u7B49\u5F85\u6388\u6743",error:"\u9519\u8BEF"},subtitle:{noTracking:"\u4E0D\u8DDF\u8E2A\u6D3B\u52A8",materializing:"\u6B63\u5728\u521B\u5EFA worktree",deleting:"\u6B63\u5728\u5220\u9664",deleteFailed:"\u5220\u9664\u5931\u8D25"},hints:{headerFolded:"\u2500\u2500 \u5FEB\u6377\u952E ?\u25B8 \u2500\u2500",headerUnfolded:"\u2500\u2500 \u5FEB\u6377\u952E ?\u25BE \u2500\u2500",fullHelp:"\u5B8C\u6574\u5E2E\u52A9",newTask:"\u65B0\u5EFA\u4EFB\u52A1",settings:"\u8BBE\u7F6E",open:"\u6253\u5F00",focusEngine:"\u805A\u7126\u5F15\u64CE",openWorktree:"\u6253\u5F00 worktree",delete:"\u5220\u9664",views:"\u89C6\u56FE",project:"\u9879\u76EE",reorder:"\u91CD\u65B0\u6392\u5E8F",done:"\u5B8C\u6210"},reBranch:{title:"\u8BBE\u7F6E\u5206\u652F",fieldLabel:"\u5206\u652F",hintNoBranches:"\uFF08\u6CA1\u6709\u672C\u5730\u5206\u652F\u2014\u2014\u8F93\u5165\u65B0\u540D\u79F0\uFF09",hintNoMatch:"\uFF08\u65E0\u5339\u914D\u2014\u2014\u56DE\u8F66\u5C06\u5206\u652F\u91CD\u547D\u540D\u4E3A\u6B64\u540D\uFF09",footer:"\u2191\u2193 \u9009\u62E9 \xB7 enter \u8BBE\u7F6E \xB7 esc \u53D6\u6D88"},toast:{noDaemonWorktree:"\u5B88\u62A4\u8FDB\u7A0B\u672A\u8FD0\u884C\u2014\u2014\u65E0\u6CD5\u521B\u5EFA worktree",noDaemonOpen:"\u5B88\u62A4\u8FDB\u7A0B\u672A\u8FD0\u884C\u2014\u2014\u65E0\u6CD5\u6253\u5F00\u6B64\u4EFB\u52A1",noEditor:"\u672A\u627E\u5230\u7F16\u8F91\u5668\u2014\u2014\u8BF7\u8BBE\u7F6E ROVE_OPEN_EDITOR\uFF08\u5982 'code'\u3001'cursor'\u3001'nvim'\uFF09",openWorktreeFailed:"\u65E0\u6CD5\u7528 {label} \u6253\u5F00 worktree",sessionStartFailed:"\u65E0\u6CD5\u542F\u52A8\u6B64\u4EFB\u52A1\u7684\u4F1A\u8BDD",moveTaskFailed:"\u65E0\u6CD5\u79FB\u52A8\u4EFB\u52A1\uFF1A{message}",alreadyLatest:"\u5DF2\u662F\u6700\u65B0\u7248\u672C\uFF08v{version}\uFF09",worktreeErrorNotGit:"\u8BE5\u9879\u76EE\u5C1A\u975E git \u4ED3\u5E93\u2014\u2014\u4EFB\u52A1\u9700\u8981 git \u5206\u652F\u3002\u8BF7\u5728\u9879\u76EE\u4E2D\u6267\u884C `git init`\uFF08+ \u9996\u6B21\u63D0\u4EA4\uFF09\u540E\u518D\u6253\u5F00\u4EFB\u52A1\u3002\u975E git \u9879\u76EE\u7684\u652F\u6301\u5373\u5C06\u63A8\u51FA\u3002",worktreeErrorGeneric:"\u65E0\u6CD5\u521B\u5EFA worktree\uFF1A{message}",scratchAdopted:"\u5DF2\u5F52\u5165 {repo}\u2014\u2014\u82E5\u8981\u51FA\u73B0\u5728\u9879\u76EE\u9009\u62E9\u5668\u91CC,\u53EF\u5728\u65B0\u5EFA\u4EFB\u52A1\u4E2D\u4FDD\u5B58\u4E3A\u9879\u76EE",scratchOpenFailed:"\u65E0\u6CD5\u6253\u5F00\u4E34\u65F6 Shell:{message}",scratchCloseFailed:"\u65E0\u6CD5\u5173\u95ED\u4E34\u65F6\u4EFB\u52A1:{message}",worktreeGoneTitle:'"{title}" \u7684 worktree \u5DF2\u6D88\u5931',worktreeGoneBody:"\u5DF2\u5173\u95ED {count} \u4E2A\u6807\u7B7E\u9875\u3002\u5206\u652F {branch} \u4ECD\u5728\u2014\u2014\u91CD\u65B0\u6253\u5F00\u8BE5\u4EFB\u52A1\u4F1A\u91CD\u5EFA worktree\u3002"}}});var Lh,_h;var Ah=h(()=>{Lh={noTask:"(no task \u2014 press n to create)",exited:"process exited \u2014 F5 restarts it",restoring:"restoring session\u2026",tab:{groupTitle:"group {n}",renameTitle:"Rename tab",renameField:"tab title",renameSubmit:"rename",chooseEngineHint:"\u2190/\u2192 or h/l choose, enter confirm, esc cancel",newChat:{title:"New conversation",destLabel:"tab \u2014 destination: ",destTab:"new tab in this worktree",destFork:"fork a child task (new worktree)",ctxLabel:"ctrl+f \u2014 context: ",ctxFresh:"fresh conversation",ctxContinue:"continue this conversation",scratchChoice:"scratch shell"},cannotCloseLast:"Cannot close the only tab",nothingToFork:"No conversation in this tab to fork yet",noTranscriptToHandOff:"{engine} keeps no readable transcript to hand over"},split:{renameTitle:"Rename split",renameField:"split name"},scrolledBack:"\u2191 scrolled {lines}L (ctrl+pgdn to follow)",unavailable:{shellMissing:"terminal unavailable \u2014 configured shell is not available",spawnFailed:"terminal unavailable \u2014 shell could not start"},reset:{title:"Reset terminal?",body:"The running shell will be killed and a fresh one will spawn at the worktree. Any in-flight processes (vim, htop, paused jobs) end immediately."}},_h={noTask:"\uFF08\u65E0\u4EFB\u52A1 \u2014\u2014 \u6309 n \u521B\u5EFA\uFF09",exited:"\u8FDB\u7A0B\u5DF2\u9000\u51FA \u2014\u2014 \u6309 F5 \u91CD\u542F",restoring:"\u6B63\u5728\u6062\u590D\u4F1A\u8BDD\u2026",tab:{groupTitle:"group {n}",renameTitle:"\u91CD\u547D\u540D\u6807\u7B7E\u9875",renameField:"\u6807\u7B7E\u9875\u540D\u79F0",renameSubmit:"\u91CD\u547D\u540D",chooseEngineHint:"\u2190/\u2192 \u6216 h/l \u9009\u62E9\uFF0Center \u786E\u8BA4\uFF0Cesc \u53D6\u6D88",newChat:{title:"\u65B0\u5EFA\u5BF9\u8BDD",destLabel:"tab \u2014\u2014 \u843D\u70B9\uFF1A",destTab:"\u672C worktree \u65B0\u6807\u7B7E\u9875",destFork:"fork \u5B50\u4EFB\u52A1\uFF08\u65B0 worktree\uFF09",ctxLabel:"ctrl+f \u2014\u2014 \u4E0A\u4E0B\u6587\uFF1A",ctxFresh:"\u5168\u65B0\u5BF9\u8BDD",ctxContinue:"\u63A5\u7740\u5F53\u524D\u5BF9\u8BDD",scratchChoice:"\u4E34\u65F6 shell"},cannotCloseLast:"\u65E0\u6CD5\u5173\u95ED\u552F\u4E00\u7684\u6807\u7B7E\u9875",nothingToFork:"\u8FD9\u4E2A\u6807\u7B7E\u9875\u8FD8\u6CA1\u6709\u53EF\u6D3E\u751F\u7684\u5BF9\u8BDD",noTranscriptToHandOff:"{engine} \u6CA1\u6709\u53EF\u8BFB\u7684\u5BF9\u8BDD\u8BB0\u5F55\uFF0C\u65E0\u6CD5\u4EA4\u63A5"},split:{renameTitle:"\u91CD\u547D\u540D\u5206\u5C4F",renameField:"\u5206\u5C4F\u540D\u79F0"},scrolledBack:"\u2191 \u5DF2\u56DE\u6EDA {lines} \u884C\uFF08ctrl+pgdn \u56DE\u5230\u5E95\u90E8\uFF09",unavailable:{shellMissing:"\u7EC8\u7AEF\u4E0D\u53EF\u7528 \u2014\u2014 \u914D\u7F6E\u7684 shell \u4E0D\u5B58\u5728",spawnFailed:"\u7EC8\u7AEF\u4E0D\u53EF\u7528 \u2014\u2014 shell \u542F\u52A8\u5931\u8D25"},reset:{title:"\u91CD\u7F6E\u7EC8\u7AEF\uFF1F",body:"\u6B63\u5728\u8FD0\u884C\u7684 shell \u4F1A\u88AB\u6740\u6389\u5E76\u5728 worktree \u91CD\u65B0\u542F\u52A8\uFF0C\u8FDB\u884C\u4E2D\u7684\u8FDB\u7A0B\uFF08vim\u3001htop\u3001\u6682\u505C\u7684\u4EFB\u52A1\uFF09\u4F1A\u7ACB\u5373\u7ED3\u675F\u3002"}}});var Ch,Eh;var Rh=h(()=>{Ch={pageTitle:"ROVE UPDATE",current:"current",latest:"latest",releaseUrlUnavailable:"release URL unavailable",statusReleaseOpened:"Opened release page in your browser.",statusReleaseError:"Could not open release URL.",statusRunningUpdater:"Closing the TUI and running the updater in this terminal...",loadingNotes:"Loading release notes...",notesUnavailable:"Release notes are unavailable. Use Open release to view the GitHub release page.",changesSectionHeader:"\u2500\u2500 changes from v{from} to v{to} \u2500\u2500",updateComplete:"Rove update complete. Relaunch Rove to use the new version.",updateFailed:"Rove update failed with exit code {code}.",pressAnyKey:"Press any key to close this update window.",actions:{updateNow:"Update now",openRelease:"Open release",close:"Close",closeDetail:"return to the workspace"},skew:{title:"\u26A0 DAEMON OUT OF DATE",olderBuild:"an older build",hint:"daemon is {daemon} \u2014 you launched v{clientVersion}. Run `rove daemon restart`, then relaunch Rove"},versions:{pageTitle:"ROVE VERSIONS",loading:"Loading releases...",unavailable:"Could not fetch releases (offline or rate-limited).",tagCurrent:"current",tagLatest:"latest",tagBreaking:"breaking",breakingWarning:"\u26A0 installing this crosses breaking version(s) {versions} \u2014 run `rove reset` after the update.",footerHint:"j/k select \xB7 enter install \xB7 q close"}},Eh={pageTitle:"ROVE \u66F4\u65B0",current:"\u5F53\u524D",latest:"\u6700\u65B0",releaseUrlUnavailable:"\u53D1\u5E03\u94FE\u63A5\u4E0D\u53EF\u7528",statusReleaseOpened:"\u5DF2\u5728\u6D4F\u89C8\u5668\u4E2D\u6253\u5F00\u53D1\u5E03\u8BF4\u660E\u9875\u9762\u3002",statusReleaseError:"\u65E0\u6CD5\u6253\u5F00\u53D1\u5E03\u94FE\u63A5\u3002",statusRunningUpdater:"\u6B63\u5728\u5173\u95ED TUI\uFF0C\u5E76\u5728\u5F53\u524D\u7EC8\u7AEF\u4E2D\u8FD0\u884C\u66F4\u65B0\u7A0B\u5E8F\u2026\u2026",loadingNotes:"\u6B63\u5728\u52A0\u8F7D\u53D1\u5E03\u8BF4\u660E\u2026\u2026",notesUnavailable:"\u53D1\u5E03\u8BF4\u660E\u4E0D\u53EF\u7528\u3002\u8BF7\u4F7F\u7528\u300C\u6253\u5F00\u53D1\u5E03\u9875\u300D\u67E5\u770B GitHub \u53D1\u5E03\u9875\u9762\u3002",changesSectionHeader:"\u2500\u2500 v{from} \u81F3 v{to} \u7684\u53D8\u66F4 \u2500\u2500",updateComplete:"Rove \u66F4\u65B0\u5B8C\u6210\u3002\u8BF7\u91CD\u65B0\u542F\u52A8 Rove \u4EE5\u4F7F\u7528\u65B0\u7248\u672C\u3002",updateFailed:"Rove \u66F4\u65B0\u5931\u8D25\uFF0C\u9000\u51FA\u7801\u4E3A {code}\u3002",pressAnyKey:"\u6309\u4EFB\u610F\u952E\u5173\u95ED\u6B64\u66F4\u65B0\u7A97\u53E3\u3002",actions:{updateNow:"\u7ACB\u5373\u66F4\u65B0",openRelease:"\u6253\u5F00\u53D1\u5E03\u9875",close:"\u5173\u95ED",closeDetail:"\u8FD4\u56DE\u5DE5\u4F5C\u533A"},skew:{title:"\u26A0 DAEMON \u7248\u672C\u4E0D\u4E00\u81F4",olderBuild:"\u65E7\u7248\u672C\u6784\u5EFA",hint:"daemon \u8FD0\u884C\u7684\u662F {daemon}\uFF0C\u800C\u4F60\u542F\u52A8\u7684\u662F v{clientVersion}\u3002\u8BF7\u8FD0\u884C `rove daemon restart`\uFF0C\u7136\u540E\u91CD\u65B0\u542F\u52A8 Rove"},versions:{pageTitle:"ROVE \u7248\u672C\u5217\u8868",loading:"\u6B63\u5728\u52A0\u8F7D\u53D1\u5E03\u5217\u8868\u2026\u2026",unavailable:"\u65E0\u6CD5\u83B7\u53D6\u53D1\u5E03\u5217\u8868\uFF08\u79BB\u7EBF\u6216\u89E6\u53D1\u9650\u6D41\uFF09\u3002",tagCurrent:"\u5F53\u524D",tagLatest:"\u6700\u65B0",tagBreaking:"breaking",breakingWarning:"\u26A0 \u5B89\u88C5\u8BE5\u7248\u672C\u4F1A\u8DE8\u8FC7 breaking \u7248\u672C {versions}\u2014\u2014\u66F4\u65B0\u540E\u9700\u8FD0\u884C `rove reset`\u3002",footerHint:"j/k \u9009\u62E9 \xB7 enter \u5B89\u88C5 \xB7 q \u5173\u95ED"}}});var Th,Sh;var Ph=h(()=>{Th={title:"ISSUES",noRepo:"no project",empty:"No open issues.",assignedFilter:"assigned to me",starting:"Starting work on #{number}\u2026",startedNoEngine:"Created {title}, but its engine did not start.",errorHint:{noRemote:"Add a GitHub remote (`git remote add origin <url>`) and try again, or press q / esc to close.",ghMissing:"Install the `gh` CLI and authenticate, or press q / esc to close.",auth:"Run `gh auth login`, or press q / esc to close.",fallback:"{message} \xB7 press q / esc to close"}},Sh={title:"\u8BAE\u9898",noRepo:"\u65E0\u9879\u76EE",empty:"\u6CA1\u6709\u5F00\u653E\u7684\u8BAE\u9898\u3002",assignedFilter:"\u5206\u914D\u7ED9\u6211\u7684",starting:"\u6B63\u5728\u5F00\u59CB\u5904\u7406 #{number}\u2026",startedNoEngine:"\u5DF2\u521B\u5EFA {title}\uFF0C\u4F46\u5F15\u64CE\u6CA1\u6709\u542F\u52A8\u3002",errorHint:{noRemote:"\u6DFB\u52A0 GitHub remote\uFF08`git remote add origin <url>`\uFF09\u540E\u91CD\u8BD5\uFF0C\u6216\u6309 q / esc \u5173\u95ED\u3002",ghMissing:"\u5B89\u88C5 `gh` CLI \u5E76\u767B\u5F55\uFF0C\u6216\u6309 q / esc \u5173\u95ED\u3002",auth:"\u6267\u884C `gh auth login`\uFF0C\u6216\u6309 q / esc \u5173\u95ED\u3002",fallback:"{message} \xB7 \u6309 q / esc \u5173\u95ED"}}});var Ih,xh;var yh=h(()=>{Ih={quit:{confirmTitle:"Quit Rove?",confirmBody:"The daemon and task sessions keep running. This closes only the native workspace.",confirmLabel:"Quit"},empty:{selectTask:"Select a task with a worktree"},welcome:{title:"Welcome to Rove",tagline:"Run several AI coding sessions side by side \u2014 each task gets its own git worktree and branch.",worktreeExplain:"Each task creates its own git worktree directory and branch, so multiple AI sessions can edit the same codebase in parallel without colliding.",stepNew:"creates your first task \u2014 pick a repo, a base branch, an engine",stepHelp:"shows every shortcut reachable from the current focus",stepPrefix:"opens the command menu",enginesFound:"\u2713 engines: {list}",enginesMissing:"\u2717 no engine CLI found \u2014 install claude, codex, copilot, or kimi, then restart Rove",gitMissing:"\u2717 git not found on PATH \u2014 Rove needs git to create worktrees",doctorHint:"run `rove doctor` in a shell for the full diagnosis",docsHint:"docs: https://docs.rove.run"},attention:{none:"No available Inbox items"},inbox:{title:"INBOX",empty:"No pending attention",openHint:"enter open",deleteHint:"d delete",more:"+{count} more",section:{attention:"ATTENTION",recent:"RECENT"},state:{done:"done",needsInput:"needs input",error:"error",rateLimited:"rate limited",running:"running",promptDeferred:"message queued"},deferredToast:"Message queued \u2014 composer busy",deferredStillQueued:"Still typing? The queued message stays in the Inbox \u2014 open it again to send.",deferredUnavailable:"That tab isn't running \u2014 the queued message stays in the Inbox.",deferredInsertFailed:"Couldn't insert the queued message \u2014 it's still in the Inbox."},terminalComing:"Embedded terminal is starting..."},xh={quit:{confirmTitle:"\u9000\u51FA Rove\uFF1F",confirmBody:"\u5B88\u62A4\u8FDB\u7A0B\u548C\u4EFB\u52A1\u4F1A\u8BDD\u4F1A\u7EE7\u7EED\u8FD0\u884C\uFF0C\u8FD9\u91CC\u53EA\u5173\u95ED\u539F\u751F\u5DE5\u4F5C\u533A\u3002",confirmLabel:"\u9000\u51FA"},empty:{selectTask:"\u8BF7\u9009\u62E9\u4E00\u4E2A\u5E26 worktree \u7684\u4EFB\u52A1"},welcome:{title:"\u6B22\u8FCE\u4F7F\u7528 Rove",tagline:"\u5E76\u884C\u8FD0\u884C\u591A\u4E2A AI \u7F16\u7801\u4F1A\u8BDD\u2014\u2014\u6BCF\u4E2A\u4EFB\u52A1\u90FD\u6709\u81EA\u5DF1\u7684 git worktree \u548C\u5206\u652F\u3002",worktreeExplain:"\u6BCF\u4E2A\u4EFB\u52A1\u90FD\u4F1A\u521B\u5EFA\u72EC\u7ACB\u7684 git worktree \u76EE\u5F55\u548C\u5206\u652F\uFF0C\u591A\u4E2A AI \u4F1A\u8BDD\u53EF\u4EE5\u5E76\u884C\u4FEE\u6539\u540C\u4E00\u4EFD\u4EE3\u7801\u5E93\uFF0C\u4E92\u4E0D\u5E72\u6270\u3002",stepNew:"\u521B\u5EFA\u4F60\u7684\u7B2C\u4E00\u4E2A\u4EFB\u52A1\u2014\u2014\u9009\u4ED3\u5E93\u3001\u57FA\u7840\u5206\u652F\u548C\u5F15\u64CE",stepHelp:"\u67E5\u770B\u5F53\u524D\u7126\u70B9\u4E0B\u7684\u5168\u90E8\u5FEB\u6377\u952E",stepPrefix:"\u6253\u5F00\u547D\u4EE4\u83DC\u5355",enginesFound:"\u2713 \u5DF2\u68C0\u6D4B\u5230\u5F15\u64CE:{list}",enginesMissing:"\u2717 \u672A\u627E\u5230\u5F15\u64CE CLI\u2014\u2014\u8BF7\u5B89\u88C5 claude\u3001codex\u3001copilot \u6216 kimi \u540E\u91CD\u542F Rove",gitMissing:"\u2717 PATH \u4E0A\u6CA1\u6709 git\u2014\u2014Rove \u9700\u8981 git \u6765\u521B\u5EFA worktree",doctorHint:"\u5728 shell \u91CC\u8FD0\u884C `rove doctor` \u67E5\u770B\u5B8C\u6574\u8BCA\u65AD",docsHint:"\u6587\u6863:https://docs.rove.run"},attention:{none:"\u6536\u4EF6\u7BB1\u4E2D\u6CA1\u6709\u53EF\u6253\u5F00\u7684\u9879\u76EE"},inbox:{title:"\u6536\u4EF6\u7BB1",empty:"\u6682\u65E0\u5F85\u5904\u7406",openHint:"enter \u6253\u5F00",deleteHint:"d \u5220\u9664",more:"\u8FD8\u6709 {count} \u6761",section:{attention:"\u5F85\u5904\u7406",recent:"\u6700\u8FD1\u4F7F\u7528"},state:{done:"\u5B8C\u6210",needsInput:"\u9700\u8981\u8F93\u5165",error:"\u51FA\u9519",rateLimited:"\u9650\u6D41",running:"\u8FDB\u884C\u4E2D",promptDeferred:"\u6D88\u606F\u5DF2\u6392\u961F"},deferredToast:"\u6D88\u606F\u5DF2\u6392\u961F\u2014\u2014composer \u6B63\u5FD9",deferredStillQueued:"\u8FD8\u5728\u6253\u5B57\uFF1F\u6392\u961F\u7684\u6D88\u606F\u7559\u5728\u6536\u4EF6\u7BB1\u2014\u2014\u518D\u6253\u5F00\u4E00\u6B21\u5373\u53EF\u53D1\u9001\u3002",deferredUnavailable:"\u8BE5\u6807\u7B7E\u9875\u672A\u8FD0\u884C\u2014\u2014\u6392\u961F\u7684\u6D88\u606F\u7559\u5728\u6536\u4EF6\u7BB1\u3002",deferredInsertFailed:"\u65E0\u6CD5\u63D2\u5165\u6392\u961F\u7684\u6D88\u606F\u2014\u2014\u5B83\u4ECD\u5728\u6536\u4EF6\u7BB1\u4E2D\u3002"},terminalComing:"\u5D4C\u5165\u7EC8\u7AEF\u6B63\u5728\u542F\u52A8\u2026\u2026"}});var wh,vh;var fh=h(()=>{wh={title:"Worktrees",loading:"Loading worktrees\u2026",noProjects:"No local projects known to Rove yet.",noWorktrees:"No worktrees.",badge:{kobeManaged:"rove",dirty:"dirty",remoteOn:"on remote",remoteOff:"not pushed",remoteUnknown:"remote unknown"},verdict:{prOpen:"PR open",prMerged:"merged (PR)",inMain:"in main",prClosed:"PR closed",idle:"stale"},row:{detached:"(detached)",created:"created {age} ago",linkedTask:"task: {title}"},delete:{button:"Delete",confirmTitle:"Delete worktree?",confirmBody:'Delete the worktree for "{branch}"? This removes the working directory; the branch itself is kept.',forceTitle:"Force delete worktree?",forceBody:'"{branch}" has uncommitted or untracked changes that will be PERMANENTLY LOST. Force delete anyway?',failed:"Failed to delete worktree: {error}"},land:{button:"Land",confirmTitle:"Land branch?",confirmBody:`Merge "{branch}" into the base repo's current branch, then remove this worktree? The branch is kept. A dirty base checkout is refused; conflicts abort with a file list.`,noTask:"This worktree isn't tracked as a Rove task \u2014 nothing to land.",conflict:"Land hit conflicts (merge aborted). Resolve by hand: {files}",dirtyBase:"The base checkout has uncommitted changes \u2014 commit or stash them, then land.",failed:"Land failed: {error}",done:'Landed "{branch}" onto {landedOn} ({commit}).',worktreeKept:"Landed, but the worktree was kept: {reason}",worktreePathStale:"Landed and removed the worktree, but the task still points at it: {reason}"},hint:{}},vh={title:"\u5DE5\u4F5C\u6811",loading:"\u6B63\u5728\u52A0\u8F7D worktree\u2026",noProjects:"Rove \u8FD8\u6CA1\u6709\u5DF2\u77E5\u7684\u672C\u5730\u9879\u76EE\u3002",noWorktrees:"\u6CA1\u6709 worktree\u3002",badge:{kobeManaged:"rove",dirty:"\u6709\u6539\u52A8",remoteOn:"\u5DF2\u63A8\u9001",remoteOff:"\u672A\u63A8\u9001",remoteUnknown:"\u8FDC\u7AEF\u672A\u77E5"},verdict:{prOpen:"PR \u8BC4\u5BA1\u4E2D",prMerged:"\u5DF2\u5408\u5165 (PR)",inMain:"\u5DF2\u5728\u4E3B\u5206\u652F",prClosed:"PR \u5DF2\u5173\u95ED",idle:"\u9648\u65E7"},row:{detached:"(\u6E38\u79BB\u72B6\u6001)",created:"{age}\u524D\u521B\u5EFA",linkedTask:"\u4EFB\u52A1\uFF1A{title}"},delete:{button:"\u5220\u9664",confirmTitle:"\u5220\u9664 worktree\uFF1F",confirmBody:'\u786E\u5B9A\u5220\u9664 "{branch}" \u5BF9\u5E94\u7684 worktree\uFF1F\u5DE5\u4F5C\u76EE\u5F55\u4F1A\u88AB\u79FB\u9664\uFF0C\u5206\u652F\u672C\u8EAB\u4F1A\u4FDD\u7559\u3002',forceTitle:"\u5F3A\u5236\u5220\u9664 worktree\uFF1F",forceBody:'"{branch}" \u5B58\u5728\u672A\u63D0\u4EA4\u6216\u672A\u8DDF\u8E2A\u7684\u6539\u52A8\uFF0C\u5F3A\u5236\u5220\u9664\u540E\u5C06\u6C38\u4E45\u4E22\u5931\u3002\u4ECD\u8981\u5F3A\u5236\u5220\u9664\u5417\uFF1F',failed:"\u5220\u9664 worktree \u5931\u8D25\uFF1A{error}"},land:{button:"\u5408\u5165",confirmTitle:"\u5408\u5165\u5206\u652F\uFF1F",confirmBody:'\u628A "{branch}" \u5408\u5165\u57FA\u4ED3\u5E93\u5F53\u524D\u5206\u652F\uFF0C\u7136\u540E\u79FB\u9664\u8FD9\u4E2A worktree\uFF1F\u5206\u652F\u4F1A\u4FDD\u7559\u3002\u57FA\u7840\u68C0\u51FA\u6709\u672A\u63D0\u4EA4\u6539\u52A8\u4F1A\u88AB\u62D2\u7EDD\uFF1B\u51B2\u7A81\u4F1A\u4E2D\u6B62\u5E76\u7ED9\u51FA\u6587\u4EF6\u6E05\u5355\u3002',noTask:"\u8BE5 worktree \u672A\u4F5C\u4E3A Rove \u4EFB\u52A1\u88AB\u8DDF\u8E2A\u2014\u2014\u6CA1\u6709\u53EF\u5408\u5165\u7684\u5BF9\u8C61\u3002",conflict:"\u5408\u5165\u9047\u5230\u51B2\u7A81\uFF08\u5DF2\u4E2D\u6B62\uFF09\u3002\u8BF7\u624B\u52A8\u89E3\u51B3\uFF1A{files}",dirtyBase:"\u57FA\u7840\u68C0\u51FA\u6709\u672A\u63D0\u4EA4\u6539\u52A8\u2014\u2014\u8BF7\u5148\u63D0\u4EA4\u6216 stash\uFF0C\u518D\u5408\u5165\u3002",failed:"\u5408\u5165\u5931\u8D25\uFF1A{error}",done:'\u5DF2\u628A "{branch}" \u5408\u5165 {landedOn}\uFF08{commit}\uFF09\u3002',worktreeKept:"\u5DF2\u5408\u5165\uFF0C\u4F46 worktree \u4FDD\u7559\u4E86\uFF1A{reason}",worktreePathStale:"\u5DF2\u5408\u5165\u5E76\u79FB\u9664 worktree\uFF0C\u4F46\u4EFB\u52A1\u4ECD\u6307\u5411\u5B83\uFF1A{reason}"},hint:{}}});function j$(Z){return typeof Z==="string"&&bQ.some((X)=>X.id===Z)}var Sq0,Pq0,bQ,O$,gQ="en";var kQ=h(()=>{ym();fm();km();um();pm();nm();sm();em();Jh();Yh();qh();Kh();Mh();Dh();Fh();Ah();Rh();Ph();yh();fh();Sq0={settings:Nh,tasks:Oh,terminal:Lh,files:mm,newTask:zh,onboarding:Gh,ops:Hh,update:Ch,quickTask:Vh,help:cm,hints:dm,history:am,common:wm,keys:Zh,workspace:Ih,worktrees:wh,kanban:rm,automations:Im,workItems:Th,doctor:bm},Pq0={settings:Wh,tasks:jh,terminal:_h,files:hm,newTask:Qh,onboarding:$h,ops:Uh,update:Eh,quickTask:Bh,help:lm,hints:im,history:om,common:vm,keys:Xh,workspace:xh,worktrees:vh,kanban:tm,automations:xm,workItems:Sh,doctor:gm},bQ=[{id:"en",label:"English"},{id:"zh",label:"\u4E2D\u6587"}],O$={en:Sq0,zh:Pq0}});import{readFileSync as Iq0}from"fs";function $D(Z,X=Tm){try{let J=JSON.parse(Iq0(r2(),"utf8")),z=typeof J.activeTheme==="string"&&X(J.activeTheme)?J.activeTheme:Z,Q=J.transparentBackground!==!1,Y=typeof J.focusAccent==="string"&&dJ.includes(J.focusAccent)?J.focusAccent:null,G=j$(J[GD])?J[GD]:gQ;return{theme:z,transparent:Q,focusAccent:Y,locale:G}}catch{return{theme:Z,transparent:!0,focusAccent:null,locale:gQ}}}var GD="locale";var qD=h(()=>{T5();EK();kQ()});function xq0(Z){return Q3({foreground:xE(Z,"text","dark"),background:xE(Z,"background","dark")})??oZ}function HD(){let Z={...AK};for(let{name:z,theme:Q}of RK())Z[z]=Q;let X=$D(rZ,(z)=>Boolean(Z[z])),J=Z[X.theme]??Z[rZ];return J?xq0(J):oZ}var wE=h(()=>{sZ();EK();YD();qD()});function wq0(Z,X){let J=0,z=X.length-1,Q;if(Z<X[0][0]||Z>X[z][1])return!1;for(;z>=J;)if(Q=J+z>>1,Z>X[Q][1])J=Q+1;else if(Z<X[Q][0])z=Q-1;else return!0;return!1}function fE(Z){gq0(Z)||bq0.onUnexpectedError(Z)}function gq0(Z){return Z instanceof kq0?!0:Z instanceof Error&&Z.name===kE&&Z.message===kE}function mq0(Z,X){let J=this,z=!1,Q;return function(){if(z)return Q;if(z=!0,X)try{Q=Z.apply(J,arguments)}finally{X()}else Q=Z.apply(J,arguments);return Q}}function hq0(Z,X,J=0,z=Z.length){let Q=J,Y=z;for(;Q<Y;){let G=Math.floor((Q+Y)/2);X(Z[G])?Q=G+1:Y=G}return Q-1}function cq0(Z,X){return(J,z)=>X(Z(J),Z(z))}function pq0(Z,X){let J=Object.create(null);for(let z of Z){let Q=X(z),Y=J[Q];Y||(Y=J[Q]=[]),Y.push(z)}return J}function aq0(Z){F$=Z}function cE(Z){return F$?.trackDisposable(Z),Z}function lE(Z){F$?.markAsDisposed(Z)}function mE(Z,X){F$?.setParent(Z,X)}function oq0(Z,X){if(F$)for(let J of Z)F$.setParent(J,X)}function ih(Z){if(dh.is(Z)){let X=[];for(let J of Z)if(J)try{J.dispose()}catch(z){X.push(z)}if(X.length===1)throw X[0];if(X.length>1)throw AggregateError(X,"Encountered errors while disposing of store");return Array.isArray(Z)?[]:Z}else if(Z)return Z.dispose(),Z}function sq0(...Z){let X=nh(()=>ih(Z));return oq0(Z,X),X}function nh(Z){let X=cE({dispose:mq0(()=>{lE(X),Z()})});return X}function lh(Z,X){let J=0,z=X.length-1,Q;if(Z<X[0][0]||Z>X[z][1])return!1;for(;z>=J;)if(Q=J+z>>1,Z>X[Q][1])J=Q+1;else if(Z<X[Q][0])z=Q-1;else return!0;return!1}var vE,yq0,y7,vq0=class{constructor(){if(this.version="6",!y7){y7=new Uint8Array(65536),y7.fill(1),y7[0]=0,y7.fill(0,1,32),y7.fill(0,127,160),y7.fill(2,4352,4448),y7[9001]=2,y7[9002]=2,y7.fill(2,11904,42192),y7[12351]=1,y7.fill(2,44032,55204),y7.fill(2,63744,64256),y7.fill(2,65040,65050),y7.fill(2,65072,65136),y7.fill(2,65280,65377),y7.fill(2,65504,65511);for(let Z=0;Z<vE.length;++Z)y7.fill(0,vE[Z][0],vE[Z][1]+1)}}wcwidth(Z){return Z<32?0:Z<127?1:Z<65536?y7[Z]:wq0(Z,yq0)?0:Z>=131072&&Z<=196605||Z>=196608&&Z<=262141?2:1}charProperties(Z,X){let J=this.wcwidth(Z),z=J===0&&X!==0;if(z){let Q=VD.extractWidth(X);Q===0?z=!1:Q>J&&(J=Q)}return VD.createPropertyValue(0,J,z)}},fq0=class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(Z){setTimeout(()=>{throw Z.stack?bh.isErrorNoTelemetry(Z)?new bh(Z.message+`
|
|
302
|
+
`)}var pW=2,rk;var FE=h(()=>{s4();I2();Q5();a8();nW();rk=[{name:"pretty",type:"bool",description:"Pretty-print stdout JSON."},{name:"help",type:"bool",description:"Show usage for the verb and exit."}]});function Jm(Z){let X=Z.args.str("precheck");if(X===void 0)return{};if(X.length===0)return{precheck:null};return{precheck:{command:X,timeoutSeconds:Z.args.int("precheck-timeout")??120}}}var ek,Zm,Xm,zm;var Qm=h(()=>{E8();$8();ek={name:"schedule",type:"string",placeholder:"CRON",description:"Five-field cron in the daemon host's local time, e.g. '0 9 * * MON-FRI'."},Zm=[{name:"precheck",type:"string",placeholder:"CMD",description:"Shell command run in the repo BEFORE the engine starts. Non-zero exit skips the run without spawning an agent \u2014 the cheap way to avoid burning a turn when nothing changed."},{name:"precheck-timeout",type:"int",placeholder:"SEC",description:"Seconds before the precheck is killed and the run skipped (default 120)."}],Xm={name:"grace",type:"int",placeholder:"MIN",description:"How late a missed occurrence may still run when the daemon was down (default 60). Only the most recent missed occurrence is ever run."};zm=[{name:"routine-list",summary:"List scheduled routines with their next run time.",flags:[],handler:(Z)=>F4(Z,"automation.list",{})},{name:"routine-create",summary:"Schedule a prompt. Each firing creates a fresh task (worktree + engine) and delivers it. An enabled routine keeps the daemon alive so it fires with no TUI attached.",flags:[w1.repo(),{name:"name",type:"string",required:!0,placeholder:"N",description:"Routine name."},w1.prompt(!0,"Text delivered as the new session's first message."),{...ek,required:!0},w1.vendor(),{name:"base-branch",type:"string",placeholder:"B",description:"Base ref each run's worktree branches from."},...Zm,Xm,{name:"disabled",type:"bool",description:"Create it paused instead of active."}],handler:(Z)=>F4(Z,"automation.create",{repo:Z.args.requirePath("repo"),name:Z.args.require("name"),prompt:Z.args.require("prompt"),schedule:Z.args.require("schedule"),...Z.args.vendor()?{vendor:Z.args.vendor()}:{},...Z.args.str("base-branch")?{baseRef:Z.args.str("base-branch")}:{},...Jm(Z),...Z.args.int("grace")!==void 0?{missedRunGraceMinutes:Z.args.int("grace")}:{},...Z.args.bool("disabled")?{enabled:!1}:{}})},{name:"routine-update",summary:"Change a routine. A new --schedule re-anchors its next run; --precheck '' clears the precheck.",flags:[{name:"id",type:"string",required:!0,placeholder:"ID",description:"Routine id."},{name:"name",type:"string",placeholder:"N",description:"New name."},w1.prompt(!1,"New prompt."),ek,w1.vendor(),{name:"base-branch",type:"string",placeholder:"B",description:"New base ref ('' to clear)."},...Zm,Xm],handler:(Z)=>F4(Z,"automation.update",{id:Z.args.require("id"),...Z.args.str("name")!==void 0?{name:Z.args.str("name")}:{},...Z.args.str("prompt")!==void 0?{prompt:Z.args.str("prompt")}:{},...Z.args.str("schedule")!==void 0?{schedule:Z.args.str("schedule")}:{},...Z.args.vendor()?{vendor:Z.args.vendor()}:{},...Z.args.str("base-branch")!==void 0?{baseRef:Z.args.str("base-branch")}:{},...Jm(Z),...Z.args.int("grace")!==void 0?{missedRunGraceMinutes:Z.args.int("grace")}:{}})},{name:"routine-set-enabled",summary:"Pause or resume a routine. Disabling the last active one releases the daemon's keep-alive hold.",flags:[{name:"id",type:"string",required:!0,placeholder:"ID",description:"Routine id."},{name:"enabled",type:"bool",required:!0,description:"true to resume, false to pause."}],handler:(Z)=>F4(Z,"automation.update",{id:Z.args.require("id"),enabled:Z.args.bool("enabled")})},{name:"routine-delete",summary:"Delete a routine and its run history. Tasks it already created are untouched.",flags:[{name:"id",type:"string",required:!0,placeholder:"ID",description:"Routine id."}],handler:(Z)=>F4(Z,"automation.delete",{id:Z.args.require("id")})},{name:"routine-run-now",summary:"Run a routine immediately, skipping its precheck (asking for it IS the answer). Does not shift its schedule.",flags:[{name:"id",type:"string",required:!0,placeholder:"ID",description:"Routine id."}],handler:(Z)=>F4(Z,"automation.runNow",{id:Z.args.require("id")})},{name:"routine-runs",summary:"Run history, newest first. Statuses: dispatched, skipped_precheck (nothing to do), skipped_missed, skipped_unavailable, dispatch_failed.",flags:[{name:"id",type:"string",required:!0,placeholder:"ID",description:"Routine id."}],handler:(Z)=>F4(Z,"automation.runs",{id:Z.args.require("id")})}]});function i$0(Z,X){let J="",z=Z;for(let Q=X-1;Q>=0;Q--){let Y=z%32;J="0123456789ABCDEFGHJKMNPQRSTVWXYZ"[Y]+J,z=(z-Y)/32}return J}function Gm(Z){let X=new Uint8Array(Z);crypto.getRandomValues(X);let J=Array(Z);for(let z=0;z<Z;z++)J[z]=(X[z]??0)&31;return J}function n$0(Z){for(let X=Z.length-1;X>=0;X--){let J=Z[X]??0;if(J<31)return Z[X]=J+1,!0;Z[X]=0}return!1}function a$0(Z){let X="";for(let J of Z)X+="0123456789ABCDEFGHJKMNPQRSTVWXYZ"[J]??"0";return X}function jK(Z=Date.now()){let X,J;if(Z>LE)J=Z,X=Gm(16);else{J=LE;let z=Ym.slice();if(!n$0(z))X=Gm(16);else X=z}return LE=J,Ym=X,i$0(J,10)+a$0(X)}var LE=-1,Ym;var _E=h(()=>{Ym=Array(16).fill(0)});import{readFile as o$0,stat as s$0,unlink as $m}from"fs/promises";function qm(Z,X){return new Promise((J,z)=>{let Q=Z;Q.once("error",z),Z.listen(X,()=>{Q.removeListener("error",z),J()})})}async function nZ(Z){try{let X=await o$0(Z,"utf8"),J=Number(X.trim());return Number.isFinite(J)?J:null}catch{return null}}function Hm(Z){let X=Z.watchMs??r$0,J=null,z=!1,Q=null,Y=async()=>{try{let K=await s$0(Z.socketPath);return{dev:K.dev,ino:K.ino}}catch(K){return K.code==="ENOENT"?null:"error"}},G=()=>{if(Q)clearInterval(Q);Q=null},$=async()=>{if(J===null||z)return;let K=await Y();if(K==="error")return;if(K===null||K.dev!==J.dev||K.ino!==J.ino)z=!0},U=async()=>{if(J===null||z)return;if(await $(),!z)return;G(),Z.onLost()};return{async arm(){let K=await Y();if(K===null||K==="error")return;if(J=K,X>0)Q=setInterval(()=>void U(),X),Q.unref?.()},async release(K){if(G(),await $(),J!==null&&z){K.unref();return}await new Promise((M)=>K.close(()=>M())),await $m(Z.socketPath).catch(()=>{}),await $m(Z.pidPath).catch(()=>{})}}}var r$0=5000;var FK=()=>{};import{unlink as Um}from"fs/promises";function aW(Z){try{return process.kill(Z,0),!0}catch(X){return X.code==="EPERM"}}async function aZ(Z,X){let J=await nZ(X),z=J!==null&&J!==process.pid?J:null,Q=z!==null&&aW(z),Y=Q?"graceful":"absent",G=new a5(Z),$=G.request("daemon.stop").catch(()=>{return}),U=new Promise((K)=>setTimeout(K,2000));if(await Promise.race([$,U]),G.close(),Q&&z!==null){let K=Date.now()+5000,M=!1;while(Date.now()<K){try{process.kill(z,0)}catch{break}if(!M&&Date.now()-(K-5000)>2000){try{process.kill(z,"SIGTERM")}catch{}Y="sigterm",M=!0}await new Promise((D)=>setTimeout(D,50))}try{process.kill(z,0),process.kill(z,"SIGKILL"),Y="sigkill",await new Promise((D)=>setTimeout(D,100))}catch{}}return await Um(Z).catch(()=>{}),await Um(X).catch(()=>{}),{pid:J,method:Y}}var LK=h(()=>{g6();FK()});var jm={};o1(jm,{tryAcquireSpawnLock:()=>Om,testDaemonResponds:()=>uJ,spawnDetachedDaemon:()=>oW,resolveKobeSpawn:()=>sW,probeDaemonSocket:()=>cJ,ensureDaemonReachable:()=>W$,detachOptions:()=>Wm,connectOrStartDaemon:()=>lJ,connectIfRunning:()=>m9,autospawnDaemonEnv:()=>Dm});import{spawn as t$0}from"child_process";import{closeSync as Km,existsSync as e$0,mkdirSync as Vm,openSync as Bm,statSync as Zq0,unlinkSync as Mm}from"fs";import{dirname as AE,resolve as N$}from"path";import{fileURLToPath as Xq0}from"url";function Wm(Z=process.platform){return Z==="win32"?{windowsHide:!0}:{detached:!0}}function oW(Z,X,J,z){let Q="ignore",Y;try{Vm(AE(z),{recursive:!0}),Y=Bm(z,"a"),Q=["ignore",Y,Y]}catch{Q="ignore"}if(t$0(Z,[...X],{...Wm(),stdio:Q,env:J}).unref(),Y!==void 0)try{Km(Y)}catch{}}function Qq0(Z=process.env){return typeof Z.KOBE_TASK_ID==="string"&&Z.KOBE_TASK_ID!==""}function Dm(Z=process.env){let{KOBE_TASK_ID:X,KOBE_TAB_ID:J,KOBE_TUI:z,KOBE_TERMINAL_PTY:Q,ROVE_TASK_ID:Y,ROVE_TAB_ID:G,ROVE_TUI:$,ROVE_TERMINAL_PTY:U,...K}=Z;return{...K,KOBE_DAEMON_AUTOSPAWNED:"1",ROVE_DAEMON_AUTOSPAWNED:"1"}}function Om(Z,X=Yq0){let J=()=>{return Vm(AE(Z),{recursive:!0}),Km(Bm(Z,"wx")),!0};try{return J()}catch{try{if(Date.now()-Zq0(Z).mtimeMs<=X)return!1;return Mm(Z),J()}catch{return!1}}}async function W$(){let Z=G8(),X=await cJ(Z);if(X==="alive")return Z;if(X==="wedged"&&Qq0())throw Error(`rove: daemon at ${Z} is not answering hello (busy or wedged); not restarting it from inside an engine session \u2014 retry, or run \`rove daemon restart\` from a regular shell`);let J=`${X3()}.spawn-lock`;if(!Om(J)){let z=Date.now()+Gq0;while(Date.now()<z){if(await uJ(Z))return Z;await new Promise((Q)=>setTimeout(Q,150))}throw Error(`rove: another process is starting the daemon but it never became reachable at ${Z}; check ${b6()} or run \`rove doctor\``)}try{if(await cJ(Z)==="alive")return Z;let z=await nZ(X3());if(z!==null&&z!==process.pid&&aW(z)){let $=Date.now()+zq0;while(Date.now()<$){if(await new Promise((U)=>setTimeout(U,250)),await uJ(Z))return Z;if(!aW(z))break}}await aZ(Z,X3()).catch(()=>{});let[Q,...Y]=sW(Jq0);oW(Q,Y,Dm(),b6());let G=Date.now()+5000;while(Date.now()<G){if(await uJ(Z))return Z;await new Promise(($)=>setTimeout($,100))}throw Error(`rove: daemon did not start (or stayed wedged) at ${Z}; check ${b6()} or run \`rove doctor\``)}finally{try{Mm(J)}catch{}}}async function lJ(){let Z=await W$(),X=new a5(Z);return await X.connect(),X}async function m9(){let Z=G8();if(!await uJ(Z))return null;let X=new a5(Z);return await X.connect(),X}async function cJ(Z,X=Nm){let J=new a5(Z);try{await J.connect()}catch{return J.close(),"absent"}let z=J.request("hello",{protocolVersion:T2}).then(()=>!0).catch(()=>!0),Q,Y=new Promise(($)=>{Q=setTimeout(()=>$(!1),X)}),G=await Promise.race([z,Y]);if(Q)clearTimeout(Q);return J.close(),G?"alive":"wedged"}async function uJ(Z,X=Nm){return await cJ(Z,X)==="alive"}function sW(Z,X=process.env){let J=Xq0(import.meta.url);if(J.startsWith("/$bunfs")||J.startsWith("B:\\~BUN"))return[process.execPath,...Z];let z=AE(J),Q=X.ROVE_INVOKED_AS===p8?p8:w3,Y=[N$(z,`../cli/${Q}.ts`),N$(z,`../../../kobe/src/cli/${Q}.ts`),N$(z,`../cli/${Q}.js`),N$(z,"../cli/index.ts"),N$(z,"../../../kobe/src/cli/index.ts"),N$(z,"../cli/index.js")],G=Y.find(($)=>e$0($));if(G)return[process.execPath,G,...Z];throw Error(`${Q}: could not locate ${Q} entry near ${z}; checked ${Y.join(", ")}`)}var Jq0,Nm=3000,zq0=15000,Yq0=40000,Gq0=30000;var z3=h(()=>{LK();j7();o8();FK();g6();Jq0=["daemon","start"]});import{existsSync as Fm}from"fs";import{rename as $q0,rm as qq0}from"fs/promises";import{basename as Hq0,delimiter as Uq0,dirname as Lm,join as Kq0,resolve as CE}from"path";import{fileURLToPath as Vq0}from"url";function EE(Z=process.env,X=Fm,J=process.platform){let z=(Z.PATH??Z.Path??"").split(Uq0).filter((Y)=>Y.length>0),Q=J==="win32"?(Z.PATHEXT??".EXE;.CMD;.BAT").split(";").filter((Y)=>Y.length>0):[""];for(let Y of z)for(let G of Q){let $=Kq0(Y,`node${G}`);if(X($))return $}return null}async function Dq0(Z,X,J){let{build:z,rename:Q,discard:Y}=J??{build:(U)=>Bun.build(U),rename:$q0,discard:(U)=>qq0(U,{force:!0})},G=`${X}.${process.pid}.tmp`,$=await z({entrypoints:[Z],outdir:Lm(G),target:"node",format:"esm",naming:Hq0(G),external:["node-pty"]});if(!$.success)return await Y(G).catch(()=>{}),$;return await Q(G,X),$}async function Oq0(Z={}){let X=Z.platform??process.platform;if(X!=="win32")return null;let J=Z.moduleDir??Lm(Vq0(import.meta.url)),z=Z.exists??Fm,Q=Z.bundle??Dq0,Y=EE(Z.env??process.env,z,X);if(!Y)throw Error("Rove: the Windows PTY host runs under node, but no node was found on PATH. "+"Install Node.js (https://nodejs.org) and restart Rove \u2014 engine and terminal sessions cannot start without it.");let G=CE(J,Mq0);if(z(G))return[Y,G];let $=CE(J,Wq0);if(!z($))throw Error(`Rove: no Windows PTY host found (looked for ${G} and ${$})`);let U=CE(J,Nq0),K=await Q($,U);if(!K.success)throw Error(`Rove: could not build the Windows PTY host \u2014 ${K.logs.map(String).join("; ")}`);return[Y,U]}async function rW(){let Z=s8();if(await uJ(Z))return Z;await aZ(Z,uZ()).catch(()=>{});let[X,...J]=await Oq0()??sW(Bq0);oW(X??"",J,process.env,yQ());let z=Date.now()+5000;while(Date.now()<z){if(await uJ(Z))return Z;await new Promise((Q)=>setTimeout(Q,100))}throw Error(`rove: pty host did not start (or stayed wedged) at ${Z}`)}async function _m(Z,X){let J=s8(X),z=new a5(J);try{await z.connect(),await z.request("pty.sweep",{liveTaskIds:Z})}catch{}finally{z.close()}}async function Am(Z){let X=new a5(s8(Z));try{return await X.connect(),(await X.request("pty.list")).sessions?.some((z)=>z.alive===!0)??!1}catch{return!1}finally{X.close()}}var Bq0,Mq0="pty-host-node.mjs",Nq0="../../.cache/pty-host-node.mjs",Wq0="../daemon/pty-host-node-entry.ts";var _K=h(()=>{LK();j7();z3();g6();Bq0=["pty-host"]});function Em(Z){return typeof Z==="string"&&jq0.test(Z)?Z.toLowerCase():null}function Q3(Z){if(typeof Z!=="object"||Z===null||Array.isArray(Z))return null;let X=Z,J=Em(X.foreground),z=Em(X.background);return J&&z?{foreground:J,background:z}:null}function Fq0(Z){let X=Z.slice(1);return[X.slice(0,2),X.slice(2,4),X.slice(4,6)].map((J)=>J.repeat(2)).join("/")}function tW(Z,X){let J=Z===10?X.foreground:X.background;return`\x1B]${Z};rgb:${Fq0(J)}\x1B\\`}function Lq0(Z){let X=Cm[0].length+1,J=Math.max(0,Z.length-X);for(let z=J;z<Z.length;z++){let Q=Z.slice(z);if(Cm.some((Y)=>Y.startsWith(Q)||Q===`${Y}\x1B`))return Q}return""}function Rm(Z,X){let J=Z+X,z=[],Q=0;RE.lastIndex=0;for(let Y=RE.exec(J);Y;Y=RE.exec(J))z.push(Y[1]==="10"?10:11),Q=Y.index+Y[0].length;return{slots:z,carry:Lq0(J.slice(Q))}}var oZ,jq0,RE,Cm;var sZ=h(()=>{oZ={foreground:"#eae7df",background:"#141413"},jq0=/^#[0-9a-f]{6}$/i,RE=/\x1b\](10|11);\?(?:\x07|\x1b\\)/g,Cm=["\x1B]10;?","\x1B]11;?"]});var eW;var TE=h(()=>{eW={$schema:"https://opencode.ai/theme.json",defs:{darkBg:"#141413",darkBgRaised:"#1A1917",darkBgInset:"#2B2A27",darkBgMenu:"#33312E",darkBorderSubtle:"#2B2A27",darkBorder:"#3A3835",darkBorderActive:"#5C5853",darkText:"#EAE7DF",darkTextMuted:"#A9A39A",darkTextSubtle:"#6B665F",darkPrimary:"#CC785C",darkSecondary:"#D4967E",darkAccent:"#CC785C",darkAccentHover:"#E0AB96",darkRed:"#D47563",darkOrange:"#D97757",darkYellow:"#E8C96B",darkGreen:"#9ACA86",darkBlue:"#61AAF2",darkViolet:"#9B87F5",darkTerracotta:"#BF4D43",lightBg:"#FAF9F5",lightBgRaised:"#F0EEE6",lightBgInset:"#EAE7DF",lightBgMenu:"#E2DED4",lightBorderSubtle:"#EAE7DF",lightBorder:"#D9D5CC",lightBorderActive:"#A9A39A",lightText:"#1A1917",lightTextMuted:"#6B665F",lightTextSubtle:"#8D877D",lightPrimary:"#C96442",lightSecondary:"#B85F3D",lightAccent:"#CC785C",lightAccentHover:"#B85F3D",lightRed:"#A84B3A",lightOrange:"#C96442",lightYellow:"#8A6220",lightGreen:"#2E7C4C",lightBlue:"#207FDE",lightViolet:"#7B5BB6",lightTerracotta:"#BF4D43"},theme:{primary:{dark:"darkPrimary",light:"lightPrimary"},secondary:{dark:"darkSecondary",light:"lightSecondary"},accent:{dark:"darkAccent",light:"lightAccent"},error:{dark:"darkRed",light:"lightRed"},warning:{dark:"darkYellow",light:"lightYellow"},success:{dark:"darkGreen",light:"lightGreen"},info:{dark:"darkBlue",light:"lightBlue"},text:{dark:"darkText",light:"lightText"},textMuted:{dark:"darkTextMuted",light:"lightTextMuted"},background:{dark:"darkBg",light:"lightBg"},backgroundPanel:{dark:"darkBgRaised",light:"lightBgRaised"},backgroundElement:{dark:"darkBgInset",light:"lightBgInset"},backgroundMenu:{dark:"darkBgMenu",light:"lightBgMenu"},backgroundDialog:{dark:"darkBgRaised",light:"lightBgRaised"},border:{dark:"darkBorder",light:"lightBorder"},borderActive:{dark:"darkBorderActive",light:"lightBorderActive"},borderSubtle:{dark:"darkBorderSubtle",light:"lightBorderSubtle"},diffAdded:{dark:"darkGreen",light:"lightGreen"},diffRemoved:{dark:"darkRed",light:"lightRed"},diffContext:{dark:"darkTextMuted",light:"lightTextSubtle"},diffHunkHeader:{dark:"darkTextMuted",light:"lightTextSubtle"},diffHighlightAdded:{dark:"#B5E0A0",light:"#1F6638"},diffHighlightRemoved:{dark:"#E89180",light:"#8A3A2C"},diffAddedBg:{dark:"#1F2A1F",light:"#E5EEDF"},diffRemovedBg:{dark:"#2A1F1C",light:"#F5DAD3"},diffContextBg:{dark:"darkBgRaised",light:"lightBgRaised"},diffLineNumber:{dark:"darkTextSubtle",light:"lightTextSubtle"},diffAddedLineNumberBg:{dark:"#1A2419",light:"#D5E2CC"},diffRemovedLineNumberBg:{dark:"#241915",light:"#EBC8BE"},markdownText:{dark:"darkText",light:"lightText"},markdownHeading:{dark:"darkPrimary",light:"lightPrimary"},markdownLink:{dark:"darkAccent",light:"lightAccent"},markdownLinkText:{dark:"darkBlue",light:"lightBlue"},markdownCode:{dark:"darkSecondary",light:"lightSecondary"},markdownBlockQuote:{dark:"darkTextMuted",light:"lightTextMuted"},markdownEmph:{dark:"darkYellow",light:"lightYellow"},markdownStrong:{dark:"darkPrimary",light:"lightPrimary"},markdownHorizontalRule:{dark:"darkTextMuted",light:"lightTextMuted"},markdownListItem:{dark:"darkAccent",light:"lightAccent"},markdownListEnumeration:{dark:"darkBlue",light:"lightBlue"},markdownImage:{dark:"darkAccent",light:"lightAccent"},markdownImageText:{dark:"darkBlue",light:"lightBlue"},markdownCodeBlock:{dark:"darkText",light:"lightText"},markdownQuote:{dark:"darkTextMuted",light:"lightTextMuted"},syntaxComment:{dark:"darkTextSubtle",light:"lightTextSubtle"},syntaxKeyword:{dark:"darkPrimary",light:"lightPrimary"},syntaxFunction:{dark:"darkBlue",light:"lightBlue"},syntaxVariable:{dark:"darkText",light:"lightText"},syntaxString:{dark:"darkGreen",light:"lightGreen"},syntaxNumber:{dark:"darkOrange",light:"lightOrange"},syntaxType:{dark:"darkViolet",light:"lightViolet"},syntaxOperator:{dark:"darkSecondary",light:"lightSecondary"},syntaxPunctuation:{dark:"darkText",light:"lightText"},selectedListItemText:{dark:"darkBg",light:"lightBg"}}}});var ZD;var SE=h(()=>{ZD={$schema:"https://opencode.ai/theme.json",defs:{darkStep1:"#0a0a0a",darkStep2:"#111111",darkStep3:"#181818",darkStep4:"#1f1f1f",darkStep5:"#2a2a2a",darkStep6:"#363636",darkStep7:"#444444",darkStep8:"#5a5a5a",darkStep9:"#7a7a7a",darkStep10:"#9a9a9a",darkStep11:"#909090",darkStep12:"#e8e8e8",darkAccent:"#7da5c8",darkAccentBright:"#9bc3e3",darkRed:"#e06c75",darkOrange:"#d6a668",darkGreen:"#7fd88f",darkCyan:"#7da5c8",darkYellow:"#d6a668",lightStep1:"#fafafa",lightStep2:"#f3f3f3",lightStep3:"#ececec",lightStep4:"#e2e2e2",lightStep5:"#d4d4d4",lightStep6:"#bdbdbd",lightStep7:"#9c9c9c",lightStep8:"#7c7c7c",lightStep9:"#5b5b5b",lightStep10:"#404040",lightStep11:"#6c6c6c",lightStep12:"#1a1a1a",lightAccent:"#3d6f9f",lightAccentBright:"#1a4f87",lightRed:"#c9343a",lightOrange:"#a06b1a",lightGreen:"#3d9a57",lightCyan:"#3d6f9f",lightYellow:"#a06b1a"},theme:{primary:{dark:"darkStep12",light:"lightStep12"},secondary:{dark:"darkAccentBright",light:"lightAccentBright"},accent:{dark:"darkAccent",light:"lightAccent"},error:{dark:"darkRed",light:"lightRed"},warning:{dark:"darkOrange",light:"lightOrange"},success:{dark:"darkGreen",light:"lightGreen"},info:{dark:"darkCyan",light:"lightCyan"},text:{dark:"darkStep12",light:"lightStep12"},textMuted:{dark:"darkStep11",light:"lightStep11"},background:{dark:"darkStep1",light:"lightStep1"},backgroundPanel:{dark:"darkStep2",light:"lightStep2"},backgroundElement:{dark:"darkStep3",light:"lightStep3"},backgroundMenu:{dark:"darkStep4",light:"lightStep4"},border:{dark:"darkStep6",light:"lightStep6"},borderActive:{dark:"darkStep8",light:"lightStep8"},borderSubtle:{dark:"darkStep4",light:"lightStep4"},diffAdded:{dark:"#7fd88f",light:"#3d9a57"},diffRemoved:{dark:"#e06c75",light:"#c9343a"},diffContext:{dark:"darkStep10",light:"lightStep10"},diffHunkHeader:{dark:"darkStep10",light:"lightStep10"},diffHighlightAdded:{dark:"#9be5ad",light:"#2d7a3f"},diffHighlightRemoved:{dark:"#f08490",light:"#a82530"},diffAddedBg:{dark:"#15241a",light:"#d8efdc"},diffRemovedBg:{dark:"#2a1518",light:"#f5dadc"},diffContextBg:{dark:"darkStep2",light:"lightStep2"},diffLineNumber:{dark:"darkStep9",light:"lightStep9"},diffAddedLineNumberBg:{dark:"#0f1c14",light:"#c5deca"},diffRemovedLineNumberBg:{dark:"#221012",light:"#e5c5c8"},markdownText:{dark:"darkStep12",light:"lightStep12"},markdownHeading:{dark:"darkStep12",light:"lightStep12"},markdownLink:{dark:"darkAccent",light:"lightAccent"},markdownCode:{dark:"darkAccentBright",light:"lightAccentBright"},markdownCodeBlock:{dark:"darkStep12",light:"lightStep12"},markdownQuote:{dark:"darkStep11",light:"lightStep11"},selectedListItemText:{dark:"darkStep1",light:"lightStep1"}}}});var XD;var PE=h(()=>{XD={$schema:"https://opencode.ai/theme.json",defs:{darkStep1:"#1a1b26",darkStep2:"#1e2030",darkStep3:"#222436",darkStep4:"#292e42",darkStep5:"#3b4261",darkStep6:"#545c7e",darkStep7:"#737aa2",darkStep8:"#9099b2",darkStep9:"#82aaff",darkStep10:"#89b4fa",darkStep11:"#828bb8",darkStep12:"#c8d3f5",darkRed:"#ff757f",darkOrange:"#ff966c",darkYellow:"#ffc777",darkGreen:"#c3e88d",darkCyan:"#86e1fc",darkPurple:"#c099ff",lightStep1:"#e1e2e7",lightStep2:"#d5d6db",lightStep3:"#c8c9ce",lightStep4:"#b9bac1",lightStep5:"#a8aecb",lightStep6:"#9699a8",lightStep7:"#737a8c",lightStep8:"#5a607d",lightStep9:"#2e7de9",lightStep10:"#1a6ce7",lightStep11:"#8990a3",lightStep12:"#3760bf",lightRed:"#f52a65",lightOrange:"#b15c00",lightYellow:"#8c6c3e",lightGreen:"#587539",lightCyan:"#007197",lightPurple:"#9854f1"},theme:{primary:{dark:"darkStep9",light:"lightStep9"},secondary:{dark:"darkPurple",light:"lightPurple"},accent:{dark:"darkOrange",light:"lightOrange"},error:{dark:"darkRed",light:"lightRed"},warning:{dark:"darkOrange",light:"lightOrange"},success:{dark:"darkGreen",light:"lightGreen"},info:{dark:"darkStep9",light:"lightStep9"},text:{dark:"darkStep12",light:"lightStep12"},textMuted:{dark:"darkStep11",light:"lightStep11"},background:{dark:"darkStep1",light:"lightStep1"},backgroundPanel:{dark:"darkStep2",light:"lightStep2"},backgroundElement:{dark:"darkStep3",light:"lightStep3"},border:{dark:"darkStep7",light:"lightStep7"},borderActive:{dark:"darkStep8",light:"lightStep8"},borderSubtle:{dark:"darkStep6",light:"lightStep6"},diffAdded:{dark:"#4fd6be",light:"#1e725c"},diffRemoved:{dark:"#c53b53",light:"#c53b53"},diffContext:{dark:"#828bb8",light:"#7086b5"},diffHunkHeader:{dark:"#828bb8",light:"#7086b5"},diffHighlightAdded:{dark:"#b8db87",light:"#4db380"},diffHighlightRemoved:{dark:"#e26a75",light:"#f52a65"},diffAddedBg:{dark:"#20303b",light:"#d5e5d5"},diffRemovedBg:{dark:"#37222c",light:"#f7d8db"},diffContextBg:{dark:"darkStep2",light:"lightStep2"},diffLineNumber:{dark:"#8f909a",light:"#59595b"},diffAddedLineNumberBg:{dark:"#1b2b34",light:"#c5d5c5"},diffRemovedLineNumberBg:{dark:"#2d1f26",light:"#e7c8cb"},markdownText:{dark:"darkStep12",light:"lightStep12"},markdownHeading:{dark:"darkPurple",light:"lightPurple"},markdownLink:{dark:"darkStep9",light:"lightStep9"},markdownLinkText:{dark:"darkCyan",light:"lightCyan"},markdownCode:{dark:"darkGreen",light:"lightGreen"},markdownBlockQuote:{dark:"darkYellow",light:"lightYellow"},markdownEmph:{dark:"darkYellow",light:"lightYellow"},markdownStrong:{dark:"darkOrange",light:"lightOrange"},markdownHorizontalRule:{dark:"darkStep11",light:"lightStep11"},markdownListItem:{dark:"darkStep9",light:"lightStep9"},markdownListEnumeration:{dark:"darkCyan",light:"lightCyan"},markdownImage:{dark:"darkStep9",light:"lightStep9"},markdownImageText:{dark:"darkCyan",light:"lightCyan"},markdownCodeBlock:{dark:"darkStep12",light:"lightStep12"},syntaxComment:{dark:"darkStep11",light:"lightStep11"},syntaxKeyword:{dark:"darkPurple",light:"lightPurple"},syntaxFunction:{dark:"darkStep9",light:"lightStep9"},syntaxVariable:{dark:"darkRed",light:"lightRed"},syntaxString:{dark:"darkGreen",light:"lightGreen"},syntaxNumber:{dark:"darkOrange",light:"lightOrange"},syntaxType:{dark:"darkYellow",light:"lightYellow"},syntaxOperator:{dark:"darkCyan",light:"lightCyan"},syntaxPunctuation:{dark:"darkStep12",light:"lightStep12"}}}});var JD;var IE=h(()=>{TE();SE();PE();JD={claude:eW,conductor:ZD,tokyonight:XD}});import{RGBA as pJ}from"@opentui/core";function Tm(Z){return Boolean(AK[Z])}function CK(Z,X="dark"){let J=Z.defs??{};function z(U,K=[]){if(typeof U==="string"){if(U==="transparent"||U==="none")return pJ.fromInts(0,0,0,0);if(U.startsWith("#"))return pJ.fromHex(U);if(K.includes(U))return pJ.fromInts(0,0,0);let M=J[U]??Z.theme[U];if(M===void 0)return pJ.fromInts(0,0,0);return z(M,[...K,U])}return z(U[X],K)}let Q={};for(let[U,K]of Object.entries(Z.theme))Q[U]=z(K);let Y=Q.text??pJ.fromHex("#ffffff"),G=Q.background??pJ.fromHex("#000000");return{...{primary:Q.primary??Y,secondary:Q.secondary??Y,accent:Q.accent??Q.primary??Y,error:Q.error??Y,warning:Q.warning??Y,success:Q.success??Y,info:Q.info??Y,text:Y,textMuted:Q.textMuted??Y,background:G,backgroundPanel:Q.backgroundPanel??G,backgroundElement:Q.backgroundElement??G,backgroundMenu:Q.backgroundMenu??Q.backgroundElement??G,backgroundDialog:Q.backgroundDialog??Q.backgroundPanel??G,border:Q.border??Y,borderActive:Q.borderActive??Q.border??Y,borderSubtle:Q.borderSubtle??Q.border??Y,diffAdded:Q.diffAdded??Q.success??Y,diffRemoved:Q.diffRemoved??Q.error??Y,diffContext:Q.diffContext??Q.textMuted??Y,diffHunkHeader:Q.diffHunkHeader??Q.textMuted??Y,diffAddedBg:Q.diffAddedBg??G,diffRemovedBg:Q.diffRemovedBg??G,selectedListItemText:Q.selectedListItemText??G},...Q}}function Sm(Z,X,J){let z={...Z,focusAccent:Z[X]??Z.primary};if(!J)return z;let[Q,Y,G]=Z.background.toInts(),[$,U,K]=Z.backgroundPanel.toInts();return{...z,background:pJ.fromInts(Q,Y,G,0),backgroundPanel:pJ.fromInts($,U,K,0)}}var AK,rZ="claude",dJ;var EK=h(()=>{IE();AK=JD;dJ=["primary","success","info"]});function Eq0(Z){let X=/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/.exec(Z);if(!X)return null;let J=X[1];if(J.length===3){let[z,Q,Y]=J;return`#${z}${z}${Q}${Q}${Y}${Y}`.toLowerCase()}return`#${J.slice(0,6)}`.toLowerCase()}function xE(Z,X,J="dark"){let z=Z.defs??{};function Q(G,$){if(typeof G==="string"){if(G==="transparent"||G==="none")return null;if(G.startsWith("#"))return Eq0(G);if($.includes(G))return null;let K=z[G]??Z.theme[G];if(K===void 0)return null;return Q(K,[...$,G])}if(!G||typeof G!=="object")return null;let U=G[J];return typeof U==="string"?Q(U,$):null}let Y=Z.theme[X];if(Y===void 0)return null;return Q(Y,[X])}function zD(Z){return typeof Z==="object"&&Z!==null&&!Array.isArray(Z)}function QD(Z){if(!zD(Z))return{ok:!1,reason:"theme must be a JSON object at the top level"};let X=Z;if(!("theme"in X))return{ok:!1,reason:"missing required key `theme`"};let J=X.theme;if(!zD(J))return{ok:!1,reason:"`theme` must be an object map"};if("defs"in X&&X.defs!==void 0){if(!zD(X.defs))return{ok:!1,reason:"`defs` must be an object map"};for(let[z,Q]of Object.entries(X.defs))if(typeof Q!=="string")return{ok:!1,reason:`defs.${z} must be a string (hex like "#abc" or a ref name)`}}for(let[z,Q]of Object.entries(J)){if(typeof Q==="string")continue;if(!zD(Q))return{ok:!1,reason:`theme.${z} must be a string or a { dark, light } object (got ${Q===null?"null":Array.isArray(Q)?"array":typeof Q})`};let Y=Q;if(typeof Y.dark!=="string")return{ok:!1,reason:`theme.${z}.dark must be a string`};if(typeof Y.light!=="string")return{ok:!1,reason:`theme.${z}.light must be a string`}}if("$schema"in X&&X.$schema!==void 0&&typeof X.$schema!=="string")return{ok:!1,reason:"`$schema` must be a string when present"};return{ok:!0,theme:X}}var yE=()=>{};import{readFileSync as Rq0,readdirSync as Tq0}from"fs";import{join as Pm}from"path";function D$(){return Pm(W7(),"themes")}function RK(){let Z=D$(),X;try{X=Tq0(Z)}catch{return[]}let J=[];for(let z of X){if(!z.endsWith(".json"))continue;let Q=Pm(Z,z),Y;try{let U=Rq0(Q,"utf8");Y=JSON.parse(U)}catch(U){let K=J1(U);console.warn(`[rove] skipping user theme ${Q}: invalid JSON \u2014 ${K}`);continue}let G=QD(Y);if(!G.ok){console.warn(`[rove] skipping user theme ${Q}: ${G.reason}`);continue}let $=z.slice(0,-5);J.push({name:$,theme:G.theme})}return J}var YD=h(()=>{T5();yE()});var Im,xm;var ym=h(()=>{Im={title:"ROUTINES",holdingDaemon:"keeping the daemon awake",notHolding:"none active",paused:"paused",newTitle:"New routine",fieldName:"name",fieldRepo:"repo",fieldPrompt:"prompt",fieldSchedule:"schedule (five-field cron)",namePlaceholder:"weekday dependency audit",promptPlaceholder:"Audit dependencies and summarize risky changes.",needRepo:"Open a project first \u2014 a routine runs in one.",cronInvalid:"not a five-field cron",cronField:{minute:"min",hour:"hour",dayOfMonth:"day",month:"month",dayOfWeek:"weekday"},cronNever:"valid, but never fires",missing:{name:"Give it a name.",repo:"Pick a project.",prompt:"Say what it should do.",schedule:"That schedule will not run."},empty:"No routines scheduled.",emptyHint:"Press n to create one.",precheck:"precheck: {command}",recentRuns:"RECENT RUNS",noRuns:"Not run yet.",noSelection:"A routine runs its prompt in a project on a schedule.",running:"Running {name}\u2026",ranWith:"{name}: {status}",runNow:"[ run now ]",runNowHint:"try it without waiting for the schedule",deleteTitle:"Delete routine?",deleteBody:"{name} and its run history will be removed. Tasks it already created are untouched.",deleteButton:"Delete"},xm={title:"\u4F8B\u884C\u4EFB\u52A1",holdingDaemon:"\u6B63\u5728\u4FDD\u6301\u5B88\u62A4\u8FDB\u7A0B\u5E38\u9A7B",notHolding:"\u65E0\u542F\u7528\u9879",paused:"\u5DF2\u6682\u505C",newTitle:"\u65B0\u5EFA\u4F8B\u884C\u4EFB\u52A1",fieldName:"\u540D\u79F0",fieldRepo:"\u4ED3\u5E93",fieldPrompt:"\u63D0\u793A\u8BCD",fieldSchedule:"\u8C03\u5EA6\uFF08\u4E94\u6BB5 cron\uFF09",namePlaceholder:"\u5DE5\u4F5C\u65E5\u4F9D\u8D56\u5BA1\u8BA1",promptPlaceholder:"\u5BA1\u8BA1\u4F9D\u8D56\u5E76\u603B\u7ED3\u6709\u98CE\u9669\u7684\u53D8\u66F4\u3002",needRepo:"\u5148\u6253\u5F00\u4E00\u4E2A\u9879\u76EE\u2014\u2014\u4F8B\u884C\u4EFB\u52A1\u8981\u8DD1\u5728\u67D0\u4E2A\u9879\u76EE\u91CC\u3002",cronInvalid:"\u4E0D\u662F\u5408\u6CD5\u7684\u4E94\u6BB5 cron",cronField:{minute:"\u5206",hour:"\u65F6",dayOfMonth:"\u65E5",month:"\u6708",dayOfWeek:"\u661F\u671F"},cronNever:"\u8BED\u6CD5\u5408\u6CD5\uFF0C\u4F46\u6C38\u8FDC\u4E0D\u4F1A\u89E6\u53D1",missing:{name:"\u8D77\u4E2A\u540D\u5B57\u3002",repo:"\u9009\u4E00\u4E2A\u9879\u76EE\u3002",prompt:"\u8BF4\u660E\u5B83\u8981\u505A\u4EC0\u4E48\u3002",schedule:"\u8FD9\u4E2A\u8C03\u5EA6\u4E0D\u4F1A\u89E6\u53D1\u3002"},empty:"\u8FD8\u6CA1\u6709\u4F8B\u884C\u4EFB\u52A1\u3002",emptyHint:"\u6309 n \u65B0\u5EFA\u4E00\u6761\u3002",precheck:"\u9884\u68C0\uFF1A{command}",recentRuns:"\u6700\u8FD1\u6267\u884C",noRuns:"\u5C1A\u672A\u6267\u884C\u3002",noSelection:"\u4F8B\u884C\u4EFB\u52A1\u4F1A\u6309\u8C03\u5EA6\u5728\u67D0\u4E2A\u9879\u76EE\u91CC\u8DD1\u5B83\u7684\u63D0\u793A\u8BCD\u3002",running:"\u6B63\u5728\u8FD0\u884C {name}\u2026",ranWith:"{name}\uFF1A{status}",runNow:"[ \u7ACB\u5373\u8FD0\u884C ]",runNowHint:"\u4E0D\u7B49\u8C03\u5EA6\uFF0C\u76F4\u63A5\u8BD5\u4E00\u6B21",deleteTitle:"\u5220\u9664\u8FD9\u6761\u4F8B\u884C\u4EFB\u52A1\uFF1F",deleteBody:"\u5C06\u5220\u9664 {name} \u53CA\u5176\u6267\u884C\u8BB0\u5F55\u3002\u5B83\u5DF2\u7ECF\u521B\u5EFA\u7684\u4EFB\u52A1\u4E0D\u53D7\u5F71\u54CD\u3002",deleteButton:"\u5220\u9664"}});var wm,vm;var fm=h(()=>{wm={cancel:"Cancel",next:"next",create:"create",confirm:"Confirm",paneCrash:{title:"This pane crashed",hint:"Reload it from the Tasks pane (the error was logged to client.log)."},rename:{defaultTitle:"Rename task",defaultFieldLabel:"title",footerHint:"enter {submitLabel} \xB7 esc cancel",defaultSubmitLabel:"rename"},prompt:{fieldLabel:"input",submitLabel:"submit"}},vm={cancel:"\u53D6\u6D88",next:"\u4E0B\u4E00\u6B65",create:"\u521B\u5EFA",confirm:"\u786E\u8BA4",paneCrash:{title:"\u6B64\u9762\u677F\u5DF2\u5D29\u6E83",hint:"\u8BF7\u4ECE\u4EFB\u52A1\u9762\u677F\u91CD\u65B0\u52A0\u8F7D\uFF08\u9519\u8BEF\u5DF2\u8BB0\u5F55\u5230 client.log\uFF09\u3002"},rename:{defaultTitle:"\u91CD\u547D\u540D\u4EFB\u52A1",defaultFieldLabel:"\u540D\u79F0",footerHint:"enter {submitLabel} \xB7 esc \u53D6\u6D88",defaultSubmitLabel:"\u91CD\u547D\u540D"},prompt:{fieldLabel:"\u8F93\u5165",submitLabel:"\u63D0\u4EA4"}}});var bm,gm;var km=h(()=>{bm={fix:{hint:"{count} finding(s) above have a known fix \u2014 run `{command}` to review them one by one",none:"fix: nothing to fix \u2014 no known remediation applies to this report",header:"fixes \u2014 each one asks before running:",willRun:"will run: {command}",confirmPrompt:"apply this fix? [y/N] ",done:"\u2713 done",failed:"\u2717 exited with code {code}",skipped:"\xB7 skipped",nonInteractive:"no interactive terminal \u2014 nothing was executed; run the commands above yourself",manualHeader:"manual steps \u2014 doctor prints these but never runs them:",daemonRestartWhy:"safe to run: engine sessions live in the separate PTY host and survive a daemon restart",daemonStale:"restart the daemon \u2014 it is running an older build than this CLI",daemonDown:"start the daemon \u2014 it is not running",hooksDown:"restart the daemon to re-establish the engine hook channel",inspectStale:"restart the daemon \u2014 it predates the hook-channel check",skillInstallWhy:"safe to run: installs skill files only; re-running is idempotent",skillMissing:"install the Rove agent skill",skillStale:"update the Rove agent skill to the version this build expects",resetWhy:"stops the daemon, the PTY host, and every live session \u2014 not undoable, so doctor only prints it",resetDaemonWedged:"the daemon process is alive but unreachable (wedged)",resetPty:"the PTY host is unreachable or not running",resetLegacy:"pre-v0.8 tmux sessions are still holding processes and memory",engineTabs:"engine tabs may hold a stale daemon socket path",engineTabsAction:"close and reopen the affected engine tabs in the TUI",engineTabsWhy:"kills that tab's live engine session \u2014 your call, not doctor's",humanOnlyWhy:"doctor does not install software or log in to accounts for you",git:"git is not on PATH",gitAction:"install git with your OS package manager",noEngine:"no usable engine \u2014 no engine CLI is both installed and logged in",noEngineAction:"install the claude, codex, or copilot CLI and log in",windowsNode:"Node.js is missing \u2014 the Windows PTY host cannot start",windowsNodeAction:"install Node.js from https://nodejs.org"}},gm={fix:{hint:"\u4E0A\u9762\u6709 {count} \u9879\u53D1\u73B0\u5B58\u5728\u5DF2\u77E5\u4FEE\u6CD5 \u2014 \u8FD0\u884C `{command}` \u9010\u6761\u67E5\u770B",none:"fix: \u65E0\u53EF\u4FEE\u9879 \u2014 \u672C\u6B21\u62A5\u544A\u6CA1\u6709\u5339\u914D\u5230\u5DF2\u77E5\u4FEE\u6CD5",header:"\u4FEE\u590D\u9879 \u2014 \u6BCF\u4E00\u6761\u90FD\u4F1A\u5148\u8BE2\u95EE\u518D\u6267\u884C:",willRun:"\u5C06\u6267\u884C: {command}",confirmPrompt:"\u6267\u884C\u8FD9\u6761\u4FEE\u590D\u5417? [y/N] ",done:"\u2713 \u5B8C\u6210",failed:"\u2717 \u9000\u51FA\u7801 {code}",skipped:"\xB7 \u5DF2\u8DF3\u8FC7",nonInteractive:"\u6CA1\u6709\u4EA4\u4E92\u7EC8\u7AEF \u2014 \u672A\u6267\u884C\u4EFB\u4F55\u547D\u4EE4; \u8BF7\u81EA\u884C\u8FD0\u884C\u4E0A\u9762\u7684\u547D\u4EE4",manualHeader:"\u4EBA\u5DE5\u6B65\u9AA4 \u2014 doctor \u53EA\u6253\u5370, \u6C38\u8FDC\u4E0D\u4F1A\u66FF\u4F60\u6267\u884C:",daemonRestartWhy:"\u53EF\u5B89\u5168\u6267\u884C: \u5F15\u64CE\u4F1A\u8BDD\u5728\u72EC\u7ACB\u7684 PTY host \u91CC, daemon \u91CD\u542F\u540E\u4ECD\u7136\u5B58\u6D3B",daemonStale:"\u91CD\u542F daemon \u2014 \u5B83\u8FD0\u884C\u7684\u6784\u5EFA\u6BD4\u5F53\u524D CLI \u65E7",daemonDown:"\u542F\u52A8 daemon \u2014 \u5B83\u5F53\u524D\u6CA1\u6709\u5728\u8FD0\u884C",hooksDown:"\u91CD\u542F daemon \u4EE5\u91CD\u5EFA\u5F15\u64CE hook \u901A\u9053",inspectStale:"\u91CD\u542F daemon \u2014 \u5B83\u7684\u7248\u672C\u65E9\u4E8E hook \u901A\u9053\u68C0\u67E5",skillInstallWhy:"\u53EF\u5B89\u5168\u6267\u884C: \u53EA\u5199\u5165 skill \u6587\u4EF6; \u91CD\u590D\u8FD0\u884C\u662F\u5E42\u7B49\u7684",skillMissing:"\u5B89\u88C5 Rove agent skill",skillStale:"\u628A Rove agent skill \u66F4\u65B0\u5230\u5F53\u524D\u6784\u5EFA\u671F\u671B\u7684\u7248\u672C",resetWhy:"\u4F1A\u505C\u6389 daemon\u3001PTY host \u548C\u6240\u6709\u6D3B\u52A8\u4F1A\u8BDD \u2014 \u4E0D\u53EF\u64A4\u9500, \u6240\u4EE5 doctor \u53EA\u6253\u5370",resetDaemonWedged:"daemon \u8FDB\u7A0B\u5B58\u6D3B\u4F46\u65E0\u6CD5\u8FDE\u63A5 (\u5361\u6B7B)",resetPty:"PTY host \u65E0\u6CD5\u8FDE\u63A5\u6216\u6CA1\u6709\u5728\u8FD0\u884C",resetLegacy:"v0.8 \u4E4B\u524D\u7684 tmux \u4F1A\u8BDD\u4ECD\u5360\u7528\u8FDB\u7A0B\u548C\u5185\u5B58",engineTabs:"\u5F15\u64CE tab \u53EF\u80FD\u6301\u6709\u8FC7\u671F\u7684 daemon socket \u8DEF\u5F84",engineTabsAction:"\u5728 TUI \u91CC\u5173\u95ED\u5E76\u91CD\u5F00\u53D7\u5F71\u54CD\u7684\u5F15\u64CE tab",engineTabsWhy:"\u4F1A\u6740\u6389\u8BE5 tab \u7684\u6D3B\u52A8\u5F15\u64CE\u4F1A\u8BDD \u2014 \u7531\u4F60\u51B3\u5B9A, doctor \u4E0D\u4EE3\u52B3",humanOnlyWhy:"doctor \u4E0D\u4F1A\u66FF\u4F60\u5B89\u88C5\u8F6F\u4EF6\u6216\u767B\u5F55\u8D26\u53F7",git:"PATH \u4E0A\u627E\u4E0D\u5230 git",gitAction:"\u7528\u4F60\u7684\u7CFB\u7EDF\u5305\u7BA1\u7406\u5668\u5B89\u88C5 git",noEngine:"\u6CA1\u6709\u53EF\u7528\u5F15\u64CE \u2014 \u6CA1\u6709\u4EFB\u4F55\u5F15\u64CE CLI \u540C\u65F6\u6EE1\u8DB3\u5DF2\u5B89\u88C5\u4E14\u5DF2\u767B\u5F55",noEngineAction:"\u5B89\u88C5 claude\u3001codex \u6216 copilot CLI \u5E76\u767B\u5F55",windowsNode:"\u7F3A\u5C11 Node.js \u2014 Windows PTY host \u65E0\u6CD5\u542F\u52A8",windowsNodeAction:"\u4ECE https://nodejs.org \u5B89\u88C5 Node.js"}}});var mm,hm;var um=h(()=>{mm={tabs:{all:"All",changes:"Changes"},actions:{zen:"Zen",createPR:"Ask agent to create PR"},legend:{changes:"M modified \xB7 A added \xB7 D deleted \xB7 ? untracked"},scope:{working:"scope: working tree",branch:"scope: vs {base}",toggleHint:"b to toggle"},empty:{noTask:"(no task \u2014 press n to create)",noFiles:"(empty worktree)",noChanges:"(no changes \u2014 clean worktree)"},error:{retryHint:"press r to retry",notGitRepo:"not a git repository",pathMissing:"worktree path is missing",permissionDenied:"permission denied",gitNotInstalled:"git is not installed",gitFailed:"git command failed"},toast:{prOnTargetBranch:"Already on the target branch ({branch}) \u2014 ask the agent to create the PR from a task branch"}},hm={tabs:{all:"\u5168\u90E8",changes:"\u6539\u52A8"},actions:{zen:"\u4E13\u6CE8\u6A21\u5F0F",createPR:"\u8BA9 agent \u521B\u5EFA PR"},legend:{changes:"M \u5DF2\u4FEE\u6539 \xB7 A \u5DF2\u6DFB\u52A0 \xB7 D \u5DF2\u5220\u9664 \xB7 ? \u672A\u8DDF\u8E2A"},scope:{working:"\u8303\u56F4\uFF1A\u5DE5\u4F5C\u533A\u6539\u52A8",branch:"\u8303\u56F4\uFF1A\u5BF9\u6BD4 {base}",toggleHint:"\u6309 b \u5207\u6362"},empty:{noTask:"\uFF08\u6682\u65E0\u4EFB\u52A1 \u2014 \u6309 n \u521B\u5EFA\uFF09",noFiles:"\uFF08worktree \u4E3A\u7A7A\uFF09",noChanges:"\uFF08\u65E0\u6539\u52A8 \u2014 worktree \u5E72\u51C0\uFF09"},error:{retryHint:"\u6309 r \u91CD\u8BD5",notGitRepo:"\u4E0D\u662F git \u4ED3\u5E93",pathMissing:"worktree \u8DEF\u5F84\u4E0D\u5B58\u5728",permissionDenied:"\u6743\u9650\u4E0D\u8DB3",gitNotInstalled:"\u672A\u5B89\u88C5 git",gitFailed:"git \u547D\u4EE4\u5931\u8D25"},toast:{prOnTargetBranch:"\u5F53\u524D\u5C31\u5728\u76EE\u6807\u5206\u652F\uFF08{branch}\uFF09\u2014 \u8BF7\u5728\u4EFB\u52A1\u5206\u652F\u4E0A\u8BA9 agent \u521B\u5EFA PR"}}});var cm,lm;var pm=h(()=>{cm={title:"Rove \u2014 keybindings",esc:"esc",commandLayer:"{prefix} \u2014 more Rove commands",escCancel:"esc cancel",focused:"Focused: {surface}",allBindings:"All keybinding contexts",grammar:"Use keys here \xB7 one-press Rove shortcuts \xB7 {prefix} for more commands",disabled:"prefix disabled",here:"HERE \u2014 only in {surface}",direct:"ONE PRESS \u2014 Rove shortcuts",afterPrefix:"AFTER PREFIX \u2014 more Rove commands",otherPane:"OTHER PANE \u2014 {surface}"},lm={title:"Rove \u2014 \u5FEB\u6377\u952E",esc:"esc",commandLayer:"{prefix} \u2014 \u66F4\u591A Rove \u547D\u4EE4",escCancel:"esc \u53D6\u6D88",focused:"\u5F53\u524D\u7126\u70B9\uFF1A{surface}",allBindings:"\u6240\u6709\u5FEB\u6377\u952E\u4E0A\u4E0B\u6587",grammar:"\u5F53\u524D\u533A\u57DF\u76F4\u63A5\u6309 \xB7 Rove \u5355\u6B21\u5FEB\u6377\u952E \xB7 {prefix} \u6253\u5F00\u66F4\u591A\u547D\u4EE4",disabled:"Prefix \u5DF2\u7981\u7528",here:"\u5F53\u524D\u533A\u57DF \u2014 \u4EC5\u5728{surface}",direct:"\u4E00\u6B21\u6309\u4E0B \u2014 Rove \u5FEB\u6377\u952E",afterPrefix:"\u6309\u4E0B Prefix \u540E \u2014 \u66F4\u591A Rove \u547D\u4EE4",otherPane:"\u5176\u4ED6\u533A\u57DF \u2014 {surface}"}});var dm,im;var nm=h(()=>{dm={status:{commands:"{key} commands",help:"{key} help",sidebar:"{key} sidebar",settings:"settings"},pane:{move:"move",open:"open",collapse:"collapse",diff:"diff"}},im={status:{commands:"{key} \u547D\u4EE4",help:"{key} \u5E2E\u52A9",sidebar:"{key} \u4FA7\u680F",settings:"\u8BBE\u7F6E"},pane:{move:"\u79FB\u52A8",open:"\u6253\u5F00",collapse:"\u6298\u53E0",diff:"\u5DEE\u5F02"}}});var am,om;var sm=h(()=>{am={empty:"No engine history for this task.",loading:"loading\u2026",earlier:"\u2026 {count} earlier messages",sessionLabel:"Session",liveTag:"\u25CF LIVE",hint:"[ ] session \xB7 j/k scroll \xB7 \u23CE expand",hintExpanded:"[ ] session \xB7 j/k scroll \xB7 \u23CE collapse",role:{user:"USER",assistant:"ASSISTANT",system:"SYSTEM"},thinking:"thinking"},om={empty:"\u6B64\u4EFB\u52A1\u6CA1\u6709\u5F15\u64CE\u5386\u53F2\u8BB0\u5F55\u3002",loading:"\u52A0\u8F7D\u4E2D\u2026",earlier:"\u2026 \u4E4B\u524D\u8FD8\u6709 {count} \u6761\u6D88\u606F",sessionLabel:"\u4F1A\u8BDD",liveTag:"\u25CF \u5B9E\u65F6",hint:"[ ] \u4F1A\u8BDD \xB7 j/k \u6EDA\u52A8 \xB7 \u23CE \u5C55\u5F00",hintExpanded:"[ ] \u4F1A\u8BDD \xB7 j/k \u6EDA\u52A8 \xB7 \u23CE \u6536\u8D77",role:{user:"\u7528\u6237",assistant:"\u52A9\u624B",system:"\u7CFB\u7EDF"},thinking:"\u601D\u8003"}});var rm,tm;var em=h(()=>{rm={title:"Kanban",hint:"tab project \xB7 \u2190\u2193\u2191\u2192 card \xB7 enter detail \xB7 n new \xB7 d delete \xB7 r refresh \xB7 esc close",loading:"Loading issues\u2026",noRepos:"No projects yet \u2014 create a task first.",empty:"No issues \u2014 agents file them via `rove api issue-create`.",columnEmpty:"No cards",column:{backlog:"Backlog",inProgress:"In progress",parked:"Parked",done:"Done"},more:"+{count} more",attention:"{count} need you",turnComplete:"turn done",detail:{status:{open:"open",doing:"doing",hold:"hold",done:"done"},created:"created {date}",linked:"linked to a session",titleLabel:"TITLE",description:"DESCRIPTION",noDescription:"No description.",attachHint:"paste a path / ctrl+v screenshot \u2192 inserts an image placeholder",engine:"ENGINE",workspace:"WORKSPACE",placement:{worktree:"New worktree task \u2014 its own workspace",projectWorktree:"New worktree \u2014 as a chattab in the project workspace",project:"Project checkout \u2014 a new chattab, no worktree"},jumpLabel:"AFTER START",jump:{stay:"Stay on the board",follow:"Jump to the session"},startLegend:"enter/ctrl+enter start \xB7 tab fields \xB7 \u2190\u2192 engine \xB7 \u2191\u2193 workspace \xB7 esc save & close",sessionLabel:"SESSION",openAction:"Open the linked session \u21B5",openLegend:"enter/ctrl+enter open the linked session \xB7 tab fields \xB7 esc save & close",eventsLabel:"EVENTS",eventsLoading:"Loading events\u2026",eventsNone:"No engine events recorded yet.",doneNote:"Done stories have nothing left to start \xB7 esc save & close",startedBackground:"Started in background: {title}",newStory:"NEW STORY",createLegend:"ctrl+s save \xB7 enter/ctrl+enter save & start \xB7 tab fields \xB7 esc cancel"},confirmDelete:{title:"Delete story #{id}?",body:"\u201C{title}\u201D will be removed from the tracker. A linked task, branch, or worktree is left untouched."}},tm={title:"\u770B\u677F",hint:"tab \u5207\u9879\u76EE \xB7 \u2190\u2193\u2191\u2192 \u9009\u5361\u7247 \xB7 enter \u8BE6\u60C5 \xB7 n \u65B0\u5EFA \xB7 d \u5220\u9664 \xB7 r \u5237\u65B0 \xB7 esc \u5173\u95ED",loading:"\u6B63\u5728\u52A0\u8F7D issues\u2026",noRepos:"\u8FD8\u6CA1\u6709\u9879\u76EE\u2014\u2014\u5148\u521B\u5EFA\u4E00\u4E2A\u4EFB\u52A1\u3002",empty:"\u6682\u65E0 issue\u2014\u2014agent \u53EF\u901A\u8FC7 `rove api issue-create` \u521B\u5EFA\u3002",columnEmpty:"\u6682\u65E0\u5361\u7247",column:{backlog:"\u5F85\u529E",inProgress:"\u8FDB\u884C\u4E2D",parked:"\u6401\u7F6E",done:"\u5DF2\u5B8C\u6210"},more:"\u8FD8\u6709 {count} \u6761",attention:"{count} \u5F20\u7B49\u4F60\u5904\u7406",turnComplete:"\u56DE\u5408\u5B8C\u6210",detail:{status:{open:"\u5F85\u529E",doing:"\u8FDB\u884C\u4E2D",hold:"\u6401\u7F6E",done:"\u5DF2\u5B8C\u6210"},created:"\u521B\u5EFA\u4E8E {date}",linked:"\u5DF2\u5173\u8054\u4F1A\u8BDD",titleLabel:"\u6807\u9898",description:"\u63CF\u8FF0",noDescription:"\u6682\u65E0\u63CF\u8FF0\u3002",attachHint:"\u7C98\u8D34\u8DEF\u5F84 / ctrl+v \u8D34\u622A\u56FE \u2192 \u63D2\u5165\u56FE\u7247\u5360\u4F4D\u884C",engine:"\u5F15\u64CE",workspace:"\u5DE5\u4F5C\u533A",placement:{worktree:"\u65B0\u5EFA worktree \u4EFB\u52A1\u2014\u2014\u72EC\u7ACB\u5DE5\u4F5C\u533A",projectWorktree:"\u65B0\u5EFA worktree\u2014\u2014\u4F5C\u4E3A\u9879\u76EE\u5DE5\u4F5C\u533A\u91CC\u7684 chattab",project:"\u9879\u76EE\u4E3B\u76EE\u5F55\u2014\u2014\u65B0\u5F00 chattab,\u4E0D\u5EFA worktree"},jumpLabel:"\u542F\u52A8\u540E",jump:{stay:"\u7559\u5728\u770B\u677F",follow:"\u8DF3\u8F6C\u5230\u4F1A\u8BDD"},startLegend:"enter/ctrl+enter \u542F\u52A8 \xB7 tab \u5207\u5B57\u6BB5 \xB7 \u2190\u2192 \u5F15\u64CE \xB7 \u2191\u2193 \u5DE5\u4F5C\u533A \xB7 esc \u4FDD\u5B58\u5173\u95ED",sessionLabel:"\u4F1A\u8BDD",openAction:"\u6253\u5F00\u5173\u8054\u4F1A\u8BDD \u21B5",openLegend:"enter/ctrl+enter \u6253\u5F00\u5DF2\u5173\u8054\u4F1A\u8BDD \xB7 tab \u5207\u5B57\u6BB5 \xB7 esc \u4FDD\u5B58\u5173\u95ED",eventsLabel:"\u4E8B\u4EF6",eventsLoading:"\u6B63\u5728\u52A0\u8F7D\u4E8B\u4EF6\u2026",eventsNone:"\u6682\u65E0\u5F15\u64CE\u4E8B\u4EF6\u8BB0\u5F55\u3002",doneNote:"\u5DF2\u5B8C\u6210\u7684 story \u65E0\u9700\u542F\u52A8 \xB7 esc \u4FDD\u5B58\u5173\u95ED",startedBackground:"\u5DF2\u5728\u540E\u53F0\u542F\u52A8:{title}",newStory:"\u65B0\u5EFA STORY",createLegend:"ctrl+s \u4EC5\u4FDD\u5B58 \xB7 enter/ctrl+enter \u4FDD\u5B58\u5E76\u542F\u52A8 \xB7 tab \u5207\u5B57\u6BB5 \xB7 esc \u53D6\u6D88"},confirmDelete:{title:"\u5220\u9664 story #{id}?",body:"\u300C{title}\u300D\u5C06\u4ECE tracker \u4E2D\u79FB\u9664\u3002\u5DF2\u5173\u8054\u7684\u4EFB\u52A1\u3001\u5206\u652F\u3001worktree \u4E0D\u53D7\u5F71\u54CD\u3002"}}});var Zh,Xh;var Jh=h(()=>{Zh={category:{Global:"Global",Sidebar:"Sidebar",Workspace:"Workspace",Navigation:"Navigation","Tasks pane":"Tasks pane",Files:"Files",Terminal:"Terminal",Dialog:"Dialog",Views:"Views",Tasks:"Tasks",Sessions:"Sessions",Attention:"Attention",Tools:"Tools"},desc:{"help.open":"Show keybindings help","task.new":"New task","task.openEditor":"Open active Task directory in editor","task.moveMode":"Reorder sidebar rows (then j/k \u2014 tab, task, or project)","settings.open":"Open settings","settings.open.sidebar":"Open settings","inbox.show":"Open attention Inbox","worktrees.open.sidebar":"Open worktrees","kanban.open":"Open kanban (issues board)","automations.open":"Open routines (scheduled tasks)","workItems.open":"Open GitHub issues (external tracker)","app.quit":"Quit (with confirm)","focus.sidebar":"Back to sidebar (tasks)","focus.previous":"Focus previous pane (files \u2192 workspace \u2192 sidebar)","focus.next":"Focus next pane (sidebar \u2192 workspace \u2192 files)","workspace.zenToggle":"Toggle zen mode","attention.next":"Jump to the next attention item","chat.interrupt":"Interrupt current turn (esc while streaming)","sidebar.nav":"Move cursor up/down","sidebar.select":"Open the selected task","sidebar.tree.open":"Open the row under the cursor","sidebar.goto":"Top / bottom of list (gg or shift-G)","sidebar.rename":"Rename task","sidebar.localMerge":"Reorder row (Shift+M, then j/k \u2014 tab, task, or project)","sidebar.pin":"Pin / unpin task at top (Shift+P)","sidebar.sort":"Switch task sort (default \u2194 recent)","sidebar.delete":"Delete task (with confirm)","sidebar.search.enter":"Search tasks (fuzzy filter)","sidebar.search.nav":"Move highlight in search results","sidebar.search.submit":"Select search match and exit search","sidebar.search.cancel":"Cancel search (restore prior selection)","tasks.openWorktree":"Open selected Task directory in your editor","tasks.renameBranch":"Rename the selected task's git branch","tasks.cycleEngine":"Cycle engine vendor \u2014 applies on reopen","tasks.update":"Open the update page (when a new version is available)","tasks.focusEngine":"Focus the engine pane of the current window","tasks.jump":"Jump to the task showing that digit","chat.send":"Send message (composer)","chat.newline":"Newline in composer","chat.cycle-mode":"Cycle permission mode (composer)","chat.steer":"Steer (interrupt + send) \u2014 mid-stream only","chat.tab.new":"New chat tab","chat.tab.chooseEngine":"New conversation \u2014 engine/shell picker with destination + context toggles","chat.tab.fork":"Fork this chat into a new tab (same Task directory, keeps the conversation)","chat.fork.new":"Quick-fork: create child task seeded with current repo/branch/model","chat.tab.close":"Close chat tab","chat.tab.rename":"Rename active chat tab","chat.tab.cycle-next":"Next chat tab","chat.tab.cycle-prev":"Previous chat tab","workspace.split.right":"Split right","workspace.split.down":"Split down","workspace.split.focus-next":"Focus next split","workspace.split.close":"Close active split (tab when unsplit)","workspace.split.rename":"Rename active split (tab when unsplit)","files.nav":"Move cursor up/down","files.hierarchy":"Collapse / expand tree level","files.open":"Open file in configured editor (diff when supported)","files.tab":"Switch tab (cycle All / Changes)","files.refresh":"Refresh","files.scope":"Toggle Changes scope (working \u2194 branch vs base)","files.diff":"Open a read-only diff in a workspace tab","files.openExternal":"Open file in system default app (audio / video / pdf preview)","files.mention":"Inject @<path> mention into the engine pane","files.createPR":"Ask the agent to create a PR from the current task","diff.review.cursor":"Move the line cursor over the diff","diff.review.range":"Toggle range anchor at the cursor","diff.review.note":"Add a review note at the cursor","diff.review.send":"Send all unsent review notes to the engine","inbox.nav":"Move through attention items","inbox.open":"Open the selected attention item","inbox.delete":"Clear the selected attention item","terminal.scroll-up":"Scroll scrollback up","terminal.scroll-down":"Scroll scrollback down","terminal.reset":"Reset terminal \u2014 kill the current shell and respawn","dialog.cancel":"Close the top dialog (esc)","dialog.newtask.tab.cycle":"Switch New Task tab (Existing / New Repo)"}},Xh={category:{Global:"\u5168\u5C40",Sidebar:"\u4FA7\u8FB9\u680F",Workspace:"\u5DE5\u4F5C\u533A",Navigation:"\u5BFC\u822A","Tasks pane":"\u4EFB\u52A1\u9762\u677F",Files:"\u6587\u4EF6",Terminal:"\u7EC8\u7AEF",Dialog:"\u5BF9\u8BDD\u6846",Views:"\u89C6\u56FE",Tasks:"\u4EFB\u52A1",Sessions:"\u4F1A\u8BDD",Attention:"\u63D0\u9192",Tools:"\u5DE5\u5177"},desc:{"help.open":"\u663E\u793A\u5FEB\u6377\u952E\u5E2E\u52A9","task.new":"\u65B0\u5EFA\u4EFB\u52A1","task.openEditor":"\u5728\u7F16\u8F91\u5668\u4E2D\u6253\u5F00\u5F53\u524D Task \u7684\u76EE\u5F55","task.moveMode":"\u8C03\u6574\u4FA7\u8FB9\u680F\u884C\u987A\u5E8F\uFF08\u7136\u540E j/k\u2014\u2014tab / \u4EFB\u52A1 / \u9879\u76EE\uFF09","settings.open":"\u6253\u5F00\u8BBE\u7F6E","settings.open.sidebar":"\u6253\u5F00\u8BBE\u7F6E","inbox.show":"\u6253\u5F00\u63D0\u9192\u6536\u4EF6\u7BB1","worktrees.open.sidebar":"\u6253\u5F00 worktrees","kanban.open":"\u6253\u5F00\u770B\u677F\uFF08issues\uFF09","automations.open":"\u6253\u5F00\u4F8B\u884C\u4EFB\u52A1\uFF08\u5B9A\u65F6\u4EFB\u52A1\uFF09","workItems.open":"\u6253\u5F00 GitHub issues\uFF08\u5916\u90E8\u8DDF\u8E2A\u5668\uFF09","app.quit":"\u9000\u51FA\uFF08\u9700\u786E\u8BA4\uFF09","focus.sidebar":"\u8FD4\u56DE\u4FA7\u8FB9\u680F\uFF08\u4EFB\u52A1\u5217\u8868\uFF09","focus.previous":"\u805A\u7126\u4E0A\u4E00\u4E2A\u9762\u677F\uFF08\u6587\u4EF6 \u2192 \u5DE5\u4F5C\u533A \u2192 \u4FA7\u8FB9\u680F\uFF09","focus.next":"\u805A\u7126\u4E0B\u4E00\u4E2A\u9762\u677F\uFF08\u4FA7\u8FB9\u680F \u2192 \u5DE5\u4F5C\u533A \u2192 \u6587\u4EF6\uFF09","workspace.zenToggle":"\u5207\u6362\u7985\u6A21\u5F0F","attention.next":"\u8DF3\u5230\u4E0B\u4E00\u4E2A\u9700\u8981\u6CE8\u610F\u7684\u9879\u76EE","chat.interrupt":"\u4E2D\u65AD\u5F53\u524D\u8F6E\u6B21\uFF08\u6D41\u5F0F\u8F93\u51FA\u4E2D\u6309 esc\uFF09","sidebar.nav":"\u4E0A\u4E0B\u79FB\u52A8\u5149\u6807","sidebar.select":"\u6253\u5F00\u9009\u4E2D\u7684\u4EFB\u52A1","sidebar.tree.open":"\u6253\u5F00\u5149\u6807\u6240\u5728\u884C","sidebar.goto":"\u8DF3\u5230\u5217\u8868\u9876\u90E8 / \u5E95\u90E8\uFF08gg \u6216 shift-G\uFF09","sidebar.rename":"\u91CD\u547D\u540D\u4EFB\u52A1","sidebar.localMerge":"\u8C03\u6574\u5F53\u524D\u884C\u987A\u5E8F\uFF08Shift+M\uFF0C\u7136\u540E j/k\u2014\u2014tab / \u4EFB\u52A1 / \u9879\u76EE\uFF09","sidebar.pin":"\u7F6E\u9876 / \u53D6\u6D88\u7F6E\u9876\u4EFB\u52A1\uFF08Shift+P\uFF09","sidebar.sort":"\u5207\u6362\u4EFB\u52A1\u6392\u5E8F\u65B9\u5F0F\uFF08\u9ED8\u8BA4 \u2194 \u6700\u8FD1\uFF09","sidebar.delete":"\u5220\u9664\u4EFB\u52A1\uFF08\u9700\u786E\u8BA4\uFF09","sidebar.search.enter":"\u641C\u7D22\u4EFB\u52A1\uFF08\u6A21\u7CCA\u8FC7\u6EE4\uFF09","sidebar.search.nav":"\u5728\u641C\u7D22\u7ED3\u679C\u4E2D\u79FB\u52A8\u9AD8\u4EAE","sidebar.search.submit":"\u9009\u4E2D\u641C\u7D22\u5339\u914D\u9879\u5E76\u9000\u51FA\u641C\u7D22","sidebar.search.cancel":"\u53D6\u6D88\u641C\u7D22\uFF08\u6062\u590D\u4E4B\u524D\u7684\u9009\u4E2D\u9879\uFF09","tasks.openWorktree":"\u5728\u7F16\u8F91\u5668\u4E2D\u6253\u5F00\u9009\u4E2D Task \u7684\u76EE\u5F55","tasks.renameBranch":"\u91CD\u547D\u540D\u9009\u4E2D\u4EFB\u52A1\u7684 git \u5206\u652F","tasks.cycleEngine":"\u5FAA\u73AF\u5207\u6362\u5F15\u64CE\u5382\u5546\u2014\u2014\u91CD\u65B0\u6253\u5F00\u540E\u751F\u6548","tasks.update":"\u6253\u5F00\u66F4\u65B0\u9875\u9762\uFF08\u6709\u65B0\u7248\u672C\u65F6\uFF09","tasks.focusEngine":"\u805A\u7126\u5F53\u524D\u7A97\u53E3\u7684\u5F15\u64CE\u9762\u677F","tasks.jump":"\u8DF3\u5230\u663E\u793A\u5BF9\u5E94\u6570\u5B57\u7684\u4EFB\u52A1","chat.send":"\u53D1\u9001\u6D88\u606F\uFF08\u8F93\u5165\u6846\uFF09","chat.newline":"\u5728\u8F93\u5165\u6846\u4E2D\u6362\u884C","chat.cycle-mode":"\u5FAA\u73AF\u5207\u6362\u6743\u9650\u6A21\u5F0F\uFF08\u8F93\u5165\u6846\uFF09","chat.steer":"\u5F15\u5BFC\uFF08\u4E2D\u65AD\u5E76\u53D1\u9001\uFF09\u2014\u2014\u4EC5\u9650\u6D41\u5F0F\u8F93\u51FA\u4E2D","chat.tab.new":"\u65B0\u5EFA\u804A\u5929\u6807\u7B7E\u9875","chat.tab.chooseEngine":"\u65B0\u5EFA\u5BF9\u8BDD \u2014\u2014 \u9009\u62E9\u5F15\u64CE\u6216 shell\uFF0C\u53EF\u5207\u6362\u843D\u70B9\u4E0E\u4E0A\u4E0B\u6587","chat.tab.fork":"\u6D3E\u751F\u5F53\u524D\u5BF9\u8BDD\u5230\u65B0\u6807\u7B7E\u9875\uFF08\u540C\u4E00 Task \u76EE\u5F55\uFF0C\u5E26\u4E0A\u5DF2\u6709\u5BF9\u8BDD\uFF09","chat.fork.new":"\u5FEB\u901F\u6D3E\u751F\uFF1A\u4EE5\u5F53\u524D\u4ED3\u5E93/\u5206\u652F/\u6A21\u578B\u521B\u5EFA\u5B50\u4EFB\u52A1","chat.tab.close":"\u5173\u95ED\u804A\u5929\u6807\u7B7E\u9875","chat.tab.rename":"\u91CD\u547D\u540D\u5F53\u524D\u804A\u5929\u6807\u7B7E\u9875","chat.tab.cycle-next":"\u4E0B\u4E00\u4E2A\u804A\u5929\u6807\u7B7E\u9875","chat.tab.cycle-prev":"\u4E0A\u4E00\u4E2A\u804A\u5929\u6807\u7B7E\u9875","workspace.split.right":"\u5411\u53F3\u5206\u5C4F","workspace.split.down":"\u5411\u4E0B\u5206\u5C4F","workspace.split.focus-next":"\u805A\u7126\u4E0B\u4E00\u4E2A\u5206\u5C4F","workspace.split.close":"\u5173\u95ED\u5F53\u524D\u5206\u5C4F\uFF08\u672A\u5206\u5C4F\u65F6\u5173\u95ED\u6807\u7B7E\u9875\uFF09","workspace.split.rename":"\u91CD\u547D\u540D\u5F53\u524D\u5206\u5C4F\uFF08\u672A\u5206\u5C4F\u65F6\u91CD\u547D\u540D\u6807\u7B7E\u9875\uFF09","files.nav":"\u4E0A\u4E0B\u79FB\u52A8\u5149\u6807","files.hierarchy":"\u6298\u53E0 / \u5C55\u5F00\u6811\u5C42\u7EA7","files.open":"\u5728\u5DF2\u914D\u7F6E\u7684\u7F16\u8F91\u5668\u4E2D\u6253\u5F00\u6587\u4EF6\uFF08\u652F\u6301\u65F6\u663E\u793A diff\uFF09","files.tab":"\u5207\u6362\u6807\u7B7E\u9875\uFF08\u5FAA\u73AF \u5168\u90E8 / \u53D8\u66F4\uFF09","files.refresh":"\u5237\u65B0","files.scope":"\u5207\u6362\u53D8\u66F4\u8303\u56F4\uFF08\u5DE5\u4F5C\u533A \u2194 \u5206\u652F\u5BF9\u6BD4 base\uFF09","files.diff":"\u5728\u5DE5\u4F5C\u533A\u6807\u7B7E\u9875\u4E2D\u6253\u5F00\u53EA\u8BFB diff","files.openExternal":"\u5728\u7CFB\u7EDF\u9ED8\u8BA4\u5E94\u7528\u4E2D\u6253\u5F00\u6587\u4EF6\uFF08\u97F3\u9891 / \u89C6\u9891 / pdf \u9884\u89C8\uFF09","files.mention":"\u5C06 @<path> \u63D0\u53CA\u6CE8\u5165\u5F15\u64CE\u9762\u677F","files.createPR":"\u8BA9 agent \u4ECE\u5F53\u524D\u4EFB\u52A1\u521B\u5EFA PR","diff.review.cursor":"\u5728 diff \u4E2D\u79FB\u52A8\u884C\u5149\u6807","diff.review.range":"\u5728\u5149\u6807\u5904\u5207\u6362\u8303\u56F4\u951A\u70B9","diff.review.note":"\u5728\u5149\u6807\u5904\u6DFB\u52A0\u5BA1\u9605\u5907\u6CE8","diff.review.send":"\u5C06\u6240\u6709\u672A\u53D1\u9001\u7684\u5BA1\u9605\u5907\u6CE8\u53D1\u7ED9\u5F15\u64CE","inbox.nav":"\u5728\u63D0\u9192\u9879\u76EE\u4E4B\u95F4\u79FB\u52A8","inbox.open":"\u6253\u5F00\u9009\u4E2D\u7684\u63D0\u9192\u9879\u76EE","inbox.delete":"\u6E05\u9664\u9009\u4E2D\u7684\u63D0\u9192\u9879\u76EE","terminal.scroll-up":"\u5411\u4E0A\u6EDA\u52A8\u56DE\u6EDA","terminal.scroll-down":"\u5411\u4E0B\u6EDA\u52A8\u56DE\u6EDA","terminal.reset":"\u91CD\u7F6E\u7EC8\u7AEF\u2014\u2014\u5173\u95ED\u5F53\u524D shell \u5E76\u91CD\u65B0\u542F\u52A8","dialog.cancel":"\u5173\u95ED\u9876\u5C42\u5BF9\u8BDD\u6846\uFF08esc\uFF09","dialog.newtask.tab.cycle":"\u5207\u6362\u65B0\u5EFA\u4EFB\u52A1\u6807\u7B7E\u9875\uFF08\u73B0\u6709\u4ED3\u5E93 / \u65B0\u4ED3\u5E93\uFF09"}}});var zh,Qh;var Yh=h(()=>{zh={title:"New task",tabs:{existing:"For Existing",clone:"For New Repo",adopt:"Adopt Worktree"},field:{engine:"engine",repo:"repo",fromBranch:"from branch",gitUrl:"git url",parentDir:"parent dir",folderName:"folder name",baseBranch:"base branch",adoptFilter:"filter (path glob)"},placeholder:{folderName:"auto from url",adoptFilter:"* \u2014 type e.g. feature-* to narrow"},hint:{engineCycle:"ctrl+e",remembered:"(remembered \u2014 next clone defaults to this dir)",currentDir:"(current dir)",noBranchesFound:"(no local branches found \u2014 typed text will be used as ref)",noMatchBranch:"(no match \u2014 typed text will be used as ref)",scanningWorktrees:"scanning worktrees\u2026"},picker:{moreAbove:"\u2191 {count} more",moreBelow:"\u2193 {count} more"},adopt:{repoLine:"repo: {path}",repoNone:"(none)",noUnlinked:"no unlinked worktrees \u2014 every git worktree here is already a task",noMatch:"no worktrees match the filter",hintSelected:"{count} selected \xB7 enter toggles \xB7 ctrl+a all \xB7 Create imports",hintDefault:"enter toggles \xB7 ctrl+a all \xB7 Create imports the highlighted row",summaryAll:"Adopted {count} worktree(s)",summaryPartial:"Adopted {done}/{total} worktrees \u2014 the rest failed (see log)",summaryNone:"Couldn't adopt any worktree: {error}"},clone:{progressFallback:"Cloning\u2026",progressInto:"Cloning into {target}\u2026"},button:{create:"[ Create ]",createFocused:"\u25B8 [ Create ]",cloning:"[ Cloning\u2026 ]"},error:{gitUrlRequired:"git URL is required",gitUrlInvalid:"does not look like a git URL: {url}",folderRequired:"folder name is required",folderHasSeparator:"folder name cannot contain path separators",parentRequired:"parent directory is required",parentNotFound:"parent directory does not exist: {path}",parentNotDir:"not a directory: {path}",targetExists:"target already exists: {path}",cloneFailed:"git clone failed: {error}",noAdoptable:"no adoptable worktrees to import"}},Qh={title:"\u65B0\u5EFA\u4EFB\u52A1",tabs:{existing:"\u5DF2\u6709\u4ED3\u5E93",clone:"\u514B\u9686\u65B0\u4ED3\u5E93",adopt:"\u63A5\u7BA1 Worktree"},field:{engine:"\u5F15\u64CE",repo:"\u4ED3\u5E93",fromBranch:"\u57FA\u51C6\u5206\u652F",gitUrl:"git \u5730\u5740",parentDir:"\u7236\u76EE\u5F55",folderName:"\u6587\u4EF6\u5939\u540D",baseBranch:"\u57FA\u51C6\u5206\u652F",adoptFilter:"\u8FC7\u6EE4\uFF08\u8DEF\u5F84 glob\uFF09"},placeholder:{folderName:"\u81EA\u52A8\u4ECE\u5730\u5740\u63A8\u5BFC",adoptFilter:"* \u2014 \u8F93\u5165\u5982 feature-* \u6765\u7F29\u5C0F\u8303\u56F4"},hint:{engineCycle:"ctrl+e",remembered:"\uFF08\u5DF2\u8BB0\u4F4F \u2014 \u4E0B\u6B21\u514B\u9686\u9ED8\u8BA4\u4F7F\u7528\u6B64\u76EE\u5F55\uFF09",currentDir:"\uFF08\u5F53\u524D\u76EE\u5F55\uFF09",noBranchesFound:"\uFF08\u672A\u627E\u5230\u672C\u5730\u5206\u652F \u2014 \u5C06\u76F4\u63A5\u4F7F\u7528\u8F93\u5165\u6587\u672C\u4F5C\u4E3A ref\uFF09",noMatchBranch:"\uFF08\u65E0\u5339\u914D \u2014 \u5C06\u76F4\u63A5\u4F7F\u7528\u8F93\u5165\u6587\u672C\u4F5C\u4E3A ref\uFF09",scanningWorktrees:"\u6B63\u5728\u626B\u63CF worktree\u2026"},picker:{moreAbove:"\u2191 \u8FD8\u6709 {count} \u9879",moreBelow:"\u2193 \u8FD8\u6709 {count} \u9879"},adopt:{repoLine:"\u4ED3\u5E93\uFF1A{path}",repoNone:"\uFF08\u65E0\uFF09",noUnlinked:"\u6CA1\u6709\u672A\u5173\u8054\u7684 worktree \u2014 \u6B64\u4ED3\u5E93\u6240\u6709 git worktree \u5747\u5DF2\u662F\u4EFB\u52A1",noMatch:"\u6CA1\u6709 worktree \u5339\u914D\u6B64\u8FC7\u6EE4\u6761\u4EF6",hintSelected:"\u5DF2\u9009 {count} \u9879 \xB7 enter \u5207\u6362\u9009\u4E2D \xB7 ctrl+a \u5168\u9009 \xB7 \u521B\u5EFA \u5BFC\u5165",hintDefault:"enter \u5207\u6362\u9009\u4E2D \xB7 ctrl+a \u5168\u9009 \xB7 \u521B\u5EFA \u5C06\u5BFC\u5165\u9AD8\u4EAE\u884C",summaryAll:"\u5DF2\u63A5\u7BA1 {count} \u4E2A worktree",summaryPartial:"\u5DF2\u63A5\u7BA1 {done}/{total} \u4E2A worktree \u2014 \u5176\u4F59\u5931\u8D25\uFF08\u8BE6\u89C1\u65E5\u5FD7\uFF09",summaryNone:"\u6CA1\u6709 worktree \u63A5\u7BA1\u6210\u529F\uFF1A{error}"},clone:{progressFallback:"\u514B\u9686\u4E2D\u2026",progressInto:"\u6B63\u5728\u514B\u9686\u5230 {target}\u2026"},button:{create:"[ \u521B\u5EFA ]",createFocused:"\u25B8 [ \u521B\u5EFA ]",cloning:"[ \u514B\u9686\u4E2D\u2026 ]"},error:{gitUrlRequired:"git \u5730\u5740\u4E0D\u80FD\u4E3A\u7A7A",gitUrlInvalid:"\u4E0D\u50CF\u662F\u6709\u6548\u7684 git \u5730\u5740\uFF1A{url}",folderRequired:"\u6587\u4EF6\u5939\u540D\u4E0D\u80FD\u4E3A\u7A7A",folderHasSeparator:"\u6587\u4EF6\u5939\u540D\u4E0D\u80FD\u5305\u542B\u8DEF\u5F84\u5206\u9694\u7B26",parentRequired:"\u7236\u76EE\u5F55\u4E0D\u80FD\u4E3A\u7A7A",parentNotFound:"\u7236\u76EE\u5F55\u4E0D\u5B58\u5728\uFF1A{path}",parentNotDir:"\u4E0D\u662F\u76EE\u5F55\uFF1A{path}",targetExists:"\u76EE\u6807\u8DEF\u5F84\u5DF2\u5B58\u5728\uFF1A{path}",cloneFailed:"git clone \u5931\u8D25\uFF1A{error}",noAdoptable:"\u6CA1\u6709\u53EF\u63A5\u7BA1\u7684 worktree"}}});var Gh,$h;var qh=h(()=>{Gh={title:"Welcome to Rove",subtitle:"Two quick questions before your first launch.",completionsQuestion:"Install shell completions for {shell}?",completionsExplain:"Tab-completes rove subcommands. One line is added to your shell config.",skillQuestion:"Install the Rove agent skill?",skillExplain:"Teaches coding agents to drive Rove from the shell via `rove api`.",optionYes:"Yes (recommended)",optionNo:"No",legend:"\u2191\u2193 select \xB7 enter confirm \xB7 q skip setup",keysTitle:"Keyboard basics",keysBare:"Bare keys act in the focused pane \u2014 {nav} moves, {open} opens.",keysOnePress:"A few one-press chords are Rove's own \u2014 {newTab} new tab, {focusNext} next pane.",keysPrefix:"{prefix} opens the command map \u2014 hold it a beat and a guide appears.",keysHelp:"{help} shows the full live reference anytime.",keysLegend:"enter finish",appliedCompletions:"\u2713 completions hooked into {path} (takes effect in new shells)",skippedCompletions:"\xB7 completions skipped \u2014 run `{command}` anytime",installingSkill:"installing the Rove agent skill ({command})\u2026",skillFailed:"! skill install failed \u2014 retry with `{command}`",skippedSkill:"\xB7 agent skill skipped \u2014 run `{command}` anytime",ready:"You're ready to go!",readyHint:"Run `rove` to launch the TUI."},$h={title:"\u6B22\u8FCE\u4F7F\u7528 Rove",subtitle:"\u9996\u6B21\u542F\u52A8\u524D\uFF0C\u5148\u56DE\u7B54\u4E24\u4E2A\u5C0F\u95EE\u9898\u3002",completionsQuestion:"\u4E3A {shell} \u5B89\u88C5 shell \u8865\u5168\u5417\uFF1F",completionsExplain:"\u8BA9 rove \u5B50\u547D\u4EE4\u652F\u6301 Tab \u8865\u5168\uFF0C\u4F1A\u5728\u4F60\u7684 shell \u914D\u7F6E\u91CC\u52A0\u4E00\u884C\u3002",skillQuestion:"\u5B89\u88C5 Rove agent skill \u5417\uFF1F",skillExplain:"\u6559\u4F1A\u7F16\u7801 agent \u901A\u8FC7 `rove api` \u5728\u547D\u4EE4\u884C\u9A71\u52A8 Rove\u3002",optionYes:"\u5B89\u88C5\uFF08\u63A8\u8350\uFF09",optionNo:"\u8DF3\u8FC7",legend:"\u2191\u2193 \u9009\u62E9 \xB7 enter \u786E\u8BA4 \xB7 q \u8DF3\u8FC7\u8BBE\u7F6E",keysTitle:"\u952E\u76D8\u57FA\u7840",keysBare:"\u88F8\u952E\u4F5C\u7528\u4E8E\u5F53\u524D\u805A\u7126\u9762\u677F \u2014 {nav} \u79FB\u52A8\uFF0C{open} \u6253\u5F00\u3002",keysOnePress:"\u5C11\u91CF\u5355\u6B21\u5FEB\u6377\u952E\u5C5E\u4E8E Rove \u81EA\u5DF1 \u2014 {newTab} \u65B0\u6807\u7B7E\u9875\uFF0C{focusNext} \u5207\u6362\u9762\u677F\u3002",keysPrefix:"{prefix} \u6253\u5F00\u547D\u4EE4\u5C42 \u2014 \u6309\u4F4F\u7A0D\u7B49\u4F1A\u51FA\u73B0\u547D\u4EE4\u6307\u5357\u3002",keysHelp:"\u968F\u65F6\u6309 {help} \u67E5\u770B\u5B8C\u6574\u7684\u5B9E\u65F6\u952E\u4F4D\u8868\u3002",keysLegend:"enter \u5B8C\u6210",appliedCompletions:"\u2713 \u8865\u5168\u5DF2\u5199\u5165 {path}\uFF08\u65B0\u5F00\u7684 shell \u751F\u6548\uFF09",skippedCompletions:"\xB7 \u5DF2\u8DF3\u8FC7\u8865\u5168 \u2014 \u4E4B\u540E\u53EF\u968F\u65F6\u8FD0\u884C `{command}`",installingSkill:"\u6B63\u5728\u5B89\u88C5 Rove agent skill\uFF08{command}\uFF09\u2026",skillFailed:"! skill \u5B89\u88C5\u5931\u8D25 \u2014 \u53EF\u7528 `{command}` \u91CD\u8BD5",skippedSkill:"\xB7 \u5DF2\u8DF3\u8FC7 agent skill \u2014 \u4E4B\u540E\u53EF\u968F\u65F6\u8FD0\u884C `{command}`",ready:"\u4E00\u5207\u5C31\u7EEA\uFF01",readyHint:"\u8FD0\u884C `rove` \u542F\u52A8 TUI\u3002"}});var Hh,Uh;var Kh=h(()=>{Hh={preview:{diffVsHead:"diff vs HEAD",diffVsBase:"diff vs {base}",file:"file",image:"image",binary:"binary file",closeHint:"\xB7 q to close",loading:"loading\u2026",noTextPreview:"no text preview",openHint:"o open in system viewer",review:{noteDialogTitle:"Review note \u2014 {location}",noteFieldLabel:"note",noteSubmitLabel:"add note",notePlaceholder:"what should the agent change here?",count:"{total} notes \xB7 {unsent} unsent",keysHint:"j/k line \xB7 v range \xB7 c note \xB7 s send"}}},Uh={preview:{diffVsHead:"\u4E0E HEAD \u5BF9\u6BD4",diffVsBase:"\u4E0E {base} \u5BF9\u6BD4",file:"\u6587\u4EF6",image:"\u56FE\u7247",binary:"\u4E8C\u8FDB\u5236\u6587\u4EF6",closeHint:"\xB7 q \u5173\u95ED",loading:"\u52A0\u8F7D\u4E2D\u2026",noTextPreview:"\u65E0\u6587\u672C\u9884\u89C8",openHint:"o \u7528\u7CFB\u7EDF\u67E5\u770B\u5668\u6253\u5F00",review:{noteDialogTitle:"\u8BC4\u5BA1\u5907\u6CE8 \u2014 {location}",noteFieldLabel:"\u5907\u6CE8",noteSubmitLabel:"\u6DFB\u52A0\u5907\u6CE8",notePlaceholder:"\u5E0C\u671B agent \u5728\u8FD9\u91CC\u6539\u4EC0\u4E48\uFF1F",count:"{total} \u6761\u5907\u6CE8 \xB7 {unsent} \u6761\u672A\u53D1\u9001",keysHint:"j/k \u884C \xB7 v \u8303\u56F4 \xB7 c \u5907\u6CE8 \xB7 s \u53D1\u9001"}}}});var Vh,Bh;var Mh=h(()=>{Vh={title:"Quick task \xB7 {repoLabel}",esc:"esc",promptLabel:"prompt",promptPlaceholder:"what should this task do?",engineLabel:"engine",branchLabel:"branch"},Bh={title:"\u5FEB\u901F\u4EFB\u52A1 \xB7 {repoLabel}",esc:"esc",promptLabel:"\u63D0\u793A\u8BCD",promptPlaceholder:"\u8FD9\u4E2A\u4EFB\u52A1\u8981\u505A\u4EC0\u4E48\uFF1F",engineLabel:"\u5F15\u64CE",branchLabel:"\u5206\u652F"}});var Nh,Wh;var Dh=h(()=>{Nh={title:"Settings",esc:"esc",nav:{default:"j/k pick \xB7 h/l switch level \xB7 enter activate \xB7 esc close",feedback:"tab next field \xB7 enter sends on Send \xB7 esc close"},sections:{general:"General",engines:"Engines",plugins:"Plugins",keys:"Keybindings",feedback:"Feedback",dev:"Dev"},general:{usage:"USAGE",theme:"Theme",themeHint:"l to enter list \xB7 j/k to highlight \xB7 enter to apply",language:"Language",languageHint:"Display language for Rove's UI. l to enter list \xB7 j/k to highlight \xB7 enter to apply.",transparent:"Transparent background",transparentHint:"Drops the renderer's bg fill so the host terminal shows through. `t` toggles.",on:"[x] on",off:"[ ] off",focusAccent:"Focus accent",focusAccentHint:"Color of focused pane title, \u258C marker, and split borders.",accentPrimary:"Primary (brand accent)",accentSuccess:"Success (legacy green)",accentInfo:"Info (cool blue)",appearance:"Appearance",appearanceHint:"How split panes draw.",splitBox:"Box frames",splitLine:"Divider line",notifications:"Notifications",notificationsHint:"When a background tab finishes or pauses on an approval. The tab-chip unread dot is always on.",toast:"Toast",toastHint:"bottom-right popup",sound:"Sound",soundHint:"bell + chime + an OSC 9 desktop notification (rides SSH)",crossTask:"Cross-task",crossTaskHint:"also for a task you switched away from",keyHints:"Keyboard hints",keyHintsHint:"The status-bar reminder and the first-use hints in the sidebar and files panes.",keyHintsShow:"Show keyboard hints",keyHintsShowHint:"re-enabling relights hints dismissed by use",zen:"Zen mode",zenHint:"The `zen` chip and `prefix`+z hide Files, keeping the Tasks rail and workspace.",zenDefaultOn:"Start in zen mode",zenKeepTasks:"Keep Tasks pane",zenKeepTasksHint:"legacy \u2014 no layout effect today",editor:"Editor",editorHint:"What enter opens a file with in the file tree \u2014 diff mode when the editor supports it, the read-only preview when it isn't installed.",editorRow:"editor: < {kind} >",editorRowHint:"auto follows $VISUAL / $EDITOR, else nvim / vim / emacs / nano",editorCustom:"custom: {cmd}",editorCustomUnset:"(unset \u2014 enter to edit)",worktree:"Worktree location",worktreeHint:"Where new task worktrees are created. New tasks only.",worktreeBase:"location: < {kind} >",worktreeBaseHint:"custom takes `~`, a relative path, or a leading `$project_dir`",worktreeKindDefault:"default ~/.rove/worktrees",worktreeKindNext:"next to project",worktreeKindCustom:"custom",worktreeCustom:"custom: {path}",worktreeCustomUnset:"(unset \u2014 enter to edit)",worktreeBaseTitle:"Custom worktree location (blank = default; $project_dir = project root)",worktreeBaseField:"path",terminal:"Terminal",terminalHint:"Applies to terminals opened after the change.",scrollbackRow:"scrollback: {rows} rows",scrollbackRowHint:"100\u2013100000 \xB7 larger costs proportionally more CPU per redraw",scrollbackTitle:"Terminal scrollback rows (100\u2013100000)",scrollbackField:"rows",scrollbackInvalidTitle:"Not a number",scrollbackInvalidBody:"Scrollback must be a number of rows (e.g. 1000). Keeping the previous setting.",tabStripRow:"tab strip: {mode}",tabStripMode:{never:"off \u2014 the sidebar tree lists tabs",multipleOnly:"only with 2+ tabs",always:"always"}},engines:{title:"Engines",hint:"Every engine Rove can launch, with what detection found under each one: where its binary is, and for the engines with an account detector whether you are logged in. [x] = offered when picking an engine for a task; (\u25CF) = the global default (per-project picks, e.g. Ctrl+Shift+T, override it) \u2014 click either, or use the keys below. Override a launch command when the binary isn't on PATH or to pass default flags. space on/off \xB7 enter edit command \xB7 r rename \xB7 x reset/remove \xB7 d set default.",customTag:" (custom)",addEngine:"+ Add engine"},accounts:{checking:"Checking\u2026",notLoggedIn:"\u25CB Not logged in",loggedIn:"\u25CF Logged in: {email}",apiKeyConfigured:"\u25CF API key configured",chatgptLogin:"\u25CF ChatGPT login: {email}",tokenConfigured:"\u25CF Token configured ({source})",detected:"\u25CF Login detected"},plugins:{title:"Plugins",hint:"Plugins registered in ~/.kobe/plugins.json. enter (or click) toggles one on or off \u2014 the daemon watches the file, so the change applies live. Rows indented under a plugin are the settings it declares; enter edits one, and the value reaches the plugin on its next run. Install and remove them from the shell: `rove plugin install <owner/repo>`, `rove plugin link <dir>`.",empty:"No plugins registered. Install one with `rove plugin install <owner/repo>` \u2014 browse the `rove-plugin` topic on GitHub.",sourceLink:"linked {path}",sourceGithub:"{spec}",updateAvailable:"update available \u2014 rove plugin update",declares:"{actions} actions \xB7 {events} events \xB7 {panes} panes",manifestUnreadable:"manifest unreadable",lastRun:"\xB7 last run {label} {status} {ago} ago",neverRun:"\xB7 never run",runOk:"ok",runFailed:"failed to start",runExit:"exit {code}",settingUnset:"(unset \u2014 enter to edit)",settingInvalidTitle:"Not a number",settingInvalidBody:"{label} only accepts a number. Keeping the previous value."},keybindings:{title:"Keybindings",hint:"Rebind direct and prefix chords in your own YAML file; changes reload live. Press F1 anywhere for the live keymap with every binding id.",configFile:"Config file",notCreated:" (not created yet)",prefixTitle:"Command layer ({prefix})",prefixHint:"Bare keys act in the focused pane; a small one-press set covers frequent Rove actions; {prefix} opens the command layer ({timeout}ms second-stroke window). Prefix bindings keep their pane scope and modal rules.",tapPresentation:"Prefix tap",tapPresentationHint:"Choose whether the complete guide also marks controls already on screen.",tapPresentationLocal:"On-screen entries + complete guide (default)",tapPresentationGuide:"Complete guide only",prefixDisabled:"disabled",fixed:"Fixed (not rebindable): {ids}.",createHint:"No overrides file yet. Rove can write one for you, fully commented \u2014 nothing is rebound until you uncomment a line.",createFile:"[enter] Create keybindings.yaml",overridesApplied:"Overrides applied",none:"none",unbound:"(unbound)",defaultKeys:"default: {keys}",warnings:"Warnings"},feedback:{title:"Feedback",hint:"Sends a GitHub Discussion to the Rove repo through `gh`. Requires `gh auth login`; category defaults to Feedback.",titleLabel:"title",titlePlaceholder:"Short summary",descriptionLabel:"description",descriptionPlaceholder:"What happened? (enter for a new line \xB7 tab to Send)",send:"[enter] Send to GitHub Discussions"},dev:{reset:"Reset UI state",resetHint:"Clears ~/.config/rove/state.json and ~/.rove/tasks.json, then quits Rove \u2014 relaunch to start fresh. Working session list, pane sizes, theme, model picks all reset. Worktrees on disk and engine session history are not touched.",resetButton:"[enter] Reset",restart:"Restart backend",restartHint:"Stops the Rove daemon and quits this Rove window so the next launch spawns a fresh daemon \u2014 picks up daemon / orchestrator / engine edits without a process kill. Other attached Rove windows will lose their connection too.",restartButton:"[enter] Restart",doctorHint:"Daemon wedged or unresponsive? From a shell, run `rove daemon restart`, then relaunch Rove. Hosted engine sessions stay alive across a daemon restart.",experimental:"Experimental",remoteHint:"Remote projects (SSH): register a project whose git worktrees live on another host, driven from this local Rove. Unfinished \u2014 Hosted PTY engine launch over SSH is not implemented, and file/diff panes still degrade. Enables `rove add --remote`.",remote:"Remote projects",autoStatusHint:"Auto status flow: a backlog task moves to in_progress when its engine starts a turn, and new sessions get a system-prompt note telling the agent to set in_review itself when the work is done. Never touches done/canceled.",autoStatus:"Auto status flow",dispatcherHint:"Field-notes dispatcher: task sessions file one-line gotchas (`rove api note`), the daemon forwards each to the repo's main session, and that session relays them to the in-flight tasks that benefit (`rove api dispatch`). Web-hosted sessions receive the relays today.",dispatcher:"Field-notes dispatcher"}},Wh={title:"\u8BBE\u7F6E",esc:"esc",nav:{default:"j/k \u9009\u62E9 \xB7 h/l \u5207\u6362\u5C42\u7EA7 \xB7 enter \u786E\u8BA4 \xB7 esc \u5173\u95ED",feedback:"tab \u4E0B\u4E00\u9879 \xB7 enter \u5728\u53D1\u9001\u9879\u53D1\u9001 \xB7 esc \u5173\u95ED"},sections:{general:"\u901A\u7528",engines:"\u5F15\u64CE",plugins:"\u63D2\u4EF6",keys:"\u5FEB\u6377\u952E",feedback:"\u53CD\u9988",dev:"\u5F00\u53D1"},general:{usage:"\u7528\u91CF",theme:"\u4E3B\u9898",themeHint:"l \u8FDB\u5165\u5217\u8868 \xB7 j/k \u9AD8\u4EAE \xB7 enter \u5E94\u7528",language:"\u8BED\u8A00",languageHint:"Rove \u754C\u9762\u7684\u663E\u793A\u8BED\u8A00\u3002l \u8FDB\u5165\u5217\u8868 \xB7 j/k \u9AD8\u4EAE \xB7 enter \u5E94\u7528\u3002",transparent:"\u900F\u660E\u80CC\u666F",transparentHint:"\u53BB\u6389\u6E32\u67D3\u5668\u7684\u80CC\u666F\u586B\u5145\uFF0C\u8BA9\u5BBF\u4E3B\u7EC8\u7AEF\u900F\u51FA\u6765\u3002\u6309 `t` \u5207\u6362\u3002",on:"[x] \u5F00",off:"[ ] \u5173",focusAccent:"\u805A\u7126\u5F3A\u8C03\u8272",focusAccentHint:"\u805A\u7126\u9762\u677F\u6807\u9898\u3001\u258C \u6807\u8BB0\u548C\u5206\u9694\u8FB9\u6846\u7684\u989C\u8272\u3002",accentPrimary:"\u4E3B\u8272\uFF08\u54C1\u724C\u5F3A\u8C03\u8272\uFF09",accentSuccess:"\u6210\u529F\u8272\uFF08\u4F20\u7EDF\u7EFF\uFF09",accentInfo:"\u4FE1\u606F\u8272\uFF08\u51B7\u84DD\uFF09",appearance:"\u5916\u89C2",appearanceHint:"\u5206\u5C4F\u9762\u677F\u600E\u4E48\u753B\u8FB9\u3002",splitBox:"\u65B9\u6846\u8FB9\u6846",splitLine:"\u5355\u7EBF\u5206\u9694",notifications:"\u901A\u77E5",notificationsHint:"\u540E\u53F0\u6807\u7B7E\u5B8C\u6210\u6216\u5728\u5BA1\u6279\u5904\u6682\u505C\u65F6\u89E6\u53D1\u3002\u6807\u7B7E\u4E0A\u7684\u672A\u8BFB\u5706\u70B9\u59CB\u7EC8\u5F00\u542F\u3002",toast:"Toast \u5F39\u7A97",toastHint:"\u53F3\u4E0B\u89D2\u5F39\u7A97",sound:"\u58F0\u97F3",soundHint:"\u54CD\u94C3 + \u63D0\u793A\u97F3 + OSC 9 \u684C\u9762\u901A\u77E5\uFF08\u7ECF SSH \u76F4\u8FBE\u672C\u5730\uFF09",crossTask:"\u8DE8\u4EFB\u52A1",crossTaskHint:"\u4F60\u5DF2\u5207\u8D70\u7684\u4EFB\u52A1\u4E5F\u901A\u77E5",keyHints:"\u952E\u76D8\u63D0\u793A",keyHintsHint:"\u72B6\u6001\u680F\u63D0\u9192\uFF0C\u4EE5\u53CA\u4FA7\u680F\u548C\u6587\u4EF6\u9762\u677F\u7684\u9996\u7528\u63D0\u793A\u3002",keyHintsShow:"\u663E\u793A\u952E\u76D8\u63D0\u793A",keyHintsShowHint:"\u91CD\u65B0\u5F00\u542F\u4F1A\u70B9\u4EAE\u5DF2\u56E0\u4F7F\u7528\u800C\u7184\u706D\u7684\u63D0\u793A",zen:"\u7985\u6A21\u5F0F",zenHint:"`zen` \u6807\u8BB0\u548C `prefix`+z \u9690\u85CF Files\uFF0C\u4FDD\u7559 Tasks \u4FA7\u680F\u4E0E workspace\u3002",zenDefaultOn:"\u542F\u52A8\u5373\u8FDB\u5165\u7985\u6A21\u5F0F",zenKeepTasks:"\u4FDD\u7559 Tasks \u9762\u677F",zenKeepTasksHint:"\u65E7\u8BBE\u7F6E \u2014 \u5F53\u524D\u4E0D\u6539\u53D8\u5E03\u5C40",editor:"\u7F16\u8F91\u5668",editorHint:"\u6587\u4EF6\u6811\u91CC\u6309 enter \u7528\u4EC0\u4E48\u6253\u5F00\u6587\u4EF6\u2014\u2014\u652F\u6301\u65F6\u8D70\u7F16\u8F91\u5668 diff \u6A21\u5F0F\uFF0C\u672A\u5B89\u88C5\u65F6\u56DE\u9000\u5230\u53EA\u8BFB\u9884\u89C8\u3002",editorRow:"\u7F16\u8F91\u5668: < {kind} >",editorRowHint:"auto \u8DDF\u968F $VISUAL / $EDITOR\uFF0C\u5426\u5219 nvim / vim / emacs / nano",editorCustom:"\u81EA\u5B9A\u4E49: {cmd}",editorCustomUnset:"(\u672A\u8BBE\u7F6E \u2014 enter \u7F16\u8F91)",worktree:"\u5DE5\u4F5C\u6811\u4F4D\u7F6E",worktreeHint:"\u65B0\u4EFB\u52A1\u5DE5\u4F5C\u6811\u7684\u521B\u5EFA\u4F4D\u7F6E\u3002\u4EC5\u5BF9\u65B0\u4EFB\u52A1\u751F\u6548\u3002",worktreeBase:"\u4F4D\u7F6E: < {kind} >",worktreeBaseHint:"\u81EA\u5B9A\u4E49\u53EF\u586B `~`\u3001\u76F8\u5BF9\u8DEF\u5F84\u6216\u4EE5 `$project_dir` \u5F00\u5934",worktreeKindDefault:"\u9ED8\u8BA4 ~/.rove/worktrees",worktreeKindNext:"\u9879\u76EE\u65C1\u8FB9",worktreeKindCustom:"\u81EA\u5B9A\u4E49",worktreeCustom:"\u81EA\u5B9A\u4E49: {path}",worktreeCustomUnset:"(\u672A\u8BBE\u7F6E \u2014 enter \u7F16\u8F91)",worktreeBaseTitle:"\u81EA\u5B9A\u4E49\u5DE5\u4F5C\u6811\u4F4D\u7F6E\uFF08\u7559\u7A7A = \u9ED8\u8BA4\uFF1B$project_dir = \u9879\u76EE\u6839\u76EE\u5F55\uFF09",worktreeBaseField:"\u8DEF\u5F84",terminal:"\u7EC8\u7AEF",terminalHint:"\u5BF9\u4FEE\u6539\u540E\u65B0\u6253\u5F00\u7684\u7EC8\u7AEF\u751F\u6548\u3002",scrollbackRow:"\u56DE\u6EDA\u884C\u6570: {rows} \u884C",scrollbackRowHint:"100\u2013100000 \xB7 \u8C03\u5927\u4F1A\u6309\u6BD4\u4F8B\u589E\u52A0\u6BCF\u6B21\u91CD\u7ED8\u7684 CPU",scrollbackTitle:"\u7EC8\u7AEF\u56DE\u6EDA\u884C\u6570\uFF08100\u2013100000\uFF09",scrollbackField:"\u884C\u6570",scrollbackInvalidTitle:"\u4E0D\u662F\u6570\u5B57",scrollbackInvalidBody:"\u56DE\u6EDA\u884C\u6570\u5FC5\u987B\u662F\u6570\u5B57\uFF08\u5982 1000\uFF09\u3002\u4FDD\u7559\u539F\u8BBE\u7F6E\u3002",tabStripRow:"\u6807\u7B7E\u680F: {mode}",tabStripMode:{never:"\u5173\u95ED \u2014 \u6807\u7B7E\u5728\u5DE6\u4FA7\u6811\u91CC",multipleOnly:"\u4EC5 2 \u4E2A\u4EE5\u4E0A\u6807\u7B7E\u65F6\u663E\u793A",always:"\u59CB\u7EC8\u663E\u793A"}},engines:{title:"\u5F15\u64CE",hint:"Rove \u80FD\u542F\u52A8\u7684\u6240\u6709\u5F15\u64CE\uFF0C\u6BCF\u4E2A\u4E0B\u9762\u8DDF\u7740\u672C\u5730\u63A2\u6D4B\u5230\u7684\u60C5\u51B5\uFF1A\u4E8C\u8FDB\u5236\u5728\u54EA\uFF0C\u4EE5\u53CA\u5BF9\u6709\u8D26\u6237\u63A2\u6D4B\u5668\u7684\u5F15\u64CE\u662F\u5426\u5DF2\u767B\u5F55\u3002[x] = \u4E3A\u4EFB\u52A1\u9009\u5F15\u64CE\u65F6\u4F1A\u5217\u51FA\u5B83\uFF1B(\u25CF) = \u5168\u5C40\u9ED8\u8BA4\u5F15\u64CE\uFF08\u5404\u9879\u76EE\u81EA\u5DF1\u7684\u9009\u62E9\u4F1A\u8986\u76D6\u5B83\uFF0C\u5982 Ctrl+Shift+T\uFF09\u2014\u2014\u4E24\u8005\u90FD\u53EF\u76F4\u63A5\u70B9\uFF0C\u4E5F\u53EF\u7528\u4E0B\u9762\u7684\u6309\u952E\u3002\u4E8C\u8FDB\u5236\u4E0D\u5728 PATH \u4E0A\u3001\u6216\u8981\u4F20\u9ED8\u8BA4\u53C2\u6570\u65F6\uFF0C\u8986\u76D6\u5B83\u7684\u542F\u52A8\u547D\u4EE4\u3002space \u5F00/\u5173 \xB7 enter \u7F16\u8F91\u547D\u4EE4 \xB7 r \u91CD\u547D\u540D \xB7 x \u91CD\u7F6E/\u79FB\u9664 \xB7 d \u8BBE\u4E3A\u9ED8\u8BA4\u3002",customTag:" (\u81EA\u5B9A\u4E49)",addEngine:"+ \u6DFB\u52A0\u5F15\u64CE"},accounts:{checking:"\u68C0\u67E5\u4E2D\u2026",notLoggedIn:"\u25CB \u672A\u767B\u5F55",loggedIn:"\u25CF \u5DF2\u767B\u5F55: {email}",apiKeyConfigured:"\u25CF \u5DF2\u914D\u7F6E API key",chatgptLogin:"\u25CF ChatGPT \u767B\u5F55: {email}",tokenConfigured:"\u25CF \u5DF2\u914D\u7F6E Token ({source})",detected:"\u25CF \u68C0\u6D4B\u5230\u767B\u5F55"},plugins:{title:"\u63D2\u4EF6",hint:"\u5728 ~/.kobe/plugins.json \u91CC\u6CE8\u518C\u7684\u63D2\u4EF6\u3002enter\uFF08\u6216\u70B9\u51FB\uFF09\u5207\u6362\u542F\u7528/\u7981\u7528\u2014\u2014daemon \u76D1\u542C\u8BE5\u6587\u4EF6\uFF0C\u6539\u52A8\u5B9E\u65F6\u751F\u6548\u3002\u63D2\u4EF6\u4E0B\u65B9\u7F29\u8FDB\u7684\u884C\u662F\u5B83\u58F0\u660E\u7684\u8BBE\u7F6E\u9879\uFF0Center \u7F16\u8F91\uFF0C\u65B0\u503C\u5728\u63D2\u4EF6\u4E0B\u6B21\u8FD0\u884C\u65F6\u751F\u6548\u3002\u5B89\u88C5\u4E0E\u79FB\u9664\u5728 shell \u91CC\u505A\uFF1A`rove plugin install <owner/repo>`\u3001`rove plugin link <dir>`\u3002",empty:"\u5C1A\u672A\u6CE8\u518C\u4EFB\u4F55\u63D2\u4EF6\u3002\u7528 `rove plugin install <owner/repo>` \u5B89\u88C5\u4E00\u4E2A\u2014\u2014\u53EF\u5728 GitHub \u7684 `rove-plugin` \u8BDD\u9898\u4E0B\u6D4F\u89C8\u3002",sourceLink:"\u672C\u5730\u94FE\u63A5 {path}",sourceGithub:"{spec}",updateAvailable:"\u6709\u65B0\u7248\u672C \u2014 rove plugin update",declares:"{actions} \u4E2A\u52A8\u4F5C \xB7 {events} \u4E2A\u4E8B\u4EF6 \xB7 {panes} \u4E2A\u9762\u677F",manifestUnreadable:"manifest \u65E0\u6CD5\u89E3\u6790",lastRun:"\xB7 \u4E0A\u6B21\u8FD0\u884C {label} {status} {ago}\u524D",neverRun:"\xB7 \u5C1A\u672A\u8FD0\u884C\u8FC7",runOk:"\u6210\u529F",runFailed:"\u542F\u52A8\u5931\u8D25",runExit:"\u9000\u51FA\u7801 {code}",settingUnset:"(\u672A\u8BBE\u7F6E \u2014 enter \u7F16\u8F91)",settingInvalidTitle:"\u4E0D\u662F\u6570\u5B57",settingInvalidBody:"{label} \u53EA\u63A5\u53D7\u6570\u5B57\uFF0C\u4FDD\u7559\u539F\u503C\u3002"},keybindings:{title:"\u5FEB\u6377\u952E",hint:"\u5728\u4F60\u81EA\u5DF1\u7684 YAML \u6587\u4EF6\u91CC\u91CD\u7ED1\u5B9A\u76F4\u63A5\u6309\u952E\u548C prefix \u7EC4\u5408\uFF1B\u4FEE\u6539\u4F1A\u5B9E\u65F6\u52A0\u8F7D\u3002\u4EFB\u610F\u4F4D\u7F6E\u6309 F1 \u67E5\u770B\u5E26\u6BCF\u4E2A\u7ED1\u5B9A id \u7684\u5B9E\u65F6\u952E\u4F4D\u8868\u3002",configFile:"\u914D\u7F6E\u6587\u4EF6",notCreated:" (\u5C1A\u672A\u521B\u5EFA)",prefixTitle:"\u547D\u4EE4\u5C42\uFF08{prefix}\uFF09",prefixHint:"\u88F8\u952E\u4F5C\u7528\u4E8E\u5F53\u524D\u805A\u7126\u9762\u677F\uFF1B\u5C11\u91CF\u5355\u6B21\u5FEB\u6377\u952E\u8986\u76D6\u9AD8\u9891 Rove \u64CD\u4F5C\uFF1B{prefix} \u6253\u5F00\u547D\u4EE4\u5C42\uFF08\u7B2C\u4E8C\u51FB\u7A97\u53E3 {timeout}ms\uFF09\u3002Prefix \u7ED1\u5B9A\u4FDD\u6301\u539F\u6709\u7684\u9762\u677F\u4F5C\u7528\u57DF\u548C modal \u89C4\u5219\u3002",tapPresentation:"\u70B9\u6309 Prefix",tapPresentationHint:"\u9009\u62E9\u5B8C\u6574\u6307\u5357\u662F\u5426\u540C\u65F6\u6807\u8BB0\u5F53\u524D\u5C4F\u5E55\u4E0A\u7684\u5165\u53E3\u3002",tapPresentationLocal:"\u5C4F\u5E55\u5165\u53E3 + \u5B8C\u6574\u6307\u5357\uFF08\u9ED8\u8BA4\uFF09",tapPresentationGuide:"\u4EC5\u5B8C\u6574\u6307\u5357",prefixDisabled:"\u5DF2\u7981\u7528",fixed:"\u56FA\u5B9A\uFF08\u4E0D\u53EF\u91CD\u7ED1\u5B9A\uFF09\uFF1A{ids}\u3002",createHint:"\u8FD8\u6CA1\u6709\u8986\u76D6\u6587\u4EF6\u3002Rove \u53EF\u4EE5\u5E2E\u4F60\u5199\u4E00\u4EFD\u5E26\u5B8C\u6574\u6CE8\u91CA\u7684\u2014\u2014\u5728\u4F60\u53D6\u6D88\u6CE8\u91CA\u4E4B\u524D\u4E0D\u4F1A\u6539\u52A8\u4EFB\u4F55\u6309\u952E\u3002",createFile:"[enter] \u521B\u5EFA keybindings.yaml",overridesApplied:"\u5DF2\u5E94\u7528\u7684\u8986\u76D6",none:"\u65E0",unbound:"(\u5DF2\u89E3\u7ED1)",defaultKeys:"\u9ED8\u8BA4: {keys}",warnings:"\u8B66\u544A"},feedback:{title:"\u53CD\u9988",hint:"\u901A\u8FC7 `gh` \u5411 Rove \u4ED3\u5E93\u53D1\u4E00\u6761 GitHub Discussion\u3002\u9700\u8981 `gh auth login`\uFF1B\u5206\u7C7B\u9ED8\u8BA4\u4E3A Feedback\u3002",titleLabel:"\u6807\u9898",titlePlaceholder:"\u7B80\u77ED\u6982\u62EC",descriptionLabel:"\u63CF\u8FF0",descriptionPlaceholder:"\u53D1\u751F\u4E86\u4EC0\u4E48\uFF1F(enter \u6362\u884C \xB7 tab \u8DF3\u5230\u53D1\u9001)",send:"[enter] \u53D1\u9001\u5230 GitHub Discussions"},dev:{reset:"\u91CD\u7F6E UI \u72B6\u6001",resetHint:"\u6E05\u7A7A ~/.config/rove/state.json \u548C ~/.rove/tasks.json\uFF0C\u7136\u540E\u9000\u51FA Rove\u2014\u2014\u91CD\u65B0\u542F\u52A8\u5373\u53EF\u4ECE\u5934\u5F00\u59CB\u3002\u5DE5\u4F5C\u4F1A\u8BDD\u5217\u8868\u3001\u9762\u677F\u5C3A\u5BF8\u3001\u4E3B\u9898\u3001\u6A21\u578B\u9009\u62E9\u90FD\u4F1A\u91CD\u7F6E\u3002\u78C1\u76D8\u4E0A\u7684 worktree \u548C\u5F15\u64CE\u4F1A\u8BDD\u5386\u53F2\u4E0D\u53D7\u5F71\u54CD\u3002",resetButton:"[enter] \u91CD\u7F6E",restart:"\u91CD\u542F\u540E\u7AEF",restartHint:"\u505C\u6B62 Rove daemon \u5E76\u9000\u51FA\u5F53\u524D Rove \u7A97\u53E3\uFF0C\u4E0B\u6B21\u542F\u52A8\u4F1A\u62C9\u8D77\u4E00\u4E2A\u5168\u65B0\u7684 daemon\u2014\u2014\u65E0\u9700\u6740\u8FDB\u7A0B\u5373\u53EF\u5E94\u7528 daemon / orchestrator / engine \u7684\u6539\u52A8\u3002\u5176\u4ED6\u5DF2\u8FDE\u63A5\u7684 Rove \u7A97\u53E3\u4E5F\u4F1A\u65AD\u5F00\u8FDE\u63A5\u3002",restartButton:"[enter] \u91CD\u542F",doctorHint:"daemon \u5361\u4F4F\u6216\u65E0\u54CD\u5E94\uFF1F\u5728 shell \u91CC\u8FD0\u884C `rove daemon restart`\uFF0C\u7136\u540E\u91CD\u65B0\u542F\u52A8 Rove\u3002Hosted PTY \u5F15\u64CE\u4F1A\u8BDD\u4E0D\u4F1A\u56E0 daemon \u91CD\u542F\u800C\u9000\u51FA\u3002",experimental:"\u5B9E\u9A8C\u6027",remoteHint:"\u8FDC\u7A0B\u9879\u76EE\uFF08SSH\uFF09\uFF1A\u6CE8\u518C\u4E00\u4E2A git worktree + \u5F15\u64CE\u90FD\u901A\u8FC7 SSH \u8DD1\u5728\u53E6\u4E00\u53F0\u4E3B\u673A\u4E0A\u3001\u7531\u672C\u5730 Rove \u9A71\u52A8\u7684\u9879\u76EE\u3002\u5C1A\u672A\u5B8C\u6210\u2014\u2014\u6587\u4EF6/diff \u9762\u677F\u5BF9\u8FDC\u7A0B\u4ECD\u4F1A\u964D\u7EA7\u3002\u542F\u7528 `rove add --remote`\u3002",remote:"\u8FDC\u7A0B\u9879\u76EE",autoStatusHint:"\u81EA\u52A8\u72B6\u6001\u6D41\u8F6C\uFF1Abacklog \u4EFB\u52A1\u5728\u5176\u5F15\u64CE\u5F00\u59CB\u4E00\u8F6E\u65F6\u79FB\u5230 in_progress\uFF0C\u65B0\u4F1A\u8BDD\u4F1A\u62FF\u5230\u4E00\u6761\u7CFB\u7EDF\u63D0\u793A\uFF0C\u544A\u8BC9 agent \u5B8C\u6210\u540E\u81EA\u884C\u8BBE\u4E3A in_review\u3002\u7EDD\u4E0D\u89E6\u78B0 done/canceled\u3002",autoStatus:"\u81EA\u52A8\u72B6\u6001\u6D41\u8F6C",dispatcherHint:"\u73B0\u573A\u7B14\u8BB0\u8C03\u5EA6\u5668\uFF1A\u4EFB\u52A1\u4F1A\u8BDD\u63D0\u4EA4\u4E00\u884C\u7ECF\u9A8C\uFF08`rove api note`\uFF09\uFF0Cdaemon \u5C06\u6BCF\u6761\u8F6C\u53D1\u7ED9\u4ED3\u5E93\u7684\u4E3B\u4F1A\u8BDD\uFF0C\u4E3B\u4F1A\u8BDD\u518D\u628A\u5B83\u4EEC\u8F6C\u8FBE\u7ED9\u80FD\u53D7\u76CA\u7684\u8FDB\u884C\u4E2D\u4EFB\u52A1\uFF08`rove api dispatch`\uFF09\u3002\u76EE\u524D\u7531 Web \u6258\u7BA1\u7684\u4F1A\u8BDD\u4F1A\u6536\u5230\u8F6C\u8FBE\u3002",dispatcher:"\u73B0\u573A\u7B14\u8BB0\u8C03\u5EA6\u5668"}}});var Oh,jh;var Fh=h(()=>{Oh={nav:{workspace:"Workspace",kanban:"Kanban",automations:"Routines",issues:"Issues"},header:{projects:"PROJECTS",tasks:"TASKS",scratch:"SCRATCH"},search:{placeholder:"fuzzy filter"},menu:{open:"Open",openTab:"Open tab",closeTab:"Close tab",newChat:"New conversation",newShell:"New shell",newTask:"New task",rename:"Rename",pin:"Pin",unpin:"Unpin",reorder:"Reorder row",delete:"Delete"},moveChip:" move",recentJump:"Recent: {title}",empty:{noMatchSearch:"No matching tasks \u2014 esc to clear.",noActiveProject:"No active tasks for this project.",noActive:"No active tasks \u2014 create one above."},activity:{rateLimited:"rate limited",permissionNeeded:"needs permission",error:"error"},subtitle:{noTracking:"no activity tracking",materializing:"materializing",deleting:"deleting",deleteFailed:"delete failed"},hints:{headerFolded:"\u2500\u2500 keys ?\u25B8 \u2500\u2500",headerUnfolded:"\u2500\u2500 keys ?\u25BE \u2500\u2500",fullHelp:"full help",newTask:"new task",settings:"settings",open:"open",focusEngine:"focus engine",openWorktree:"open wt",delete:"delete",views:"views",project:"project",reorder:"reorder",done:"done"},reBranch:{title:"Set branch",fieldLabel:"branch",hintNoBranches:"(no local branches \u2014 type a new name)",hintNoMatch:"(no match \u2014 enter renames to this branch)",footer:"\u2191\u2193 pick \xB7 enter set \xB7 esc cancel"},toast:{noDaemonWorktree:"No daemon running \u2014 can't create the worktree",noDaemonOpen:"No daemon running \u2014 can't open this task",noEditor:"No editor found \u2014 set ROVE_OPEN_EDITOR (e.g. 'code', 'cursor', 'nvim')",openWorktreeFailed:"Couldn't open worktree with {label}",sessionStartFailed:"Couldn't start this task's session",moveTaskFailed:"Couldn't move task: {message}",alreadyLatest:"Already on the latest version (v{version})",worktreeErrorNotGit:"This project isn't a git repo yet \u2014 a task needs a git branch. Run `git init` (+ a first commit) in the project, then open the task. Non-git support is coming.",worktreeErrorGeneric:"Couldn't create the worktree: {message}",scratchAdopted:"Adopted into {repo} \u2014 save it as a project from New Task if you want it in the picker",scratchOpenFailed:"Couldn't open a scratch shell: {message}",scratchCloseFailed:"Couldn't close the scratch task: {message}",worktreeGoneTitle:'Worktree for "{title}" is gone',worktreeGoneBody:"Closed {count} tab(s). The branch {branch} is still there \u2014 reopen the task to re-create its worktree."}},jh={nav:{workspace:"\u5DE5\u4F5C\u533A",kanban:"\u770B\u677F",automations:"\u4F8B\u884C\u4EFB\u52A1",issues:"\u8BAE\u9898"},header:{projects:"\u9879\u76EE",tasks:"\u4EFB\u52A1",scratch:"\u4E34\u65F6"},search:{placeholder:"\u6A21\u7CCA\u641C\u7D22"},menu:{open:"\u6253\u5F00",openTab:"\u6253\u5F00\u8BE5\u6807\u7B7E\u9875",closeTab:"\u5173\u95ED\u8BE5\u6807\u7B7E\u9875",newChat:"\u65B0\u5EFA\u4F1A\u8BDD",newShell:"\u65B0\u5EFA\u7EC8\u7AEF",newTask:"\u65B0\u5EFA\u4EFB\u52A1",rename:"\u91CD\u547D\u540D",pin:"\u7F6E\u9876",unpin:"\u53D6\u6D88\u7F6E\u9876",reorder:"\u91CD\u65B0\u6392\u5E8F",delete:"\u5220\u9664"},moveChip:" \u79FB\u52A8",recentJump:"\u6700\u8FD1:{title}",empty:{noMatchSearch:"\u65E0\u5339\u914D\u4EFB\u52A1\u2014\u2014\u6309 esc \u6E05\u9664\u3002",noActiveProject:"\u8BE5\u9879\u76EE\u6682\u65E0\u6D3B\u8DC3\u4EFB\u52A1\u3002",noActive:"\u6682\u65E0\u6D3B\u8DC3\u4EFB\u52A1\u2014\u2014\u5728\u4E0A\u65B9\u65B0\u5EFA\u3002"},activity:{rateLimited:"\u8BF7\u6C42\u53D7\u9650",permissionNeeded:"\u7B49\u5F85\u6388\u6743",error:"\u9519\u8BEF"},subtitle:{noTracking:"\u4E0D\u8DDF\u8E2A\u6D3B\u52A8",materializing:"\u6B63\u5728\u521B\u5EFA worktree",deleting:"\u6B63\u5728\u5220\u9664",deleteFailed:"\u5220\u9664\u5931\u8D25"},hints:{headerFolded:"\u2500\u2500 \u5FEB\u6377\u952E ?\u25B8 \u2500\u2500",headerUnfolded:"\u2500\u2500 \u5FEB\u6377\u952E ?\u25BE \u2500\u2500",fullHelp:"\u5B8C\u6574\u5E2E\u52A9",newTask:"\u65B0\u5EFA\u4EFB\u52A1",settings:"\u8BBE\u7F6E",open:"\u6253\u5F00",focusEngine:"\u805A\u7126\u5F15\u64CE",openWorktree:"\u6253\u5F00 worktree",delete:"\u5220\u9664",views:"\u89C6\u56FE",project:"\u9879\u76EE",reorder:"\u91CD\u65B0\u6392\u5E8F",done:"\u5B8C\u6210"},reBranch:{title:"\u8BBE\u7F6E\u5206\u652F",fieldLabel:"\u5206\u652F",hintNoBranches:"\uFF08\u6CA1\u6709\u672C\u5730\u5206\u652F\u2014\u2014\u8F93\u5165\u65B0\u540D\u79F0\uFF09",hintNoMatch:"\uFF08\u65E0\u5339\u914D\u2014\u2014\u56DE\u8F66\u5C06\u5206\u652F\u91CD\u547D\u540D\u4E3A\u6B64\u540D\uFF09",footer:"\u2191\u2193 \u9009\u62E9 \xB7 enter \u8BBE\u7F6E \xB7 esc \u53D6\u6D88"},toast:{noDaemonWorktree:"\u5B88\u62A4\u8FDB\u7A0B\u672A\u8FD0\u884C\u2014\u2014\u65E0\u6CD5\u521B\u5EFA worktree",noDaemonOpen:"\u5B88\u62A4\u8FDB\u7A0B\u672A\u8FD0\u884C\u2014\u2014\u65E0\u6CD5\u6253\u5F00\u6B64\u4EFB\u52A1",noEditor:"\u672A\u627E\u5230\u7F16\u8F91\u5668\u2014\u2014\u8BF7\u8BBE\u7F6E ROVE_OPEN_EDITOR\uFF08\u5982 'code'\u3001'cursor'\u3001'nvim'\uFF09",openWorktreeFailed:"\u65E0\u6CD5\u7528 {label} \u6253\u5F00 worktree",sessionStartFailed:"\u65E0\u6CD5\u542F\u52A8\u6B64\u4EFB\u52A1\u7684\u4F1A\u8BDD",moveTaskFailed:"\u65E0\u6CD5\u79FB\u52A8\u4EFB\u52A1\uFF1A{message}",alreadyLatest:"\u5DF2\u662F\u6700\u65B0\u7248\u672C\uFF08v{version}\uFF09",worktreeErrorNotGit:"\u8BE5\u9879\u76EE\u5C1A\u975E git \u4ED3\u5E93\u2014\u2014\u4EFB\u52A1\u9700\u8981 git \u5206\u652F\u3002\u8BF7\u5728\u9879\u76EE\u4E2D\u6267\u884C `git init`\uFF08+ \u9996\u6B21\u63D0\u4EA4\uFF09\u540E\u518D\u6253\u5F00\u4EFB\u52A1\u3002\u975E git \u9879\u76EE\u7684\u652F\u6301\u5373\u5C06\u63A8\u51FA\u3002",worktreeErrorGeneric:"\u65E0\u6CD5\u521B\u5EFA worktree\uFF1A{message}",scratchAdopted:"\u5DF2\u5F52\u5165 {repo}\u2014\u2014\u82E5\u8981\u51FA\u73B0\u5728\u9879\u76EE\u9009\u62E9\u5668\u91CC,\u53EF\u5728\u65B0\u5EFA\u4EFB\u52A1\u4E2D\u4FDD\u5B58\u4E3A\u9879\u76EE",scratchOpenFailed:"\u65E0\u6CD5\u6253\u5F00\u4E34\u65F6 Shell:{message}",scratchCloseFailed:"\u65E0\u6CD5\u5173\u95ED\u4E34\u65F6\u4EFB\u52A1:{message}",worktreeGoneTitle:'"{title}" \u7684 worktree \u5DF2\u6D88\u5931',worktreeGoneBody:"\u5DF2\u5173\u95ED {count} \u4E2A\u6807\u7B7E\u9875\u3002\u5206\u652F {branch} \u4ECD\u5728\u2014\u2014\u91CD\u65B0\u6253\u5F00\u8BE5\u4EFB\u52A1\u4F1A\u91CD\u5EFA worktree\u3002"}}});var Lh,_h;var Ah=h(()=>{Lh={noTask:"(no task \u2014 press n to create)",exited:"process exited \u2014 F5 restarts it",restoring:"restoring session\u2026",tab:{groupTitle:"group {n}",renameTitle:"Rename tab",renameField:"tab title",renameSubmit:"rename",chooseEngineHint:"\u2190/\u2192 or h/l choose, enter confirm, esc cancel",newChat:{title:"New conversation",destLabel:"tab \u2014 destination: ",destTab:"new tab in this worktree",destFork:"fork a child task (new worktree)",ctxLabel:"ctrl+f \u2014 context: ",ctxFresh:"fresh conversation",ctxContinue:"continue this conversation",scratchChoice:"scratch shell"},cannotCloseLast:"Cannot close the only tab",nothingToFork:"No conversation in this tab to fork yet",noTranscriptToHandOff:"{engine} keeps no readable transcript to hand over"},split:{renameTitle:"Rename split",renameField:"split name"},scrolledBack:"\u2191 scrolled {lines}L (ctrl+pgdn to follow)",unavailable:{shellMissing:"terminal unavailable \u2014 configured shell is not available",spawnFailed:"terminal unavailable \u2014 shell could not start"},reset:{title:"Reset terminal?",body:"The running shell will be killed and a fresh one will spawn at the worktree. Any in-flight processes (vim, htop, paused jobs) end immediately."}},_h={noTask:"\uFF08\u65E0\u4EFB\u52A1 \u2014\u2014 \u6309 n \u521B\u5EFA\uFF09",exited:"\u8FDB\u7A0B\u5DF2\u9000\u51FA \u2014\u2014 \u6309 F5 \u91CD\u542F",restoring:"\u6B63\u5728\u6062\u590D\u4F1A\u8BDD\u2026",tab:{groupTitle:"group {n}",renameTitle:"\u91CD\u547D\u540D\u6807\u7B7E\u9875",renameField:"\u6807\u7B7E\u9875\u540D\u79F0",renameSubmit:"\u91CD\u547D\u540D",chooseEngineHint:"\u2190/\u2192 \u6216 h/l \u9009\u62E9\uFF0Center \u786E\u8BA4\uFF0Cesc \u53D6\u6D88",newChat:{title:"\u65B0\u5EFA\u5BF9\u8BDD",destLabel:"tab \u2014\u2014 \u843D\u70B9\uFF1A",destTab:"\u672C worktree \u65B0\u6807\u7B7E\u9875",destFork:"fork \u5B50\u4EFB\u52A1\uFF08\u65B0 worktree\uFF09",ctxLabel:"ctrl+f \u2014\u2014 \u4E0A\u4E0B\u6587\uFF1A",ctxFresh:"\u5168\u65B0\u5BF9\u8BDD",ctxContinue:"\u63A5\u7740\u5F53\u524D\u5BF9\u8BDD",scratchChoice:"\u4E34\u65F6 shell"},cannotCloseLast:"\u65E0\u6CD5\u5173\u95ED\u552F\u4E00\u7684\u6807\u7B7E\u9875",nothingToFork:"\u8FD9\u4E2A\u6807\u7B7E\u9875\u8FD8\u6CA1\u6709\u53EF\u6D3E\u751F\u7684\u5BF9\u8BDD",noTranscriptToHandOff:"{engine} \u6CA1\u6709\u53EF\u8BFB\u7684\u5BF9\u8BDD\u8BB0\u5F55\uFF0C\u65E0\u6CD5\u4EA4\u63A5"},split:{renameTitle:"\u91CD\u547D\u540D\u5206\u5C4F",renameField:"\u5206\u5C4F\u540D\u79F0"},scrolledBack:"\u2191 \u5DF2\u56DE\u6EDA {lines} \u884C\uFF08ctrl+pgdn \u56DE\u5230\u5E95\u90E8\uFF09",unavailable:{shellMissing:"\u7EC8\u7AEF\u4E0D\u53EF\u7528 \u2014\u2014 \u914D\u7F6E\u7684 shell \u4E0D\u5B58\u5728",spawnFailed:"\u7EC8\u7AEF\u4E0D\u53EF\u7528 \u2014\u2014 shell \u542F\u52A8\u5931\u8D25"},reset:{title:"\u91CD\u7F6E\u7EC8\u7AEF\uFF1F",body:"\u6B63\u5728\u8FD0\u884C\u7684 shell \u4F1A\u88AB\u6740\u6389\u5E76\u5728 worktree \u91CD\u65B0\u542F\u52A8\uFF0C\u8FDB\u884C\u4E2D\u7684\u8FDB\u7A0B\uFF08vim\u3001htop\u3001\u6682\u505C\u7684\u4EFB\u52A1\uFF09\u4F1A\u7ACB\u5373\u7ED3\u675F\u3002"}}});var Ch,Eh;var Rh=h(()=>{Ch={pageTitle:"ROVE UPDATE",current:"current",latest:"latest",releaseUrlUnavailable:"release URL unavailable",statusReleaseOpened:"Opened release page in your browser.",statusReleaseError:"Could not open release URL.",statusRunningUpdater:"Closing the TUI and running the updater in this terminal...",loadingNotes:"Loading release notes...",notesUnavailable:"Release notes are unavailable. Use Open release to view the GitHub release page.",changesSectionHeader:"\u2500\u2500 changes from v{from} to v{to} \u2500\u2500",updateComplete:"Rove update complete. Relaunch Rove to use the new version.",updateFailed:"Rove update failed with exit code {code}.",pressAnyKey:"Press any key to close this update window.",actions:{updateNow:"Update now",openRelease:"Open release",close:"Close",closeDetail:"return to the workspace"},skew:{title:"\u26A0 DAEMON OUT OF DATE",olderBuild:"an older build",hint:"daemon is {daemon} \u2014 you launched v{clientVersion}. Run `rove daemon restart`, then relaunch Rove"},versions:{pageTitle:"ROVE VERSIONS",loading:"Loading releases...",unavailable:"Could not fetch releases (offline or rate-limited).",tagCurrent:"current",tagLatest:"latest",tagBreaking:"breaking",breakingWarning:"\u26A0 installing this crosses breaking version(s) {versions} \u2014 run `rove reset` after the update.",footerHint:"j/k select \xB7 enter install \xB7 q close"}},Eh={pageTitle:"ROVE \u66F4\u65B0",current:"\u5F53\u524D",latest:"\u6700\u65B0",releaseUrlUnavailable:"\u53D1\u5E03\u94FE\u63A5\u4E0D\u53EF\u7528",statusReleaseOpened:"\u5DF2\u5728\u6D4F\u89C8\u5668\u4E2D\u6253\u5F00\u53D1\u5E03\u8BF4\u660E\u9875\u9762\u3002",statusReleaseError:"\u65E0\u6CD5\u6253\u5F00\u53D1\u5E03\u94FE\u63A5\u3002",statusRunningUpdater:"\u6B63\u5728\u5173\u95ED TUI\uFF0C\u5E76\u5728\u5F53\u524D\u7EC8\u7AEF\u4E2D\u8FD0\u884C\u66F4\u65B0\u7A0B\u5E8F\u2026\u2026",loadingNotes:"\u6B63\u5728\u52A0\u8F7D\u53D1\u5E03\u8BF4\u660E\u2026\u2026",notesUnavailable:"\u53D1\u5E03\u8BF4\u660E\u4E0D\u53EF\u7528\u3002\u8BF7\u4F7F\u7528\u300C\u6253\u5F00\u53D1\u5E03\u9875\u300D\u67E5\u770B GitHub \u53D1\u5E03\u9875\u9762\u3002",changesSectionHeader:"\u2500\u2500 v{from} \u81F3 v{to} \u7684\u53D8\u66F4 \u2500\u2500",updateComplete:"Rove \u66F4\u65B0\u5B8C\u6210\u3002\u8BF7\u91CD\u65B0\u542F\u52A8 Rove \u4EE5\u4F7F\u7528\u65B0\u7248\u672C\u3002",updateFailed:"Rove \u66F4\u65B0\u5931\u8D25\uFF0C\u9000\u51FA\u7801\u4E3A {code}\u3002",pressAnyKey:"\u6309\u4EFB\u610F\u952E\u5173\u95ED\u6B64\u66F4\u65B0\u7A97\u53E3\u3002",actions:{updateNow:"\u7ACB\u5373\u66F4\u65B0",openRelease:"\u6253\u5F00\u53D1\u5E03\u9875",close:"\u5173\u95ED",closeDetail:"\u8FD4\u56DE\u5DE5\u4F5C\u533A"},skew:{title:"\u26A0 DAEMON \u7248\u672C\u4E0D\u4E00\u81F4",olderBuild:"\u65E7\u7248\u672C\u6784\u5EFA",hint:"daemon \u8FD0\u884C\u7684\u662F {daemon}\uFF0C\u800C\u4F60\u542F\u52A8\u7684\u662F v{clientVersion}\u3002\u8BF7\u8FD0\u884C `rove daemon restart`\uFF0C\u7136\u540E\u91CD\u65B0\u542F\u52A8 Rove"},versions:{pageTitle:"ROVE \u7248\u672C\u5217\u8868",loading:"\u6B63\u5728\u52A0\u8F7D\u53D1\u5E03\u5217\u8868\u2026\u2026",unavailable:"\u65E0\u6CD5\u83B7\u53D6\u53D1\u5E03\u5217\u8868\uFF08\u79BB\u7EBF\u6216\u89E6\u53D1\u9650\u6D41\uFF09\u3002",tagCurrent:"\u5F53\u524D",tagLatest:"\u6700\u65B0",tagBreaking:"breaking",breakingWarning:"\u26A0 \u5B89\u88C5\u8BE5\u7248\u672C\u4F1A\u8DE8\u8FC7 breaking \u7248\u672C {versions}\u2014\u2014\u66F4\u65B0\u540E\u9700\u8FD0\u884C `rove reset`\u3002",footerHint:"j/k \u9009\u62E9 \xB7 enter \u5B89\u88C5 \xB7 q \u5173\u95ED"}}});var Th,Sh;var Ph=h(()=>{Th={title:"ISSUES",noRepo:"no project",empty:"No open issues.",assignedFilter:"assigned to me",starting:"Starting work on #{number}\u2026",startedNoEngine:"Created {title}, but its engine did not start.",errorHint:{noRemote:"Add a GitHub remote (`git remote add origin <url>`) and try again, or press q / esc to close.",ghMissing:"Install the `gh` CLI and authenticate, or press q / esc to close.",auth:"Run `gh auth login`, or press q / esc to close.",fallback:"{message} \xB7 press q / esc to close"}},Sh={title:"\u8BAE\u9898",noRepo:"\u65E0\u9879\u76EE",empty:"\u6CA1\u6709\u5F00\u653E\u7684\u8BAE\u9898\u3002",assignedFilter:"\u5206\u914D\u7ED9\u6211\u7684",starting:"\u6B63\u5728\u5F00\u59CB\u5904\u7406 #{number}\u2026",startedNoEngine:"\u5DF2\u521B\u5EFA {title}\uFF0C\u4F46\u5F15\u64CE\u6CA1\u6709\u542F\u52A8\u3002",errorHint:{noRemote:"\u6DFB\u52A0 GitHub remote\uFF08`git remote add origin <url>`\uFF09\u540E\u91CD\u8BD5\uFF0C\u6216\u6309 q / esc \u5173\u95ED\u3002",ghMissing:"\u5B89\u88C5 `gh` CLI \u5E76\u767B\u5F55\uFF0C\u6216\u6309 q / esc \u5173\u95ED\u3002",auth:"\u6267\u884C `gh auth login`\uFF0C\u6216\u6309 q / esc \u5173\u95ED\u3002",fallback:"{message} \xB7 \u6309 q / esc \u5173\u95ED"}}});var Ih,xh;var yh=h(()=>{Ih={quit:{confirmTitle:"Quit Rove?",confirmBody:"The daemon and task sessions keep running. This closes only the native workspace.",confirmLabel:"Quit"},empty:{selectTask:"Select a task with a worktree"},welcome:{title:"Welcome to Rove",tagline:"Run several AI coding sessions side by side \u2014 each task gets its own git worktree and branch.",worktreeExplain:"Each task creates its own git worktree directory and branch, so multiple AI sessions can edit the same codebase in parallel without colliding.",stepNew:"creates your first task \u2014 pick a repo, a base branch, an engine",stepHelp:"shows every shortcut reachable from the current focus",stepPrefix:"opens the command menu",enginesFound:"\u2713 engines: {list}",enginesMissing:"\u2717 no engine CLI found \u2014 install claude, codex, copilot, or kimi, then restart Rove",gitMissing:"\u2717 git not found on PATH \u2014 Rove needs git to create worktrees",doctorHint:"run `rove doctor` in a shell for the full diagnosis",docsHint:"docs: https://docs.rove.run"},attention:{none:"No available Inbox items"},inbox:{title:"INBOX",empty:"No pending attention",openHint:"enter open",clearHint:"d clear",more:"+{count} more",section:{attention:"ATTENTION",recent:"RECENT"},state:{done:"done",needsInput:"needs input",error:"error",rateLimited:"rate limited",running:"running",promptDeferred:"message queued"},deferredToast:"Message queued \u2014 composer busy",deferredStillQueued:"Still typing? The queued message stays in the Inbox \u2014 open it again to send.",deferredUnavailable:"That tab isn't running \u2014 the queued message stays in the Inbox.",deferredInsertFailed:"Couldn't insert the queued message \u2014 it's still in the Inbox."},terminalComing:"Embedded terminal is starting..."},xh={quit:{confirmTitle:"\u9000\u51FA Rove\uFF1F",confirmBody:"\u5B88\u62A4\u8FDB\u7A0B\u548C\u4EFB\u52A1\u4F1A\u8BDD\u4F1A\u7EE7\u7EED\u8FD0\u884C\uFF0C\u8FD9\u91CC\u53EA\u5173\u95ED\u539F\u751F\u5DE5\u4F5C\u533A\u3002",confirmLabel:"\u9000\u51FA"},empty:{selectTask:"\u8BF7\u9009\u62E9\u4E00\u4E2A\u5E26 worktree \u7684\u4EFB\u52A1"},welcome:{title:"\u6B22\u8FCE\u4F7F\u7528 Rove",tagline:"\u5E76\u884C\u8FD0\u884C\u591A\u4E2A AI \u7F16\u7801\u4F1A\u8BDD\u2014\u2014\u6BCF\u4E2A\u4EFB\u52A1\u90FD\u6709\u81EA\u5DF1\u7684 git worktree \u548C\u5206\u652F\u3002",worktreeExplain:"\u6BCF\u4E2A\u4EFB\u52A1\u90FD\u4F1A\u521B\u5EFA\u72EC\u7ACB\u7684 git worktree \u76EE\u5F55\u548C\u5206\u652F\uFF0C\u591A\u4E2A AI \u4F1A\u8BDD\u53EF\u4EE5\u5E76\u884C\u4FEE\u6539\u540C\u4E00\u4EFD\u4EE3\u7801\u5E93\uFF0C\u4E92\u4E0D\u5E72\u6270\u3002",stepNew:"\u521B\u5EFA\u4F60\u7684\u7B2C\u4E00\u4E2A\u4EFB\u52A1\u2014\u2014\u9009\u4ED3\u5E93\u3001\u57FA\u7840\u5206\u652F\u548C\u5F15\u64CE",stepHelp:"\u67E5\u770B\u5F53\u524D\u7126\u70B9\u4E0B\u7684\u5168\u90E8\u5FEB\u6377\u952E",stepPrefix:"\u6253\u5F00\u547D\u4EE4\u83DC\u5355",enginesFound:"\u2713 \u5DF2\u68C0\u6D4B\u5230\u5F15\u64CE:{list}",enginesMissing:"\u2717 \u672A\u627E\u5230\u5F15\u64CE CLI\u2014\u2014\u8BF7\u5B89\u88C5 claude\u3001codex\u3001copilot \u6216 kimi \u540E\u91CD\u542F Rove",gitMissing:"\u2717 PATH \u4E0A\u6CA1\u6709 git\u2014\u2014Rove \u9700\u8981 git \u6765\u521B\u5EFA worktree",doctorHint:"\u5728 shell \u91CC\u8FD0\u884C `rove doctor` \u67E5\u770B\u5B8C\u6574\u8BCA\u65AD",docsHint:"\u6587\u6863:https://docs.rove.run"},attention:{none:"\u6536\u4EF6\u7BB1\u4E2D\u6CA1\u6709\u53EF\u6253\u5F00\u7684\u9879\u76EE"},inbox:{title:"\u6536\u4EF6\u7BB1",empty:"\u6682\u65E0\u5F85\u5904\u7406",openHint:"enter \u6253\u5F00",clearHint:"d \u6E05\u9664",more:"\u8FD8\u6709 {count} \u6761",section:{attention:"\u5F85\u5904\u7406",recent:"\u6700\u8FD1\u4F7F\u7528"},state:{done:"\u5B8C\u6210",needsInput:"\u9700\u8981\u8F93\u5165",error:"\u51FA\u9519",rateLimited:"\u9650\u6D41",running:"\u8FDB\u884C\u4E2D",promptDeferred:"\u6D88\u606F\u5DF2\u6392\u961F"},deferredToast:"\u6D88\u606F\u5DF2\u6392\u961F\u2014\u2014composer \u6B63\u5FD9",deferredStillQueued:"\u8FD8\u5728\u6253\u5B57\uFF1F\u6392\u961F\u7684\u6D88\u606F\u7559\u5728\u6536\u4EF6\u7BB1\u2014\u2014\u518D\u6253\u5F00\u4E00\u6B21\u5373\u53EF\u53D1\u9001\u3002",deferredUnavailable:"\u8BE5\u6807\u7B7E\u9875\u672A\u8FD0\u884C\u2014\u2014\u6392\u961F\u7684\u6D88\u606F\u7559\u5728\u6536\u4EF6\u7BB1\u3002",deferredInsertFailed:"\u65E0\u6CD5\u63D2\u5165\u6392\u961F\u7684\u6D88\u606F\u2014\u2014\u5B83\u4ECD\u5728\u6536\u4EF6\u7BB1\u4E2D\u3002"},terminalComing:"\u5D4C\u5165\u7EC8\u7AEF\u6B63\u5728\u542F\u52A8\u2026\u2026"}});var wh,vh;var fh=h(()=>{wh={title:"Worktrees",loading:"Loading worktrees\u2026",noProjects:"No local projects known to Rove yet.",noWorktrees:"No worktrees.",badge:{kobeManaged:"rove",dirty:"dirty",remoteOn:"on remote",remoteOff:"not pushed",remoteUnknown:"remote unknown"},verdict:{prOpen:"PR open",prMerged:"merged (PR)",inMain:"in main",prClosed:"PR closed",idle:"stale"},row:{detached:"(detached)",created:"created {age} ago",linkedTask:"task: {title}"},delete:{button:"Delete",confirmTitle:"Delete worktree?",confirmBody:'Delete the worktree for "{branch}"? This removes the working directory; the branch itself is kept.',forceTitle:"Force delete worktree?",forceBody:'"{branch}" has uncommitted or untracked changes that will be PERMANENTLY LOST. Force delete anyway?',failed:"Failed to delete worktree: {error}"},land:{button:"Land",confirmTitle:"Land branch?",confirmBody:`Merge "{branch}" into the base repo's current branch, then remove this worktree? The branch is kept. A dirty base checkout is refused; conflicts abort with a file list.`,noTask:"This worktree isn't tracked as a Rove task \u2014 nothing to land.",conflict:"Land hit conflicts (merge aborted). Resolve by hand: {files}",dirtyBase:"The base checkout has uncommitted changes \u2014 commit or stash them, then land.",failed:"Land failed: {error}",done:'Landed "{branch}" onto {landedOn} ({commit}).',worktreeKept:"Landed, but the worktree was kept: {reason}",worktreePathStale:"Landed and removed the worktree, but the task still points at it: {reason}"},hint:{}},vh={title:"\u5DE5\u4F5C\u6811",loading:"\u6B63\u5728\u52A0\u8F7D worktree\u2026",noProjects:"Rove \u8FD8\u6CA1\u6709\u5DF2\u77E5\u7684\u672C\u5730\u9879\u76EE\u3002",noWorktrees:"\u6CA1\u6709 worktree\u3002",badge:{kobeManaged:"rove",dirty:"\u6709\u6539\u52A8",remoteOn:"\u5DF2\u63A8\u9001",remoteOff:"\u672A\u63A8\u9001",remoteUnknown:"\u8FDC\u7AEF\u672A\u77E5"},verdict:{prOpen:"PR \u8BC4\u5BA1\u4E2D",prMerged:"\u5DF2\u5408\u5165 (PR)",inMain:"\u5DF2\u5728\u4E3B\u5206\u652F",prClosed:"PR \u5DF2\u5173\u95ED",idle:"\u9648\u65E7"},row:{detached:"(\u6E38\u79BB\u72B6\u6001)",created:"{age}\u524D\u521B\u5EFA",linkedTask:"\u4EFB\u52A1\uFF1A{title}"},delete:{button:"\u5220\u9664",confirmTitle:"\u5220\u9664 worktree\uFF1F",confirmBody:'\u786E\u5B9A\u5220\u9664 "{branch}" \u5BF9\u5E94\u7684 worktree\uFF1F\u5DE5\u4F5C\u76EE\u5F55\u4F1A\u88AB\u79FB\u9664\uFF0C\u5206\u652F\u672C\u8EAB\u4F1A\u4FDD\u7559\u3002',forceTitle:"\u5F3A\u5236\u5220\u9664 worktree\uFF1F",forceBody:'"{branch}" \u5B58\u5728\u672A\u63D0\u4EA4\u6216\u672A\u8DDF\u8E2A\u7684\u6539\u52A8\uFF0C\u5F3A\u5236\u5220\u9664\u540E\u5C06\u6C38\u4E45\u4E22\u5931\u3002\u4ECD\u8981\u5F3A\u5236\u5220\u9664\u5417\uFF1F',failed:"\u5220\u9664 worktree \u5931\u8D25\uFF1A{error}"},land:{button:"\u5408\u5165",confirmTitle:"\u5408\u5165\u5206\u652F\uFF1F",confirmBody:'\u628A "{branch}" \u5408\u5165\u57FA\u4ED3\u5E93\u5F53\u524D\u5206\u652F\uFF0C\u7136\u540E\u79FB\u9664\u8FD9\u4E2A worktree\uFF1F\u5206\u652F\u4F1A\u4FDD\u7559\u3002\u57FA\u7840\u68C0\u51FA\u6709\u672A\u63D0\u4EA4\u6539\u52A8\u4F1A\u88AB\u62D2\u7EDD\uFF1B\u51B2\u7A81\u4F1A\u4E2D\u6B62\u5E76\u7ED9\u51FA\u6587\u4EF6\u6E05\u5355\u3002',noTask:"\u8BE5 worktree \u672A\u4F5C\u4E3A Rove \u4EFB\u52A1\u88AB\u8DDF\u8E2A\u2014\u2014\u6CA1\u6709\u53EF\u5408\u5165\u7684\u5BF9\u8C61\u3002",conflict:"\u5408\u5165\u9047\u5230\u51B2\u7A81\uFF08\u5DF2\u4E2D\u6B62\uFF09\u3002\u8BF7\u624B\u52A8\u89E3\u51B3\uFF1A{files}",dirtyBase:"\u57FA\u7840\u68C0\u51FA\u6709\u672A\u63D0\u4EA4\u6539\u52A8\u2014\u2014\u8BF7\u5148\u63D0\u4EA4\u6216 stash\uFF0C\u518D\u5408\u5165\u3002",failed:"\u5408\u5165\u5931\u8D25\uFF1A{error}",done:'\u5DF2\u628A "{branch}" \u5408\u5165 {landedOn}\uFF08{commit}\uFF09\u3002',worktreeKept:"\u5DF2\u5408\u5165\uFF0C\u4F46 worktree \u4FDD\u7559\u4E86\uFF1A{reason}",worktreePathStale:"\u5DF2\u5408\u5165\u5E76\u79FB\u9664 worktree\uFF0C\u4F46\u4EFB\u52A1\u4ECD\u6307\u5411\u5B83\uFF1A{reason}"},hint:{}}});function j$(Z){return typeof Z==="string"&&bQ.some((X)=>X.id===Z)}var Sq0,Pq0,bQ,O$,gQ="en";var kQ=h(()=>{ym();fm();km();um();pm();nm();sm();em();Jh();Yh();qh();Kh();Mh();Dh();Fh();Ah();Rh();Ph();yh();fh();Sq0={settings:Nh,tasks:Oh,terminal:Lh,files:mm,newTask:zh,onboarding:Gh,ops:Hh,update:Ch,quickTask:Vh,help:cm,hints:dm,history:am,common:wm,keys:Zh,workspace:Ih,worktrees:wh,kanban:rm,automations:Im,workItems:Th,doctor:bm},Pq0={settings:Wh,tasks:jh,terminal:_h,files:hm,newTask:Qh,onboarding:$h,ops:Uh,update:Eh,quickTask:Bh,help:lm,hints:im,history:om,common:vm,keys:Xh,workspace:xh,worktrees:vh,kanban:tm,automations:xm,workItems:Sh,doctor:gm},bQ=[{id:"en",label:"English"},{id:"zh",label:"\u4E2D\u6587"}],O$={en:Sq0,zh:Pq0}});import{readFileSync as Iq0}from"fs";function $D(Z,X=Tm){try{let J=JSON.parse(Iq0(r2(),"utf8")),z=typeof J.activeTheme==="string"&&X(J.activeTheme)?J.activeTheme:Z,Q=J.transparentBackground!==!1,Y=typeof J.focusAccent==="string"&&dJ.includes(J.focusAccent)?J.focusAccent:null,G=j$(J[GD])?J[GD]:gQ;return{theme:z,transparent:Q,focusAccent:Y,locale:G}}catch{return{theme:Z,transparent:!0,focusAccent:null,locale:gQ}}}var GD="locale";var qD=h(()=>{T5();EK();kQ()});function xq0(Z){return Q3({foreground:xE(Z,"text","dark"),background:xE(Z,"background","dark")})??oZ}function HD(){let Z={...AK};for(let{name:z,theme:Q}of RK())Z[z]=Q;let X=$D(rZ,(z)=>Boolean(Z[z])),J=Z[X.theme]??Z[rZ];return J?xq0(J):oZ}var wE=h(()=>{sZ();EK();YD();qD()});function wq0(Z,X){let J=0,z=X.length-1,Q;if(Z<X[0][0]||Z>X[z][1])return!1;for(;z>=J;)if(Q=J+z>>1,Z>X[Q][1])J=Q+1;else if(Z<X[Q][0])z=Q-1;else return!0;return!1}function fE(Z){gq0(Z)||bq0.onUnexpectedError(Z)}function gq0(Z){return Z instanceof kq0?!0:Z instanceof Error&&Z.name===kE&&Z.message===kE}function mq0(Z,X){let J=this,z=!1,Q;return function(){if(z)return Q;if(z=!0,X)try{Q=Z.apply(J,arguments)}finally{X()}else Q=Z.apply(J,arguments);return Q}}function hq0(Z,X,J=0,z=Z.length){let Q=J,Y=z;for(;Q<Y;){let G=Math.floor((Q+Y)/2);X(Z[G])?Q=G+1:Y=G}return Q-1}function cq0(Z,X){return(J,z)=>X(Z(J),Z(z))}function pq0(Z,X){let J=Object.create(null);for(let z of Z){let Q=X(z),Y=J[Q];Y||(Y=J[Q]=[]),Y.push(z)}return J}function aq0(Z){F$=Z}function cE(Z){return F$?.trackDisposable(Z),Z}function lE(Z){F$?.markAsDisposed(Z)}function mE(Z,X){F$?.setParent(Z,X)}function oq0(Z,X){if(F$)for(let J of Z)F$.setParent(J,X)}function ih(Z){if(dh.is(Z)){let X=[];for(let J of Z)if(J)try{J.dispose()}catch(z){X.push(z)}if(X.length===1)throw X[0];if(X.length>1)throw AggregateError(X,"Encountered errors while disposing of store");return Array.isArray(Z)?[]:Z}else if(Z)return Z.dispose(),Z}function sq0(...Z){let X=nh(()=>ih(Z));return oq0(Z,X),X}function nh(Z){let X=cE({dispose:mq0(()=>{lE(X),Z()})});return X}function lh(Z,X){let J=0,z=X.length-1,Q;if(Z<X[0][0]||Z>X[z][1])return!1;for(;z>=J;)if(Q=J+z>>1,Z>X[Q][1])J=Q+1;else if(Z<X[Q][0])z=Q-1;else return!0;return!1}var vE,yq0,y7,vq0=class{constructor(){if(this.version="6",!y7){y7=new Uint8Array(65536),y7.fill(1),y7[0]=0,y7.fill(0,1,32),y7.fill(0,127,160),y7.fill(2,4352,4448),y7[9001]=2,y7[9002]=2,y7.fill(2,11904,42192),y7[12351]=1,y7.fill(2,44032,55204),y7.fill(2,63744,64256),y7.fill(2,65040,65050),y7.fill(2,65072,65136),y7.fill(2,65280,65377),y7.fill(2,65504,65511);for(let Z=0;Z<vE.length;++Z)y7.fill(0,vE[Z][0],vE[Z][1]+1)}}wcwidth(Z){return Z<32?0:Z<127?1:Z<65536?y7[Z]:wq0(Z,yq0)?0:Z>=131072&&Z<=196605||Z>=196608&&Z<=262141?2:1}charProperties(Z,X){let J=this.wcwidth(Z),z=J===0&&X!==0;if(z){let Q=VD.extractWidth(X);Q===0?z=!1:Q>J&&(J=Q)}return VD.createPropertyValue(0,J,z)}},fq0=class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(Z){setTimeout(()=>{throw Z.stack?bh.isErrorNoTelemetry(Z)?new bh(Z.message+`
|
|
303
303
|
|
|
304
304
|
`+Z.stack):Error(Z.message+`
|
|
305
305
|
|
|
@@ -519,7 +519,7 @@ To install use this command:
|
|
|
519
519
|
|
|
520
520
|
$ bun add react-devtools-core@7 -d
|
|
521
521
|
`.trim()+`
|
|
522
|
-
`);else throw Z}i$.injectIntoDevTools();Fp=i$,bT=Fp.flushSyncFromReconciler??Fp.flushSync});import{engine as gd0,Timeline as kd0}from"@opentui/core";import{createSlotRegistry as hd0}from"@opentui/core";import{TimeToFirstDrawRenderable as tB0}from"@opentui/core";function yp(Z){let X=n$.useRef(Z);return n$.useLayoutEffect(()=>{X.current=Z}),n$.useCallback((...J)=>{let z=X.current;return z(...J)},[])}function sB0(Z,X,J,z,Q){if(!X)return null;try{return X(J)}catch(Y){return Z.reportPluginError({pluginId:z,slot:Q,phase:"error_placeholder",source:"react",error:Y}),null}}var pB0,n$,dB0,iB0,wp,vp,aB0,fp,oB0,iQ,eB0,ZM0,i4=()=>{let{renderer:Z}=fT();if(!Z)throw Error("Renderer not found.");return Z},DO=(Z)=>{let{keyHandler:X}=fT(),J=yp(Z);wp.useEffect(()=>{return X?.on("paste",J),()=>{X?.off("paste",J)}},[X])},nB0=(Z)=>{let X=i4(),J=yp(Z);return vp.useEffect(()=>{return X.on("resize",J),()=>{X.off("resize",J)}},[X]),X},q5=()=>{let Z=i4(),[X,J]=fp.useState({width:Z.width,height:Z.height});return nB0((Q,Y)=>{J({width:Q,height:Y})}),X},rB0;var Z5=h(async()=>{JO();await xp();pB0=p0(n0(),1),n$=p0(n0(),1),dB0=p0(n0(),1),iB0=p0(n0(),1),wp=p0(n0(),1),vp=p0(n0(),1),aB0=p0(n0(),1),fp=p0(n0(),1),oB0=p0(n0(),1),iQ=p0(n0(),1),eB0=p0(n0(),1),ZM0=p0(n0(),1);rB0=class rB0 extends iQ.default.Component{constructor(Z){super(Z);this.state={failure:null}}componentDidCatch(Z){let X=this.props.registry.reportPluginError({pluginId:this.props.pluginId,slot:this.props.slotName,phase:"render",source:"react",error:Z});this.setState({failure:X})}componentDidUpdate(Z){if(Z.resetToken!==this.props.resetToken&&this.state.failure)this.setState({failure:null})}render(){if(this.state.failure){let Z=sB0(this.props.registry,this.props.pluginFailurePlaceholder,this.state.failure,this.props.pluginId,this.props.slotName);if(Z===null||Z===void 0||Z===!1)return this.props.fallbackOnFailure??null;return Z}return this.props.children}};Ep({"time-to-first-draw":tB0})});function H4(Z){return bp.useSyncExternalStore(Z.subscribe,Z.get,Z.get)}var bp;var i3=h(()=>{bp=p0(n0(),1)});function gp(Z,X,J){var z=null;if(J!==void 0&&(z=""+J),X.key!==void 0&&(z=""+X.key),"key"in X){J={};for(var Q in X)Q!=="key"&&(J[Q]=X[Q])}else J=X;return X=J.ref,{$$typeof:XM0,type:Z,key:z,ref:X!==void 0?X:null,props:J}}var XM0,JM0,o5,y,U0;var kp=h(()=>{XM0=Symbol.for("react.transitional.element"),JM0=Symbol.for("react.fragment");o5=JM0,y=gp,U0=gp});var b0=h(()=>{kp()});import{RGBA as zM0}from"@opentui/core";function QM0(){return Object.keys(e8.get().themes)}function a$(Z){return Boolean(e8.get().themes[Z])}function kT(Z,X){if(!Z)return!1;if(!X||typeof X!=="object"||!X.theme)return!1;return e8.update((J)=>({...J,themes:{...J.themes,[Z]:X}})),!0}function mp(){return e8.get().active}function hp(Z){if(!a$(Z))return!1;return e8.update((X)=>({...X,active:Z})),!0}function up(){return e8.get().transparentBackground}function cp(Z){e8.update((X)=>({...X,transparentBackground:Z}))}function lp(){return e8.get().focusAccent}function pp(Z){e8.update((X)=>({...X,focusAccent:Z}))}function YM0(Z){let X=Z.themes[Z.active];if(X)return CK(X,Z.mode);let J=Z.themes[rZ]??Object.values(Z.themes)[0];if(!J)return CK({theme:{background:"#000000",text:"#ffffff"}},Z.mode);return CK(J,Z.mode)}function ip(Z){d9.useMemo(()=>{e8.update((Y)=>({...Y,mode:Z.mode??Y.mode,active:Z.theme&&Y.themes[Z.theme]?Z.theme:Y.active}))},[]);let X=H4(e8),J=i4(),z=d9.useMemo(()=>Sm(YM0(X),X.focusAccent,X.transparentBackground),[X]);d9.useEffect(()=>{if(J?.screenMode==="split-footer")return;J?.setBackgroundColor(z.background??zM0.fromInts(0,0,0))},[J,z]);let Q=d9.useMemo(()=>({theme:z,selected:X.active,transparentBackground:X.transparentBackground,focusAccent:X.focusAccent,mode:()=>X.mode,set(Y){if(!a$(Y))return!1;return e8.update((G)=>({...G,active:Y})),!0},setMode(Y){e8.update((G)=>({...G,mode:Y}))},setTransparentBackground(Y){e8.update((G)=>({...G,transparentBackground:Y}))},setFocusAccent(Y){e8.update((G)=>({...G,focusAccent:Y}))},all:QM0,has:a$}),[z,X]);return y(dp.Provider,{value:Q,children:Z.children})}function w0(){let Z=d9.useContext(dp);if(!Z)throw Error("Theme context must be used within a context provider");return Z}var d9,e8,dp;var S1=h(async()=>{h9();EK();i3();EK();b0();await Z5();d9=p0(n0(),1),e8=SD({themes:{...AK},active:rZ,mode:"dark",transparentBackground:!0,focusAccent:"primary"});dp=d9.createContext(null)});function GM0(){return H4(wu())}function m0(){let Z=GM0();return np.useCallback((X,J)=>U1(X,J),[Z])}var np;var P1=h(()=>{c3();i3();kQ();np=p0(n0(),1)});function h7(Z){if(Z===void 0)return"undefined";if(Z===null)return"null";let X=Array.isArray(Z)?"array":typeof Z,J;try{J=typeof Z==="string"?Z:JSON.stringify(Z)}catch{J=String(Z)}if(J.length>120)J=`${J.slice(0,120)}\u2026`;return`${X}:${J}`}function mT(Z){let X=Z?.changes;if(!X||typeof X!=="object"||Array.isArray(X))return null;let J=new Map;for(let[z,Q]of Object.entries(X)){let Y=Q;if(typeof Y?.added!=="number"||typeof Y.deleted!=="number")return null;J.set(z,{added:Y.added,deleted:Y.deleted})}return J}function hT(Z){let X=Z;if(typeof X?.theme!=="string")return null;return{theme:X.theme,transparentBackground:X.transparentBackground===!0,focusAccent:typeof X.focusAccent==="string"?X.focusAccent:null,locale:typeof X.locale==="string"?X.locale:"",sortMode:X.sortMode==="recent"?"recent":"default",keysCollapsed:X.keysCollapsed===!0,projectFilter:typeof X.projectFilter==="string"&&X.projectFilter.length>0?X.projectFilter:null}}function uT(Z,X){if(Z.size!==X.size)return!1;for(let[J,z]of Z){let Q=X.get(J);if(!Q||!kK(z,Q))return!1}return!0}function ap(Z){let X=Z?.usage;if(!X||typeof X!=="object"||Array.isArray(X))return null;let J=new Map;for(let[z,Q]of Object.entries(X)){let Y=Q;if(typeof Y?.capturedAt!=="number"||!Array.isArray(Y.windows))return null;let G=[];for(let $ of Y.windows){let U=$;if(typeof U?.kind!=="string"||typeof U.label!=="string"||typeof U.percent!=="number")return null;if(U.resetsAt!==null&&typeof U.resetsAt!=="number")return null;G.push({kind:U.kind,label:U.label,percent:U.percent,resetsAt:U.resetsAt})}J.set(z,{windows:G,capturedAt:Y.capturedAt})}return J}function op(Z,X){if(Z.size!==X.size)return!1;for(let[J,z]of Z){let Q=X.get(J);if(!Q||Q.capturedAt!==z.capturedAt||Q.windows.length!==z.windows.length)return!1;for(let Y=0;Y<z.windows.length;Y++){let G=z.windows[Y],$=Q.windows[Y];if(!G||!$||G.kind!==$.kind||G.label!==$.label||G.percent!==$.percent||G.resetsAt!==$.resetsAt)return!1}}return!0}function cT(Z){let X=Z?.activity;if(!X||typeof X!=="object"||Array.isArray(X))return null;let J=new Map;for(let[z,Q]of Object.entries(X)){let Y=Q;if(typeof Y?.mtimeMs!=="number"||typeof Y.completionAt!=="number")return null;if(Y.completionId!==null&&typeof Y.completionId!=="string")return null;J.set(z,{mtimeMs:Y.mtimeMs,completionId:Y.completionId,completionAt:Y.completionAt})}return J}function lT(Z,X){if(Z.size!==X.size)return!1;for(let[J,z]of Z){let Q=X.get(J);if(!Q||Q.mtimeMs!==z.mtimeMs||Q.completionId!==z.completionId||Q.completionAt!==z.completionAt)return!1}return!0}function sp(Z){if(Z>$M0)return!1;return Z===1||Z%10===0}function qX(Z){return{id:f$(Z.id),title:Z.title,repo:Z.repo,branch:Z.branch,worktreePath:Z.worktreePath,kind:Z.kind,...Z.scratch?{scratch:!0}:{},status:Z.status,pinned:Z.pinned,vendor:Z.vendor,prStatus:Z.prStatus,modelEffort:Z.modelEffort,groupId:Z.groupId,deletion:Z.deletion,dispatcher:Z.dispatcher,createdAt:Z.createdAt,updatedAt:Z.updatedAt}}var $M0=100;var o$=h(()=>{g$();w7()});async function rp(Z){let X=Z.spawnDaemon?Math.floor(Math.random()*400):500,J=0;while(!Z.isDisposed()){if(X>0)await new Promise((z)=>setTimeout(z,X));if(Z.isDisposed())break;J++;try{if(Z.spawnDaemon)await Z.ensureReachable();await Z.init(),cZ("orch",`reconnected and re-subscribed after ${J} attempt(s) \u2014 task list re-synced`);return}catch(z){if(Z.shouldLogAttempt(J))d4("orch-reconnect",z);X=X===0?500:Math.min(X*2,3000)}}}async function tp(Z,X,J){let z=await Z.request("hello",{protocolVersion:T2,minProtocolVersion:mJ}),Q=typeof z.protocolVersion==="number"?z.protocolVersion:T2,Y=typeof z.minProtocolVersion==="number"?z.minProtocolVersion:Q;if(!kW({localVersion:T2,localMin:mJ,remoteVersion:Q,remoteMin:Y}))throw Error(`Rove daemon is protocol v${Q} (min v${Y}); this client is v${T2} (min v${mJ}). Restart the daemon (\`rove daemon restart\`) or upgrade Rove.`);let G=A2();if(xk(z.homeDir,G))throw Error(`Rove daemon on this socket serves ${z.homeDir}, but this client uses ${G}. A sandbox or dev daemon has taken the production socket \u2014 stop it (\`rove daemon stop\`), or unset ROVE_DAEMON_SOCKET_PATH / KOBE_DAEMON_SOCKET_PATH before starting it.`);if(J.setDaemonVersionSig(typeof z.kobeVersion==="string"?z.kobeVersion:null),z.tasks&&X.subscribesTasks)J.setTasks(z.tasks.map(qX));if(await Z.subscribe({role:X.role,channels:X.channels}),z.capabilities?.includes("worktree.changes")){if(J.worktreeChangesAcc()===null)J.setWorktreeChangesSig(new Map)}else J.setWorktreeChangesSig(null);if(z.capabilities?.includes("transcript.activity")){if(J.transcriptActivityAcc()===null)J.setTranscriptActivitySig(new Map)}else J.setTranscriptActivitySig(null);J.setConnectionState("online"),cZ("orch",`subscribed as ${X.role} (${J.tasksAcc().length} tasks)`)}var ep=h(()=>{lZ();o8();T5();o$()});function qM0(Z,X){let J=new Set(Z.map((G)=>G.id)),z=X.engineStateAcc();if(z.size>0){let G=null;for(let $ of z.keys()){if(J.has($))continue;if(!G)G=new Map(z);G.delete($)}if(G)X.setEngineStateSig(G)}let Q=X.engineTabStateAcc();if(Q.size>0){let G=null;for(let $ of Q.keys()){if(J.has($))continue;if(!G)G=new Map(Q);G.delete($)}if(G)X.setEngineTabStateSig(G)}let Y=X.engineLifecycleAcc();if(Y.size>0){let G=null;for(let $ of Y.keys()){if(J.has($))continue;if(!G)G=new Map(Y);G.delete($)}if(G)X.setEngineLifecycleSig(G)}}function HM0(Z,X){let J=X.taskJobsAcc();if(J.size===0)return;let z=new Set(Z.map((Y)=>Y.id)),Q=null;for(let Y of J.keys()){if(z.has(Y))continue;if(!Q)Q=new Map(J);Q.delete(Y)}if(Q)X.setTaskJobsSig(Q)}function Zd(Z,X,J){if(Z==="task.snapshot"){let z=X?.tasks;if(Array.isArray(z))J.setTasks(z.map(qX)),qM0(z,J),HM0(z,J);else d4("orch",`dropped task.snapshot event: tasks is not an array (got ${h7(z)})`);return}if(Z==="active-task"){let z=X?.taskId;J.setActiveTaskSig(typeof z==="string"?z:null);return}if(Z==="update"){let z=X?.info;J.setUpdateSig(z??null);return}if(Z==="engine-state"){let z=X;if(typeof z?.taskId!=="string"||typeof z.state!=="string"){d4("orch",`dropped engine-state event: taskId/state must be strings (taskId=${h7(z?.taskId)}, state=${h7(z?.state)})`);return}let Q=typeof z.tabId==="string"&&z.tabId?z.tabId:void 0,Y={state:z.state,detail:z.detail,...typeof z.sessionId==="string"&&z.sessionId?{sessionId:z.sessionId}:{},...typeof z.transcriptPath==="string"&&z.transcriptPath?{transcriptPath:z.transcriptPath}:{},...Q?{tabId:Q}:{},at:typeof z.at==="number"?z.at:0},G=J.engineStateAcc().get(z.taskId),$=G?.state,U=new Map(J.engineStateAcc());if(z.state==="idle"){if(!Q||G?.tabId===Q)U.delete(z.taskId)}else U.set(z.taskId,Y);if(J.setEngineStateSig(U),(z.state==="idle"||z.state==="turn_complete"||z.state==="error"||z.state==="running"&&$!=="running")&&J.engineLifecycleAcc().has(z.taskId)){let M=new Map(J.engineLifecycleAcc());M.delete(z.taskId),J.setEngineLifecycleSig(M)}if(Q){let M=new Map(J.engineTabStateAcc()),D=new Map(M.get(z.taskId)??[]);D.set(Q,Y),M.set(z.taskId,D),J.setEngineTabStateSig(M)}return}if(Z==="attention.inbox"){let z=X?.items;if(!Array.isArray(z)){d4("orch",`dropped attention.inbox event: items is not an array (${h7(z)})`);return}if(!z.every((Y)=>{if(!Y||typeof Y!=="object"||Array.isArray(Y))return!1;let G=Y;return typeof G.taskId==="string"&&(G.tabId===null||typeof G.tabId==="string")&&VK(G.state)&&(G.unread===void 0||typeof G.unread==="boolean")&&typeof G.at==="number"})){d4("orch",`dropped attention.inbox event: malformed item (${h7(z)})`);return}J.setAttentionInboxSig(z.map((Y)=>({...Y,unread:Y.unread!==!1})));return}if(Z==="task.jobs"){let z=X;if(typeof z?.taskId!=="string"||z.kind!=="ensureWorktree"){d4("orch",`dropped task.jobs event: expected string taskId + kind "ensureWorktree" (taskId=${h7(z?.taskId)}, kind=${h7(z?.kind)})`);return}let Q=J.taskJobsAcc();if(z.phase==="running"){let Y=new Map(Q);Y.set(z.taskId,{kind:z.kind}),J.setTaskJobsSig(Y);return}if((z.phase==="done"||z.phase==="error")&&Q.has(z.taskId)){let Y=new Map(Q);Y.delete(z.taskId),J.setTaskJobsSig(Y)}return}if(Z==="usage.snapshot"){let z=ap(X);if(!z){d4("orch",`dropped usage.snapshot event: malformed usage payload (${h7(X)})`);return}let Q=J.usageSnapshotAcc();if(Q&&op(Q,z))return;J.setUsageSnapshotSig(z);return}if(Z==="worktree.changes"){let z=mT(X);if(!z){d4("orch",`dropped worktree.changes event: malformed changes payload (${h7(X)})`);return}let Q=J.worktreeChangesAcc();if(Q&&uT(Q,z))return;J.setWorktreeChangesSig(z);return}if(Z==="transcript.activity"){let z=cT(X);if(!z){d4("orch",`dropped transcript.activity event: malformed activity payload (${h7(X)})`);return}let Q=J.transcriptActivityAcc();if(Q&&lT(Q,z))return;J.setTranscriptActivitySig(z);return}if(Z==="tab.open"){let z=X;if(typeof z?.taskId!=="string"||typeof z.at!=="number"||typeof z.title!=="string"||!Array.isArray(z.argv)){d4("orch",`dropped tab.open event: malformed payload (${h7(X)})`);return}J.setTabOpenSig(z);return}if(Z==="tab.close"){let z=X;if(typeof z?.taskId!=="string"||typeof z.at!=="number"||typeof z.title!=="string"){d4("orch",`dropped tab.close event: malformed payload (${h7(X)})`);return}J.setTabCloseSig(z);return}if(Z==="ui.prompt"){let z=X;if(typeof z?.promptId!=="string"||typeof z.title!=="string"||typeof z.at!=="number"){d4("orch",`dropped ui.prompt event: malformed payload (${h7(X)})`);return}J.setUiPromptSig(z);return}if(Z==="engine.lifecycle"){let z=X;if(typeof z?.taskId!=="string"||typeof z.kind!=="string"){d4("orch",`dropped engine.lifecycle event: malformed payload (${h7(X)})`);return}let Q=J.engineLifecycleAcc(),Y=Q.get(z.taskId)??{subagents:0},G=z.kind==="subagent-start"?{subagents:Y.subagents+1}:z.kind==="subagent-stop"?{subagents:Math.max(0,Y.subagents-1)}:Y;if(G===Y&&!Q.has(z.taskId))return;let $=new Map(Q);if(G.subagents===0)$.delete(z.taskId);else $.set(z.taskId,G);J.setEngineLifecycleSig($);return}if(Z==="notice.event"){let z=X;if(typeof z?.title!=="string"||typeof z.at!=="number"||typeof z.kind!=="string"){d4("orch",`dropped notice.event: malformed payload (${h7(X)})`);return}J.setNoticeSig(z);return}if(Z==="ui-prefs"){let z=hT(X);if(!z){let Q=X?.theme;d4("orch",`dropped ui-prefs event: theme must be a string (got ${h7(Q)})`);return}J.setUiPrefsSig(z);return}if(Z==="keybindings"){let z=X;if(typeof z?.rev!=="number"){d4("orch",`dropped keybindings event: rev must be a number (got ${h7(z?.rev)})`);return}J.setKeybindingsRevSig(z.rev)}}var Xd=h(()=>{lZ();o8();o$()});function Jd(Z){return Z.tasksAcc}function zd(Z){return Z.activeTaskAcc}function Qd(Z){return Z.updateAcc}function Yd(Z){return Z.daemonVersionAcc}function Gd(Z){return Z.daemonStaleAcc}function $d(Z){return Z.engineStateAcc}function qd(Z){return Z.engineTabStateAcc}function Hd(Z){return Z.attentionInboxAcc}function Ud(Z){return Z.taskJobsAcc}function Kd(Z){return Z.worktreeChangesAcc}function Vd(Z){return Z.usageSnapshotAcc}function Bd(Z){return Z.transcriptActivityAcc}function Md(Z){return Z.transcriptActivityStoreInner}function Nd(Z){return Z.uiPrefsAcc}function Wd(Z){return Z.uiPrefsStoreInner}function Dd(Z){return Z.keybindingsRevAcc}function Od(Z){return Z.keybindingsRevStoreInner}function pT(Z){return Z.tasksAcc()}function jd(Z,X){return Z.tasksAcc().find((J)=>J.id===X)}function Fd(Z,X){try{X(pT(Z))}catch(J){console.error("[rove RemoteOrchestrator] task listener threw on subscribe:",J)}return Z.tasksAcc.subscribe(()=>{try{X(Z.tasksAcc.get())}catch(J){console.error("[rove RemoteOrchestrator] task listener threw:",J)}})}async function Ld(Z,X){let{modelEffort:J,...z}=X,Q=await Z.request("task.create",{...z,effort:J});return qX(Q.task)}async function _d(Z,X){let J=await Z.request("task.ensureMain",{repo:X});return qX(J.task)}async function Ad(Z,X){let J=await Z.request("task.openDir",X);return qX(J.task)}async function Cd(Z,X,J){await Z.request("task.adoptScratchRepo",{taskId:String(X),repo:J})}async function Ed(Z,X){return(await Z.request("task.ensureWorktree",{taskId:String(X)})).worktreePath}async function Rd(Z,X){await Z.request("project.forget",{repo:X})}function Td(Z,X,J){Z.request("engine.reportEvent",{kind:"turn-interrupted",taskId:X,tabId:J}).catch(()=>{})}async function Sd(Z,X,J){await Z.request("task.rename",{taskId:String(X),title:J})}async function Pd(Z,X,J){await Z.request("task.setBranch",{taskId:String(X),branch:J})}async function Id(Z,X,J){await Z.request("task.setVendor",{taskId:String(X),vendor:J})}async function xd(Z,X,J,z){await Z.request("task.setCommand",{taskId:String(X),command:J,...z?{vendor:z}:{}})}async function yd(Z,X,J){await Z.request("task.pin",{taskId:String(X),pinned:J})}async function wd(Z,X,J){await Z.request("task.move",{taskId:String(X),direction:J<0?"up":"down"})}async function vd(Z,X,J){await Z.request("task.status",{taskId:String(X),status:J})}async function fd(Z,X,J){await Z.request("task.delete",{taskId:String(X),force:J?.force,deleteBranch:J?.deleteBranch})}async function bd(Z,X,J,z){return(await Z.request("attention.dismiss",{taskId:String(X),...J!==null?{tabId:J}:{},at:z})).deleted}async function gd(Z,X,J,z){return(await Z.request("attention.read",{taskId:String(X),...J!==null?{tabId:J}:{},at:z})).updated}async function kd(Z,X){return(await Z.request("deferredPrompt.get",{id:X})).record}async function md(Z,X){return(await Z.request("deferredPrompt.resolve",{id:X})).removed}async function hd(Z,X,J){return(await Z.request("task.land",{taskId:String(X),strategy:J?.strategy,deleteBranch:J?.deleteBranch,removeWorktree:J?.removeWorktree,callerCwd:J?.callerCwd})).result}async function ud(Z,X){return(await Z.request("worktree.discoverAdoptable",{repo:X})).worktrees}async function cd(Z,X){let J=await Z.request("worktree.adopt",X);return qX(J.task)}async function ld(Z,X){return(await Z.request("worktree.list",{network:X?.network!==!1})).projects}async function pd(Z,X,J){await Z.request("worktree.remove",{path:X,force:J})}async function dd(Z,X){return Z.request("issue.list",{repoRoot:X})}async function id(Z,X,J){return Z.request("issue.mutate",{repoRoot:X,op:J})}async function nd(Z){return Z.request("automation.list",{})}async function ad(Z,X){return Z.request("automation.create",X)}async function od(Z,X){return Z.request("automation.runs",{id:X})}async function sd(Z,X,J){return Z.request("automation.update",{id:X,enabled:J})}async function rd(Z,X){return Z.request("automation.runNow",{id:X})}async function td(Z,X){return Z.request("automation.delete",{id:X})}async function ed(Z,X){return Z.request("workitem.list",X)}async function Zi(Z,X){return Z.request("workitem.start",X)}async function Xi(Z,X){await Z.request("task.setActive",{taskId:X===null?null:String(X)})}var Ji=h(()=>{o$()});class HX{client;tasksAcc=B4([]);activeTaskAcc=B4(null);updateAcc=B4(null);daemonVersionAcc=B4(null);daemonStaleAcc=xu(this.daemonVersionAcc,(Z)=>Ik(Z??void 0,e1));engineStateAcc=B4(new Map);engineTabStateAcc=B4(new Map);attentionInboxAcc=B4([]);taskJobsAcc=B4(new Map);worktreeChangesAcc=B4(null);usageSnapshotAcc=B4(null);transcriptActivityAcc=B4(null);noticeAcc=B4(null);tabOpenAcc=B4(null);tabCloseAcc=B4(null);uiPromptAcc=B4(null);engineLifecycleAcc=B4(new Map);uiPrefsAcc=B4(null);keybindingsRevAcc=B4(null);connectionStateAcc=B4("online");ensureReachable;role;channels;subscribesTasks;reconnectTask=null;signals;reads;constructor(Z,X={}){this.client=Z;this.ensureReachable=X.ensureReachable??W$,this.role=X.role??"pane",this.channels=X.channels,this.subscribesTasks=!X.channels||X.channels.includes("task.snapshot"),this.signals={tasksAcc:this.tasksAcc,setTasks:this.tasksAcc.set,setActiveTaskSig:this.activeTaskAcc.set,setUpdateSig:this.updateAcc.set,setDaemonVersionSig:this.daemonVersionAcc.set,engineStateAcc:this.engineStateAcc,setEngineStateSig:this.engineStateAcc.set,engineTabStateAcc:this.engineTabStateAcc,setEngineTabStateSig:this.engineTabStateAcc.set,setAttentionInboxSig:this.attentionInboxAcc.set,taskJobsAcc:this.taskJobsAcc,setTaskJobsSig:this.taskJobsAcc.set,worktreeChangesAcc:this.worktreeChangesAcc,setWorktreeChangesSig:this.worktreeChangesAcc.set,usageSnapshotAcc:this.usageSnapshotAcc,setUsageSnapshotSig:this.usageSnapshotAcc.set,transcriptActivityAcc:this.transcriptActivityAcc,setTranscriptActivitySig:this.transcriptActivityAcc.set,setNoticeSig:this.noticeAcc.set,setTabOpenSig:this.tabOpenAcc.set,setTabCloseSig:this.tabCloseAcc.set,setUiPromptSig:this.uiPromptAcc.set,engineLifecycleAcc:this.engineLifecycleAcc,setEngineLifecycleSig:this.engineLifecycleAcc.set,setUiPrefsSig:this.uiPrefsAcc.set,setKeybindingsRevSig:this.keybindingsRevAcc.set,setConnectionState:this.connectionStateAcc.set},this.reads={tasksAcc:this.tasksAcc,activeTaskAcc:this.activeTaskAcc,updateAcc:this.updateAcc,daemonVersionAcc:this.daemonVersionAcc,daemonStaleAcc:this.daemonStaleAcc,engineStateAcc:this.engineStateAcc,engineTabStateAcc:this.engineTabStateAcc,attentionInboxAcc:this.attentionInboxAcc,taskJobsAcc:this.taskJobsAcc,worktreeChangesAcc:this.worktreeChangesAcc,usageSnapshotAcc:this.usageSnapshotAcc,transcriptActivityAcc:this.transcriptActivityAcc,transcriptActivityStoreInner:this.transcriptActivityAcc,noticeAcc:this.noticeAcc,uiPrefsAcc:this.uiPrefsAcc,uiPrefsStoreInner:this.uiPrefsAcc,keybindingsRevAcc:this.keybindingsRevAcc,keybindingsRevStoreInner:this.keybindingsRevAcc,connectionStateAcc:this.connectionStateAcc},this.client.on("*",(J)=>this.handleEvent(J.name,J.payload)),this.client.onLifecycle("close",()=>{this.connectionStateAcc.set("disconnected");let J=this.role==="gui";cZ("orch",J?"daemon socket closed \u2014 starting silent spawning reconnect loop":"daemon socket closed \u2014 starting non-spawning reconnect loop"),this.reconnectLoop(J)})}reconnectLoop(Z){if(this.reconnectTask)return this.reconnectTask;let X=rp({isDisposed:()=>this.client.isDisposed,spawnDaemon:Z,ensureReachable:this.ensureReachable,init:()=>this.init(),shouldLogAttempt:sp});this.reconnectTask=X;let J=()=>{if(this.reconnectTask===X)this.reconnectTask=null};return X.then(J,J),X}async init(){await tp(this.client,{role:this.role,channels:this.channels,subscribesTasks:this.subscribesTasks},this.signals)}connectionStateSignal(){return this.connectionStateAcc}async manualReconnect(){this.client.forceDisconnect(),await this.reconnectLoop(!0)}dispose(){this.client.close()}tasksSignal=()=>Jd(this.reads);activeTaskSignal=()=>zd(this.reads);updateSignal=()=>Qd(this.reads);daemonVersionSignal=()=>Yd(this.reads);daemonStaleSignal=()=>Gd(this.reads);engineStateSignal=()=>$d(this.reads);engineTabStatesSignal=()=>qd(this.reads);attentionInboxSignal=()=>Hd(this.reads);taskJobsSignal=()=>Ud(this.reads);worktreeChangesSignal=()=>Kd(this.reads);usageSnapshotSignal=()=>Vd(this.reads);transcriptActivitySignal=()=>Bd(this.reads);transcriptActivityStore=()=>Md(this.reads);noticeStore=()=>this.noticeAcc;tabOpenStore=()=>this.tabOpenAcc;tabCloseStore=()=>this.tabCloseAcc;uiPromptStore=()=>this.uiPromptAcc;replyPrompt=(Z,X)=>void this.client.request("ui.promptReply",{promptId:Z,...X!==void 0?{value:X}:{}}).catch(()=>{});engineLifecycleSignal=()=>this.engineLifecycleAcc;recentTaskEvents(Z){return this.client.request("task.recentEvents",{taskId:String(Z)})}reportUiEvent=(Z,X,J)=>void this.client.request("ui.reportEvent",{kind:Z,...X?{taskId:X}:{},...J?{detail:J}:{}}).catch(()=>{});reportEngineInterrupt=(Z,X)=>Td(this.client,String(Z),X);uiPrefsSignal=()=>Nd(this.reads);uiPrefsStore=()=>Wd(this.reads);keybindingsRevSignal=()=>Dd(this.reads);keybindingsRevStore=()=>Od(this.reads);listTasks=()=>pT(this.reads);getTask=(Z)=>jd(this.reads,Z);subscribeTasks(Z){return Fd(this.reads,Z)}createTask=(Z)=>Ld(this.client,Z);ensureMainTask=(Z)=>_d(this.client,Z);openDirectoryTask=(Z)=>Ad(this.client,Z);adoptScratchRepo=(Z,X)=>Cd(this.client,Z,X);ensureWorktree=(Z)=>Ed(this.client,Z);forgetProject=(Z)=>Rd(this.client,Z);setTitle=(Z,X)=>Sd(this.client,Z,X);setBranch=(Z,X)=>Pd(this.client,Z,X);setVendor=(Z,X)=>Id(this.client,Z,X);setCommand=(Z,X,J)=>xd(this.client,Z,X,J);setPinned=(Z,X)=>yd(this.client,Z,X);moveTask=(Z,X)=>wd(this.client,Z,X);setStatus=(Z,X)=>vd(this.client,Z,X);deleteTask=(Z,X)=>fd(this.client,Z,X);dismissAttention=(Z,X,J)=>bd(this.client,Z,X,J);markAttentionRead=(Z,X,J)=>gd(this.client,Z,X,J);getDeferredPrompt=(Z)=>kd(this.client,Z);resolveDeferredPrompt=(Z)=>md(this.client,Z);landTask(Z,X){return hd(this.client,Z,X)}discoverAdoptableWorktrees(Z){return ud(this.client,Z)}adoptWorktree(Z){return cd(this.client,Z)}listWorktrees(Z){return ld(this.client,Z)}listIssues(Z){return dd(this.client,Z)}mutateIssue(Z,X){return id(this.client,Z,X)}listAutomations=()=>nd(this.client);createAutomation=(Z)=>ad(this.client,Z);automationRuns=(Z)=>od(this.client,Z);setAutomationEnabled=(Z,X)=>sd(this.client,Z,X);runAutomationNow=(Z)=>rd(this.client,Z);deleteAutomation=(Z)=>td(this.client,Z);listWorkItems=(Z)=>ed(this.client,Z);startWorkItem=(Z)=>Zi(this.client,Z);removeWorktree(Z,X){return pd(this.client,Z,X)}setActiveTask(Z){return Xi(this.client,Z)}handleEvent(Z,X){Zd(Z,X,this.signals)}}var eK=h(()=>{lZ();z3();o8();h9();I2();ep();Xd();o$();Ji();o$()});async function zi(Z={}){let X=Z.logTag??"orch-connect",J=Z.connect??m9,z=null;try{let Q=await J();if(!Q)return cZ(X,"no daemon running \u2014 caller degrades"),null;return z=new HX(Q,{...Z.orchestratorOptions,channels:Z.channels}),await z.init(),z}catch(Q){return d4(X,Q),z?.dispose(),null}}var Qi=h(()=>{lZ();z3();eK()});import{existsSync as Yi,readFileSync as UM0}from"fs";function Gi(){nQ=null}function KM0(){let Z=Zf();if(Yi(Z))return{canonical:Z,found:Z};let X=Z.replace(/\.yaml$/,".yml");if(Yi(X))return{canonical:Z,found:X};return{canonical:Z,found:null}}function $i(){if(nQ)return nQ;let{canonical:Z,found:X}=KM0();if(!X)return nQ={path:Z,exists:!1,doc:null,warnings:[]},nQ;let J=[],z=null;try{let Q=UM0(X,"utf8");z=Bun.YAML.parse(Q)}catch(Q){let Y=J1(Q);J.push(`could not read/parse ${X}: ${Y}`)}return nQ={path:Z,exists:!0,doc:z,warnings:J},nQ}var nQ=null;var qi=h(()=>{T5()});function Hi(Z,X){for(let J=Z.length-1;J>=0;J--){let z=Z[J]?.config();if(!z||z.enabled===!1)continue;if(z.bindings.some(X))return!0;if(z.modal)return!1}return!1}function OO(Z){let X=new Set,J=new Set,z=!1,Q=!1,Y=[],G=new Set;for(let $=Z.length-1;$>=0;$--){let U=Z[$]?.config();if(!U||U.enabled===!1)continue;for(let K of U.bindings){if(K.passthrough)Q=!0;if(K.prefix===!0){if(z=!0,K.id)J.add(K.id);if(!G.has(K.key))G.add(K.key),Y.push({stroke:K.key,action:K.id??K.key})}else if(K.id)X.add(K.id)}if(U.modal)break}return{prefixReachable:z,inputPassthrough:Q,prefixOptions:Y,directIds:X,prefixIds:J}}function Ki(Z){let{directIds:X,prefixIds:J,inputPassthrough:z}=OO(Z);return{direct:X,prefix:J,inputPassthrough:z}}var Ui=(Z)=>Hi(Z,(X)=>X.prefix===!0),dT=(Z)=>Hi(Z,(X)=>X.passthrough===!0);function oT(Z,X=[],J=null){aT.update((z)=>{if(!Z&&!z.armed&&z.options.length===0)return z;return{...z,armed:Z,armedAt:Z?J:null,options:Z?X:[]}})}function FO(Z){aT.update((X)=>({...X,armed:!1,armedAt:null,options:[],entries:[...X.entries,{...Z,id:BM0++}].slice(-VM0)}))}var iT=4000,nT=180,VM0=3,aT,BM0=1,jO;var LO=h(()=>{h9();aT=B4({armed:!1,armedAt:null,options:[],entries:[]}),jO=aT});function q8(Z){return{run:Z}}function Mi(Z,X){if(X.modalOwner!==void 0){let J=Z.findIndex((z)=>z.modalMember===X.modalOwner);if(J>=0){Z.splice(J,0,X);return}}Z.push(X)}function MM0(Z){let X=[],J=Z.name;if(J)X.push(J);if(J==="return")X.push("enter");if(J==="enter")X.push("return");if(J==="backspace"&&Z.raw==="\b"&&!Z.meta&&!Z.option)X.push("ctrl+h");if(J==="linefeed"&&!Z.meta&&!Z.option)X.push("ctrl+j");let z=[];if(Z.ctrl)z.push("ctrl");if(Z.meta)z.push("cmd");if(Z.option)z.push("alt");let Q=Z.shift&&J!==void 0&&J.length===1&&z.length===0;if(Z.shift&&J&&J.length>1)z.push("shift");if(z.length===0){if(Q)return[...X.map((G)=>`shift+${G}`),...X];return X}let Y=`${z.join("+")}+`;return X.map((G)=>Y+G)}function Ni(Z){u6={...Z},y2()}function Wi(){u6={...Zz},y2()}function T8(){return u6}function y2(){if(_O!==null)clearTimeout(_O);_O=null,eJ=null,AO=!1,sT=[],oT(!1)}function Di(Z,X,J){y2(),eJ=Z,AO=J,sT=X.slice(),_O=setTimeout(y2,u6.timeoutMs),oT(!0,X,Z)}function Oi(Z,X=Date.now()){if(u6.key===null)return!1;let J=OO(Z);if(!J.prefixReachable)return!1;return Di(X,J.prefixOptions,J.inputPassthrough),!0}function ji(Z,X,J,z=Date.now()){if(s$||eJ===null)return!1;let Q=Z.slice(),Y=u6.key??"",G=sT.some((M)=>M.action===X&&M.stroke===J),$=z-eJ>u6.timeoutMs,U=dT(Q)!==AO;if(!G||$||U)return y2(),!1;let K=null;for(let M=Q.length-1;M>=0;M--){let D=Q[M];if(!D)continue;let W=D.config();if(W.enabled===!1)continue;let j=W.bindings.find((C)=>C.prefix===!0&&C.key===J);if(j){if(j.id===X)K=j;break}if(W.modal)break}if(!K?.action)return y2(),!1;y2(),s$=!0;try{return K.action.run(),FO({prefixKey:Y,stroke:J,action:X,at:z}),!0}finally{s$=!1}}function NM0(Z,X,J,z){for(let Q=X-1;Q>=0;Q--){let Y=Z[Q]?.config();if(!Y||Y.enabled===!1)continue;let G=Y.bindings.find(($)=>Boolean($.prefix)===z&&J.includes($.key));if(G){if(!Vi.has(G.key))Vi.add(G.key),console.error(`[rove keymap] "${G.key}" matched two ENABLED bindings \u2014 the lower one is shadowed by LIFO order. Gate one of them off (see tui-react/lib/keymap.ts header).`);return}if(Y.modal)return}}function Bi(Z,X,J,z,Q){for(let Y=Z.length-1;Y>=0;Y--){let G=Z[Y];if(!G)continue;let $=G.config();if($.enabled===!1)continue;let U;for(let K of J)if(U=$.bindings.find((M)=>Boolean(M.prefix)===z&&M.key===K),U)break;if(U){if(!$.modal&&cG())NM0(Z,Y,J,z);return Q(()=>U.cmd(X,U.slot)),U}if($.modal)return null}return null}function rT(Z,X,J=Date.now(),z){if(X.defaultPrevented||s$)return!1;let Q=Z.slice(),Y=MM0(X),G=z?.flushSync??(($)=>$());s$=!0;try{if(eJ!==null&&dT(Q)!==AO)y2();if(eJ!==null){let U=u6.key??"",K=J-eJ>u6.timeoutMs;if(eJ=null,K)y2();else{if(Y.includes("escape"))return y2(),X.preventDefault(),!0;y2();let M=Bi(Q,X,Y,!0,G);return FO({prefixKey:U,stroke:Y[0]??"",action:M?M.id??M.key:null,at:J}),X.preventDefault(),!0}}if(u6.key!==null&&Y.includes(u6.key)){if(Ui(Q)){let U=OO(Q);return Di(J,U.prefixOptions,U.inputPassthrough),X.preventDefault(),!0}}let $=Bi(Q,X,Y,!1,G);if($){if($.id&&$.key.includes("+")&&!$.key.startsWith("shift+"))FO({prefixKey:"",stroke:$.key,action:$.id??$.key,at:J});return X.preventDefault(),!0}return!1}finally{s$=!1}}var s$=!1,Zz,u6,eJ=null,AO=!1,sT,_O=null,Vi;var S8=h(()=>{T5();LO();Zz={key:"ctrl+a",timeoutMs:5000},u6={...Zz},sT=[];Vi=new Set});function aQ(Z){let X=Z.trim(),J=X.length===1&&X>="A"&&X<="Z",z=Z.trim().toLowerCase();if(!z)return{error:"empty chord"};let Q=z.split("+"),Y=Q.pop()??"";if(Y===""&&Q.length>0&&Q[Q.length-1]==="")Y="+",Q.pop();if(!Y)return{error:`"${Z}": no key after the modifiers`};let G=new Set;for(let K of Q){let M=WM0[K];if(!M)return{error:`"${Z}": unknown modifier "${K}" (use ctrl / cmd / alt / shift)`};G.add(M)}if(Y=DM0[Y]??Y,J)G.add("shift");if(G.has("shift")&&G.size>1&&Y.length===1)return{error:`"${Z}": shift with other modifiers on a single character can never match \u2014 legacy terminals send the same byte with and without shift`};let $=jM0.filter((K)=>G.has(K)).join("+"),U=$?`${$}+${Y}`:Y;if(Y.length>1&&!OM0.has(Y))return{chord:U,warning:`"${Z}": unrecognized key name "${Y}" \u2014 the chord may never fire`};return{chord:U}}function ZV(Z){return typeof Z==="object"&&Z!==null&&!Array.isArray(Z)}function FM0(Z){if(Z==="darwin")return["darwin","macos","mac"];if(Z==="win32")return["win32","windows"];return[Z]}function LM0(Z){if(!ZV(Z))return null;let X=Z.bindings;if(ZV(X))return X;return Z}function tT(Z,X){let J=[];if(Z===null||Z===void 0)return{entries:[],prefixEntries:[],warnings:J};if(!ZV(Z))return{entries:[],prefixEntries:[],warnings:["config root must be a YAML mapping (e.g. a top-level `bindings:` key)"]};let z=new Map,Q=new Map,Y=[];if(Z.bindings!==void 0)if(ZV(Z.bindings))Y.push(Z.bindings);else J.push("`bindings:` must be a mapping of id \u2192 chord(s)");for(let G of FM0(X)){let $=Z[G];if($===void 0)continue;let U=LM0($);if(U)Y.push(U);else J.push(`\`${G}:\` must be a mapping (or contain a \`bindings:\` mapping)`)}for(let G of Y)for(let[$,U]of Object.entries(G)){let K=ZV(U)&&(("direct"in U)||("prefix"in U))?[[z,U.direct],[Q,U.prefix]]:[[z,U]];for(let[M,D]of K){if(D===void 0)continue;if(D===null||D===!1||Array.isArray(D)&&D.length===0){M.set($,[]);continue}let W=typeof D==="string"?[D]:Array.isArray(D)?D:null;if(!W){J.push(`${$}: expected a chord string, a list of chords, or null \u2014 got ${typeof D}`);continue}let j=[],C=!1;for(let _ of W){if(typeof _!=="string"){J.push(`${$}: chord entries must be strings`),C=!0;continue}let L=aQ(_);if("error"in L){J.push(`${$}: ${L.error}`),C=!0;continue}if(L.warning)J.push(`${$}: ${L.warning}`);if(!j.includes(L.chord))j.push(L.chord)}if(j.length===0&&C){J.push(`${$}: no valid chords \u2014 keeping the default`);continue}M.set($,j)}}return{entries:Array.from(z,([G,$])=>({id:G,keys:$})),prefixEntries:Array.from(Q,([G,$])=>({id:G,keys:$})),warnings:J}}var WM0,DM0,OM0,jM0;var eT=h(()=>{WM0={ctrl:"ctrl",control:"ctrl",ctl:"ctrl",cmd:"cmd",command:"cmd",meta:"cmd",super:"cmd",win:"cmd",alt:"alt",option:"alt",opt:"alt",shift:"shift"},DM0={esc:"escape",spacebar:"space",pgup:"pageup",pgdn:"pagedown",pgdown:"pagedown"},OM0=new Set(["up","down","left","right","pageup","pagedown","home","end","insert","delete","backspace","tab","space","escape","enter","return",...Array.from({length:12},(Z,X)=>`f${X+1}`)]),jM0=["ctrl","cmd","alt","shift"]});function r$(Z,X){let J=`alternating [${Z}, ${X}] pairs`;return{layout:J,validateCount:(z)=>z>=2&&z%2===0?null:`needs ${J} (an even number of chords \u2014 got ${z})`}}function CM0(Z,X){return Z===X||Z==="global"||X==="global"}function Fi(Z,X,J=ZS){let z=[],Q=[];for(let Y of X){let G=Z.find((W)=>W.id===Y.id);if(!G){z.push(`${Y.id}: unknown binding id (press F1 in Rove for the full list)`);continue}let $=J[Y.id];if($){z.push(`${Y.id}: not customizable \u2014 ${$}`);continue}if(G.keys.length===0&&G.prefixKeys===void 0){z.push(`${Y.id}: not customizable \u2014 the key is handled outside the keymap (doc-only row)`);continue}let U=_M0[Y.id];if(U&&Y.keys.length>0){let W=U.validateCount(Y.keys.length);if(W){z.push(`${Y.id}: ${W} \u2014 keeping the default`);continue}}let K=Y.keys.filter((W)=>{if((W.length===1||W.startsWith("shift+")&&W.length===7)&&AM0.has(G.scope))return z.push(`${Y.id}: "${W}" dropped \u2014 a bare character on a ${G.scope}-scope binding would steal typed input (add a modifier)`),!1;return!0});if(K.length===0&&Y.keys.length>0){z.push(`${Y.id}: no chords survived validation \u2014 keeping the default`);continue}if(U&&K.length!==Y.keys.length){z.push(`${Y.id}: a dropped chord would shift the slot layout (${U.layout}) \u2014 keeping the default`);continue}let M=G.keys,D=G;if(D.keys=K,G.hint)if(K.length===0)D.hint=void 0;else G.hint.keys=K.join("/");Q.push({id:Y.id,keys:K,defaultKeys:M})}for(let Y of Q)for(let G of Y.keys){let $=Z.find((U)=>U.id===Y.id);if(!$)continue;for(let U of Z){if(U.id===Y.id)continue;if(!U.keys.includes(G))continue;if(!CM0($.scope,U.scope))continue;z.push(`${Y.id}: "${G}" also fires ${U.id} (${U.scope} scope) \u2014 last registration wins; consider a different chord`)}}return{applied:Q,warnings:z}}var ZS,_M0,AM0;var CO=h(()=>{eT();ZS={};_M0={"sidebar.goto":r$("top (double-tap)","bottom"),"sidebar.nav":r$("down","up"),"files.nav":r$("down","up"),"sidebar.search.nav":r$("down","up"),"files.hierarchy":r$("collapse","expand"),"files.tab":r$("previous tab","next tab"),"app.quit":{layout:"[quit confirm, hard exit] (second chord optional)",validateCount:(Z)=>Z<=2?null:`needs [quit confirm, hard exit] (1 or 2 chords \u2014 got ${Z})`}},AM0=new Set(["global","workspace","terminal"])});function XS(Z,X){if(typeof Z!=="object"||Z===null)return null;let J=Z[X];if(typeof J!=="object"||J===null||Array.isArray(J))return null;return J}function Li(Z,X,J){for(let[z,Q]of Object.entries(Z)){if(typeof Q!=="string"){J.push(`plugins: ${z}: value must be a "pane:<id>" or "action:<id>" string`);continue}let Y=Q.trim().match(RM0);if(!Y){J.push(`plugins: ${z}: \`${Q}\` is not pane:<plugin-id>.<local-id> or action:<...>`);continue}let G=aQ(z);if("error"in G){J.push(`plugins: ${z}: ${G.error}`);continue}if(G.warning)J.push(`plugins: ${z}: ${G.warning}`);X.set(G.chord,{chord:G.chord,kind:Y[1],target:Y[2].trim()})}}function _i(Z,X){let J=[],z=new Map,Q=XS(Z,"plugins");if(Q)Li(Q,z,J);for(let Y of EM0[X]??[]){let G=XS(Z,Y),$=G?XS(G,"plugins"):null;if($)Li($,z,J)}return{entries:[...z.values()],warnings:J}}var EM0,RM0;var Ai=h(()=>{eT();EM0={darwin:["darwin","macos","mac"],linux:["linux"],win32:["win32","windows"]},RM0=/^(pane|action):\s*([A-Za-z0-9][A-Za-z0-9._:-]*\.[A-Za-z0-9][A-Za-z0-9_:-]*)$/});function EO(Z){return typeof Z==="object"&&Z!==null&&!Array.isArray(Z)}function TM0(Z){if(Z==="darwin")return["darwin","macos","mac"];if(Z==="win32")return["win32","windows"];return[Z]}function SM0(Z,X){let J=new Map;if(Z===void 0)return J;if(!EO(Z))return X.push("prefix.bindings must be a mapping of binding id to chord(s)"),J;for(let[z,Q]of Object.entries(Z)){if(Q===null||Array.isArray(Q)&&Q.length===0){J.set(z,[]);continue}let Y=typeof Q==="string"?[Q]:Array.isArray(Q)?Q:null;if(!Y||Y.some((U)=>typeof U!=="string")){X.push(`prefix.bindings.${z} must be a chord string, a string list, null, or []`);continue}let G=[],$=!1;for(let U of Y){let K=aQ(U);if("error"in K){X.push(`prefix.bindings.${z}: ${K.error}`),$=!0;continue}if(!G.includes(K.chord))G.push(K.chord);if(K.warning)X.push(`prefix.bindings.${z}: ${K.warning}`)}if(G.length===0&&$){X.push(`prefix.bindings.${z}: no valid chords \u2014 keeping the default`);continue}J.set(z,G)}return J}function Ci(Z,X,J,z){if(Z===void 0)return;if(!EO(Z)){z.push("prefix must be a mapping");return}if("key"in Z)if(Z.key===null)X.key=null;else if(typeof Z.key!=="string")z.push("prefix.key must be a modifier chord or null");else{let Q=aQ(Z.key);if("error"in Q)z.push(`prefix.key: ${Q.error}`);else if(!Q.chord.includes("+"))z.push("prefix.key must include a modifier");else X.key=Q.chord}if("timeoutMs"in Z)if(typeof Z.timeoutMs!=="number"||!Number.isInteger(Z.timeoutMs)||Z.timeoutMs<100||Z.timeoutMs>1e4)z.push("prefix.timeoutMs must be an integer from 100 to 10000");else X.timeoutMs=Z.timeoutMs;for(let[Q,Y]of SM0(Z.bindings,z))J.set(Q,Y)}function Ei(Z,X){let J={},z=[],Q=new Map;if(!EO(Z)){if(Z!==null&&Z!==void 0)z.push("keybindings document must be a mapping");return{configuration:J,entries:[],warnings:z}}Ci(Z.prefix,J,Q,z);for(let Y of TM0(X)){let G=Z[Y];if(EO(G))Ci(G.prefix,J,Q,z)}return{configuration:J,entries:[...Q].map(([Y,G])=>({id:Y,keys:G})),warnings:z}}function Ri(Z,X){let J=[],z=[];for(let Q of X){let Y=Z.find((U)=>U.id===Q.id);if(!Y){z.push(`${Q.id}: unknown binding id`);continue}let G=Y,$=[...Y.prefixKeys??[]];G.prefixKeys=[...Q.keys],J.push({id:Q.id,keys:[...Q.keys],defaultKeys:$})}return{applied:J,warnings:z}}var Ti=h(()=>{CO()});var Si;var Pi=h(()=>{Si=[{id:"chat.send",scope:"workspace",keys:[],category:"Workspace",description:"Send message (composer)",hint:{keys:"enter"}},{id:"chat.newline",scope:"workspace",keys:[],category:"Workspace",description:"Newline in composer",hint:{keys:"shift+enter"}},{id:"chat.cycle-mode",scope:"workspace",keys:[],category:"Workspace",description:"Cycle permission mode (composer)",hint:{keys:"shift+tab"}},{id:"chat.steer",scope:"workspace",keys:[],category:"Workspace",description:"Steer (interrupt + send) \u2014 mid-stream only",hint:{keys:"ctrl+enter"}},{id:"chat.tab.new",scope:"workspace",keys:["ctrl+t"],category:"Workspace",description:"New chat tab",hint:{keys:"ctrl+t"},presentation:"onePress"},{id:"chat.tab.chooseEngine",scope:"workspace",keys:["ctrl+e"],category:"Workspace",description:"New conversation \u2014 engine/shell picker with destination + context toggles",hint:{keys:"ctrl+e"},presentation:"onePress"},{id:"chat.tab.fork",scope:"workspace",keys:[],prefixKeys:["c"],category:"Workspace",description:"Fork this chat into a new tab (same Task directory, keeps the conversation)",hint:{keys:"ctrl+a c"}},{id:"chat.fork.new",scope:"workspace",keys:[],prefixKeys:["f"],category:"Workspace",description:"Quick-fork: create child task seeded with current repo/branch/model",hint:{keys:"ctrl+a f"}},{id:"chat.tab.close",scope:"workspace",keys:["ctrl+w"],category:"Workspace",description:"Close chat tab",hint:{keys:"ctrl+w"},presentation:"onePress"},{id:"chat.tab.rename",scope:"workspace",keys:["f2"],category:"Workspace",description:"Rename active chat tab",hint:{keys:"f2"},presentation:"onePress"},{id:"chat.tab.cycle-next",scope:"workspace",keys:["ctrl+]"],category:"Workspace",description:"Next chat tab",hint:{keys:"ctrl+]"},presentation:"onePress"},{id:"chat.tab.cycle-prev",scope:"workspace",keys:["ctrl+["],category:"Workspace",description:"Previous chat tab",hint:{keys:"ctrl+["},presentation:"onePress"},{id:"workspace.split.right",scope:"workspace",keys:["ctrl+\\"],category:"Workspace",description:"Split right",hint:{keys:"ctrl+\\"},presentation:"onePress"},{id:"workspace.split.down",scope:"workspace",keys:["ctrl+="],category:"Workspace",description:"Split down",hint:{keys:"ctrl+="},presentation:"onePress"},{id:"workspace.split.focus-next",scope:"workspace",keys:["f3"],category:"Workspace",description:"Focus next split",hint:{keys:"f3"},presentation:"onePress"},{id:"workspace.split.close",scope:"workspace",keys:["ctrl+w"],prefixKeys:["w"],category:"Workspace",description:"Close active split (tab when unsplit)",hint:{keys:"ctrl+w"},presentation:"onePress"},{id:"workspace.split.rename",scope:"workspace",keys:["f2"],category:"Workspace",description:"Rename active split (tab when unsplit)",hint:{keys:"f2"},presentation:"onePress"}]});var Ii;var xi=h(()=>{Ii=[{id:"files.nav",scope:"files",keys:["j","k","down","up"],category:"Files",description:"Move cursor up/down",hint:{keys:"j/k"}},{id:"files.hierarchy",scope:"files",keys:["h","l","left","right"],category:"Files",description:"Collapse / expand tree level",hint:{keys:"h/l"}},{id:"files.open",scope:"files",keys:["return"],category:"Files",description:"Open file in configured editor (diff when supported)",hint:{keys:"enter"}},{id:"files.tab",scope:"files",keys:["[","]"],category:"Files",description:"Switch tab (cycle All / Changes)",hint:{keys:"[/]"}},{id:"files.refresh",scope:"files",keys:["r"],category:"Files",description:"Refresh",hint:{keys:"r"}},{id:"files.scope",scope:"files",keys:["b"],category:"Files",description:"Toggle Changes scope (working \u2194 branch vs base)",hint:{keys:"b"}},{id:"files.diff",scope:"files",keys:["d"],category:"Files",description:"Open read-only diff in a workspace tab",hint:{keys:"d"}},{id:"files.openExternal",scope:"files",keys:["o"],category:"Files",description:"Open file in system default app (audio / video / pdf preview)",hint:{keys:"o"}},{id:"files.mention",scope:"files",keys:["a"],category:"Files",description:"Inject @<path> mention into the engine pane",hint:{keys:"a"}},{id:"files.createPR",scope:"global",keys:[],prefixKeys:["p","shift+p"],category:"Files",description:"Ask the agent to create a PR from the current task"},{id:"diff.review.cursor",scope:"workspace",keys:[],category:"Diff review",description:"Move the line cursor over the diff",hint:{keys:"j/k"}},{id:"diff.review.range",scope:"workspace",keys:[],category:"Diff review",description:"Toggle range anchor at the cursor",hint:{keys:"v"}},{id:"diff.review.note",scope:"workspace",keys:[],category:"Diff review",description:"Add a review note at the cursor",hint:{keys:"c"}},{id:"diff.review.send",scope:"workspace",keys:[],category:"Diff review",description:"Send all unsent review notes to the engine",hint:{keys:"s"}}]});var yi;var wi=h(()=>{yi=[{id:"inbox.show",scope:"global",keys:[],prefixKeys:["i"],category:"Global",description:"Open Inbox"},{id:"inbox.nav",scope:"inbox",keys:["j","k","down","up"],category:"Inbox",description:"Move cursor up/down",hint:{keys:"j/k"}},{id:"inbox.open",scope:"inbox",keys:["return"],category:"Inbox",description:"Open the selected Task and Terminal Tab",hint:{keys:"enter"}},{id:"inbox.delete",scope:"inbox",keys:["d"],category:"Inbox",description:"Remove the selected Inbox item",hint:{keys:"d"}}]});var PM0,vi;var fi=h(()=>{PM0=["2","3","4","5","6","7","8","9","0"],vi=PM0.map((Z)=>`ctrl+${Z}`)});var bi;var gi=h(()=>{fi();bi=[{id:"sidebar.nav",scope:"sidebar",keys:["j","k","down","up"],category:"Sidebar",description:"Move cursor up/down",hint:{keys:"j/k"}},{id:"sidebar.select",scope:"sidebar",keys:["return"],category:"Sidebar",description:"Open the selected task",hint:{keys:"enter"}},{id:"sidebar.tree.open",scope:"sidebar",keys:["l","space"],category:"Sidebar",description:"Open the row under the cursor (a tab row enters its chat)",hint:{keys:"l"}},{id:"sidebar.goto",scope:"sidebar",keys:["g","shift+g"],category:"Sidebar",description:"Top / bottom of list (gg or shift-G)"},{id:"sidebar.rename",scope:"sidebar",keys:["r"],category:"Sidebar",description:"Rename task",hint:{keys:"r"}},{id:"sidebar.localMerge",scope:"sidebar",keys:["shift+m"],category:"Sidebar",description:"Reorder row (Shift+M, then j/k)",hint:{keys:"M"}},{id:"sidebar.pin",scope:"sidebar",keys:["shift+p"],category:"Sidebar",description:"Pin / unpin task at top (Shift+P)",hint:{keys:"P"}},{id:"sidebar.sort",scope:"sidebar",keys:["t"],category:"Sidebar",description:"Switch task sort (default \u2194 recent)",hint:{keys:"t"}},{id:"sidebar.delete",scope:"sidebar",keys:["d"],category:"Sidebar",description:"Delete task (with confirm)",hint:{keys:"d"}},{id:"sidebar.search.enter",scope:"sidebar",keys:["/"],category:"Sidebar",description:"Search tasks (fuzzy filter)",hint:{keys:"/"}},{id:"sidebar.search.nav",scope:"sidebar",keys:["down","up"],category:"Sidebar",description:"Move highlight in search results"},{id:"sidebar.search.submit",scope:"sidebar",keys:["return"],category:"Sidebar",description:"Select search match and exit search"},{id:"sidebar.search.cancel",scope:"sidebar",keys:["escape"],category:"Sidebar",description:"Cancel search (restore prior selection)"},{id:"tasks.openWorktree",scope:"sidebar",keys:["o"],category:"Tasks pane",description:"Open selected Task directory in your editor",hint:{keys:"o"}},{id:"tasks.renameBranch",scope:"sidebar",keys:["b"],category:"Tasks pane",description:"Rename the selected task's git branch",hint:{keys:"b"}},{id:"tasks.cycleEngine",scope:"sidebar",keys:["v"],category:"Tasks pane",description:"Cycle engine vendor \u2014 applies on reopen",hint:{keys:"v"}},{id:"tasks.update",scope:"sidebar",keys:["u"],category:"Tasks pane",description:"Open the update page (when a new version is available)",hint:{keys:"u"}},{id:"tasks.jump",scope:"global",keys:[...vi],category:"Tasks pane",description:"Jump to the task showing that digit (ctrl+2 = first row)",hint:{keys:"ctrl+2-0"},presentation:"onePress"},{id:"tasks.focusEngine",scope:"sidebar",keys:["right"],category:"Tasks pane",description:"Focus the engine pane of the current window",hint:{keys:"\u2192"}}]});var Z2;var JS=h(()=>{Pi();xi();wi();gi();Z2=[{id:"help.open",scope:"global",keys:["f1"],category:"Global",description:"Show keybindings help",hint:{keys:"F1"},presentation:"onePress"},{id:"task.new",scope:"sidebar",keys:["n"],category:"Sidebar",description:"New task",hint:{keys:"n"}},{id:"task.openEditor",scope:"global",keys:[],prefixKeys:["o"],category:"Global",description:"Open active Task directory in editor"},{id:"task.moveMode",scope:"global",keys:[],prefixKeys:["m"],category:"Global",description:"Reorder sidebar rows (then j/k)"},{id:"settings.open",scope:"global",keys:[],prefixKeys:[","],category:"Global",description:"Open settings"},{id:"settings.open.sidebar",scope:"sidebar",keys:["s"],category:"Sidebar",description:"Open settings",hint:{keys:"s"}},{id:"worktrees.open.sidebar",scope:"sidebar",keys:["x"],category:"Sidebar",description:"Open worktrees",hint:{keys:"x"}},{id:"kanban.open",scope:"global",keys:[],prefixKeys:["1"],category:"Global",description:"Open kanban (issues board)"},{id:"automations.open",scope:"global",keys:[],prefixKeys:["2"],category:"Global",description:"Open automations (scheduled tasks)"},{id:"workItems.open",scope:"global",keys:[],prefixKeys:["3"],category:"Global",description:"Open GitHub issues (external tracker)"},{id:"app.quit",scope:"sidebar",keys:["q","ctrl+q"],category:"Sidebar",description:"Quit (with confirm)",hint:{keys:"q"}},{id:"focus.sidebar",scope:"workspace",keys:["ctrl+q"],category:"Workspace",description:"Back to sidebar (tasks)",hint:{keys:"ctrl+q"},presentation:"onePress"},{id:"focus.previous",scope:"global",keys:[],prefixKeys:["h"],category:"Navigation",description:"Focus previous pane (files \u2192 workspace \u2192 sidebar)"},{id:"focus.next",scope:"global",keys:["f4"],prefixKeys:["l"],category:"Navigation",description:"Focus next pane (sidebar \u2192 workspace \u2192 files)",hint:{keys:"f4"},presentation:"onePress"},{id:"attention.next",scope:"global",keys:["f7"],category:"Navigation",description:"Jump to the next available Inbox item",hint:{keys:"f7"},presentation:"onePress"},{id:"workspace.zenToggle",scope:"global",keys:[],prefixKeys:["z"],category:"Navigation",description:"Toggle zen mode (hide the files column)"},{id:"chat.interrupt",scope:"workspace",keys:[],category:"Workspace",description:"Interrupt current turn (esc while streaming)"},...bi,...Si,...Ii,...yi,{id:"terminal.scroll-up",scope:"terminal",keys:["ctrl+pageup"],category:"Terminal",description:"Scroll scrollback up",hint:{keys:"ctrl+pgup"}},{id:"terminal.scroll-down",scope:"terminal",keys:["ctrl+pagedown"],category:"Terminal",description:"Scroll scrollback down"},{id:"terminal.reset",scope:"terminal",keys:["f5"],category:"Terminal",description:"Reset terminal \u2014 kill the current shell and respawn",hint:{keys:"f5"},presentation:"onePress"},{id:"dialog.cancel",scope:"global",keys:[],category:"Dialog",description:"Close the top dialog (esc)"},{id:"dialog.newtask.tab.cycle",scope:"global",keys:[],category:"Dialog",description:"Switch New Task tab (Existing / New Repo)",hint:{keys:"ctrl+[/]"}}]});function O5(Z){let X=[];for(let J in Z){let z=Z[J];if(!z)continue;let Q=typeof z==="function"?void 0:z,Y=typeof z==="function"?z:()=>z.run(),G=i9(J),$=G?.keys??[],U=G?.prefixKeys??[];if($.length===0&&U.length===0){console.warn(`[rove/keybindings] bindByIds: id="${J}" has no chords (or doesn't exist in KobeKeymap)`);continue}$.forEach((K,M)=>X.push({key:K,cmd:Y,action:Q,slot:M,id:J})),U.forEach((K,M)=>X.push({key:K,prefix:!0,cmd:Y,action:Q,slot:M,id:J}))}return X}var ki=h(()=>{n9()});function hi(Z){return mi.get(Z)?.keys??[]}function QS(){for(let Z of Z2){let X=mi.get(Z.id);if(!X)continue;let J=Z;J.keys=[...X.keys],J.prefixKeys=X.prefixKeys&&[...X.prefixKeys],J.hint=X.hint?{...X.hint}:void 0}}function YS(){return ui}function GS(Z){return zS.add(Z),()=>{zS.delete(Z)}}function $S(){ui+=1;for(let Z of[...zS])Z()}function i9(Z){return xM0.get(Z)}var mi,ui=0,zS,xM0;var n9=h(()=>{JS();JS();ki();mi=new Map(Z2.map((Z)=>[Z.id,{keys:[...Z.keys],prefixKeys:Z.prefixKeys&&[...Z.prefixKeys],hint:Z.hint?{...Z.hint}:void 0}]));zS=new Set;xM0=new Map(Z2.map((Z)=>[Z.id,Z]))});function RO(){if(Xz)return Xz;let Z=$i();if(!Z.exists)return Xz={path:Z.path,exists:!1,applied:[],plugins:[],warnings:[]},Xz;let X=[...Z.warnings],J=tT(Z.doc,process.platform);X.push(...J.warnings);let z=Ei(Z.doc,process.platform);X.push(...z.warnings),Ni({...Zz,...z.configuration});let Q=Fi(Z2,J.entries);X.push(...Q.warnings);let Y=[...Q.applied],G=z.configuration.key;if(G!==null&&G!==void 0){let K=Z2.find((M)=>M.keys.includes(G));if(K)X.push(`prefix.key "${G}" collides with direct binding ${K.id}`)}let $=Ri(Z2,[...J.prefixEntries,...z.entries]);X.push(...$.warnings),Y.push(...$.applied);let U=_i(Z.doc,process.platform);X.push(...U.warnings);for(let K of U.entries){let M=Z2.find((D)=>D.keys.includes(K.chord));if(M)X.push(`plugins: ${K.chord} shadows ${M.id}`)}for(let K of X)console.warn(`[rove/keybindings] ${K}`);return Xz={path:Z.path,exists:!0,applied:Y,plugins:U.entries,warnings:X},Xz}function ci(){return oQ().plugins}function oQ(){return Xz??RO()}function TO(){Xz=null,Gi(),QS(),Wi();let Z=RO();return $S(),Z}var Xz=null;var XV=h(()=>{qi();S8();CO();Ai();Ti();n9()});function qS(Z,X){if(typeof X.theme==="string"&&X.theme.length>0&&X.theme!==Z.selectedTheme()){if(!Z.hasTheme(X.theme))Z.reloadUserThemes();if(Z.hasTheme(X.theme))Z.setTheme(X.theme)}if(typeof X.transparentBackground==="boolean"&&X.transparentBackground!==Z.transparentBackground())Z.setTransparentBackground(X.transparentBackground);if(X.focusAccent===null||typeof X.focusAccent==="string"){let J=wM0(X.focusAccent);if(J&&J!==Z.focusAccent())Z.setFocusAccent(J)}}function wM0(Z){if(Z===null)return"primary";return yM0.includes(Z)?Z:null}var yM0;var li=h(()=>{yM0=["primary","success","info"]});function fM0(Z,X,J=pi,z=vM0){let Q=Z-J;if(Q<z)return null;let Y=(G)=>Math.round(G/1048576);return`event loop stalled ~${Q}ms \u2014 rss=${Y(X.rss)}MB heapUsed=${Y(X.heapUsed)}MB`}function di(){let Z=Date.now(),X=setInterval(()=>{let J=Date.now(),z=J-Z;Z=J;let Q=fM0(z,process.memoryUsage());if(Q)cZ("stall",Q)},pi);return X.unref?.(),()=>clearInterval(X)}var pi=1000,vM0=2000;var ii=h(()=>{lZ()});function ni(Z){let X={backgroundColor:"transparent",externalOutputMode:"passthrough",exitOnCtrlC:!1,screenMode:"alternate-screen",useKittyKeyboard:{}};return Z?{...X,onDestroy:Z}:X}function ai(Z,X){let J={backgroundColor:"transparent",exitOnCtrlC:!1,screenMode:"split-footer",footerHeight:Z,useKittyKeyboard:{}};return X?{...J,onDestroy:X}:J}function oi(Z){process.on("exit",()=>Z.destroy())}function si(Z=process.stdout){if(!Z.isTTY)return()=>{};let X=(Q)=>{try{Z.write(Q)}catch{}};X(bM0);let J=!1,z=()=>{if(J)return;J=!0,X(gM0)};return process.on("exit",z),z}function ri(){let Z=!1,X=()=>{if(Z)return;Z=!0,setTimeout(()=>process.exit(0),5000)};for(let J of["SIGHUP","SIGTERM","SIGINT"])process.on(J,X)}function ti(Z=5000){let X=setInterval(()=>{if(process.ppid===1)process.exit(0)},Z);return X.unref?.(),()=>clearInterval(X)}var bM0="\x1B[?2004h",gM0="\x1B[?2004l";class Zn{owner=null;anchor=null;claim(Z,X){this.owner=Z,this.anchor={x:Math.max(0,Math.trunc(X.x)),y:Math.max(0,Math.trunc(X.y))}}release(Z){if(this.owner!==Z)return!1;return this.owner=null,this.anchor=null,!0}current(){return this.anchor}}class Xn{controller;pending=Buffer.alloc(0);frame=Buffer.alloc(0);constructor(Z){this.controller=Z}push(Z){let X=this.pending.length>0?Buffer.concat([this.pending,Z]):Z;this.pending=Buffer.alloc(0);let J=[],z=0;while(z<X.length){if(this.frame.length===0){let K=X.indexOf(Jz,z);if(K<0){let M=X.subarray(z),D=ei(M,[Jz]),W=M.length-D;if(W>0)J.push(M.subarray(0,W));if(D>0)this.pending=Buffer.from(M.subarray(W));break}if(K>z)J.push(X.subarray(z,K));this.frame=Buffer.from(Jz),z=K+Jz.length;continue}let Q=X.indexOf(SO,z),Y=X.indexOf(Jz,z);if(Y>=0&&(Q<0||Y<Q)){this.frame=Buffer.from(Jz),z=Y+Jz.length;continue}if(Q>=0){if(Q>z)this.frame=Buffer.concat([this.frame,X.subarray(z,Q)]);J.push(this.frame);let K=this.controller.current();if(K)J.push(Buffer.from(`\x1B[${K.y+1};${K.x+1}H\x1B[?25l`));J.push(SO),this.frame=Buffer.alloc(0),z=Q+SO.length;continue}let G=X.subarray(z),$=ei(G,[Jz,SO]),U=G.length-$;if(U>0)this.frame=Buffer.concat([this.frame,G.subarray(0,U)]);if($>0)this.pending=Buffer.from(G.subarray(U));break}return J.length>0?Buffer.concat(J):Buffer.alloc(0)}flush(){if(this.frame.length>0)return this.frame=Buffer.alloc(0),this.pending=Buffer.alloc(0),Buffer.alloc(0);let Z=this.pending;return this.pending=Buffer.alloc(0),Z}}function ei(Z,X){let J=Math.min(Z.length,Math.max(...X.map((z)=>z.length-1)));for(let z=J;z>0;z-=1){let Q=Z.subarray(Z.length-z);if(X.some((Y)=>z<Y.length&&Q.equals(Y.subarray(0,z))))return z}return 0}function kM0(Z,X){if(typeof Z!=="string")return Buffer.from(Z);let J=typeof X==="string"?X:void 0;return Buffer.from(Z,J)}function mM0(Z,X){return typeof Z==="function"?Z:X}function hM0(Z,X=t$){let J=new Xn(X),Q=(G,$,U)=>{let K=J.push(kM0(G,$)),M=mM0($,U);if(K.length===0){if(M)queueMicrotask(()=>M(null));return!0}return M?Z.write(K,M):Z.write(K)};return{stdout:new Proxy(Z,{get(G,$){if($==="write")return Q;let U=Reflect.get(G,$,G);return typeof U==="function"?U.bind(G):U},set(G,$,U){if($==="write")return Q=U,!0;return Reflect.set(G,$,U,G)}}),flush(){let G=J.flush();if(G.length>0)Z.write(G)}}}function Jn(Z){if(Z.platform!=="darwin"||!Z.fullscreen)return{active:!1,rendererOptions:{},attach:()=>()=>{},flush:()=>{}};let X=hM0(Z.stdout,Z.controller);return{active:!0,rendererOptions:{stdout:X.stdout,remote:!1},attach:(J)=>uM0(J,Z.stdout),flush:()=>X.flush()}}function uM0(Z,X,J=process){let z=()=>{let{columns:Q,rows:Y}=X;if(!Q||!Y)return;Z.resize(Q,Y)};return J.on("SIGWINCH",z),()=>J.removeListener("SIGWINCH",z)}var Jz,SO,t$;var HS=h(()=>{Jz=Buffer.from("\x1B[?2026h"),SO=Buffer.from("\x1B[?2026l");t$=new Zn});function z1(Z){let X=zn.useRef(Z);return X.current=Z,X}var zn;var F7=h(()=>{zn=p0(n0(),1)});function Qn(Z){let[X,J]=n3.useState(Z.initial??"sidebar"),z=i4(),Q=z1(X),Y=n3.useCallback((U)=>{if(Q.current===U)return;let K=z?.currentFocusedRenderable;if(K&&!K.isDestroyed)try{K.blur()}catch{}J(U)},[z]),G=n3.useCallback((U)=>{let M=(PO.indexOf(Q.current)+U+PO.length)%PO.length;Y(PO[M])},[Y]),$=n3.useMemo(()=>({focused:X,is:(U)=>X===U,setFocused:Y,cycle:G}),[X,Y,G]);return y(US.Provider,{value:$,children:Z.children})}function IO(){let Z=n3.useContext(US);if(!Z)throw Error("useFocus: must be called inside <FocusProvider>. See src/tui-react/context/focus.tsx.");return Z}function Yn(){return n3.useContext(US)}var n3,PO,US;var JV=h(async()=>{F7();b0();await Z5();n3=p0(n0(),1),PO=["sidebar","workspace","files","terminal"],US=n3.createContext(null)});function Gn(){let Z=SD(g4()),X=new Set,J=null;function z(G){if(X.size===0)return!0;try{let $={},U=Z.get();for(let K of X)$[K]=U[K];return _8($),X.clear(),!0}catch($){return console.error(`[rove] kv ${G} failed:`,$),!1}}function Q(){if(J)clearTimeout(J),J=null}function Y(){Q(),J=setTimeout(()=>{J=null,z("write")},cM0)}return{snapshot:Z.get,subscribe:Z.subscribe,get(G,$){return Z.get()[G]??$},set(G,$){Z.update((U)=>({...U,[G]:$})),X.add(G),Y()},seed(G,$){if(Z.get()[G]!==void 0)return;Z.update((U)=>({...U,[G]:$}))},flush(){return Q(),z("flush")},clear(){Q(),X.clear(),Z.set({});try{Cf({})}catch(G){console.error("[rove] kv clear write failed:",G)}}}}var cM0=250;var $n=h(()=>{h9();i8()});function qn(Z){let[X]=G3.useState(Gn),J=G3.useSyncExternalStore(X.subscribe,X.snapshot,X.snapshot);G3.useEffect(()=>{let Q=()=>{X.flush()};return process.on("exit",Q),()=>{process.off("exit",Q)}},[X]);let z=G3.useMemo(()=>({ready:!0,store:J,signal(Q,Y){return X.seed(Q,Y),[()=>X.get(Q)??Y,(G)=>X.set(Q,G)]},get:X.get,set:X.set,flush:X.flush,clear:X.clear}),[X,J]);return y(KS.Provider,{value:z,children:Z.children})}function P8(){let Z=G3.useContext(KS);if(!Z)throw Error("KV context must be used within a context provider");return Z}function w2(){return G3.useContext(KS)??null}var G3,KS;var I8=h(()=>{$n();b0();G3=p0(n0(),1),KS=G3.createContext(null)});function Un(Z,X){return`${Z}:${X}`}function Kn(Z,X){let J=Un(X.taskId,X.tabId),z=Z.get(J);if(z==="needs_input"||z==="error")return Z;let Q=new Map(Z);return Q.set(J,X.kind),Q}function Vn(Z,X,J){let z=Un(X,J);if(!Z.has(z))return Z;let Q=new Map(Z);return Q.delete(z),Q}function Bn(Z,X){return Z==="error"||X}function Mn(Z){if(Z==="permission_needed")return"needs_input";if(Z==="error"||Z==="rate_limited")return"error";if(Z==="turn_complete")return"done";return null}function Nn(Z){if(Z==="done")return"done";if(Z==="error")return"error";if(Z==="needs_input")return"needs_input";return null}function xO(Z,X,J,z){if(Z===null)return[];let Q=[];for(let[Y,G]of X){if(Y===J)continue;if(Z.get(Y)===G)continue;let $=z(G);if($)Q.push({key:Y,kind:$})}return Q}function lM0(Z){let X="",J=0;for(let z=0;z<Z.length;z++){let Q=Z.charCodeAt(z);if(Q>31&&(Q<127||Q>159))continue;X+=`${Z.slice(J,z)} `,J=z+1}return J===0?Z:X+Z.slice(J)}function Wn(Z){return`\x1B]9;${lM0(Z)}\x07`}var Hn=4500;var yO="../pulse-n3cq1btw.wav";var Dn=()=>{};import{existsSync as dM0,mkdirSync as iM0}from"fs";import{tmpdir as nM0}from"os";import{basename as aM0,delimiter as oM0,isAbsolute as sM0,join as VS,resolve as rM0}from"path";function eM0(Z,X,J){if(Z==="ffplay")return[Z,"-autoexit","-nodisp","-af",`volume=${J}`,X];if(Z==="mpv")return[Z,"--no-video","--audio-display=no","--volume",String(Math.round(J*100)),X];if(Z==="mpg123"||Z==="mpg321")return[Z,"-g",String(Math.round(J*100)),X];if(Z==="mplayer")return[Z,"-vo","null","-volume",String(Math.round(J*100)),X];if(Z==="afplay"||Z==="omxplayer"||Z==="aplay"||Z==="cmdmp3")return[Z,X];if(Z==="play")return[Z,"-v",String(J),X];if(Z==="cvlc")return[Z,`--gain=${J}`,"--play-and-exit",X];return[Z,"-c",`(New-Object Media.SoundPlayer '${X.replace(/'/g,"''")}').PlaySync()`]}function ZN0(Z,X=oM0){return Z.split(X).filter(Boolean)}function XN0(){if(wO!==void 0)return wO;let Z=ZN0(process.env.PATH??"");return wO=tM0.find((X)=>Z.some((J)=>dM0(VS(J,X))))??null,wO}async function JN0(){return Fn??=(async()=>{iM0(jn,{recursive:!0});let Z=VS(jn,aM0(On)),X=Bun.file(Z);if(await X.exists())return Z;return await Bun.write(X,Bun.file(On)),Z})(),Fn}function Ln(Z=0.4){let X=XN0();if(!X)return;JN0().then((J)=>{try{Bun.spawn(eM0(X,J,Z),{stdin:"ignore",stdout:"ignore",stderr:"ignore"}).unref?.()}catch{}}).catch(()=>{return})}var On,jn,tM0,wO,Fn;var _n=h(()=>{Dn();On=sM0(yO)?yO:rM0(import.meta.dir,yO),jn=VS(nM0(),"kobe-sfx"),tM0=["ffplay","mpv","mpg123","mpg321","mplayer","afplay","play","omxplayer","aplay","cmdmp3","cvlc","powershell.exe"]});function Cn(Z){let[X,J]=L7.useState([]),[z,Q]=L7.useState(new Map),Y=w2(),G=L7.useMemo(()=>g4(),[]),$=L7.useMemo(()=>({"notifications.sound.enabled":Y?.get("notifications.sound.enabled")??G["notifications.sound.enabled"],"notifications.toast.enabled":Y?.get("notifications.toast.enabled")??G["notifications.toast.enabled"]}),[Y,G]),U=L7.useRef(0),K=L7.useRef(new Set);L7.useEffect(()=>()=>{for(let C of K.current)clearTimeout(C);K.current.clear()},[]);let M=L7.useCallback((C)=>{J((_)=>_.filter((L)=>L.id!==C))},[]),D=L7.useCallback((C)=>{if(Q((L)=>Kn(L,C)),$["notifications.sound.enabled"]!==!1){try{process.stdout.write(`\x07${Wn(`Rove \u2014 ${C.title}`)}`)}catch{}Ln()}let _=$["notifications.toast.enabled"]!==!1;if(Bn(C.kind,_)){let L=++U.current;J((R)=>[...R,{id:L,...C}]);let w=setTimeout(()=>{K.current.delete(w),M(L)},Hn);K.current.add(w)}},[$,M]),W=L7.useCallback((C,_)=>{Q((L)=>Vn(L,C,_))},[]),j=L7.useMemo(()=>({toasts:X,unread:z,notify:D,dismiss:M,markRead:W}),[X,z,D,M,W]);return y(An.Provider,{value:j,children:Z.children})}function a9(){let Z=L7.useContext(An);if(!Z)throw Error("useNotifications must be used within a NotificationsProvider");return Z}var L7,An;var sQ=h(()=>{i8();_n();I8();b0();L7=p0(n0(),1),An=L7.createContext(null)});function QN0(Z){if(!Z)throw Error("useBindings: no renderer in scope; call inside a component rendered by @opentui/react.");if(vO===Z)return;if(En.has(Z))return;if(fO&&bO)fO.off("keypress",bO);if(vO)En.add(vO);UX.length=0,y2(),vO=Z,fO=Z.keyInput,bO=(X)=>{rT(UX,X,Date.now(),{flushSync:bT})},fO.on("keypress",bO)}function rQ(){return UX.some((Z)=>Z.modalOwner!==void 0)}function e$(){return Ki(UX)}function Tn(){return Oi(UX)}function Sn(Z,X){return ji(UX,Z,X)}function Rn(){Pn++;for(let Z of BS)Z()}function gO(){return zz.useSyncExternalStore((Z)=>{return BS.add(Z),()=>BS.delete(Z)},()=>Pn)}function N1(Z,X){let J=i4();QN0(J);let z=z1(Z),Q=zz.useContext(MS);zz.useEffect(()=>{if(X?.modalOwner!==void 0)y2();let Y={config:()=>z.current(),id:zN0++,modalOwner:X?.modalOwner,modalMember:X?.modalOwner===void 0?Q??void 0:void 0};return Mi(UX,Y),Rn(),()=>{let G=UX.findIndex(($)=>$.id===Y.id);if(G>=0)UX.splice(G,1);Rn()}},[])}function u7(Z){return[{key:"escape",cmd:Z},{key:"q",cmd:Z},{key:"ctrl+c",cmd:Z}]}var zz,MS,zN0=1,UX,vO=null,fO=null,bO=null,En,Pn=0,BS;var v4=h(async()=>{S8();F7();S8();await Z5();zz=p0(n0(),1),MS=zz.createContext(null),UX=[],En=new WeakSet;BS=new Set});function $3(Z){return Z<70}function In(Z){if(Z.focusedPane==="sidebar")return"sidebar";return Z.hasSelection||Z.hasOpenPage?"content":"sidebar"}function _7(){let Z=q5();return $3(Z.width)?1:2}function $N0(Z){let X=q5(),{theme:J}=w0(),z=i4(),Q=H7.useRef(!1),Y=Z.size==="xlarge"?140:Z.size==="large"?110:Z.size==="small"?50:80,G=2,$=Z.placement==="upper-fifth"&&!$3(X.width),U=Math.max(2,Math.floor(X.height/5)),K=$?Math.max(2,U-1):0,M=Math.max(8,$?X.height-K-2:X.height-4);return y("box",{onMouseDown:()=>{Q.current=!!z?.getSelection()},onMouseUp:()=>{if(Q.current){Q.current=!1;return}Z.onClose?.()},width:X.width,height:X.height,alignItems:"center",justifyContent:$?"flex-start":"center",paddingTop:K,position:"absolute",zIndex:3000,left:0,top:0,shouldFill:!1,children:y("box",{onMouseUp:(D)=>{Q.current=!1,D.stopPropagation()},width:Y,maxWidth:X.width-2,maxHeight:M,flexShrink:1,flexGrow:0,backgroundColor:J.backgroundDialog,paddingTop:1,children:Z.children})})}function yn(Z){let[X,J]=H7.useState([]),[z,Q]=H7.useState("medium"),[Y,G]=H7.useState("center"),$=i4(),{transparentBackground:U}=w0(),K=H7.useRef(null),M=H7.useRef(null);H7.useEffect(()=>()=>{if(M.current)clearTimeout(M.current)},[]);let D=H7.useCallback(()=>{if(M.current)clearTimeout(M.current);M.current=setTimeout(()=>{let R=K.current;if(!R||R.isDestroyed)return;function T(S){for(let I of S.getChildren()){if(I===R)return!0;if(T(I))return!0}return!1}let E=$?.root;if(!E)return;if(!T(E))return;R.focus()},1)},[$]),W=z1(X),j=H7.useCallback(()=>{if(M.current)clearTimeout(M.current);if(W.current.length===0)K.current=$?.currentFocusedRenderable??null,K.current?.blur()},[$]),C=H7.useCallback(()=>{let R=$?.getSelection();if(R){if($?.clearSelection(),R.getSelectedText())return}W.current.at(-1)?.onClose?.(),J((E)=>E.slice(0,-1)),D()},[$,D]),_=H7.useMemo(()=>({clear(R){for(let T of W.current)T.onClose?.();if(Q("medium"),G("center"),J([]),R?.refocus===!1)K.current=null;else D()},replace(R,T){j();for(let E of W.current)E.onClose?.();Q("medium"),G("center"),J([{key:++xn,element:R,onClose:T}])},push(R,T){j(),J((E)=>[...E,{key:++xn,element:R,onClose:T}])},pop(){if(W.current.at(-1)?.onClose?.(),J((T)=>T.slice(0,-1)),W.current.length<=1)D()},get stack(){return W.current},get size(){return z},setSize:Q,get placement(){return Y},setPlacement:G}),[X,z,Y,D,j]),L=X.at(-1),w=L?U?GN0:YN0:1;return U0(NS.Provider,{value:_,children:[y("box",{flexGrow:1,backgroundColor:L&&!U?"black":"transparent",children:y("box",{flexGrow:1,opacity:w,children:Z.children})}),y("box",{position:"absolute",zIndex:3000,children:L?U0(MS,{value:wn,children:[y(qN0,{dismissTop:C}),y($N0,{onClose:()=>_.clear(),size:z,placement:Y,children:L.element()},L.key)]}):null})]})}function qN0(Z){return N1(()=>({modal:!0,bindings:[{key:"escape",cmd:Z.dismissTop},{key:"ctrl+c",cmd:Z.dismissTop}]}),{modalOwner:wn}),null}function M4(){let Z=H7.useContext(NS);if(!Z)throw Error("useDialog must be used within a DialogProvider");return Z}function vn(){return H7.useContext(NS)}function x8(Z,X,J){return new Promise((z)=>{if(Z.replace(()=>X(z),()=>z(void 0)),J?.size)Z.setSize(J.size)})}var H7,YN0=0.5,GN0=0.75,xn=0,NS,wn;var S5=h(async()=>{F7();b0();await T1([Z5(),S1(),v4()]);H7=p0(n0(),1);NS=H7.createContext(null);wn=Symbol("kobe.dialog.modal")});import{createCliRenderer as HN0}from"@opentui/core";function KN0(){return zV.useEffect(()=>{let Z=!1,X=null,J=[];return(async()=>{let z=await zi({logTag:"ui-prefs",channels:["ui-prefs","keybindings"]});if(!z)return;if(Z){z.dispose();return}X=z;let Q=(U)=>{if(!U)return;if(qS(fn,U),j$(U.locale))I$(U.locale)},Y=z.uiPrefsStore();Q(Y.get()),J.push(Y.subscribe(()=>Q(Y.get())));let G=z.keybindingsRevStore(),$=G.get();J.push(G.subscribe(()=>{let U=G.get();if(U==null||U===$)return;let K=$===null;if($=U,!K)TO()}))})(),()=>{Z=!0;for(let z of J)z();X?.dispose()}},[]),null}function VN0(Z){let{theme:X}=w0();return zV.useEffect(()=>{d4("pane-crash",Z.error)},[Z.error]),U0("box",{flexDirection:"column",flexGrow:1,backgroundColor:X.background,paddingLeft:1,paddingTop:1,gap:1,children:[y("text",{fg:X.error,children:U1("common.paneCrash.title")}),y("text",{fg:X.textMuted,children:U1("common.paneCrash.hint")})]})}async function tQ(Z){if(Z.logContext)hk(Z.logContext);lk(),RO();for(let{name:_,theme:L}of RK())kT(_,L);let X=$D(UN0,a$);qS(fn,{theme:X.theme,transparentBackground:X.transparent,focusAccent:X.focusAccent}),I$(X.locale);let J=Z.providers?.kv??!1,z=Z.providers?.focus??!0,Q=Z.providers?.notifications??!1,Y=await Z.setup(X),G=Jn({platform:process.platform,fullscreen:Z.inlineRows===void 0,stdout:process.stdout}),$=()=>{},U=()=>{$(),G.flush(),Y.onDestroy?.()},K=await HN0({...Z.inlineRows!==void 0?ai(Z.inlineRows,U):ni(U),...G.rendererOptions});$=G.attach(K);let M=U0(o5,{children:[y(KN0,{}),y(bn,{children:Y.root()})]}),W=y(yn,{children:Q?y(Cn,{children:M}):M}),j=z?y(Qn,{initial:"sidebar",children:W}):W,C=J?y(qn,{children:j}):j;gT(K).render(y(ip,{mode:"dark",theme:X.theme,children:C})),oi(K),si(),ri(),ti(),di()}var zV,UN0,fn,bn;var QV=h(async()=>{lZ();z3();Qi();XV();YD();li();ii();HS();qD();I8();sQ();P1();b0();await T1([Z5(),JV(),S1(),S1(),S5()]);zV=p0(n0(),1),UN0=rZ,fn={selectedTheme:mp,hasTheme:a$,setTheme:hp,reloadUserThemes:()=>{for(let{name:Z,theme:X}of RK())kT(Z,X)},transparentBackground:up,setTransparentBackground:cp,focusAccent:lp,setFocusAccent:pp};bn=class bn extends zV.Component{state={error:null};static getDerivedStateFromError(Z){return{error:Z}}render(){if(this.state.error!==null)return y(VN0,{error:this.state.error});return this.props.children}}});import{spawnSync as BN0}from"child_process";function MN0(){if(!process.stdin.isTTY)return Promise.resolve();return new Promise((Z)=>{let X=process.stdin,J=()=>{X.off("data",J),X.setRawMode?.(!1),X.pause(),Z()};X.setRawMode?.(!0),X.resume(),X.once("data",J)})}async function kO(Z){Z.renderer?.destroy(),process.stdout.write(`
|
|
522
|
+
`);else throw Z}i$.injectIntoDevTools();Fp=i$,bT=Fp.flushSyncFromReconciler??Fp.flushSync});import{engine as gd0,Timeline as kd0}from"@opentui/core";import{createSlotRegistry as hd0}from"@opentui/core";import{TimeToFirstDrawRenderable as tB0}from"@opentui/core";function yp(Z){let X=n$.useRef(Z);return n$.useLayoutEffect(()=>{X.current=Z}),n$.useCallback((...J)=>{let z=X.current;return z(...J)},[])}function sB0(Z,X,J,z,Q){if(!X)return null;try{return X(J)}catch(Y){return Z.reportPluginError({pluginId:z,slot:Q,phase:"error_placeholder",source:"react",error:Y}),null}}var pB0,n$,dB0,iB0,wp,vp,aB0,fp,oB0,iQ,eB0,ZM0,i4=()=>{let{renderer:Z}=fT();if(!Z)throw Error("Renderer not found.");return Z},DO=(Z)=>{let{keyHandler:X}=fT(),J=yp(Z);wp.useEffect(()=>{return X?.on("paste",J),()=>{X?.off("paste",J)}},[X])},nB0=(Z)=>{let X=i4(),J=yp(Z);return vp.useEffect(()=>{return X.on("resize",J),()=>{X.off("resize",J)}},[X]),X},q5=()=>{let Z=i4(),[X,J]=fp.useState({width:Z.width,height:Z.height});return nB0((Q,Y)=>{J({width:Q,height:Y})}),X},rB0;var Z5=h(async()=>{JO();await xp();pB0=p0(n0(),1),n$=p0(n0(),1),dB0=p0(n0(),1),iB0=p0(n0(),1),wp=p0(n0(),1),vp=p0(n0(),1),aB0=p0(n0(),1),fp=p0(n0(),1),oB0=p0(n0(),1),iQ=p0(n0(),1),eB0=p0(n0(),1),ZM0=p0(n0(),1);rB0=class rB0 extends iQ.default.Component{constructor(Z){super(Z);this.state={failure:null}}componentDidCatch(Z){let X=this.props.registry.reportPluginError({pluginId:this.props.pluginId,slot:this.props.slotName,phase:"render",source:"react",error:Z});this.setState({failure:X})}componentDidUpdate(Z){if(Z.resetToken!==this.props.resetToken&&this.state.failure)this.setState({failure:null})}render(){if(this.state.failure){let Z=sB0(this.props.registry,this.props.pluginFailurePlaceholder,this.state.failure,this.props.pluginId,this.props.slotName);if(Z===null||Z===void 0||Z===!1)return this.props.fallbackOnFailure??null;return Z}return this.props.children}};Ep({"time-to-first-draw":tB0})});function H4(Z){return bp.useSyncExternalStore(Z.subscribe,Z.get,Z.get)}var bp;var i3=h(()=>{bp=p0(n0(),1)});function gp(Z,X,J){var z=null;if(J!==void 0&&(z=""+J),X.key!==void 0&&(z=""+X.key),"key"in X){J={};for(var Q in X)Q!=="key"&&(J[Q]=X[Q])}else J=X;return X=J.ref,{$$typeof:XM0,type:Z,key:z,ref:X!==void 0?X:null,props:J}}var XM0,JM0,o5,y,U0;var kp=h(()=>{XM0=Symbol.for("react.transitional.element"),JM0=Symbol.for("react.fragment");o5=JM0,y=gp,U0=gp});var b0=h(()=>{kp()});import{RGBA as zM0}from"@opentui/core";function QM0(){return Object.keys(e8.get().themes)}function a$(Z){return Boolean(e8.get().themes[Z])}function kT(Z,X){if(!Z)return!1;if(!X||typeof X!=="object"||!X.theme)return!1;return e8.update((J)=>({...J,themes:{...J.themes,[Z]:X}})),!0}function mp(){return e8.get().active}function hp(Z){if(!a$(Z))return!1;return e8.update((X)=>({...X,active:Z})),!0}function up(){return e8.get().transparentBackground}function cp(Z){e8.update((X)=>({...X,transparentBackground:Z}))}function lp(){return e8.get().focusAccent}function pp(Z){e8.update((X)=>({...X,focusAccent:Z}))}function YM0(Z){let X=Z.themes[Z.active];if(X)return CK(X,Z.mode);let J=Z.themes[rZ]??Object.values(Z.themes)[0];if(!J)return CK({theme:{background:"#000000",text:"#ffffff"}},Z.mode);return CK(J,Z.mode)}function ip(Z){d9.useMemo(()=>{e8.update((Y)=>({...Y,mode:Z.mode??Y.mode,active:Z.theme&&Y.themes[Z.theme]?Z.theme:Y.active}))},[]);let X=H4(e8),J=i4(),z=d9.useMemo(()=>Sm(YM0(X),X.focusAccent,X.transparentBackground),[X]);d9.useEffect(()=>{if(J?.screenMode==="split-footer")return;J?.setBackgroundColor(z.background??zM0.fromInts(0,0,0))},[J,z]);let Q=d9.useMemo(()=>({theme:z,selected:X.active,transparentBackground:X.transparentBackground,focusAccent:X.focusAccent,mode:()=>X.mode,set(Y){if(!a$(Y))return!1;return e8.update((G)=>({...G,active:Y})),!0},setMode(Y){e8.update((G)=>({...G,mode:Y}))},setTransparentBackground(Y){e8.update((G)=>({...G,transparentBackground:Y}))},setFocusAccent(Y){e8.update((G)=>({...G,focusAccent:Y}))},all:QM0,has:a$}),[z,X]);return y(dp.Provider,{value:Q,children:Z.children})}function w0(){let Z=d9.useContext(dp);if(!Z)throw Error("Theme context must be used within a context provider");return Z}var d9,e8,dp;var S1=h(async()=>{h9();EK();i3();EK();b0();await Z5();d9=p0(n0(),1),e8=SD({themes:{...AK},active:rZ,mode:"dark",transparentBackground:!0,focusAccent:"primary"});dp=d9.createContext(null)});function GM0(){return H4(wu())}function m0(){let Z=GM0();return np.useCallback((X,J)=>U1(X,J),[Z])}var np;var P1=h(()=>{c3();i3();kQ();np=p0(n0(),1)});function h7(Z){if(Z===void 0)return"undefined";if(Z===null)return"null";let X=Array.isArray(Z)?"array":typeof Z,J;try{J=typeof Z==="string"?Z:JSON.stringify(Z)}catch{J=String(Z)}if(J.length>120)J=`${J.slice(0,120)}\u2026`;return`${X}:${J}`}function mT(Z){let X=Z?.changes;if(!X||typeof X!=="object"||Array.isArray(X))return null;let J=new Map;for(let[z,Q]of Object.entries(X)){let Y=Q;if(typeof Y?.added!=="number"||typeof Y.deleted!=="number")return null;J.set(z,{added:Y.added,deleted:Y.deleted})}return J}function hT(Z){let X=Z;if(typeof X?.theme!=="string")return null;return{theme:X.theme,transparentBackground:X.transparentBackground===!0,focusAccent:typeof X.focusAccent==="string"?X.focusAccent:null,locale:typeof X.locale==="string"?X.locale:"",sortMode:X.sortMode==="recent"?"recent":"default",keysCollapsed:X.keysCollapsed===!0,projectFilter:typeof X.projectFilter==="string"&&X.projectFilter.length>0?X.projectFilter:null}}function uT(Z,X){if(Z.size!==X.size)return!1;for(let[J,z]of Z){let Q=X.get(J);if(!Q||!kK(z,Q))return!1}return!0}function ap(Z){let X=Z?.usage;if(!X||typeof X!=="object"||Array.isArray(X))return null;let J=new Map;for(let[z,Q]of Object.entries(X)){let Y=Q;if(typeof Y?.capturedAt!=="number"||!Array.isArray(Y.windows))return null;let G=[];for(let $ of Y.windows){let U=$;if(typeof U?.kind!=="string"||typeof U.label!=="string"||typeof U.percent!=="number")return null;if(U.resetsAt!==null&&typeof U.resetsAt!=="number")return null;G.push({kind:U.kind,label:U.label,percent:U.percent,resetsAt:U.resetsAt})}J.set(z,{windows:G,capturedAt:Y.capturedAt})}return J}function op(Z,X){if(Z.size!==X.size)return!1;for(let[J,z]of Z){let Q=X.get(J);if(!Q||Q.capturedAt!==z.capturedAt||Q.windows.length!==z.windows.length)return!1;for(let Y=0;Y<z.windows.length;Y++){let G=z.windows[Y],$=Q.windows[Y];if(!G||!$||G.kind!==$.kind||G.label!==$.label||G.percent!==$.percent||G.resetsAt!==$.resetsAt)return!1}}return!0}function cT(Z){let X=Z?.activity;if(!X||typeof X!=="object"||Array.isArray(X))return null;let J=new Map;for(let[z,Q]of Object.entries(X)){let Y=Q;if(typeof Y?.mtimeMs!=="number"||typeof Y.completionAt!=="number")return null;if(Y.completionId!==null&&typeof Y.completionId!=="string")return null;J.set(z,{mtimeMs:Y.mtimeMs,completionId:Y.completionId,completionAt:Y.completionAt})}return J}function lT(Z,X){if(Z.size!==X.size)return!1;for(let[J,z]of Z){let Q=X.get(J);if(!Q||Q.mtimeMs!==z.mtimeMs||Q.completionId!==z.completionId||Q.completionAt!==z.completionAt)return!1}return!0}function sp(Z){if(Z>$M0)return!1;return Z===1||Z%10===0}function qX(Z){return{id:f$(Z.id),title:Z.title,repo:Z.repo,branch:Z.branch,worktreePath:Z.worktreePath,kind:Z.kind,...Z.scratch?{scratch:!0}:{},status:Z.status,pinned:Z.pinned,vendor:Z.vendor,prStatus:Z.prStatus,modelEffort:Z.modelEffort,groupId:Z.groupId,deletion:Z.deletion,dispatcher:Z.dispatcher,createdAt:Z.createdAt,updatedAt:Z.updatedAt}}var $M0=100;var o$=h(()=>{g$();w7()});async function rp(Z){let X=Z.spawnDaemon?Math.floor(Math.random()*400):500,J=0;while(!Z.isDisposed()){if(X>0)await new Promise((z)=>setTimeout(z,X));if(Z.isDisposed())break;J++;try{if(Z.spawnDaemon)await Z.ensureReachable();await Z.init(),cZ("orch",`reconnected and re-subscribed after ${J} attempt(s) \u2014 task list re-synced`);return}catch(z){if(Z.shouldLogAttempt(J))d4("orch-reconnect",z);X=X===0?500:Math.min(X*2,3000)}}}async function tp(Z,X,J){let z=await Z.request("hello",{protocolVersion:T2,minProtocolVersion:mJ}),Q=typeof z.protocolVersion==="number"?z.protocolVersion:T2,Y=typeof z.minProtocolVersion==="number"?z.minProtocolVersion:Q;if(!kW({localVersion:T2,localMin:mJ,remoteVersion:Q,remoteMin:Y}))throw Error(`Rove daemon is protocol v${Q} (min v${Y}); this client is v${T2} (min v${mJ}). Restart the daemon (\`rove daemon restart\`) or upgrade Rove.`);let G=A2();if(xk(z.homeDir,G))throw Error(`Rove daemon on this socket serves ${z.homeDir}, but this client uses ${G}. A sandbox or dev daemon has taken the production socket \u2014 stop it (\`rove daemon stop\`), or unset ROVE_DAEMON_SOCKET_PATH / KOBE_DAEMON_SOCKET_PATH before starting it.`);if(J.setDaemonVersionSig(typeof z.kobeVersion==="string"?z.kobeVersion:null),z.tasks&&X.subscribesTasks)J.setTasks(z.tasks.map(qX));if(await Z.subscribe({role:X.role,channels:X.channels}),z.capabilities?.includes("worktree.changes")){if(J.worktreeChangesAcc()===null)J.setWorktreeChangesSig(new Map)}else J.setWorktreeChangesSig(null);if(z.capabilities?.includes("transcript.activity")){if(J.transcriptActivityAcc()===null)J.setTranscriptActivitySig(new Map)}else J.setTranscriptActivitySig(null);J.setConnectionState("online"),cZ("orch",`subscribed as ${X.role} (${J.tasksAcc().length} tasks)`)}var ep=h(()=>{lZ();o8();T5();o$()});function qM0(Z,X){let J=new Set(Z.map((G)=>G.id)),z=X.engineStateAcc();if(z.size>0){let G=null;for(let $ of z.keys()){if(J.has($))continue;if(!G)G=new Map(z);G.delete($)}if(G)X.setEngineStateSig(G)}let Q=X.engineTabStateAcc();if(Q.size>0){let G=null;for(let $ of Q.keys()){if(J.has($))continue;if(!G)G=new Map(Q);G.delete($)}if(G)X.setEngineTabStateSig(G)}let Y=X.engineLifecycleAcc();if(Y.size>0){let G=null;for(let $ of Y.keys()){if(J.has($))continue;if(!G)G=new Map(Y);G.delete($)}if(G)X.setEngineLifecycleSig(G)}}function HM0(Z,X){let J=X.taskJobsAcc();if(J.size===0)return;let z=new Set(Z.map((Y)=>Y.id)),Q=null;for(let Y of J.keys()){if(z.has(Y))continue;if(!Q)Q=new Map(J);Q.delete(Y)}if(Q)X.setTaskJobsSig(Q)}function Zd(Z,X,J){if(Z==="task.snapshot"){let z=X?.tasks;if(Array.isArray(z))J.setTasks(z.map(qX)),qM0(z,J),HM0(z,J);else d4("orch",`dropped task.snapshot event: tasks is not an array (got ${h7(z)})`);return}if(Z==="active-task"){let z=X?.taskId;J.setActiveTaskSig(typeof z==="string"?z:null);return}if(Z==="update"){let z=X?.info;J.setUpdateSig(z??null);return}if(Z==="engine-state"){let z=X;if(typeof z?.taskId!=="string"||typeof z.state!=="string"){d4("orch",`dropped engine-state event: taskId/state must be strings (taskId=${h7(z?.taskId)}, state=${h7(z?.state)})`);return}let Q=typeof z.tabId==="string"&&z.tabId?z.tabId:void 0,Y={state:z.state,detail:z.detail,...typeof z.sessionId==="string"&&z.sessionId?{sessionId:z.sessionId}:{},...typeof z.transcriptPath==="string"&&z.transcriptPath?{transcriptPath:z.transcriptPath}:{},...Q?{tabId:Q}:{},at:typeof z.at==="number"?z.at:0},G=J.engineStateAcc().get(z.taskId),$=G?.state,U=new Map(J.engineStateAcc());if(z.state==="idle"){if(!Q||G?.tabId===Q)U.delete(z.taskId)}else U.set(z.taskId,Y);if(J.setEngineStateSig(U),(z.state==="idle"||z.state==="turn_complete"||z.state==="error"||z.state==="running"&&$!=="running")&&J.engineLifecycleAcc().has(z.taskId)){let M=new Map(J.engineLifecycleAcc());M.delete(z.taskId),J.setEngineLifecycleSig(M)}if(Q){let M=new Map(J.engineTabStateAcc()),D=new Map(M.get(z.taskId)??[]);D.set(Q,Y),M.set(z.taskId,D),J.setEngineTabStateSig(M)}return}if(Z==="attention.inbox"){let z=X?.items;if(!Array.isArray(z)){d4("orch",`dropped attention.inbox event: items is not an array (${h7(z)})`);return}if(!z.every((Y)=>{if(!Y||typeof Y!=="object"||Array.isArray(Y))return!1;let G=Y;return typeof G.taskId==="string"&&(G.tabId===null||typeof G.tabId==="string")&&VK(G.state)&&(G.unread===void 0||typeof G.unread==="boolean")&&typeof G.at==="number"})){d4("orch",`dropped attention.inbox event: malformed item (${h7(z)})`);return}J.setAttentionInboxSig(z.map((Y)=>({...Y,unread:Y.unread!==!1})));return}if(Z==="task.jobs"){let z=X;if(typeof z?.taskId!=="string"||z.kind!=="ensureWorktree"){d4("orch",`dropped task.jobs event: expected string taskId + kind "ensureWorktree" (taskId=${h7(z?.taskId)}, kind=${h7(z?.kind)})`);return}let Q=J.taskJobsAcc();if(z.phase==="running"){let Y=new Map(Q);Y.set(z.taskId,{kind:z.kind}),J.setTaskJobsSig(Y);return}if((z.phase==="done"||z.phase==="error")&&Q.has(z.taskId)){let Y=new Map(Q);Y.delete(z.taskId),J.setTaskJobsSig(Y)}return}if(Z==="usage.snapshot"){let z=ap(X);if(!z){d4("orch",`dropped usage.snapshot event: malformed usage payload (${h7(X)})`);return}let Q=J.usageSnapshotAcc();if(Q&&op(Q,z))return;J.setUsageSnapshotSig(z);return}if(Z==="worktree.changes"){let z=mT(X);if(!z){d4("orch",`dropped worktree.changes event: malformed changes payload (${h7(X)})`);return}let Q=J.worktreeChangesAcc();if(Q&&uT(Q,z))return;J.setWorktreeChangesSig(z);return}if(Z==="transcript.activity"){let z=cT(X);if(!z){d4("orch",`dropped transcript.activity event: malformed activity payload (${h7(X)})`);return}let Q=J.transcriptActivityAcc();if(Q&&lT(Q,z))return;J.setTranscriptActivitySig(z);return}if(Z==="tab.open"){let z=X;if(typeof z?.taskId!=="string"||typeof z.at!=="number"||typeof z.title!=="string"||!Array.isArray(z.argv)){d4("orch",`dropped tab.open event: malformed payload (${h7(X)})`);return}J.setTabOpenSig(z);return}if(Z==="tab.close"){let z=X;if(typeof z?.taskId!=="string"||typeof z.at!=="number"||typeof z.title!=="string"){d4("orch",`dropped tab.close event: malformed payload (${h7(X)})`);return}J.setTabCloseSig(z);return}if(Z==="ui.prompt"){let z=X;if(typeof z?.promptId!=="string"||typeof z.title!=="string"||typeof z.at!=="number"){d4("orch",`dropped ui.prompt event: malformed payload (${h7(X)})`);return}J.setUiPromptSig(z);return}if(Z==="engine.lifecycle"){let z=X;if(typeof z?.taskId!=="string"||typeof z.kind!=="string"){d4("orch",`dropped engine.lifecycle event: malformed payload (${h7(X)})`);return}let Q=J.engineLifecycleAcc(),Y=Q.get(z.taskId)??{subagents:0},G=z.kind==="subagent-start"?{subagents:Y.subagents+1}:z.kind==="subagent-stop"?{subagents:Math.max(0,Y.subagents-1)}:Y;if(G===Y&&!Q.has(z.taskId))return;let $=new Map(Q);if(G.subagents===0)$.delete(z.taskId);else $.set(z.taskId,G);J.setEngineLifecycleSig($);return}if(Z==="notice.event"){let z=X;if(typeof z?.title!=="string"||typeof z.at!=="number"||typeof z.kind!=="string"){d4("orch",`dropped notice.event: malformed payload (${h7(X)})`);return}J.setNoticeSig(z);return}if(Z==="ui-prefs"){let z=hT(X);if(!z){let Q=X?.theme;d4("orch",`dropped ui-prefs event: theme must be a string (got ${h7(Q)})`);return}J.setUiPrefsSig(z);return}if(Z==="keybindings"){let z=X;if(typeof z?.rev!=="number"){d4("orch",`dropped keybindings event: rev must be a number (got ${h7(z?.rev)})`);return}J.setKeybindingsRevSig(z.rev)}}var Xd=h(()=>{lZ();o8();o$()});function Jd(Z){return Z.tasksAcc}function zd(Z){return Z.activeTaskAcc}function Qd(Z){return Z.updateAcc}function Yd(Z){return Z.daemonVersionAcc}function Gd(Z){return Z.daemonStaleAcc}function $d(Z){return Z.engineStateAcc}function qd(Z){return Z.engineTabStateAcc}function Hd(Z){return Z.attentionInboxAcc}function Ud(Z){return Z.taskJobsAcc}function Kd(Z){return Z.worktreeChangesAcc}function Vd(Z){return Z.usageSnapshotAcc}function Bd(Z){return Z.transcriptActivityAcc}function Md(Z){return Z.transcriptActivityStoreInner}function Nd(Z){return Z.uiPrefsAcc}function Wd(Z){return Z.uiPrefsStoreInner}function Dd(Z){return Z.keybindingsRevAcc}function Od(Z){return Z.keybindingsRevStoreInner}function pT(Z){return Z.tasksAcc()}function jd(Z,X){return Z.tasksAcc().find((J)=>J.id===X)}function Fd(Z,X){try{X(pT(Z))}catch(J){console.error("[rove RemoteOrchestrator] task listener threw on subscribe:",J)}return Z.tasksAcc.subscribe(()=>{try{X(Z.tasksAcc.get())}catch(J){console.error("[rove RemoteOrchestrator] task listener threw:",J)}})}async function Ld(Z,X){let{modelEffort:J,...z}=X,Q=await Z.request("task.create",{...z,effort:J});return qX(Q.task)}async function _d(Z,X){let J=await Z.request("task.ensureMain",{repo:X});return qX(J.task)}async function Ad(Z,X){let J=await Z.request("task.openDir",X);return qX(J.task)}async function Cd(Z,X,J){await Z.request("task.adoptScratchRepo",{taskId:String(X),repo:J})}async function Ed(Z,X){return(await Z.request("task.ensureWorktree",{taskId:String(X)})).worktreePath}async function Rd(Z,X){await Z.request("project.forget",{repo:X})}function Td(Z,X,J){Z.request("engine.reportEvent",{kind:"turn-interrupted",taskId:X,tabId:J}).catch(()=>{})}async function Sd(Z,X,J){await Z.request("task.rename",{taskId:String(X),title:J})}async function Pd(Z,X,J){await Z.request("task.setBranch",{taskId:String(X),branch:J})}async function Id(Z,X,J){await Z.request("task.setVendor",{taskId:String(X),vendor:J})}async function xd(Z,X,J,z){await Z.request("task.setCommand",{taskId:String(X),command:J,...z?{vendor:z}:{}})}async function yd(Z,X,J){await Z.request("task.pin",{taskId:String(X),pinned:J})}async function wd(Z,X,J){await Z.request("task.move",{taskId:String(X),direction:J<0?"up":"down"})}async function vd(Z,X,J){await Z.request("task.status",{taskId:String(X),status:J})}async function fd(Z,X,J){await Z.request("task.delete",{taskId:String(X),force:J?.force,deleteBranch:J?.deleteBranch})}async function bd(Z,X,J,z){return(await Z.request("attention.dismiss",{taskId:String(X),...J!==null?{tabId:J}:{},at:z})).deleted}async function gd(Z,X,J,z){return(await Z.request("attention.read",{taskId:String(X),...J!==null?{tabId:J}:{},at:z})).updated}async function kd(Z,X){return(await Z.request("deferredPrompt.get",{id:X})).record}async function md(Z,X){return(await Z.request("deferredPrompt.resolve",{id:X})).removed}async function hd(Z,X,J){return(await Z.request("task.land",{taskId:String(X),strategy:J?.strategy,deleteBranch:J?.deleteBranch,removeWorktree:J?.removeWorktree,callerCwd:J?.callerCwd})).result}async function ud(Z,X){return(await Z.request("worktree.discoverAdoptable",{repo:X})).worktrees}async function cd(Z,X){let J=await Z.request("worktree.adopt",X);return qX(J.task)}async function ld(Z,X){return(await Z.request("worktree.list",{network:X?.network!==!1})).projects}async function pd(Z,X,J){await Z.request("worktree.remove",{path:X,force:J})}async function dd(Z,X){return Z.request("issue.list",{repoRoot:X})}async function id(Z,X,J){return Z.request("issue.mutate",{repoRoot:X,op:J})}async function nd(Z){return Z.request("automation.list",{})}async function ad(Z,X){return Z.request("automation.create",X)}async function od(Z,X){return Z.request("automation.runs",{id:X})}async function sd(Z,X,J){return Z.request("automation.update",{id:X,enabled:J})}async function rd(Z,X){return Z.request("automation.runNow",{id:X})}async function td(Z,X){return Z.request("automation.delete",{id:X})}async function ed(Z,X){return Z.request("workitem.list",X)}async function Zi(Z,X){return Z.request("workitem.start",X)}async function Xi(Z,X){await Z.request("task.setActive",{taskId:X===null?null:String(X)})}var Ji=h(()=>{o$()});class HX{client;tasksAcc=B4([]);activeTaskAcc=B4(null);updateAcc=B4(null);daemonVersionAcc=B4(null);daemonStaleAcc=xu(this.daemonVersionAcc,(Z)=>Ik(Z??void 0,e1));engineStateAcc=B4(new Map);engineTabStateAcc=B4(new Map);attentionInboxAcc=B4([]);taskJobsAcc=B4(new Map);worktreeChangesAcc=B4(null);usageSnapshotAcc=B4(null);transcriptActivityAcc=B4(null);noticeAcc=B4(null);tabOpenAcc=B4(null);tabCloseAcc=B4(null);uiPromptAcc=B4(null);engineLifecycleAcc=B4(new Map);uiPrefsAcc=B4(null);keybindingsRevAcc=B4(null);connectionStateAcc=B4("online");ensureReachable;role;channels;subscribesTasks;reconnectTask=null;signals;reads;constructor(Z,X={}){this.client=Z;this.ensureReachable=X.ensureReachable??W$,this.role=X.role??"pane",this.channels=X.channels,this.subscribesTasks=!X.channels||X.channels.includes("task.snapshot"),this.signals={tasksAcc:this.tasksAcc,setTasks:this.tasksAcc.set,setActiveTaskSig:this.activeTaskAcc.set,setUpdateSig:this.updateAcc.set,setDaemonVersionSig:this.daemonVersionAcc.set,engineStateAcc:this.engineStateAcc,setEngineStateSig:this.engineStateAcc.set,engineTabStateAcc:this.engineTabStateAcc,setEngineTabStateSig:this.engineTabStateAcc.set,setAttentionInboxSig:this.attentionInboxAcc.set,taskJobsAcc:this.taskJobsAcc,setTaskJobsSig:this.taskJobsAcc.set,worktreeChangesAcc:this.worktreeChangesAcc,setWorktreeChangesSig:this.worktreeChangesAcc.set,usageSnapshotAcc:this.usageSnapshotAcc,setUsageSnapshotSig:this.usageSnapshotAcc.set,transcriptActivityAcc:this.transcriptActivityAcc,setTranscriptActivitySig:this.transcriptActivityAcc.set,setNoticeSig:this.noticeAcc.set,setTabOpenSig:this.tabOpenAcc.set,setTabCloseSig:this.tabCloseAcc.set,setUiPromptSig:this.uiPromptAcc.set,engineLifecycleAcc:this.engineLifecycleAcc,setEngineLifecycleSig:this.engineLifecycleAcc.set,setUiPrefsSig:this.uiPrefsAcc.set,setKeybindingsRevSig:this.keybindingsRevAcc.set,setConnectionState:this.connectionStateAcc.set},this.reads={tasksAcc:this.tasksAcc,activeTaskAcc:this.activeTaskAcc,updateAcc:this.updateAcc,daemonVersionAcc:this.daemonVersionAcc,daemonStaleAcc:this.daemonStaleAcc,engineStateAcc:this.engineStateAcc,engineTabStateAcc:this.engineTabStateAcc,attentionInboxAcc:this.attentionInboxAcc,taskJobsAcc:this.taskJobsAcc,worktreeChangesAcc:this.worktreeChangesAcc,usageSnapshotAcc:this.usageSnapshotAcc,transcriptActivityAcc:this.transcriptActivityAcc,transcriptActivityStoreInner:this.transcriptActivityAcc,noticeAcc:this.noticeAcc,uiPrefsAcc:this.uiPrefsAcc,uiPrefsStoreInner:this.uiPrefsAcc,keybindingsRevAcc:this.keybindingsRevAcc,keybindingsRevStoreInner:this.keybindingsRevAcc,connectionStateAcc:this.connectionStateAcc},this.client.on("*",(J)=>this.handleEvent(J.name,J.payload)),this.client.onLifecycle("close",()=>{this.connectionStateAcc.set("disconnected");let J=this.role==="gui";cZ("orch",J?"daemon socket closed \u2014 starting silent spawning reconnect loop":"daemon socket closed \u2014 starting non-spawning reconnect loop"),this.reconnectLoop(J)})}reconnectLoop(Z){if(this.reconnectTask)return this.reconnectTask;let X=rp({isDisposed:()=>this.client.isDisposed,spawnDaemon:Z,ensureReachable:this.ensureReachable,init:()=>this.init(),shouldLogAttempt:sp});this.reconnectTask=X;let J=()=>{if(this.reconnectTask===X)this.reconnectTask=null};return X.then(J,J),X}async init(){await tp(this.client,{role:this.role,channels:this.channels,subscribesTasks:this.subscribesTasks},this.signals)}connectionStateSignal(){return this.connectionStateAcc}async manualReconnect(){this.client.forceDisconnect(),await this.reconnectLoop(!0)}dispose(){this.client.close()}tasksSignal=()=>Jd(this.reads);activeTaskSignal=()=>zd(this.reads);updateSignal=()=>Qd(this.reads);daemonVersionSignal=()=>Yd(this.reads);daemonStaleSignal=()=>Gd(this.reads);engineStateSignal=()=>$d(this.reads);engineTabStatesSignal=()=>qd(this.reads);attentionInboxSignal=()=>Hd(this.reads);taskJobsSignal=()=>Ud(this.reads);worktreeChangesSignal=()=>Kd(this.reads);usageSnapshotSignal=()=>Vd(this.reads);transcriptActivitySignal=()=>Bd(this.reads);transcriptActivityStore=()=>Md(this.reads);noticeStore=()=>this.noticeAcc;tabOpenStore=()=>this.tabOpenAcc;tabCloseStore=()=>this.tabCloseAcc;uiPromptStore=()=>this.uiPromptAcc;replyPrompt=(Z,X)=>void this.client.request("ui.promptReply",{promptId:Z,...X!==void 0?{value:X}:{}}).catch(()=>{});engineLifecycleSignal=()=>this.engineLifecycleAcc;recentTaskEvents(Z){return this.client.request("task.recentEvents",{taskId:String(Z)})}reportUiEvent=(Z,X,J)=>void this.client.request("ui.reportEvent",{kind:Z,...X?{taskId:X}:{},...J?{detail:J}:{}}).catch(()=>{});reportEngineInterrupt=(Z,X)=>Td(this.client,String(Z),X);uiPrefsSignal=()=>Nd(this.reads);uiPrefsStore=()=>Wd(this.reads);keybindingsRevSignal=()=>Dd(this.reads);keybindingsRevStore=()=>Od(this.reads);listTasks=()=>pT(this.reads);getTask=(Z)=>jd(this.reads,Z);subscribeTasks(Z){return Fd(this.reads,Z)}createTask=(Z)=>Ld(this.client,Z);ensureMainTask=(Z)=>_d(this.client,Z);openDirectoryTask=(Z)=>Ad(this.client,Z);adoptScratchRepo=(Z,X)=>Cd(this.client,Z,X);ensureWorktree=(Z)=>Ed(this.client,Z);forgetProject=(Z)=>Rd(this.client,Z);setTitle=(Z,X)=>Sd(this.client,Z,X);setBranch=(Z,X)=>Pd(this.client,Z,X);setVendor=(Z,X)=>Id(this.client,Z,X);setCommand=(Z,X,J)=>xd(this.client,Z,X,J);setPinned=(Z,X)=>yd(this.client,Z,X);moveTask=(Z,X)=>wd(this.client,Z,X);setStatus=(Z,X)=>vd(this.client,Z,X);deleteTask=(Z,X)=>fd(this.client,Z,X);dismissAttention=(Z,X,J)=>bd(this.client,Z,X,J);markAttentionRead=(Z,X,J)=>gd(this.client,Z,X,J);getDeferredPrompt=(Z)=>kd(this.client,Z);resolveDeferredPrompt=(Z)=>md(this.client,Z);landTask(Z,X){return hd(this.client,Z,X)}discoverAdoptableWorktrees(Z){return ud(this.client,Z)}adoptWorktree(Z){return cd(this.client,Z)}listWorktrees(Z){return ld(this.client,Z)}listIssues(Z){return dd(this.client,Z)}mutateIssue(Z,X){return id(this.client,Z,X)}listAutomations=()=>nd(this.client);createAutomation=(Z)=>ad(this.client,Z);automationRuns=(Z)=>od(this.client,Z);setAutomationEnabled=(Z,X)=>sd(this.client,Z,X);runAutomationNow=(Z)=>rd(this.client,Z);deleteAutomation=(Z)=>td(this.client,Z);listWorkItems=(Z)=>ed(this.client,Z);startWorkItem=(Z)=>Zi(this.client,Z);removeWorktree(Z,X){return pd(this.client,Z,X)}setActiveTask(Z){return Xi(this.client,Z)}handleEvent(Z,X){Zd(Z,X,this.signals)}}var eK=h(()=>{lZ();z3();o8();h9();I2();ep();Xd();o$();Ji();o$()});async function zi(Z={}){let X=Z.logTag??"orch-connect",J=Z.connect??m9,z=null;try{let Q=await J();if(!Q)return cZ(X,"no daemon running \u2014 caller degrades"),null;return z=new HX(Q,{...Z.orchestratorOptions,channels:Z.channels}),await z.init(),z}catch(Q){return d4(X,Q),z?.dispose(),null}}var Qi=h(()=>{lZ();z3();eK()});import{existsSync as Yi,readFileSync as UM0}from"fs";function Gi(){nQ=null}function KM0(){let Z=Zf();if(Yi(Z))return{canonical:Z,found:Z};let X=Z.replace(/\.yaml$/,".yml");if(Yi(X))return{canonical:Z,found:X};return{canonical:Z,found:null}}function $i(){if(nQ)return nQ;let{canonical:Z,found:X}=KM0();if(!X)return nQ={path:Z,exists:!1,doc:null,warnings:[]},nQ;let J=[],z=null;try{let Q=UM0(X,"utf8");z=Bun.YAML.parse(Q)}catch(Q){let Y=J1(Q);J.push(`could not read/parse ${X}: ${Y}`)}return nQ={path:Z,exists:!0,doc:z,warnings:J},nQ}var nQ=null;var qi=h(()=>{T5()});function Hi(Z,X){for(let J=Z.length-1;J>=0;J--){let z=Z[J]?.config();if(!z||z.enabled===!1)continue;if(z.bindings.some(X))return!0;if(z.modal)return!1}return!1}function OO(Z){let X=new Set,J=new Set,z=!1,Q=!1,Y=[],G=new Set;for(let $=Z.length-1;$>=0;$--){let U=Z[$]?.config();if(!U||U.enabled===!1)continue;for(let K of U.bindings){if(K.passthrough)Q=!0;if(K.prefix===!0){if(z=!0,K.id)J.add(K.id);if(!G.has(K.key))G.add(K.key),Y.push({stroke:K.key,action:K.id??K.key})}else if(K.id)X.add(K.id)}if(U.modal)break}return{prefixReachable:z,inputPassthrough:Q,prefixOptions:Y,directIds:X,prefixIds:J}}function Ki(Z){let{directIds:X,prefixIds:J,inputPassthrough:z}=OO(Z);return{direct:X,prefix:J,inputPassthrough:z}}var Ui=(Z)=>Hi(Z,(X)=>X.prefix===!0),dT=(Z)=>Hi(Z,(X)=>X.passthrough===!0);function oT(Z,X=[],J=null){aT.update((z)=>{if(!Z&&!z.armed&&z.options.length===0)return z;return{...z,armed:Z,armedAt:Z?J:null,options:Z?X:[]}})}function FO(Z){aT.update((X)=>({...X,armed:!1,armedAt:null,options:[],entries:[...X.entries,{...Z,id:BM0++}].slice(-VM0)}))}var iT=4000,nT=180,VM0=3,aT,BM0=1,jO;var LO=h(()=>{h9();aT=B4({armed:!1,armedAt:null,options:[],entries:[]}),jO=aT});function q8(Z){return{run:Z}}function Mi(Z,X){if(X.modalOwner!==void 0){let J=Z.findIndex((z)=>z.modalMember===X.modalOwner);if(J>=0){Z.splice(J,0,X);return}}Z.push(X)}function MM0(Z){let X=[],J=Z.name;if(J)X.push(J);if(J==="return")X.push("enter");if(J==="enter")X.push("return");if(J==="backspace"&&Z.raw==="\b"&&!Z.meta&&!Z.option)X.push("ctrl+h");if(J==="linefeed"&&!Z.meta&&!Z.option)X.push("ctrl+j");let z=[];if(Z.ctrl)z.push("ctrl");if(Z.meta)z.push("cmd");if(Z.option)z.push("alt");let Q=Z.shift&&J!==void 0&&J.length===1&&z.length===0;if(Z.shift&&J&&J.length>1)z.push("shift");if(z.length===0){if(Q)return[...X.map((G)=>`shift+${G}`),...X];return X}let Y=`${z.join("+")}+`;return X.map((G)=>Y+G)}function Ni(Z){u6={...Z},y2()}function Wi(){u6={...Zz},y2()}function T8(){return u6}function y2(){if(_O!==null)clearTimeout(_O);_O=null,eJ=null,AO=!1,sT=[],oT(!1)}function Di(Z,X,J){y2(),eJ=Z,AO=J,sT=X.slice(),_O=setTimeout(y2,u6.timeoutMs),oT(!0,X,Z)}function Oi(Z,X=Date.now()){if(u6.key===null)return!1;let J=OO(Z);if(!J.prefixReachable)return!1;return Di(X,J.prefixOptions,J.inputPassthrough),!0}function ji(Z,X,J,z=Date.now()){if(s$||eJ===null)return!1;let Q=Z.slice(),Y=u6.key??"",G=sT.some((M)=>M.action===X&&M.stroke===J),$=z-eJ>u6.timeoutMs,U=dT(Q)!==AO;if(!G||$||U)return y2(),!1;let K=null;for(let M=Q.length-1;M>=0;M--){let D=Q[M];if(!D)continue;let W=D.config();if(W.enabled===!1)continue;let j=W.bindings.find((C)=>C.prefix===!0&&C.key===J);if(j){if(j.id===X)K=j;break}if(W.modal)break}if(!K?.action)return y2(),!1;y2(),s$=!0;try{return K.action.run(),FO({prefixKey:Y,stroke:J,action:X,at:z}),!0}finally{s$=!1}}function NM0(Z,X,J,z){for(let Q=X-1;Q>=0;Q--){let Y=Z[Q]?.config();if(!Y||Y.enabled===!1)continue;let G=Y.bindings.find(($)=>Boolean($.prefix)===z&&J.includes($.key));if(G){if(!Vi.has(G.key))Vi.add(G.key),console.error(`[rove keymap] "${G.key}" matched two ENABLED bindings \u2014 the lower one is shadowed by LIFO order. Gate one of them off (see tui-react/lib/keymap.ts header).`);return}if(Y.modal)return}}function Bi(Z,X,J,z,Q){for(let Y=Z.length-1;Y>=0;Y--){let G=Z[Y];if(!G)continue;let $=G.config();if($.enabled===!1)continue;let U;for(let K of J)if(U=$.bindings.find((M)=>Boolean(M.prefix)===z&&M.key===K),U)break;if(U){if(!$.modal&&cG())NM0(Z,Y,J,z);return Q(()=>U.cmd(X,U.slot)),U}if($.modal)return null}return null}function rT(Z,X,J=Date.now(),z){if(X.defaultPrevented||s$)return!1;let Q=Z.slice(),Y=MM0(X),G=z?.flushSync??(($)=>$());s$=!0;try{if(eJ!==null&&dT(Q)!==AO)y2();if(eJ!==null){let U=u6.key??"",K=J-eJ>u6.timeoutMs;if(eJ=null,K)y2();else{if(Y.includes("escape"))return y2(),X.preventDefault(),!0;y2();let M=Bi(Q,X,Y,!0,G);return FO({prefixKey:U,stroke:Y[0]??"",action:M?M.id??M.key:null,at:J}),X.preventDefault(),!0}}if(u6.key!==null&&Y.includes(u6.key)){if(Ui(Q)){let U=OO(Q);return Di(J,U.prefixOptions,U.inputPassthrough),X.preventDefault(),!0}}let $=Bi(Q,X,Y,!1,G);if($){if($.id&&$.key.includes("+")&&!$.key.startsWith("shift+"))FO({prefixKey:"",stroke:$.key,action:$.id??$.key,at:J});return X.preventDefault(),!0}return!1}finally{s$=!1}}var s$=!1,Zz,u6,eJ=null,AO=!1,sT,_O=null,Vi;var S8=h(()=>{T5();LO();Zz={key:"ctrl+a",timeoutMs:5000},u6={...Zz},sT=[];Vi=new Set});function aQ(Z){let X=Z.trim(),J=X.length===1&&X>="A"&&X<="Z",z=Z.trim().toLowerCase();if(!z)return{error:"empty chord"};let Q=z.split("+"),Y=Q.pop()??"";if(Y===""&&Q.length>0&&Q[Q.length-1]==="")Y="+",Q.pop();if(!Y)return{error:`"${Z}": no key after the modifiers`};let G=new Set;for(let K of Q){let M=WM0[K];if(!M)return{error:`"${Z}": unknown modifier "${K}" (use ctrl / cmd / alt / shift)`};G.add(M)}if(Y=DM0[Y]??Y,J)G.add("shift");if(G.has("shift")&&G.size>1&&Y.length===1)return{error:`"${Z}": shift with other modifiers on a single character can never match \u2014 legacy terminals send the same byte with and without shift`};let $=jM0.filter((K)=>G.has(K)).join("+"),U=$?`${$}+${Y}`:Y;if(Y.length>1&&!OM0.has(Y))return{chord:U,warning:`"${Z}": unrecognized key name "${Y}" \u2014 the chord may never fire`};return{chord:U}}function ZV(Z){return typeof Z==="object"&&Z!==null&&!Array.isArray(Z)}function FM0(Z){if(Z==="darwin")return["darwin","macos","mac"];if(Z==="win32")return["win32","windows"];return[Z]}function LM0(Z){if(!ZV(Z))return null;let X=Z.bindings;if(ZV(X))return X;return Z}function tT(Z,X){let J=[];if(Z===null||Z===void 0)return{entries:[],prefixEntries:[],warnings:J};if(!ZV(Z))return{entries:[],prefixEntries:[],warnings:["config root must be a YAML mapping (e.g. a top-level `bindings:` key)"]};let z=new Map,Q=new Map,Y=[];if(Z.bindings!==void 0)if(ZV(Z.bindings))Y.push(Z.bindings);else J.push("`bindings:` must be a mapping of id \u2192 chord(s)");for(let G of FM0(X)){let $=Z[G];if($===void 0)continue;let U=LM0($);if(U)Y.push(U);else J.push(`\`${G}:\` must be a mapping (or contain a \`bindings:\` mapping)`)}for(let G of Y)for(let[$,U]of Object.entries(G)){let K=ZV(U)&&(("direct"in U)||("prefix"in U))?[[z,U.direct],[Q,U.prefix]]:[[z,U]];for(let[M,D]of K){if(D===void 0)continue;if(D===null||D===!1||Array.isArray(D)&&D.length===0){M.set($,[]);continue}let W=typeof D==="string"?[D]:Array.isArray(D)?D:null;if(!W){J.push(`${$}: expected a chord string, a list of chords, or null \u2014 got ${typeof D}`);continue}let j=[],C=!1;for(let _ of W){if(typeof _!=="string"){J.push(`${$}: chord entries must be strings`),C=!0;continue}let L=aQ(_);if("error"in L){J.push(`${$}: ${L.error}`),C=!0;continue}if(L.warning)J.push(`${$}: ${L.warning}`);if(!j.includes(L.chord))j.push(L.chord)}if(j.length===0&&C){J.push(`${$}: no valid chords \u2014 keeping the default`);continue}M.set($,j)}}return{entries:Array.from(z,([G,$])=>({id:G,keys:$})),prefixEntries:Array.from(Q,([G,$])=>({id:G,keys:$})),warnings:J}}var WM0,DM0,OM0,jM0;var eT=h(()=>{WM0={ctrl:"ctrl",control:"ctrl",ctl:"ctrl",cmd:"cmd",command:"cmd",meta:"cmd",super:"cmd",win:"cmd",alt:"alt",option:"alt",opt:"alt",shift:"shift"},DM0={esc:"escape",spacebar:"space",pgup:"pageup",pgdn:"pagedown",pgdown:"pagedown"},OM0=new Set(["up","down","left","right","pageup","pagedown","home","end","insert","delete","backspace","tab","space","escape","enter","return",...Array.from({length:12},(Z,X)=>`f${X+1}`)]),jM0=["ctrl","cmd","alt","shift"]});function r$(Z,X){let J=`alternating [${Z}, ${X}] pairs`;return{layout:J,validateCount:(z)=>z>=2&&z%2===0?null:`needs ${J} (an even number of chords \u2014 got ${z})`}}function CM0(Z,X){return Z===X||Z==="global"||X==="global"}function Fi(Z,X,J=ZS){let z=[],Q=[];for(let Y of X){let G=Z.find((W)=>W.id===Y.id);if(!G){z.push(`${Y.id}: unknown binding id (press F1 in Rove for the full list)`);continue}let $=J[Y.id];if($){z.push(`${Y.id}: not customizable \u2014 ${$}`);continue}if(G.keys.length===0&&G.prefixKeys===void 0){z.push(`${Y.id}: not customizable \u2014 the key is handled outside the keymap (doc-only row)`);continue}let U=_M0[Y.id];if(U&&Y.keys.length>0){let W=U.validateCount(Y.keys.length);if(W){z.push(`${Y.id}: ${W} \u2014 keeping the default`);continue}}let K=Y.keys.filter((W)=>{if((W.length===1||W.startsWith("shift+")&&W.length===7)&&AM0.has(G.scope))return z.push(`${Y.id}: "${W}" dropped \u2014 a bare character on a ${G.scope}-scope binding would steal typed input (add a modifier)`),!1;return!0});if(K.length===0&&Y.keys.length>0){z.push(`${Y.id}: no chords survived validation \u2014 keeping the default`);continue}if(U&&K.length!==Y.keys.length){z.push(`${Y.id}: a dropped chord would shift the slot layout (${U.layout}) \u2014 keeping the default`);continue}let M=G.keys,D=G;if(D.keys=K,G.hint)if(K.length===0)D.hint=void 0;else G.hint.keys=K.join("/");Q.push({id:Y.id,keys:K,defaultKeys:M})}for(let Y of Q)for(let G of Y.keys){let $=Z.find((U)=>U.id===Y.id);if(!$)continue;for(let U of Z){if(U.id===Y.id)continue;if(!U.keys.includes(G))continue;if(!CM0($.scope,U.scope))continue;z.push(`${Y.id}: "${G}" also fires ${U.id} (${U.scope} scope) \u2014 last registration wins; consider a different chord`)}}return{applied:Q,warnings:z}}var ZS,_M0,AM0;var CO=h(()=>{eT();ZS={};_M0={"sidebar.goto":r$("top (double-tap)","bottom"),"sidebar.nav":r$("down","up"),"files.nav":r$("down","up"),"sidebar.search.nav":r$("down","up"),"files.hierarchy":r$("collapse","expand"),"files.tab":r$("previous tab","next tab"),"app.quit":{layout:"[quit confirm, hard exit] (second chord optional)",validateCount:(Z)=>Z<=2?null:`needs [quit confirm, hard exit] (1 or 2 chords \u2014 got ${Z})`}},AM0=new Set(["global","workspace","terminal"])});function XS(Z,X){if(typeof Z!=="object"||Z===null)return null;let J=Z[X];if(typeof J!=="object"||J===null||Array.isArray(J))return null;return J}function Li(Z,X,J){for(let[z,Q]of Object.entries(Z)){if(typeof Q!=="string"){J.push(`plugins: ${z}: value must be a "pane:<id>" or "action:<id>" string`);continue}let Y=Q.trim().match(RM0);if(!Y){J.push(`plugins: ${z}: \`${Q}\` is not pane:<plugin-id>.<local-id> or action:<...>`);continue}let G=aQ(z);if("error"in G){J.push(`plugins: ${z}: ${G.error}`);continue}if(G.warning)J.push(`plugins: ${z}: ${G.warning}`);X.set(G.chord,{chord:G.chord,kind:Y[1],target:Y[2].trim()})}}function _i(Z,X){let J=[],z=new Map,Q=XS(Z,"plugins");if(Q)Li(Q,z,J);for(let Y of EM0[X]??[]){let G=XS(Z,Y),$=G?XS(G,"plugins"):null;if($)Li($,z,J)}return{entries:[...z.values()],warnings:J}}var EM0,RM0;var Ai=h(()=>{eT();EM0={darwin:["darwin","macos","mac"],linux:["linux"],win32:["win32","windows"]},RM0=/^(pane|action):\s*([A-Za-z0-9][A-Za-z0-9._:-]*\.[A-Za-z0-9][A-Za-z0-9_:-]*)$/});function EO(Z){return typeof Z==="object"&&Z!==null&&!Array.isArray(Z)}function TM0(Z){if(Z==="darwin")return["darwin","macos","mac"];if(Z==="win32")return["win32","windows"];return[Z]}function SM0(Z,X){let J=new Map;if(Z===void 0)return J;if(!EO(Z))return X.push("prefix.bindings must be a mapping of binding id to chord(s)"),J;for(let[z,Q]of Object.entries(Z)){if(Q===null||Array.isArray(Q)&&Q.length===0){J.set(z,[]);continue}let Y=typeof Q==="string"?[Q]:Array.isArray(Q)?Q:null;if(!Y||Y.some((U)=>typeof U!=="string")){X.push(`prefix.bindings.${z} must be a chord string, a string list, null, or []`);continue}let G=[],$=!1;for(let U of Y){let K=aQ(U);if("error"in K){X.push(`prefix.bindings.${z}: ${K.error}`),$=!0;continue}if(!G.includes(K.chord))G.push(K.chord);if(K.warning)X.push(`prefix.bindings.${z}: ${K.warning}`)}if(G.length===0&&$){X.push(`prefix.bindings.${z}: no valid chords \u2014 keeping the default`);continue}J.set(z,G)}return J}function Ci(Z,X,J,z){if(Z===void 0)return;if(!EO(Z)){z.push("prefix must be a mapping");return}if("key"in Z)if(Z.key===null)X.key=null;else if(typeof Z.key!=="string")z.push("prefix.key must be a modifier chord or null");else{let Q=aQ(Z.key);if("error"in Q)z.push(`prefix.key: ${Q.error}`);else if(!Q.chord.includes("+"))z.push("prefix.key must include a modifier");else X.key=Q.chord}if("timeoutMs"in Z)if(typeof Z.timeoutMs!=="number"||!Number.isInteger(Z.timeoutMs)||Z.timeoutMs<100||Z.timeoutMs>1e4)z.push("prefix.timeoutMs must be an integer from 100 to 10000");else X.timeoutMs=Z.timeoutMs;for(let[Q,Y]of SM0(Z.bindings,z))J.set(Q,Y)}function Ei(Z,X){let J={},z=[],Q=new Map;if(!EO(Z)){if(Z!==null&&Z!==void 0)z.push("keybindings document must be a mapping");return{configuration:J,entries:[],warnings:z}}Ci(Z.prefix,J,Q,z);for(let Y of TM0(X)){let G=Z[Y];if(EO(G))Ci(G.prefix,J,Q,z)}return{configuration:J,entries:[...Q].map(([Y,G])=>({id:Y,keys:G})),warnings:z}}function Ri(Z,X){let J=[],z=[];for(let Q of X){let Y=Z.find((U)=>U.id===Q.id);if(!Y){z.push(`${Q.id}: unknown binding id`);continue}let G=Y,$=[...Y.prefixKeys??[]];G.prefixKeys=[...Q.keys],J.push({id:Q.id,keys:[...Q.keys],defaultKeys:$})}return{applied:J,warnings:z}}var Ti=h(()=>{CO()});var Si;var Pi=h(()=>{Si=[{id:"chat.send",scope:"workspace",keys:[],category:"Workspace",description:"Send message (composer)",hint:{keys:"enter"}},{id:"chat.newline",scope:"workspace",keys:[],category:"Workspace",description:"Newline in composer",hint:{keys:"shift+enter"}},{id:"chat.cycle-mode",scope:"workspace",keys:[],category:"Workspace",description:"Cycle permission mode (composer)",hint:{keys:"shift+tab"}},{id:"chat.steer",scope:"workspace",keys:[],category:"Workspace",description:"Steer (interrupt + send) \u2014 mid-stream only",hint:{keys:"ctrl+enter"}},{id:"chat.tab.new",scope:"workspace",keys:["ctrl+t"],category:"Workspace",description:"New chat tab",hint:{keys:"ctrl+t"},presentation:"onePress"},{id:"chat.tab.chooseEngine",scope:"workspace",keys:["ctrl+e"],category:"Workspace",description:"New conversation \u2014 engine/shell picker with destination + context toggles",hint:{keys:"ctrl+e"},presentation:"onePress"},{id:"chat.tab.fork",scope:"workspace",keys:[],prefixKeys:["c"],category:"Workspace",description:"Fork this chat into a new tab (same Task directory, keeps the conversation)",hint:{keys:"ctrl+a c"}},{id:"chat.fork.new",scope:"workspace",keys:[],prefixKeys:["f"],category:"Workspace",description:"Quick-fork: create child task seeded with current repo/branch/model",hint:{keys:"ctrl+a f"}},{id:"chat.tab.close",scope:"workspace",keys:["ctrl+w"],category:"Workspace",description:"Close chat tab",hint:{keys:"ctrl+w"},presentation:"onePress"},{id:"chat.tab.rename",scope:"workspace",keys:["f2"],category:"Workspace",description:"Rename active chat tab",hint:{keys:"f2"},presentation:"onePress"},{id:"chat.tab.cycle-next",scope:"workspace",keys:["ctrl+]"],category:"Workspace",description:"Next chat tab",hint:{keys:"ctrl+]"},presentation:"onePress"},{id:"chat.tab.cycle-prev",scope:"workspace",keys:["ctrl+["],category:"Workspace",description:"Previous chat tab",hint:{keys:"ctrl+["},presentation:"onePress"},{id:"workspace.split.right",scope:"workspace",keys:["ctrl+\\"],category:"Workspace",description:"Split right",hint:{keys:"ctrl+\\"},presentation:"onePress"},{id:"workspace.split.down",scope:"workspace",keys:["ctrl+="],category:"Workspace",description:"Split down",hint:{keys:"ctrl+="},presentation:"onePress"},{id:"workspace.split.focus-next",scope:"workspace",keys:["f3"],category:"Workspace",description:"Focus next split",hint:{keys:"f3"},presentation:"onePress"},{id:"workspace.split.close",scope:"workspace",keys:["ctrl+w"],prefixKeys:["w"],category:"Workspace",description:"Close active split (tab when unsplit)",hint:{keys:"ctrl+w"},presentation:"onePress"},{id:"workspace.split.rename",scope:"workspace",keys:["f2"],category:"Workspace",description:"Rename active split (tab when unsplit)",hint:{keys:"f2"},presentation:"onePress"}]});var Ii;var xi=h(()=>{Ii=[{id:"files.nav",scope:"files",keys:["j","k","down","up"],category:"Files",description:"Move cursor up/down",hint:{keys:"j/k"}},{id:"files.hierarchy",scope:"files",keys:["h","l","left","right"],category:"Files",description:"Collapse / expand tree level",hint:{keys:"h/l"}},{id:"files.open",scope:"files",keys:["return"],category:"Files",description:"Open file in configured editor (diff when supported)",hint:{keys:"enter"}},{id:"files.tab",scope:"files",keys:["[","]"],category:"Files",description:"Switch tab (cycle All / Changes)",hint:{keys:"[/]"}},{id:"files.refresh",scope:"files",keys:["r"],category:"Files",description:"Refresh",hint:{keys:"r"}},{id:"files.scope",scope:"files",keys:["b"],category:"Files",description:"Toggle Changes scope (working \u2194 branch vs base)",hint:{keys:"b"}},{id:"files.diff",scope:"files",keys:["d"],category:"Files",description:"Open read-only diff in a workspace tab",hint:{keys:"d"}},{id:"files.openExternal",scope:"files",keys:["o"],category:"Files",description:"Open file in system default app (audio / video / pdf preview)",hint:{keys:"o"}},{id:"files.mention",scope:"files",keys:["a"],category:"Files",description:"Inject @<path> mention into the engine pane",hint:{keys:"a"}},{id:"files.createPR",scope:"global",keys:[],prefixKeys:["p","shift+p"],category:"Files",description:"Ask the agent to create a PR from the current task"},{id:"diff.review.cursor",scope:"workspace",keys:[],category:"Diff review",description:"Move the line cursor over the diff",hint:{keys:"j/k"}},{id:"diff.review.range",scope:"workspace",keys:[],category:"Diff review",description:"Toggle range anchor at the cursor",hint:{keys:"v"}},{id:"diff.review.note",scope:"workspace",keys:[],category:"Diff review",description:"Add a review note at the cursor",hint:{keys:"c"}},{id:"diff.review.send",scope:"workspace",keys:[],category:"Diff review",description:"Send all unsent review notes to the engine",hint:{keys:"s"}}]});var yi;var wi=h(()=>{yi=[{id:"inbox.show",scope:"global",keys:[],prefixKeys:["i"],category:"Global",description:"Open Inbox"},{id:"inbox.nav",scope:"inbox",keys:["j","k","down","up"],category:"Inbox",description:"Move cursor up/down",hint:{keys:"j/k"}},{id:"inbox.open",scope:"inbox",keys:["return"],category:"Inbox",description:"Open the selected Task and Terminal Tab",hint:{keys:"enter"}},{id:"inbox.delete",scope:"inbox",keys:["d"],category:"Inbox",description:"Remove the selected Inbox item",hint:{keys:"d"}}]});var PM0,vi;var fi=h(()=>{PM0=["2","3","4","5","6","7","8","9","0"],vi=PM0.map((Z)=>`ctrl+${Z}`)});var bi;var gi=h(()=>{fi();bi=[{id:"sidebar.nav",scope:"sidebar",keys:["j","k","down","up"],category:"Sidebar",description:"Move cursor up/down",hint:{keys:"j/k"}},{id:"sidebar.select",scope:"sidebar",keys:["return"],category:"Sidebar",description:"Open the selected task",hint:{keys:"enter"}},{id:"sidebar.tree.open",scope:"sidebar",keys:["l","space"],category:"Sidebar",description:"Open the row under the cursor (a tab row enters its chat)",hint:{keys:"l"}},{id:"sidebar.goto",scope:"sidebar",keys:["g","shift+g"],category:"Sidebar",description:"Top / bottom of list (gg or shift-G)"},{id:"sidebar.rename",scope:"sidebar",keys:["r"],category:"Sidebar",description:"Rename task",hint:{keys:"r"}},{id:"sidebar.localMerge",scope:"sidebar",keys:["shift+m"],category:"Sidebar",description:"Reorder row (Shift+M, then j/k)",hint:{keys:"M"}},{id:"sidebar.pin",scope:"sidebar",keys:["shift+p"],category:"Sidebar",description:"Pin / unpin task at top (Shift+P)",hint:{keys:"P"}},{id:"sidebar.sort",scope:"sidebar",keys:["t"],category:"Sidebar",description:"Switch task sort (default \u2194 recent)",hint:{keys:"t"}},{id:"sidebar.delete",scope:"sidebar",keys:["d"],category:"Sidebar",description:"Delete task (with confirm)",hint:{keys:"d"}},{id:"sidebar.search.enter",scope:"sidebar",keys:["/"],category:"Sidebar",description:"Search tasks (fuzzy filter)",hint:{keys:"/"}},{id:"sidebar.search.nav",scope:"sidebar",keys:["down","up"],category:"Sidebar",description:"Move highlight in search results"},{id:"sidebar.search.submit",scope:"sidebar",keys:["return"],category:"Sidebar",description:"Select search match and exit search"},{id:"sidebar.search.cancel",scope:"sidebar",keys:["escape"],category:"Sidebar",description:"Cancel search (restore prior selection)"},{id:"tasks.openWorktree",scope:"sidebar",keys:["o"],category:"Tasks pane",description:"Open selected Task directory in your editor",hint:{keys:"o"}},{id:"tasks.renameBranch",scope:"sidebar",keys:["b"],category:"Tasks pane",description:"Rename the selected task's git branch",hint:{keys:"b"}},{id:"tasks.cycleEngine",scope:"sidebar",keys:["v"],category:"Tasks pane",description:"Cycle engine vendor \u2014 applies on reopen",hint:{keys:"v"}},{id:"tasks.update",scope:"sidebar",keys:["u"],category:"Tasks pane",description:"Open the update page (when a new version is available)",hint:{keys:"u"}},{id:"tasks.jump",scope:"global",keys:[...vi],category:"Tasks pane",description:"Jump to the task showing that digit (ctrl+2 = first row)",hint:{keys:"ctrl+2-0"},presentation:"onePress"},{id:"tasks.focusEngine",scope:"sidebar",keys:["right"],category:"Tasks pane",description:"Focus the engine pane of the current window",hint:{keys:"\u2192"}}]});var Z2;var JS=h(()=>{Pi();xi();wi();gi();Z2=[{id:"help.open",scope:"global",keys:["f1"],category:"Global",description:"Show keybindings help",hint:{keys:"F1"},presentation:"onePress"},{id:"task.new",scope:"sidebar",keys:["n"],category:"Sidebar",description:"New task",hint:{keys:"n"}},{id:"task.openEditor",scope:"global",keys:[],prefixKeys:["o"],category:"Global",description:"Open active Task directory in editor"},{id:"task.moveMode",scope:"global",keys:[],prefixKeys:["m"],category:"Global",description:"Reorder sidebar rows (then j/k)"},{id:"settings.open",scope:"global",keys:[],prefixKeys:[","],category:"Global",description:"Open settings"},{id:"settings.open.sidebar",scope:"sidebar",keys:["s"],category:"Sidebar",description:"Open settings",hint:{keys:"s"}},{id:"worktrees.open.sidebar",scope:"sidebar",keys:["x"],category:"Sidebar",description:"Open worktrees",hint:{keys:"x"}},{id:"kanban.open",scope:"global",keys:[],prefixKeys:["1"],category:"Global",description:"Open kanban (issues board)"},{id:"automations.open",scope:"global",keys:[],prefixKeys:["2"],category:"Global",description:"Open routines (scheduled tasks)"},{id:"workItems.open",scope:"global",keys:[],prefixKeys:["3"],category:"Global",description:"Open GitHub issues (external tracker)"},{id:"app.quit",scope:"sidebar",keys:["q","ctrl+q"],category:"Sidebar",description:"Quit (with confirm)",hint:{keys:"q"}},{id:"focus.sidebar",scope:"workspace",keys:["ctrl+q"],category:"Workspace",description:"Back to sidebar (tasks)",hint:{keys:"ctrl+q"},presentation:"onePress"},{id:"focus.previous",scope:"global",keys:[],prefixKeys:["h"],category:"Navigation",description:"Focus previous pane (files \u2192 workspace \u2192 sidebar)"},{id:"focus.next",scope:"global",keys:["f4"],prefixKeys:["l"],category:"Navigation",description:"Focus next pane (sidebar \u2192 workspace \u2192 files)",hint:{keys:"f4"},presentation:"onePress"},{id:"attention.next",scope:"global",keys:["f7"],category:"Navigation",description:"Jump to the next available Inbox item",hint:{keys:"f7"},presentation:"onePress"},{id:"workspace.zenToggle",scope:"global",keys:[],prefixKeys:["z"],category:"Navigation",description:"Toggle zen mode (hide the files column)"},{id:"chat.interrupt",scope:"workspace",keys:[],category:"Workspace",description:"Interrupt current turn (esc while streaming)"},...bi,...Si,...Ii,...yi,{id:"terminal.scroll-up",scope:"terminal",keys:["ctrl+pageup"],category:"Terminal",description:"Scroll scrollback up",hint:{keys:"ctrl+pgup"}},{id:"terminal.scroll-down",scope:"terminal",keys:["ctrl+pagedown"],category:"Terminal",description:"Scroll scrollback down"},{id:"terminal.reset",scope:"terminal",keys:["f5"],category:"Terminal",description:"Reset terminal \u2014 kill the current shell and respawn",hint:{keys:"f5"},presentation:"onePress"},{id:"dialog.cancel",scope:"global",keys:[],category:"Dialog",description:"Close the top dialog (esc)"},{id:"dialog.newtask.tab.cycle",scope:"global",keys:[],category:"Dialog",description:"Switch New Task tab (Existing / New Repo)",hint:{keys:"ctrl+[/]"}}]});function O5(Z){let X=[];for(let J in Z){let z=Z[J];if(!z)continue;let Q=typeof z==="function"?void 0:z,Y=typeof z==="function"?z:()=>z.run(),G=i9(J),$=G?.keys??[],U=G?.prefixKeys??[];if($.length===0&&U.length===0){console.warn(`[rove/keybindings] bindByIds: id="${J}" has no chords (or doesn't exist in KobeKeymap)`);continue}$.forEach((K,M)=>X.push({key:K,cmd:Y,action:Q,slot:M,id:J})),U.forEach((K,M)=>X.push({key:K,prefix:!0,cmd:Y,action:Q,slot:M,id:J}))}return X}var ki=h(()=>{n9()});function hi(Z){return mi.get(Z)?.keys??[]}function QS(){for(let Z of Z2){let X=mi.get(Z.id);if(!X)continue;let J=Z;J.keys=[...X.keys],J.prefixKeys=X.prefixKeys&&[...X.prefixKeys],J.hint=X.hint?{...X.hint}:void 0}}function YS(){return ui}function GS(Z){return zS.add(Z),()=>{zS.delete(Z)}}function $S(){ui+=1;for(let Z of[...zS])Z()}function i9(Z){return xM0.get(Z)}var mi,ui=0,zS,xM0;var n9=h(()=>{JS();JS();ki();mi=new Map(Z2.map((Z)=>[Z.id,{keys:[...Z.keys],prefixKeys:Z.prefixKeys&&[...Z.prefixKeys],hint:Z.hint?{...Z.hint}:void 0}]));zS=new Set;xM0=new Map(Z2.map((Z)=>[Z.id,Z]))});function RO(){if(Xz)return Xz;let Z=$i();if(!Z.exists)return Xz={path:Z.path,exists:!1,applied:[],plugins:[],warnings:[]},Xz;let X=[...Z.warnings],J=tT(Z.doc,process.platform);X.push(...J.warnings);let z=Ei(Z.doc,process.platform);X.push(...z.warnings),Ni({...Zz,...z.configuration});let Q=Fi(Z2,J.entries);X.push(...Q.warnings);let Y=[...Q.applied],G=z.configuration.key;if(G!==null&&G!==void 0){let K=Z2.find((M)=>M.keys.includes(G));if(K)X.push(`prefix.key "${G}" collides with direct binding ${K.id}`)}let $=Ri(Z2,[...J.prefixEntries,...z.entries]);X.push(...$.warnings),Y.push(...$.applied);let U=_i(Z.doc,process.platform);X.push(...U.warnings);for(let K of U.entries){let M=Z2.find((D)=>D.keys.includes(K.chord));if(M)X.push(`plugins: ${K.chord} shadows ${M.id}`)}for(let K of X)console.warn(`[rove/keybindings] ${K}`);return Xz={path:Z.path,exists:!0,applied:Y,plugins:U.entries,warnings:X},Xz}function ci(){return oQ().plugins}function oQ(){return Xz??RO()}function TO(){Xz=null,Gi(),QS(),Wi();let Z=RO();return $S(),Z}var Xz=null;var XV=h(()=>{qi();S8();CO();Ai();Ti();n9()});function qS(Z,X){if(typeof X.theme==="string"&&X.theme.length>0&&X.theme!==Z.selectedTheme()){if(!Z.hasTheme(X.theme))Z.reloadUserThemes();if(Z.hasTheme(X.theme))Z.setTheme(X.theme)}if(typeof X.transparentBackground==="boolean"&&X.transparentBackground!==Z.transparentBackground())Z.setTransparentBackground(X.transparentBackground);if(X.focusAccent===null||typeof X.focusAccent==="string"){let J=wM0(X.focusAccent);if(J&&J!==Z.focusAccent())Z.setFocusAccent(J)}}function wM0(Z){if(Z===null)return"primary";return yM0.includes(Z)?Z:null}var yM0;var li=h(()=>{yM0=["primary","success","info"]});function fM0(Z,X,J=pi,z=vM0){let Q=Z-J;if(Q<z)return null;let Y=(G)=>Math.round(G/1048576);return`event loop stalled ~${Q}ms \u2014 rss=${Y(X.rss)}MB heapUsed=${Y(X.heapUsed)}MB`}function di(){let Z=Date.now(),X=setInterval(()=>{let J=Date.now(),z=J-Z;Z=J;let Q=fM0(z,process.memoryUsage());if(Q)cZ("stall",Q)},pi);return X.unref?.(),()=>clearInterval(X)}var pi=1000,vM0=2000;var ii=h(()=>{lZ()});function ni(Z){let X={backgroundColor:"transparent",externalOutputMode:"passthrough",exitOnCtrlC:!1,screenMode:"alternate-screen",useKittyKeyboard:{}};return Z?{...X,onDestroy:Z}:X}function ai(Z,X){let J={backgroundColor:"transparent",exitOnCtrlC:!1,screenMode:"split-footer",footerHeight:Z,useKittyKeyboard:{}};return X?{...J,onDestroy:X}:J}function oi(Z){process.on("exit",()=>Z.destroy())}function si(Z=process.stdout){if(!Z.isTTY)return()=>{};let X=(Q)=>{try{Z.write(Q)}catch{}};X(bM0);let J=!1,z=()=>{if(J)return;J=!0,X(gM0)};return process.on("exit",z),z}function ri(){let Z=!1,X=()=>{if(Z)return;Z=!0,setTimeout(()=>process.exit(0),5000)};for(let J of["SIGHUP","SIGTERM","SIGINT"])process.on(J,X)}function ti(Z=5000){let X=setInterval(()=>{if(process.ppid===1)process.exit(0)},Z);return X.unref?.(),()=>clearInterval(X)}var bM0="\x1B[?2004h",gM0="\x1B[?2004l";class Zn{owner=null;anchor=null;claim(Z,X){this.owner=Z,this.anchor={x:Math.max(0,Math.trunc(X.x)),y:Math.max(0,Math.trunc(X.y))}}release(Z){if(this.owner!==Z)return!1;return this.owner=null,this.anchor=null,!0}current(){return this.anchor}}class Xn{controller;pending=Buffer.alloc(0);frame=Buffer.alloc(0);constructor(Z){this.controller=Z}push(Z){let X=this.pending.length>0?Buffer.concat([this.pending,Z]):Z;this.pending=Buffer.alloc(0);let J=[],z=0;while(z<X.length){if(this.frame.length===0){let K=X.indexOf(Jz,z);if(K<0){let M=X.subarray(z),D=ei(M,[Jz]),W=M.length-D;if(W>0)J.push(M.subarray(0,W));if(D>0)this.pending=Buffer.from(M.subarray(W));break}if(K>z)J.push(X.subarray(z,K));this.frame=Buffer.from(Jz),z=K+Jz.length;continue}let Q=X.indexOf(SO,z),Y=X.indexOf(Jz,z);if(Y>=0&&(Q<0||Y<Q)){this.frame=Buffer.from(Jz),z=Y+Jz.length;continue}if(Q>=0){if(Q>z)this.frame=Buffer.concat([this.frame,X.subarray(z,Q)]);J.push(this.frame);let K=this.controller.current();if(K)J.push(Buffer.from(`\x1B[${K.y+1};${K.x+1}H\x1B[?25l`));J.push(SO),this.frame=Buffer.alloc(0),z=Q+SO.length;continue}let G=X.subarray(z),$=ei(G,[Jz,SO]),U=G.length-$;if(U>0)this.frame=Buffer.concat([this.frame,G.subarray(0,U)]);if($>0)this.pending=Buffer.from(G.subarray(U));break}return J.length>0?Buffer.concat(J):Buffer.alloc(0)}flush(){if(this.frame.length>0)return this.frame=Buffer.alloc(0),this.pending=Buffer.alloc(0),Buffer.alloc(0);let Z=this.pending;return this.pending=Buffer.alloc(0),Z}}function ei(Z,X){let J=Math.min(Z.length,Math.max(...X.map((z)=>z.length-1)));for(let z=J;z>0;z-=1){let Q=Z.subarray(Z.length-z);if(X.some((Y)=>z<Y.length&&Q.equals(Y.subarray(0,z))))return z}return 0}function kM0(Z,X){if(typeof Z!=="string")return Buffer.from(Z);let J=typeof X==="string"?X:void 0;return Buffer.from(Z,J)}function mM0(Z,X){return typeof Z==="function"?Z:X}function hM0(Z,X=t$){let J=new Xn(X),Q=(G,$,U)=>{let K=J.push(kM0(G,$)),M=mM0($,U);if(K.length===0){if(M)queueMicrotask(()=>M(null));return!0}return M?Z.write(K,M):Z.write(K)};return{stdout:new Proxy(Z,{get(G,$){if($==="write")return Q;let U=Reflect.get(G,$,G);return typeof U==="function"?U.bind(G):U},set(G,$,U){if($==="write")return Q=U,!0;return Reflect.set(G,$,U,G)}}),flush(){let G=J.flush();if(G.length>0)Z.write(G)}}}function Jn(Z){if(Z.platform!=="darwin"||!Z.fullscreen)return{active:!1,rendererOptions:{},attach:()=>()=>{},flush:()=>{}};let X=hM0(Z.stdout,Z.controller);return{active:!0,rendererOptions:{stdout:X.stdout,remote:!1},attach:(J)=>uM0(J,Z.stdout),flush:()=>X.flush()}}function uM0(Z,X,J=process){let z=()=>{let{columns:Q,rows:Y}=X;if(!Q||!Y)return;Z.resize(Q,Y)};return J.on("SIGWINCH",z),()=>J.removeListener("SIGWINCH",z)}var Jz,SO,t$;var HS=h(()=>{Jz=Buffer.from("\x1B[?2026h"),SO=Buffer.from("\x1B[?2026l");t$=new Zn});function z1(Z){let X=zn.useRef(Z);return X.current=Z,X}var zn;var F7=h(()=>{zn=p0(n0(),1)});function Qn(Z){let[X,J]=n3.useState(Z.initial??"sidebar"),z=i4(),Q=z1(X),Y=n3.useCallback((U)=>{if(Q.current===U)return;let K=z?.currentFocusedRenderable;if(K&&!K.isDestroyed)try{K.blur()}catch{}J(U)},[z]),G=n3.useCallback((U)=>{let M=(PO.indexOf(Q.current)+U+PO.length)%PO.length;Y(PO[M])},[Y]),$=n3.useMemo(()=>({focused:X,is:(U)=>X===U,setFocused:Y,cycle:G}),[X,Y,G]);return y(US.Provider,{value:$,children:Z.children})}function IO(){let Z=n3.useContext(US);if(!Z)throw Error("useFocus: must be called inside <FocusProvider>. See src/tui-react/context/focus.tsx.");return Z}function Yn(){return n3.useContext(US)}var n3,PO,US;var JV=h(async()=>{F7();b0();await Z5();n3=p0(n0(),1),PO=["sidebar","workspace","files","terminal"],US=n3.createContext(null)});function Gn(){let Z=SD(g4()),X=new Set,J=null;function z(G){if(X.size===0)return!0;try{let $={},U=Z.get();for(let K of X)$[K]=U[K];return _8($),X.clear(),!0}catch($){return console.error(`[rove] kv ${G} failed:`,$),!1}}function Q(){if(J)clearTimeout(J),J=null}function Y(){Q(),J=setTimeout(()=>{J=null,z("write")},cM0)}return{snapshot:Z.get,subscribe:Z.subscribe,get(G,$){return Z.get()[G]??$},set(G,$){Z.update((U)=>({...U,[G]:$})),X.add(G),Y()},seed(G,$){if(Z.get()[G]!==void 0)return;Z.update((U)=>({...U,[G]:$}))},flush(){return Q(),z("flush")},clear(){Q(),X.clear(),Z.set({});try{Cf({})}catch(G){console.error("[rove] kv clear write failed:",G)}}}}var cM0=250;var $n=h(()=>{h9();i8()});function qn(Z){let[X]=G3.useState(Gn),J=G3.useSyncExternalStore(X.subscribe,X.snapshot,X.snapshot);G3.useEffect(()=>{let Q=()=>{X.flush()};return process.on("exit",Q),()=>{process.off("exit",Q)}},[X]);let z=G3.useMemo(()=>({ready:!0,store:J,signal(Q,Y){return X.seed(Q,Y),[()=>X.get(Q)??Y,(G)=>X.set(Q,G)]},get:X.get,set:X.set,flush:X.flush,clear:X.clear}),[X,J]);return y(KS.Provider,{value:z,children:Z.children})}function P8(){let Z=G3.useContext(KS);if(!Z)throw Error("KV context must be used within a context provider");return Z}function w2(){return G3.useContext(KS)??null}var G3,KS;var I8=h(()=>{$n();b0();G3=p0(n0(),1),KS=G3.createContext(null)});function Un(Z,X){return`${Z}:${X}`}function Kn(Z,X){let J=Un(X.taskId,X.tabId),z=Z.get(J);if(z==="needs_input"||z==="error")return Z;let Q=new Map(Z);return Q.set(J,X.kind),Q}function Vn(Z,X,J){let z=Un(X,J);if(!Z.has(z))return Z;let Q=new Map(Z);return Q.delete(z),Q}function Bn(Z,X){return Z==="error"||X}function Mn(Z){if(Z==="permission_needed")return"needs_input";if(Z==="error"||Z==="rate_limited")return"error";if(Z==="turn_complete")return"done";return null}function Nn(Z){if(Z==="done")return"done";if(Z==="error")return"error";if(Z==="needs_input")return"needs_input";return null}function xO(Z,X,J,z){if(Z===null)return[];let Q=[];for(let[Y,G]of X){if(Y===J)continue;if(Z.get(Y)===G)continue;let $=z(G);if($)Q.push({key:Y,kind:$})}return Q}function lM0(Z){let X="",J=0;for(let z=0;z<Z.length;z++){let Q=Z.charCodeAt(z);if(Q>31&&(Q<127||Q>159))continue;X+=`${Z.slice(J,z)} `,J=z+1}return J===0?Z:X+Z.slice(J)}function Wn(Z){return`\x1B]9;${lM0(Z)}\x07`}var Hn=4500;var yO="../pulse-n3cq1btw.wav";var Dn=()=>{};import{existsSync as dM0,mkdirSync as iM0}from"fs";import{tmpdir as nM0}from"os";import{basename as aM0,delimiter as oM0,isAbsolute as sM0,join as VS,resolve as rM0}from"path";function eM0(Z,X,J){if(Z==="ffplay")return[Z,"-autoexit","-nodisp","-af",`volume=${J}`,X];if(Z==="mpv")return[Z,"--no-video","--audio-display=no","--volume",String(Math.round(J*100)),X];if(Z==="mpg123"||Z==="mpg321")return[Z,"-g",String(Math.round(J*100)),X];if(Z==="mplayer")return[Z,"-vo","null","-volume",String(Math.round(J*100)),X];if(Z==="afplay"||Z==="omxplayer"||Z==="aplay"||Z==="cmdmp3")return[Z,X];if(Z==="play")return[Z,"-v",String(J),X];if(Z==="cvlc")return[Z,`--gain=${J}`,"--play-and-exit",X];return[Z,"-c",`(New-Object Media.SoundPlayer '${X.replace(/'/g,"''")}').PlaySync()`]}function ZN0(Z,X=oM0){return Z.split(X).filter(Boolean)}function XN0(){if(wO!==void 0)return wO;let Z=ZN0(process.env.PATH??"");return wO=tM0.find((X)=>Z.some((J)=>dM0(VS(J,X))))??null,wO}async function JN0(){return Fn??=(async()=>{iM0(jn,{recursive:!0});let Z=VS(jn,aM0(On)),X=Bun.file(Z);if(await X.exists())return Z;return await Bun.write(X,Bun.file(On)),Z})(),Fn}function Ln(Z=0.4){let X=XN0();if(!X)return;JN0().then((J)=>{try{Bun.spawn(eM0(X,J,Z),{stdin:"ignore",stdout:"ignore",stderr:"ignore"}).unref?.()}catch{}}).catch(()=>{return})}var On,jn,tM0,wO,Fn;var _n=h(()=>{Dn();On=sM0(yO)?yO:rM0(import.meta.dir,yO),jn=VS(nM0(),"kobe-sfx"),tM0=["ffplay","mpv","mpg123","mpg321","mplayer","afplay","play","omxplayer","aplay","cmdmp3","cvlc","powershell.exe"]});function Cn(Z){let[X,J]=L7.useState([]),[z,Q]=L7.useState(new Map),Y=w2(),G=L7.useMemo(()=>g4(),[]),$=L7.useMemo(()=>({"notifications.sound.enabled":Y?.get("notifications.sound.enabled")??G["notifications.sound.enabled"],"notifications.toast.enabled":Y?.get("notifications.toast.enabled")??G["notifications.toast.enabled"]}),[Y,G]),U=L7.useRef(0),K=L7.useRef(new Set);L7.useEffect(()=>()=>{for(let C of K.current)clearTimeout(C);K.current.clear()},[]);let M=L7.useCallback((C)=>{J((_)=>_.filter((L)=>L.id!==C))},[]),D=L7.useCallback((C)=>{if(Q((L)=>Kn(L,C)),$["notifications.sound.enabled"]!==!1){try{process.stdout.write(`\x07${Wn(`Rove \u2014 ${C.title}`)}`)}catch{}Ln()}let _=$["notifications.toast.enabled"]!==!1;if(Bn(C.kind,_)){let L=++U.current;J((R)=>[...R,{id:L,...C}]);let w=setTimeout(()=>{K.current.delete(w),M(L)},Hn);K.current.add(w)}},[$,M]),W=L7.useCallback((C,_)=>{Q((L)=>Vn(L,C,_))},[]),j=L7.useMemo(()=>({toasts:X,unread:z,notify:D,dismiss:M,markRead:W}),[X,z,D,M,W]);return y(An.Provider,{value:j,children:Z.children})}function a9(){let Z=L7.useContext(An);if(!Z)throw Error("useNotifications must be used within a NotificationsProvider");return Z}var L7,An;var sQ=h(()=>{i8();_n();I8();b0();L7=p0(n0(),1),An=L7.createContext(null)});function QN0(Z){if(!Z)throw Error("useBindings: no renderer in scope; call inside a component rendered by @opentui/react.");if(vO===Z)return;if(En.has(Z))return;if(fO&&bO)fO.off("keypress",bO);if(vO)En.add(vO);UX.length=0,y2(),vO=Z,fO=Z.keyInput,bO=(X)=>{rT(UX,X,Date.now(),{flushSync:bT})},fO.on("keypress",bO)}function rQ(){return UX.some((Z)=>Z.modalOwner!==void 0)}function e$(){return Ki(UX)}function Tn(){return Oi(UX)}function Sn(Z,X){return ji(UX,Z,X)}function Rn(){Pn++;for(let Z of BS)Z()}function gO(){return zz.useSyncExternalStore((Z)=>{return BS.add(Z),()=>BS.delete(Z)},()=>Pn)}function N1(Z,X){let J=i4();QN0(J);let z=z1(Z),Q=zz.useContext(MS);zz.useEffect(()=>{if(X?.modalOwner!==void 0)y2();let Y={config:()=>z.current(),id:zN0++,modalOwner:X?.modalOwner,modalMember:X?.modalOwner===void 0?Q??void 0:void 0};return Mi(UX,Y),Rn(),()=>{let G=UX.findIndex(($)=>$.id===Y.id);if(G>=0)UX.splice(G,1);Rn()}},[])}function u7(Z){return[{key:"escape",cmd:Z},{key:"q",cmd:Z},{key:"ctrl+c",cmd:Z}]}var zz,MS,zN0=1,UX,vO=null,fO=null,bO=null,En,Pn=0,BS;var v4=h(async()=>{S8();F7();S8();await Z5();zz=p0(n0(),1),MS=zz.createContext(null),UX=[],En=new WeakSet;BS=new Set});function $3(Z){return Z<70}function In(Z){if(Z.focusedPane==="sidebar")return"sidebar";return Z.hasSelection||Z.hasOpenPage?"content":"sidebar"}function _7(){let Z=q5();return $3(Z.width)?1:2}function $N0(Z){let X=q5(),{theme:J}=w0(),z=i4(),Q=H7.useRef(!1),Y=Z.size==="xlarge"?140:Z.size==="large"?110:Z.size==="small"?50:80,G=2,$=Z.placement==="upper-fifth"&&!$3(X.width),U=Math.max(2,Math.floor(X.height/5)),K=$?Math.max(2,U-1):0,M=Math.max(8,$?X.height-K-2:X.height-4);return y("box",{onMouseDown:()=>{Q.current=!!z?.getSelection()},onMouseUp:()=>{if(Q.current){Q.current=!1;return}Z.onClose?.()},width:X.width,height:X.height,alignItems:"center",justifyContent:$?"flex-start":"center",paddingTop:K,position:"absolute",zIndex:3000,left:0,top:0,shouldFill:!1,children:y("box",{onMouseUp:(D)=>{Q.current=!1,D.stopPropagation()},width:Y,maxWidth:X.width-2,maxHeight:M,flexShrink:1,flexGrow:0,backgroundColor:J.backgroundDialog,paddingTop:1,children:Z.children})})}function yn(Z){let[X,J]=H7.useState([]),[z,Q]=H7.useState("medium"),[Y,G]=H7.useState("center"),$=i4(),{transparentBackground:U}=w0(),K=H7.useRef(null),M=H7.useRef(null);H7.useEffect(()=>()=>{if(M.current)clearTimeout(M.current)},[]);let D=H7.useCallback(()=>{if(M.current)clearTimeout(M.current);M.current=setTimeout(()=>{let R=K.current;if(!R||R.isDestroyed)return;function T(S){for(let I of S.getChildren()){if(I===R)return!0;if(T(I))return!0}return!1}let E=$?.root;if(!E)return;if(!T(E))return;R.focus()},1)},[$]),W=z1(X),j=H7.useCallback(()=>{if(M.current)clearTimeout(M.current);if(W.current.length===0)K.current=$?.currentFocusedRenderable??null,K.current?.blur()},[$]),C=H7.useCallback(()=>{let R=$?.getSelection();if(R){if($?.clearSelection(),R.getSelectedText())return}W.current.at(-1)?.onClose?.(),J((E)=>E.slice(0,-1)),D()},[$,D]),_=H7.useMemo(()=>({clear(R){for(let T of W.current)T.onClose?.();if(Q("medium"),G("center"),J([]),R?.refocus===!1)K.current=null;else D()},replace(R,T){j();for(let E of W.current)E.onClose?.();Q("medium"),G("center"),J([{key:++xn,element:R,onClose:T}])},push(R,T){j(),J((E)=>[...E,{key:++xn,element:R,onClose:T}])},pop(){if(W.current.at(-1)?.onClose?.(),J((T)=>T.slice(0,-1)),W.current.length<=1)D()},get stack(){return W.current},get size(){return z},setSize:Q,get placement(){return Y},setPlacement:G}),[X,z,Y,D,j]),L=X.at(-1),w=L?U?GN0:YN0:1;return U0(NS.Provider,{value:_,children:[y("box",{flexGrow:1,backgroundColor:L&&!U?"black":"transparent",children:y("box",{flexGrow:1,opacity:w,children:Z.children})}),y("box",{position:"absolute",zIndex:3000,children:L?U0(MS,{value:wn,children:[y(qN0,{dismissTop:C}),y($N0,{onClose:()=>_.clear(),size:z,placement:Y,children:L.element()},L.key)]}):null})]})}function qN0(Z){return N1(()=>({modal:!0,bindings:[{key:"escape",cmd:Z.dismissTop},{key:"ctrl+c",cmd:Z.dismissTop}]}),{modalOwner:wn}),null}function M4(){let Z=H7.useContext(NS);if(!Z)throw Error("useDialog must be used within a DialogProvider");return Z}function vn(){return H7.useContext(NS)}function x8(Z,X,J){return new Promise((z)=>{if(Z.replace(()=>X(z),()=>z(void 0)),J?.size)Z.setSize(J.size)})}var H7,YN0=0.5,GN0=0.75,xn=0,NS,wn;var S5=h(async()=>{F7();b0();await T1([Z5(),S1(),v4()]);H7=p0(n0(),1);NS=H7.createContext(null);wn=Symbol("kobe.dialog.modal")});import{createCliRenderer as HN0}from"@opentui/core";function KN0(){return zV.useEffect(()=>{let Z=!1,X=null,J=[];return(async()=>{let z=await zi({logTag:"ui-prefs",channels:["ui-prefs","keybindings"]});if(!z)return;if(Z){z.dispose();return}X=z;let Q=(U)=>{if(!U)return;if(qS(fn,U),j$(U.locale))I$(U.locale)},Y=z.uiPrefsStore();Q(Y.get()),J.push(Y.subscribe(()=>Q(Y.get())));let G=z.keybindingsRevStore(),$=G.get();J.push(G.subscribe(()=>{let U=G.get();if(U==null||U===$)return;let K=$===null;if($=U,!K)TO()}))})(),()=>{Z=!0;for(let z of J)z();X?.dispose()}},[]),null}function VN0(Z){let{theme:X}=w0();return zV.useEffect(()=>{d4("pane-crash",Z.error)},[Z.error]),U0("box",{flexDirection:"column",flexGrow:1,backgroundColor:X.background,paddingLeft:1,paddingTop:1,gap:1,children:[y("text",{fg:X.error,children:U1("common.paneCrash.title")}),y("text",{fg:X.textMuted,children:U1("common.paneCrash.hint")})]})}async function tQ(Z){if(Z.logContext)hk(Z.logContext);lk(),RO();for(let{name:_,theme:L}of RK())kT(_,L);let X=$D(UN0,a$);qS(fn,{theme:X.theme,transparentBackground:X.transparent,focusAccent:X.focusAccent}),I$(X.locale);let J=Z.providers?.kv??!1,z=Z.providers?.focus??!0,Q=Z.providers?.notifications??!1,Y=await Z.setup(X),G=Jn({platform:process.platform,fullscreen:Z.inlineRows===void 0,stdout:process.stdout}),$=()=>{},U=()=>{$(),G.flush(),Y.onDestroy?.()},K=await HN0({...Z.inlineRows!==void 0?ai(Z.inlineRows,U):ni(U),...G.rendererOptions});$=G.attach(K);let M=U0(o5,{children:[y(KN0,{}),y(bn,{children:Y.root()})]}),W=y(yn,{children:Q?y(Cn,{children:M}):M}),j=z?y(Qn,{initial:"sidebar",children:W}):W,C=J?y(qn,{children:j}):j;gT(K).render(y(ip,{mode:"dark",theme:X.theme,children:C})),oi(K),si(),ri(),ti(),di()}var zV,UN0,fn,bn;var QV=h(async()=>{lZ();z3();Qi();XV();YD();li();ii();HS();qD();I8();sQ();P1();b0();await T1([Z5(),JV(),S1(),S1(),S5()]);zV=p0(n0(),1),UN0=rZ,fn={selectedTheme:mp,hasTheme:a$,setTheme:hp,reloadUserThemes:()=>{for(let{name:Z,theme:X}of RK())kT(Z,X)},transparentBackground:up,setTransparentBackground:cp,focusAccent:lp,setFocusAccent:pp};bn=class bn extends zV.Component{state={error:null};static getDerivedStateFromError(Z){return{error:Z}}render(){if(this.state.error!==null)return y(VN0,{error:this.state.error});return this.props.children}}});import{spawnSync as BN0}from"child_process";function MN0(){if(!process.stdin.isTTY)return Promise.resolve();return new Promise((Z)=>{let X=process.stdin,J=()=>{X.off("data",J),X.setRawMode?.(!1),X.pause(),Z()};X.setRawMode?.(!0),X.resume(),X.once("data",J)})}async function kO(Z){Z.renderer?.destroy(),process.stdout.write(`
|
|
523
523
|
rove ${e1} -> ${Z.targetLabel}
|
|
524
524
|
`),process.stdout.write(`running: ${Z.command}
|
|
525
525
|
|
|
@@ -706,7 +706,7 @@ ${Y}
|
|
|
706
706
|
`).filter((U)=>U.length>0);SE0(Y,$)}catch{}let G=[];for(let $ of Y){if($.status!=="?")continue;if($.children)G.push(...$.children);else if($.added==null&&!$.path.endsWith("/"))G.push($)}if(G.length>0)await Promise.all(G.map(async($)=>{let U=await IE0(Z,$.path,X);if(U!=null)$.added=U,$.deleted=0}));for(let $ of Y){if(!$.children)continue;let U=0,K=!1;for(let M of $.children)if(M.added!=null)U+=M.added,K=!0;if(K)$.added=U,$.deleted=0}return Y}function u40(Z){return Z.status==="?"&&Z.path.endsWith("/")}function SE0(Z,X){for(let J of Z){if(!u40(J))continue;J.children=X.filter((z)=>z.startsWith(J.path)).map((z)=>({path:z,status:"?"}))}}async function c40(Z,X,J){if(X&&X.trim().length>0)return X.trim();try{let z=(await IX(["symbolic-ref","--short","refs/remotes/origin/HEAD"],Z,J)).trim();if(z.length>0)return z}catch{}for(let z of["origin/main","origin/master"])try{return await IX(["rev-parse","--verify","--quiet",z],Z,J),z}catch{}return null}async function l40(Z,X,J){let z=`${X}...HEAD`,[Q,Y]=await Promise.all([IX(["diff","--no-color","--name-status",z],Z,J),IX(["diff","--no-color","--numstat","-z",z],Z,J)]),G=new Map(yx(Y).map((U)=>[U.path,{added:U.added,deleted:U.deleted}])),$=[];for(let{status:U,path:K}of PE0(Q)){let M=G.get(K);$.push({path:K,status:U,added:M?.added,deleted:M?.deleted})}return $}function PE0(Z){let X=[];for(let J of Z.split(`
|
|
707
707
|
`)){let z=J.replace(/\r$/,"");if(z.length===0)continue;let Q=z.indexOf("\t");if(Q<0)continue;let Y=z[0],G;if(Y==="R"||Y==="C"){let U=z.indexOf("\t",Q+1);G=l3(U<0?z.slice(Q+1):z.slice(U+1))}else G=l3(z.slice(Q+1));if(G.length===0||G.endsWith("/"))continue;let $=Y==="M"||Y==="A"||Y==="D"||Y==="T"?Y:Y==="R"?"R":Y==="C"?"C":null;if($)X.push({status:$,path:G})}return X}async function IE0(Z,X,J){if(J?.aborted)return null;let z=await jj(Z,X);if(z==null)return null;if(z.includes("\x00"))return null;if(z.length===0)return 0;let Q=0;for(let Y=0;Y<z.length;Y++)if(z[Y]===`
|
|
708
708
|
`)Q++;if(!z.endsWith(`
|
|
709
|
-
`))Q++;return Q}function yx(Z){return Mc(Z).map((X)=>({path:X.path,added:X.added,deleted:X.deleted}))}function xE0(Z){let X=[];for(let J of uD(Z)){let z;if(J.x==="?"&&J.y==="?")z="?";else{let Y=J.y!==" "?J.y:J.x;if(Y==="M"||Y==="A"||Y==="D"||Y==="R"||Y==="C"||Y==="U"||Y==="T")z=Y;else continue}let Q=J.path;if(Q.length===0)continue;if(Q.endsWith("/")&&z!=="?")continue;X.push({path:Q,status:z})}return X}var p40=h(()=>{cD();LV()});function d40(Z){switch(Z){case"all":return"files.tabs.all";case"changes":return"files.tabs.changes"}}function i40(Z){return O5({"files.nav":(X,J)=>{if((J??0)%2===0)Z.moveDown();else Z.moveUp()},"files.hierarchy":(X,J)=>{if((J??0)%2===0)Z.collapseOrParent();else Z.expandOrDescend()},"files.tab":(X,J)=>{let z=Z.currentTab(),Q=Tq.indexOf(z);if(Q<0)return;let Y=(J??0)%2===0?-1:1,G=Tq[(Q+Y+Tq.length)%Tq.length];if(G)Z.setTab(G)},"files.open":()=>Z.openCurrent(),"files.mention":()=>Z.mentionCurrent?.(),"files.openExternal":()=>Z.openExternal(),"files.refresh":()=>Z.refresh(),"files.scope":()=>Z.toggleScope?.(),"files.diff":()=>Z.openDiff?.()})}var Tq;var wx=h(()=>{n9();Tq=["all","changes"]});import{spawn as yE0}from"child_process";import{existsSync as wE0}from"fs";import{platform as vE0}from"os";function _F(Z){if(!Z)return;let X=vE0();if(X==="linux"){if(wE0("/proc/sys/fs/binfmt_misc/WSLInterop")||process.env.WSL_DISTRO_NAME){hV("wslview",[Z],()=>{let J=yE0("wslpath",["-w",Z],{stdio:["ignore","pipe","ignore"]}),z="";J.stdout?.on("data",(Q)=>{z+=Q.toString()}),J.on("close",(Q)=>{if(Q===0)hV("explorer.exe",[z.trim()])})});return}hV("xdg-open",[Z]);return}if(X==="darwin"){hV("open",[Z]);return}if(X==="win32"){hV("cmd.exe",["/c","start","",Z]);return}}function hV(Z,X,J){Qz(Z,X,{onError:J?()=>J():void 0})}var vx=h(()=>{YV()});import{watch as fE0}from"fs";function n40(Z){switch(Z){case"M":return"warning";case"A":return"success";case"D":return"error";case"?":return"textMuted";case"R":case"C":case"U":case"T":return"info"}}function a40(Z,X){let J=Z.toLowerCase();if(J.includes("not a git repository"))return X("files.error.notGitRepo");if(J.includes("does not exist")||J.includes("enoent"))return X("files.error.pathMissing");if(J.includes("permission denied")||J.includes("eacces"))return X("files.error.permissionDenied");if(J.includes("git: not found")||J.includes("command not found"))return X("files.error.gitNotInstalled");let z=Z.indexOf(": ");if(z>=0&&Z.startsWith("git "))return Z.slice(z+2).trim()||X("files.error.gitFailed");return Z.trim()||X("files.error.gitFailed")}function o40(Z){let X=0,J=0;for(let z of Z){if(z.kind!=="status")continue;if(z.added!=null)X=Math.max(X,String(z.added).length+1);if(z.deleted!=null)J=Math.max(J,String(z.deleted).length+1)}return{added:X,deleted:J}}function s40(Z,X){let J=(X.added>0?X.added+1:0)+(X.deleted>0?X.deleted+1:0);return Math.max(8,Z-6-J)}function fx(Z,X,J){let z=J==="-"?"\u2212":J;return Z==null?" ".repeat(X):`${z}${Z}`.padStart(X)}function bx(Z,X){let J=new Set(Z);if(J.has(X))J.delete(X);else J.add(X);return J}function r40(Z,X){let J=Z[X];if(!J||J.kind!=="dir")return null;if(!J.expanded&&J.hasChildren)return{type:"expand",path:J.path};if(J.expanded&&X+1<Z.length)return{type:"cursor",index:X+1};return null}function t40(Z,X){let J=Z[X];if(!J)return null;if(J.kind==="dir"&&J.expanded)return{type:"collapse",path:J.path};if(J.kind!=="dir"&&J.kind!=="file")return null;let z=J.depth-1;if(z<0)return null;for(let Q=X-1;Q>=0;Q--){let Y=Z[Q];if(!Y)continue;if(Y.kind==="dir"&&Y.depth===z)return{type:"cursor",index:Q}}return null}function AF(Z,X,J){if(X<=0)return null;if(J<Z)return J;if(J>=Z+X)return J-X+1;return null}function bE0(Z){if(Z===".git"||Z.startsWith(".git/")||Z.startsWith(".git\\"))return!1;if(Z.startsWith("node_modules/")||Z.startsWith("node_modules\\"))return!1;return!0}function e40(Z,X,J=500){let z=null,Q=null;try{Q=fE0(Z,{recursive:!0},(Y,G)=>{if(G==null)return;if(!bE0(G.toString()))return;if(z!=null)clearTimeout(z);z=setTimeout(()=>{z=null,X()},J)}),Q.on("error",()=>{})}catch{}return()=>{if(z!=null)clearTimeout(z);if(Q!=null)Q.close()}}var CF=()=>{};function gx(Z,X,J,z,Q={}){if(Z.length===0)return X;let Y=new Map;for(let U of Z)Y.set(J(U),U);let G=Z.length===X.length,$=Array(X.length);for(let U=0;U<X.length;U++){let K=X[U],M=Y.get(J(K));if(M&&z(M,K)&&(!Q.samePosition||Z[U]===M)){if($[U]=M,G&&Z[U]!==M)G=!1}else $[U]=K,G=!1}return G?Z:$}function kx(Z,X,J,z){for(let Q of Z.children)if(Q.isDir){let Y=X.has(Q.path);if(z.push({kind:"dir",path:Q.path,name:Q.name,depth:J,expanded:Y,hasChildren:Q.children.length>0}),Y)kx(Q,X,J+1,z)}else z.push({kind:"file",path:Q.path,name:Q.name,depth:J})}function Z50(Z,X){return sj(Z,X)}function X50(Z,X=gE0){let J=[];for(let z of Z){if(z.children==null){J.push({kind:"status",path:z.path,status:z.status,added:z.added,deleted:z.deleted});continue}let Q=X.has(z.path);if(J.push({kind:"status",path:z.path,status:z.status,added:z.added,deleted:z.deleted,fileCount:z.children.length,expanded:Q}),Q)for(let Y of z.children)J.push({kind:"status",path:Y.path,status:Y.status,added:Y.added,deleted:Y.deleted,child:!0})}return J}function kE0(Z){return`${Z.kind}\x00${Z.path}`}function mE0(Z,X){if(Z.kind!==X.kind||Z.path!==X.path)return!1;switch(Z.kind){case"file":{let J=X;return Z.name===J.name&&Z.depth===J.depth}case"dir":{let J=X;return Z.name===J.name&&Z.depth===J.depth&&Z.expanded===J.expanded&&Z.hasChildren===J.hasChildren}case"status":{let J=X;return Z.status===J.status&&Z.added===J.added&&Z.deleted===J.deleted&&Z.fileCount===J.fileCount&&Z.expanded===J.expanded&&Z.child===J.child}}}function J50(Z,X){return gx(Z,X,kE0,mE0)}function z50(Z,X){if(Z===X)return!0;if(Z==null||X==null)return!1;if(Z.length!==X.length)return!1;for(let J=0;J<Z.length;J++)if(Z[J]!==X[J])return!1;return!0}function Q50(Z,X){if(Z===X)return!0;if(Z==null||X==null)return!1;if(Z.length!==X.length)return!1;for(let J=0;J<Z.length;J++){let z=Z[J],Q=X[J];if(z.path!==Q.path||z.status!==Q.status||z.added!==Q.added||z.deleted!==Q.deleted)return!1;let Y=z.children,G=Q.children;if(Y==null!==(G==null))return!1;if(Y&&G){if(Y.length!==G.length)return!1;for(let $=0;$<Y.length;$++){let U=Y[$],K=G[$];if(U.path!==K.path||U.status!==K.status||U.added!==K.added||U.deleted!==K.deleted)return!1}}}return!0}var gE0;var mx=h(()=>{gE0=new Set});function Y50(Z){let X={name:"",path:"",isDir:!0,children:[]};for(let J of Z){if(!J)continue;let z=J.split("/").filter((Y)=>Y.length>0);if(z.length===0)continue;let Q=X;for(let Y=0;Y<z.length;Y++){let G=z[Y],U=Y!==z.length-1,K=Q.children.find((M)=>M.name===G&&M.isDir===U);if(!K)K={name:G,path:z.slice(0,Y+1).join("/"),isDir:U,children:[]},Q.children.push(K);Q=K}}return G50(X),X}function G50(Z){Z.children.sort((X,J)=>{if(X.isDir!==J.isDir)return X.isDir?-1:1;return X.name.localeCompare(J.name)});for(let X of Z.children)G50(X)}function hE0(Z){return Z.hint?.keys??Z.keys[0]}function g2(Z){let X=i9(Z);if(!X)return null;let J=hE0(X);return J&&J.length>0?J:null}function uE0(Z){if(Z.keys.length>0)return Z.hint?.keys??Z.keys[0]??null;return Z.prefixKeys?.length?null:Z.hint?.keys??null}function cE0(Z,X){if(Z.scope==="global")return!0;if(X===null)return!1;if(Z.scope===X)return!0;return X==="terminal"&&Z.scope==="workspace"}function $50(Z,X,J,z){let Q=[],Y=[],G=[],$=new Map;for(let K of Z){let M=uE0(K),D=cE0(K,X),W=z?z.direct.has(K.id):D,j=z?z.prefix.has(K.id):D;if(M){let C={binding:K,primary:M,aliases:K.keys.filter((L)=>L!==M)},_=K.keys.length===0&&!K.prefixKeys?.length&&D;if(W&&(D||K.presentation==="onePress")||_)if(K.presentation==="onePress")Y.push(C);else Q.push(C);else if(!D&&K.scope!=="global"){let L=$.get(K.scope);if(L)L.push(C);else $.set(K.scope,[C])}}if(J&&j&&K.prefixKeys?.length)G.push({binding:K,primary:`${J} + ${K.prefixKeys[0]}`,aliases:K.prefixKeys.slice(1).map((C)=>`${J} + ${C}`)})}let U=[];if(Q.length)U.push({kind:"here",scope:X??void 0,rows:Q});if(Y.length)U.push({kind:"direct",rows:Y});if(G.length)U.push({kind:"prefix",rows:G});for(let[K,M]of $)U.push({kind:"other",scope:K,rows:M});return U}var uV=h(()=>{n9()});function Pq(Z){return Z!==!1}function EF(Z){return Pq(Z.get(Sq,!0))}function RF(Z){let X=!EF(Z);if(Z.set(Sq,X),X)for(let J of Object.values(cV))Z.set(J,!1)}function q50(Z,X){return Pq(Z)&&X!==!0}function H50(Z,X){let J=[];if(X!==null&&Z.prefix.size>0)J.push({chord:X,msg:"commands"});else if(Z.inputPassthrough){let z=Z.direct.has("focus.sidebar")?g2("focus.sidebar"):null;if(z)J.push({chord:z,msg:"sidebar"})}if(Z.direct.has("help.open")){let z=g2("help.open");if(z)J.push({chord:z,msg:"help"})}return J}function U50(Z,X){return lE0[Z].flatMap((J)=>{if(X==="always"&&J.always!==!0)return[];let z=g2(J.id);return z?[{cap:z,msg:J.msg}]:[]})}function K50(Z){let X=[],J=g2("sidebar.nav"),z=g2("sidebar.select");if(J&&z)X.push({msg:"keysBare",params:{nav:L5(J),open:L5(z)}});let Q=g2("chat.tab.new"),Y=g2("focus.next");if(Q&&Y)X.push({msg:"keysOnePress",params:{newTab:L5(Q),focusNext:L5(Y)}});if(Z!==null)X.push({msg:"keysPrefix",params:{prefix:L5(Z)}});let G=g2("help.open");if(G)X.push({msg:"keysHelp",params:{help:L5(G)}});return X}var Sq="hints.keyboard.enabled",cV,lE0;var lV=h(()=>{UY();uV();cV={sidebar:"hints.sidebar.used",files:"hints.files.used"};lE0={sidebar:[{id:"sidebar.nav",msg:"move"},{id:"sidebar.select",msg:"open"}],files:[{id:"files.nav",msg:"move"},{id:"files.hierarchy",msg:"fold"},{id:"files.open",msg:"open",always:!0},{id:"files.diff",msg:"diff",always:!0}]}});import{TextAttributes as V50}from"@opentui/core";function hx(Z){if(!Z)return"Global";if(Z==="sidebar")return"Sidebar";if(Z==="workspace")return"Workspace";if(Z==="files")return"Files";if(Z==="terminal")return"Terminal";return"Dialog"}function B50(Z){return Z.split(" + ").map((X)=>L5(X)).join(" + ")}function pE0(Z,X){if(Z.kind==="here")return X("help.here",{surface:JX("category",hx(Z.scope))});if(Z.kind==="direct")return X("help.direct");if(Z.kind==="prefix")return X("help.afterPrefix");return X("help.otherPane",{surface:JX("category",hx(Z.scope))})}function Iq(Z){let X=M4(),{theme:J}=w0(),z=m0(),Q=_7(),Y=RX(),G=T8(),$=TF.useMemo(()=>$50(Z2,Z.currentScope??null,G.key,Z.reachability),[Y,Z.currentScope,Z.reachability,G.key]),U=()=>Z.onClose?Z.onClose():X.clear(),K=TF.useRef(null),M=(W)=>{let j=K.current;if(!j)return;j.scrollTo({x:0,y:Math.max(0,j.scrollTop+W)})},D=(W)=>{let j=K.current;if(!j)return;j.scrollTo({x:0,y:W==="top"?0:Number.MAX_SAFE_INTEGER})};return N1(()=>({bindings:[{key:"?",cmd:U},{key:"up",cmd:()=>M(-1)},{key:"down",cmd:()=>M(1)},{key:"pageup",cmd:()=>M(-(K.current?.viewport.height??10))},{key:"pagedown",cmd:()=>M(K.current?.viewport.height??10)},{key:"home",cmd:()=>D("top")},{key:"end",cmd:()=>D("bottom")}]})),U0("box",{paddingLeft:Q,paddingRight:Q,gap:1,flexShrink:1,children:[U0("box",{flexDirection:"row",justifyContent:"space-between",flexShrink:0,children:[U0("box",{flexDirection:"column",gap:0,children:[y("text",{attributes:V50.BOLD,fg:J.text,children:z("help.title")}),y("text",{fg:J.textMuted,children:Z.currentScope?z("help.focused",{surface:JX("category",hx(Z.currentScope))}):z("help.allBindings")}),y("text",{fg:J.textMuted,children:z("help.grammar",{prefix:G.key?L5(G.key):z("help.disabled")})})]}),y("text",{fg:J.textMuted,onMouseUp:U,children:z("help.esc")})]}),y("scrollbox",{ref:(W)=>{K.current=W},flexShrink:1,flexGrow:1,stickyScroll:!1,verticalScrollbarOptions:{trackOptions:{backgroundColor:J.backgroundDialog,foregroundColor:J.borderActive}},children:y("box",{paddingBottom:1,gap:1,paddingRight:1,children:$.map((W,j)=>U0("box",{gap:0,children:[y("text",{fg:J.accent,attributes:V50.BOLD,children:pE0(W,z)}),W.rows.map((C)=>{return U0("box",{flexDirection:"row",gap:2,paddingLeft:1,children:[y("box",{width:18,children:y("text",{fg:J.primary,children:B50(C.primary)})}),y("box",{flexGrow:1,children:y("text",{fg:J.text,children:JX("desc",C.binding.id)})}),C.aliases.length>0?y("box",{children:y("text",{fg:J.textMuted,children:`(${C.aliases.map(B50).join(", ")})`})}):null]},`${W.kind}-${C.binding.id}`)})]},`${W.kind}-${W.scope??j}`))})})]})}var TF;var ux=h(async()=>{UY();uV();S8();s3();P1();b0();await T1([S1(),v4(),S5()]);TF=p0(n0(),1);Iq.show=(Z,X)=>{let J=e$(),z=J.inputPassthrough?"terminal":X;Z.replace(()=>y(Iq,{currentScope:z,reachability:J}))}});function cx(Z){let X=m0(),J=w2(),z=Yn(),Q=vn();RX(),gO();let[Y,G]=xq.useState({tokens:[],modal:!1});xq.useEffect(()=>{let K=Pq(J?.get(Sq,!0)),M=rQ()||(Q?.stack.length??0)>0,D=K&&!M?H50(e$(),T8().key):null;G((W)=>{let j=D??(K?W.tokens:[]);return W.modal===M&&W.tokens.length===j.length&&W.tokens.every((C,_)=>C.chord===j[_]?.chord&&C.msg===j[_]?.msg)?W:{tokens:j,modal:M}})});let $=Y.modal?{commands:void 0,sidebar:void 0,help:void 0}:{commands:()=>void Tn(),sidebar:z?()=>z.setFocused("sidebar"):void 0,help:Q?()=>Iq.show(Q,z?.focused??"sidebar"):void 0},U=Y.tokens.map((K)=>({text:Z?.compact?L5(K.chord):X(`hints.status.${K.msg}`,{key:L5(K.chord)}),onPress:$[K.msg]}));if(Z?.onOpenSettings&&!Z.compact&&Pq(J?.get(Sq,!0)))U.push({text:`[${X("hints.status.settings")}]`,bindingId:"settings.open",onPress:Y.modal?void 0:Z.onOpenSettings});return U}function M50(Z){let{theme:X}=w0(),J=cx({onOpenSettings:Z.onOpenSettings,compact:Z.compact});if(J.length===0)return null;return y("box",{flexDirection:"row",flexShrink:0,children:J.flatMap((z,Q)=>[Q>0?y("text",{fg:X.textMuted,wrapMode:"none",children:" \xB7 "},`sep-${z.text}`):null,U0("box",{position:"relative",onMouseUp:z.onPress,children:[y("text",{fg:X.textMuted,wrapMode:"none",children:z.text}),z.bindingId?y(s9,{bindingId:z.bindingId,cover:!0}):null]},z.text)])})}function SF(Z){let X=w2();return xq.useCallback(()=>{if(!X)return;if(X.get(cV[Z],!1)!==!0)X.set(cV[Z],!0)},[X,Z])}function PF(Z){let X=m0(),{theme:J}=w0(),z=w2();RX();let Q=z?.get(Sq,!0),Y=z?.get(cV[Z.pane],!1);if(!Pq(Q))return null;let G=U50(Z.pane,q50(Q,Y)?"firstUse":"always");if(G.length===0)return null;return y("text",{fg:J.textMuted,wrapMode:"none",children:G.map(($)=>`${L5($.cap)} ${X(`hints.pane.${$.msg}`)}`).join(" \xB7 ")})}var xq;var pV=h(async()=>{UY();lV();S8();s3();I8();P1();b0();await T1([JV(),S1(),v4(),S5(),ux(),_q()]);xq=p0(n0(),1)});import{TextAttributes as lx}from"@opentui/core";function N50(Z){let{theme:X}=w0(),J=m0(),z=T8().key,Q=z?`[${L5(z)} P]`:null;return U0(o5,{children:[Z.onZenToggle||Z.onCreatePR?U0("box",{flexDirection:"row",flexWrap:"wrap",justifyContent:"flex-end",gap:2,paddingBottom:1,flexShrink:0,children:[Z.onZenToggle?U0("box",{position:"relative",flexDirection:"row",gap:1,flexShrink:0,onMouseUp:(Y)=>{Y.stopPropagation(),Z.onZenToggle?.()},children:[y("text",{fg:X.accent,attributes:lx.BOLD,wrapMode:"none",children:"[~]"}),y("text",{fg:X.text,wrapMode:"none",children:J("files.actions.zen")}),y(s9,{bindingId:"workspace.zenToggle"})]}):null,Z.onCreatePR?U0("box",{flexDirection:"row",gap:1,flexShrink:0,onMouseUp:(Y)=>{Y.stopPropagation(),Z.onCreatePR?.()},children:[Q?U0("box",{position:"relative",children:[y("text",{fg:X.accent,attributes:lx.BOLD,wrapMode:"none",children:Q}),y(s9,{bindingId:"files.createPR",cover:!0})]}):null,y("text",{fg:X.text,wrapMode:"none",children:J("files.actions.createPR")})]}):null]}):null,y("box",{flexDirection:"row",paddingBottom:0,flexShrink:0,gap:2,children:Tq.map((Y)=>{let G=Z.tab===Y;return y("text",{fg:G?X.primary:X.textMuted,attributes:G?lx.BOLD:void 0,wrapMode:"none",onMouseUp:()=>Z.onSelectTab(Y),children:J(d40(Y))},Y)})}),Z.tab==="changes"?U0("box",{flexDirection:"column",paddingBottom:1,flexShrink:0,gap:0,children:[U0("text",{fg:X.textMuted,wrapMode:"none",children:[Z.scope==="branch"&&Z.base!=null?J("files.scope.branch",{base:Z.base}):J("files.scope.working"),Z.base!=null?` ${J("files.scope.toggleHint")}`:""]}),y("text",{fg:X.textMuted,wrapMode:"none",children:J("files.legend.changes")})]}):y("box",{flexDirection:"row",paddingBottom:1,flexShrink:0})]})}var W50=h(async()=>{UY();S8();wx();P1();b0();await T1([_q(),S1()])});function xX(Z,X){let J=Z.background.a===0;if(X.cursor){if(J)return{marker:"\u258C",markerColor:Z.focusAccent??Z.primary,backgroundColor:void 0};return{marker:"\u258C",markerColor:Z.text,backgroundColor:Z.backgroundElement}}if(X.selected)return{marker:"\u258C",markerColor:Z.borderActive,backgroundColor:J?void 0:Z.background};return{marker:" ",markerColor:void 0,backgroundColor:void 0}}import{TextAttributes as dE0}from"@opentui/core";var D50,O50;var j50=h(async()=>{CF();mx();b0();await S1();D50=p0(n0(),1),O50=D50.memo(function(X){let{theme:J}=w0(),z=xX(J,{cursor:X.cursor}),Q=y("text",{fg:z.markerColor,wrapMode:"none",children:z.marker}),Y=z.backgroundColor,G=X.row;if(G.kind==="dir"){let C=" ".repeat(G.depth);return U0("box",{flexDirection:"row",gap:0,backgroundColor:Y,onMouseUp:()=>X.onActivate(X.row,X.index),children:[Q,y("box",{flexGrow:1,paddingRight:1,children:y("text",{fg:J.textMuted,attributes:dE0.BOLD,wrapMode:"none",children:`${C}${G.expanded?"\u25BE":"\u25B8"} ${G.name}/`})})]})}if(G.kind==="file"){let C=" ".repeat(G.depth);return U0("box",{flexDirection:"row",gap:0,backgroundColor:Y,onMouseUp:()=>X.onActivate(X.row,X.index),children:[Q,y("box",{flexGrow:1,paddingRight:1,children:y("text",{fg:J.text,wrapMode:"none",children:`${C} ${G.name}`})})]})}let $=G.fileCount!==void 0,U=$?G.expanded?"\u25BE ":"\u25B8 ":"",K=$?` (${G.fileCount})`:"",M=G.child?" ":"",D=X.pathBudget-U.length-K.length-M.length,W=n40(G.status),j=W==="success"?J.success:W==="warning"?J.warning:W==="error"?J.error:W==="info"?J.info:J.textMuted;return U0("box",{flexDirection:"row",gap:0,backgroundColor:Y,onMouseUp:()=>X.onActivate(X.row,X.index),children:[Q,U0("box",{flexDirection:"row",flexGrow:1,gap:1,paddingRight:1,children:[y("text",{fg:j,wrapMode:"none",children:G.status}),y("text",{fg:$?J.textMuted:J.text,wrapMode:"none",flexGrow:1,children:`${M}${U}${Z50(G.path,D)}${K}`}),X.statWidths.added>0?y("text",{fg:J.success,wrapMode:"none",children:fx(G.added,X.statWidths.added,"+")}):null,X.statWidths.deleted>0?y("text",{fg:J.error,wrapMode:"none",children:fx(G.deleted,X.statWidths.deleted,"-")}):null]})]})})});function F50(Z){let{theme:X}=w0(),J=m0(),z=q5(),[Q,Y]=b4.useState("all"),[G,$]=b4.useState("working"),[U,K]=b4.useState(!1),[M,D]=b4.useState(null),[W,j]=b4.useState(0),[C,_]=b4.useState(0),[L,w]=b4.useState(null),[R,T]=b4.useState(null),[E,S]=b4.useState(null),[I,k]=b4.useState(()=>new Set),m=z1(Z.worktreePath),n=z1(Q),f=z1(L),o=z1(R),l=z1(G),Z0=z1(M),H0=z1(U),N0=z1(Z.onOpenFile),B0=b4.useRef(0),q0=b4.useCallback(async(_0,S0,y0)=>{let v0=++B0.current;if(S0==null){w(null),T(null),S(null);return}S(null);try{if(_0==="all"){let a0=await m40(S0,y0);if(y0?.aborted||v0!==B0.current||m.current!==S0)return;w((Y1)=>z50(Y1,a0)?Y1:a0)}else if(_0==="changes"){let a0=l.current==="branch"&&Z0.current!=null,Y1=a0?await l40(S0,Z0.current,y0):await h40(S0,y0);if(y0?.aborted||v0!==B0.current||m.current!==S0)return;if(!a0&&Y1.length===0&&!H0.current&&Z0.current!=null){$("branch");return}T((G0)=>Q50(G0,Y1)?G0:Y1)}}catch(a0){if(y0?.aborted)return;let Y1=J1(a0);if(v0===B0.current&&m.current===S0)S(Y1)}},[]);b4.useEffect(()=>{w(null),T(null),S(null),j(0),k(new Set),$("working"),K(!1);let _0=new AbortController;return q0(n.current,Z.worktreePath,_0.signal),()=>_0.abort()},[Z.worktreePath,q0]),b4.useEffect(()=>{let _0=Z.worktreePath;if(_0==null){D(null);return}let S0=!1,y0=new AbortController;return c40(_0,Z.prBaseRef,y0.signal).then((v0)=>{if(!S0)D(v0)}).catch(()=>{if(!S0)D(null)}),()=>{S0=!0,y0.abort()}},[Z.worktreePath,Z.prBaseRef]),b4.useEffect(()=>{if(n.current!=="changes")return;let _0=m.current;if(_0==null)return;let S0=new AbortController;return q0("changes",_0,S0.signal),()=>S0.abort()},[G,M,q0]),b4.useEffect(()=>{let _0=Z.worktreePath;if(_0==null)return;if(process.env.KOBE_FILETREE_WATCH!=="1")return;return e40(_0,()=>_((S0)=>S0+1))},[Z.worktreePath]),b4.useEffect(()=>{j(0);let _0=m.current;if(_0==null)return;let S0=new AbortController;if(Q==="all"){if(f.current==null)q0("all",_0,S0.signal)}else if(Q==="changes"){if(o.current==null)q0("changes",_0,S0.signal)}return()=>S0.abort()},[Q,q0]),b4.useEffect(()=>{if(C===0)return;let _0=m.current;if(_0==null)return;let S0=new AbortController;return q0(n.current,_0,S0.signal),()=>S0.abort()},[C,q0]);let u=b4.useMemo(()=>L==null?null:Y50(L),[L]),p=b4.useRef([]),r=b4.useMemo(()=>{let _0=[];if(Q==="all"){if(u!=null)kx(u,I,0,_0)}else if(Q==="changes"){if(R!=null)_0.push(...X50(R,I))}let S0=J50(p.current,_0);return p.current=S0,S0},[Q,u,I,R]);b4.useEffect(()=>{if(r.length===0)return;j((_0)=>_0>r.length-1?r.length-1:_0)},[r]);let i=b4.useMemo(()=>o40(r),[r]),K0=Z.paneWidth??z.width,e=b4.useMemo(()=>s40(K0,i),[K0,i]);function a(_0){if(!_0)return;if(_0.type==="cursor")j(_0.index);else if(_0.type==="expand")k((S0)=>new Set(S0).add(_0.path));else k((S0)=>bx(S0,_0.path))}let X0=b4.useCallback((_0)=>{if(_0.kind==="dir"||_0.path.endsWith("/"))k((S0)=>bx(S0,_0.path));else N0.current(_0.path)},[]),O0=b4.useCallback((_0,S0)=>{j(S0),X0(_0)},[X0]),Q0=SF("files");N1(()=>({enabled:Z.focused??!0,bindings:i40({moveDown:()=>{if(Q0(),r.length===0)return;j((_0)=>Math.min(_0+1,r.length-1))},moveUp:()=>{if(Q0(),r.length===0)return;j((_0)=>Math.max(_0-1,0))},setTab:Y,currentTab:()=>Q,openCurrent:()=>{Q0();let _0=r[W];if(_0)X0(_0)},mentionCurrent:()=>{let _0=r[W];if(!_0||_0.kind==="dir"||_0.path.endsWith("/"))return;Z.onMention?.(_0.path)},openExternal:()=>{let _0=r[W];if(!_0||_0.kind==="dir"||_0.path.endsWith("/"))return;if(!Z.worktreePath)return;_F(`${Z.worktreePath}/${_0.path}`)},refresh:()=>{_((_0)=>_0+1)},toggleScope:()=>{if(Q!=="changes")return;if(M==null)return;K(!0),$((_0)=>_0==="working"?"branch":"working")},openDiff:()=>{let _0=r[W];if(!_0||_0.kind==="dir"||_0.path.endsWith("/"))return;Z.onOpenDiff?.(_0.path,G==="branch"&&M!=null?M:void 0)},expandOrDescend:()=>a(r40(r,W)),collapseOrParent:()=>{if(Q!=="all")return;a(t40(r,W))}})}));let A0=b4.useRef(null);b4.useEffect(()=>{let _0=A0.current;if(!_0||r.length===0)return;let S0=AF(_0.scrollTop,_0.viewport.height,W);if(S0!=null)_0.scrollTo({x:0,y:S0})},[W,r]);let I0=Q==="all"&&L!=null||Q==="changes"&&R!=null;return U0("box",{flexDirection:"column",flexGrow:1,paddingLeft:0,paddingRight:0,children:[y(N50,{tab:Q,scope:G,base:M,onSelectTab:Y,onZenToggle:Z.onZenToggle,onCreatePR:Z.onCreatePR}),y("scrollbox",{ref:(_0)=>{A0.current=_0},flexGrow:1,verticalScrollbarOptions:{trackOptions:{foregroundColor:"transparent"}},children:Z.worktreePath==null?y("box",{paddingTop:1,paddingLeft:1,children:y("text",{fg:X.textMuted,children:J("files.empty.noTask")})}):E!=null?U0("box",{paddingTop:1,paddingLeft:1,flexDirection:"column",gap:0,children:[y("text",{fg:X.error,wrapMode:"word",children:a40(E,J)}),y("text",{fg:X.textMuted,wrapMode:"word",children:J("files.error.retryHint")})]}):r.length===0&&I0?y("box",{paddingTop:1,paddingLeft:1,children:y("text",{fg:X.textMuted,children:Q==="all"?J("files.empty.noFiles"):J("files.empty.noChanges")})}):r.length>0?y("box",{flexShrink:0,gap:0,paddingRight:1,children:r.map((_0,S0)=>y(O50,{row:_0,index:S0,cursor:S0===W,statWidths:i,pathBudget:e,onActivate:O0},`${_0.kind}:${_0.path}`))}):null}),Z.worktreePath!=null?y("box",{flexDirection:"row",justifyContent:"flex-end",paddingTop:1,flexShrink:0,children:y(PF,{pane:"files"})}):null]})}var b4;var L50=h(async()=>{p40();wx();vx();CF();mx();P1();F7();b0();await T1([Z5(),pV(),S1(),v4(),W50(),j50()]);b4=p0(n0(),1)});function A50(Z){let{theme:X,transparentBackground:J}=w0(),z=IO(),Q=q5(),Y=J?X.border:X.borderSubtle,G=Math.max(_50,Q.width-_X),$=Math.max(_50,Math.min(iE0,Math.floor(G/3)));return y("box",{width:$,flexShrink:0,borderColor:z.focused==="files"?X.focusAccent:Y,onMouseUp:()=>z.setFocused("files"),children:y(F50,{worktreePath:Z.worktree,paneWidth:$-2,prBaseRef:Z.prBaseRef,focused:Z.focused,onOpenFile:Z.onOpenFile,onOpenDiff:Z.onOpenDiff,onZenToggle:Z.onZenToggle,onCreatePR:Z.onCreatePR})})}var _50=22,iE0=34;var C50=h(async()=>{Mz();b0();await T1([Z5(),JV(),S1(),L50()])});function E50(Z,X=8){let J=Math.min(1,Math.max(0,Z))*X,z=Math.floor(J),Q=Math.round((J-z)*8);if(Q===8)z+=1,Q=0;let Y=z<X?nE0[Q]??"":"";return`${"\u2588".repeat(z)}${Y}`.padEnd(X,"\u2591")}var nE0;var px=h(()=>{nE0=["","\u258F","\u258E","\u258D","\u258C","\u258B","\u258A","\u2589"]});function ix(Z,X){if(Z==null||Z<=X)return"";let J=new Date(Z),z=`${R50(J.getHours())}:${R50(J.getMinutes())}`;if(Z-X<86400000)return`\u2192 ${z}`;return`\u2192 ${J.getMonth()+1}/${J.getDate()} ${z}`}function T50(Z,X){return Z.windows.map((J)=>({label:J.label,percentText:`${J.percent}%`,resetText:ix(J.resetsAt,X),tone:dx(J.percent)}))}function S50(Z,X){let J=Z.windows.find((z)=>z.kind==="session")??Z.windows[0];if(!J)return null;return{label:J.label,percentText:`${J.percent}%`,resetText:ix(J.resetsAt,X),tone:dx(J.percent)}}function P50(Z,X){let J=Math.min(8,Z.windows.reduce((z,Q)=>Math.max(z,Q.label.length),2));return Z.windows.map((z)=>({label:(z.label.length>J?z.label.slice(0,J):z.label).padEnd(J),bar:E50(z.percent/100,aE0),percentText:`${String(z.percent).padStart(3)}%`,resetText:ix(z.resetsAt,X),tone:dx(z.percent)}))}var aE0=10,dx=(Z)=>Z>=95?"crit":Z>=75?"warn":"ok",R50=(Z)=>String(Z).padStart(2,"0");var nx=h(()=>{px()});function oE0(Z){let{theme:X}=w0(),J=H4(Z.orchestrator.usageSnapshotSignal());if(!J||J.size===0)return null;let z={ok:X.success,warn:X.warning,crit:X.error},Q=Date.now();if(Z.narrow)return y("box",{flexDirection:"row",gap:2,children:[...J.entries()].flatMap(([Y,G])=>{let $=S50(G,Q);if(!$)return[];return[U0("box",{flexDirection:"row",gap:1,children:[y("text",{fg:X.textMuted,wrapMode:"none",children:g5(Y).toUpperCase()}),y("text",{fg:z[$.tone],wrapMode:"none",children:$.percentText})]},Y)]})});return y("box",{flexDirection:"row",gap:2,children:[...J.entries()].map(([Y,G])=>U0("box",{flexDirection:"row",gap:1,children:[y("text",{fg:X.textMuted,wrapMode:"none",children:g5(Y).toUpperCase()}),T50(G,Q).map(($,U)=>U0("box",{flexDirection:"row",gap:1,children:[y("text",{fg:X.textMuted,wrapMode:"none",children:U===0?$.label:`\xB7 ${$.label}`}),y("text",{fg:z[$.tone],wrapMode:"none",children:$.percentText}),$.resetText?y("text",{fg:X.textMuted,wrapMode:"none",children:$.resetText}):null]},$.label))]},Y))})}function I50(Z){let{theme:X}=w0(),J=q5(),z=$3(J.width),Q=H4(Z.orchestrator.usageSnapshotSignal()),Y=cx({onOpenSettings:Z.onOpenSettings}),G=Q!=null&&Q.size>0||Y.length>0;return y(Z40,{children:U0("box",{flexDirection:"column",flexGrow:1,backgroundColor:X.background,children:[y("box",{flexDirection:"row",flexGrow:1,children:Z.children}),G?U0("box",{flexDirection:"row",flexShrink:0,height:1,paddingLeft:1,paddingRight:1,gap:2,children:[y("box",{flexGrow:1,flexDirection:"row",children:y(oE0,{orchestrator:Z.orchestrator,narrow:z})}),y(M50,{onOpenSettings:z?void 0:Z.onOpenSettings,compact:z})]}):null]})})}var x50=h(async()=>{Q8();nx();i3();b0();await T1([Z5(),pV(),_q(),S1()])});import{TextAttributes as sE0}from"@opentui/core";function rE0(Z){if(!Z)return Z;return Z.charAt(0).toUpperCase()+Z.slice(1)}function n4(Z){let X=M4(),{theme:J}=w0(),z=m0(),Q=_7(),[Y,G]=y50.useState(Z.initialActive??"confirm");return N1(()=>({bindings:[{key:"return",cmd:()=>{if(Y==="confirm")Z.onConfirm?.();if(Y==="cancel")Z.onCancel?.();X.clear()}},{key:"left",cmd:()=>G(($)=>$==="confirm"?"cancel":"confirm")},{key:"right",cmd:()=>G(($)=>$==="confirm"?"cancel":"confirm")}]})),U0("box",{paddingLeft:Q,paddingRight:Q,paddingBottom:1,gap:0,children:[U0("box",{flexDirection:"row",justifyContent:"space-between",children:[y("text",{attributes:sE0.BOLD,fg:J.text,children:Z.title}),y("text",{fg:J.textMuted,onMouseUp:()=>X.clear(),children:"esc"})]}),y("text",{fg:J.textMuted,children:Z.message}),y("box",{flexDirection:"row",justifyContent:"flex-end",paddingTop:1,children:["cancel","confirm"].map(($)=>y("box",{paddingLeft:1,paddingRight:1,backgroundColor:$===Y?J.primary:void 0,onMouseUp:()=>{if($==="confirm")Z.onConfirm?.();if($==="cancel")Z.onCancel?.();X.clear()},children:y("text",{fg:$===Y?J.selectedListItemText:J.textMuted,children:rE0($==="cancel"?Z.label??z("common.cancel"):Z.confirmLabel??z("common.confirm"))})},$))})]})}var y50;var t9=h(async()=>{P1();b0();await T1([S1(),v4(),S5()]);y50=p0(n0(),1);n4.show=(Z,X,J,z,Q,Y)=>{return x8(Z,(G)=>y(n4,{title:X,message:J,onConfirm:()=>G(!0),onCancel:()=>G(!1),label:z,confirmLabel:Q,initialActive:Y?.initialActive}),{size:"small"})}});function w50(Z){return!Z.dialogOpen&&!Z.settingsOpen&&!Z.worktreesOpen&&!Z.updateOpen}function v50(Z){return Z.settingsOpen&&!Z.dialogOpen}function f50(Z,X,J){let z=tE0.filter((G)=>G!=="files"||J.filesVisible),Q=z.indexOf(Z);if(Q<0)return(X>0?z[z.length-1]:z[0])??null;let Y=Math.min(Math.max(Q+X,0),z.length-1);return Y===Q?null:z[Y]??null}var tE0;var b50=h(()=>{tE0=["sidebar","workspace","files"]});function eE0(Z){let X=Z.kind==="pane"?["plugin","pane","open",Z.target]:["plugin","action","invoke",Z.target],[J,...z]=[...rG(),...X];Qz(J,z,{onError:(Q)=>console.warn(`[rove/plugins] ${Z.target}: ${String(Q)}`)})}function g50(Z){N1(()=>({enabled:Z,bindings:ci().map((X)=>({key:X.chord,cmd:()=>eE0(X)}))}))}var k50=h(async()=>{tG();YV();XV();await v4()});function m50(Z){let{focus:X,dialog:J}=Z,z=m0(),Q=i4();function Y(){try{Q?.destroy()}catch(M){console.error("Rove: renderer.destroy() failed during quit:",M)}process.exit(0)}async function G(){if(await n4.show(J,z("workspace.quit.confirmTitle"),z("workspace.quit.confirmBody"),z("common.cancel"),z("workspace.quit.confirmLabel")))Y()}function $(M){let D=f50(X.focused,M,{filesVisible:Z.filesPaneVisible!==!1});if(D)X.setFocused(D)}let U={dialogOpen:Z.dialog.stack.length>0,settingsOpen:Z.pages.settingsOpen,worktreesOpen:Z.pages.worktreesOpen,updateOpen:Z.pages.updateOpen,kanbanOpen:Z.pages.kanbanOpen,automationsOpen:Z.pages.automationsOpen,workItemsOpen:Z.pages.workItemsOpen},K=w50(U);N1(()=>({enabled:K,bindings:[...O5({"help.open":()=>Iq.show(J,X.focused),"focus.previous":q8(()=>$(-1)),"focus.next":q8(()=>$(1)),"workspace.zenToggle":q8(()=>Z.toggleZen()),"attention.next":()=>Z.jumpToNextAttention(),"inbox.show":q8(()=>Z.openInbox()),"kanban.open":q8(()=>Z.pages.openKanban()),"automations.open":q8(()=>Z.pages.openAutomations()),"workItems.open":q8(()=>Z.pages.openWorkItems()),"task.moveMode":q8(()=>Z.enterMoveMode()),"settings.open":q8(()=>Z.pages.openSettings()),"files.createPR":q8(()=>Z.createPR()),"task.openEditor":q8(()=>{if(Z.selectedId)Z.openTaskWorktree(Z.selectedId)})})]})),N1(()=>({enabled:K&&X.focused!=="sidebar",bindings:O5({"focus.sidebar":()=>X.setFocused("sidebar")})})),N1(()=>({enabled:K&&X.focused==="sidebar",bindings:O5({"app.quit":(M,D)=>{if(D===1){Y();return}G()},"settings.open.sidebar":()=>Z.pages.openSettings(),"worktrees.open.sidebar":()=>Z.pages.openWorktrees(),"tasks.update":()=>Z.pages.openUpdate()})})),N1(()=>({enabled:K&&X.focused==="sidebar"&&!Z.searchActive,bindings:O5({"task.new":()=>Z.createTask(),"tasks.openWorktree":()=>{if(Z.selectedId)Z.openTaskWorktree(Z.selectedId)},"tasks.renameBranch":()=>{let M=Z.selectedId;if(M)Z.renameBranch(M)},"tasks.cycleEngine":()=>{let M=Z.selectedId;if(M)Z.cycleVendor(M)},"tasks.focusEngine":()=>X.setFocused("workspace"),"sidebar.sort":()=>Z.toggleSortMode()})})),N1(()=>({enabled:v50(U),bindings:u7(Z.pages.closeSettings)})),g50(K)}var h50=h(async()=>{S8();s3();P1();b50();await T1([Z5(),ux(),v4(),t9(),k50()])});function c50(Z){return Z==="terminal"?"sidebar":"workspace"}var u50;var ax=h(()=>{u50=[{nav:"kanban",labelKey:"tasks.nav.kanban",bindingId:"kanban.open"},{nav:"automations",labelKey:"tasks.nav.automations",bindingId:"automations.open"},{nav:"issues",labelKey:"tasks.nav.issues",bindingId:"workItems.open"}]});function IF(Z){let X=Math.round(Z/60000),J=Math.round(X/60);return{minutes:X,hours:J,days:Math.round(J/24)}}function dV(Z,X=1){let J=xF.indexOf(Z);if(J<0)return"name";let z=(J+X+xF.length)%xF.length;return xF[z]}function p50(Z){return Z.name.trim().length>0&&Z.repo.trim().length>0&&Z.prompt.trim().length>0&&zq(Z.schedule.trim())}function d50(Z){if(Z.name.trim().length===0)return"name";if(Z.repo.trim().length===0)return"repo";if(Z.prompt.trim().length===0)return"prompt";if(!zq(Z.schedule.trim()))return"schedule";return null}function i50(Z,X){let J=Z.trim();if(!zq(J))return{kind:"invalid"};let z;try{z=Qq(J,X)}catch{return{kind:"never"}}return{kind:"ok",nextRunMs:z,relative:ZR0(z-X),absolute:zR0(z,X)}}function ZR0(Z){let{minutes:X,hours:J,days:z}=IF(Z);if(X<60)return`in ${Math.max(1,X)}m`;if(J<24)return`in ${J}h`;return`in ${z}d`}function zR0(Z,X){let J=new Date(Z),z=`${String(J.getHours()).padStart(2,"0")}:${String(J.getMinutes()).padStart(2,"0")}`,Q=new Date(X);if(J.getFullYear()===Q.getFullYear()&&J.getMonth()===Q.getMonth()&&J.getDate()===Q.getDate())return z;let G=XR0[J.getDay()]??"";if(Z-X<518400000)return`${G} ${z}`;return`${G} ${JR0[J.getMonth()]??""} ${J.getDate()}, ${z}`}var xF,l50,XR0,JR0;var n50=h(()=>{HV();xF=["name","repo","prompt","schedule","confirm"];l50={name:"",repo:"",prompt:"",schedule:"0 9 * * MON-FRI"};XR0=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],JR0=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function yF(Z){let X=Z.trim().split(/\s+/).filter(Boolean);return yX.map((J,z)=>X[z]??"*")}function a50(Z){return yX.map((X,J)=>Z[J]??"*").join(" ")}function ox(Z,X){let J=[];for(let z=Z;z<=X;z++)J.push(String(z));return J}function sx(Z,X,J){let z=UR0[Z],Q=z.indexOf(X.trim().toUpperCase());if(Q<0)return(J>0?z[0]:z[z.length-1])??X;let Y=(Q+J+z.length)%z.length;return z[Y]??X}function rx(Z,X){return Math.min(Math.max(Z+X,0),yX.length-1)}function tx(Z,X,J){let z=yF(Z);if(X<0||X>=yX.length)return a50(z);return z[X]=J,a50(z)}function ex(Z){let[X,J,z,Q,Y]=yF(Z);if(Q!=="*"||z!=="*")return null;if(X===void 0||J===void 0||Y===void 0)return null;let G=KR0(X,J);if(!G)return null;if(Y==="*")return G.startsWith("every ")?G:`every day ${G}`;if(Y==="MON-FRI")return`weekdays ${G}`;if(Y==="SAT,SUN")return`weekends ${G}`;let $=HR0[Y.toUpperCase()];if($)return`${$} ${G}`;return null}function KR0(Z,X){if(X==="*"){if(Z==="*")return"every minute";if(Z.startsWith("*/"))return`every ${Z.slice(2)}m`;if(/^\d+$/.test(Z))return`hourly at :${Z.padStart(2,"0")}`;return null}if(X.startsWith("*/")&&Z==="0")return`every ${X.slice(2)}h`;if(/^\d+$/.test(X)&&/^\d+$/.test(Z))return`at ${X.padStart(2,"0")}:${Z.padStart(2,"0")}`;return null}var yX,QR0,YR0,GR0,$R0,qR0,HR0,UR0;var o50=h(()=>{yX=["minute","hour","dayOfMonth","month","dayOfWeek"];QR0=["*","*/5","*/10","*/15","*/30",...ox(0,59)],YR0=["*","*/2","*/3","*/4","*/6","*/12",...ox(0,23)],GR0=["*",...ox(1,31)],$R0=["*","JAN","FEB","MAR","APR","MAY","JUN","JUL","AUG","SEP","OCT","NOV","DEC"],qR0=["*","MON-FRI","SAT,SUN","MON","TUE","WED","THU","FRI","SAT","SUN"],HR0={MON:"Mondays",TUE:"Tuesdays",WED:"Wednesdays",THU:"Thursdays",FRI:"Fridays",SAT:"Saturdays",SUN:"Sundays"};UR0={minute:QR0,hour:YR0,dayOfMonth:GR0,month:$R0,dayOfWeek:qR0}});function Zy(Z,X){if(!Z)return!0;let J=Z.toLowerCase(),z=X.toLowerCase(),Q=0;for(let Y=0;Y<z.length&&Q<J.length;Y++)if(z.charCodeAt(Y)===J.charCodeAt(Q))Q++;return Q===J.length}function iV(Z,X){let J=s50(X)-s50(Z);if(J!==0)return J;return String(X.id).localeCompare(String(Z.id))}function s50(Z){let X=Date.parse(Z.updatedAt||Z.createdAt);return Number.isFinite(X)?X:0}function t3(Z){let X=Z.split("/").filter(Boolean);return X[X.length-1]??Z}function KY(Z){return Z.trim().replace(/[\\/]+$/,"")||Z}function e3(Z,X){let J=t3(Z);if(!X.some((Q)=>Q!==Z&&t3(Q)===J))return J;return Z.replace(/[\\/]+$/,"").split(/[\\/]+/).slice(-2).join("/")}var M3=()=>{};import{TextAttributes as wF}from"@opentui/core";function i6(Z){let{theme:X}=w0(),J=m0(),z=Z.window.total-Z.window.start-Z.window.items.length;return U0("box",{gap:0,paddingLeft:2,paddingBottom:Z.paddingBottom,children:[Z.window.start>0?y("text",{fg:X.textMuted,wrapMode:"none",children:J("newTask.picker.moreAbove",{count:Z.window.start})}):null,Z.rows.map((Q,Y)=>{let G=Z.window.start+Y,$=G===Z.cursor;return U0("text",{fg:$?X.primary:Q.accent?X.accent:X.textMuted,attributes:$?wF.BOLD:void 0,wrapMode:"none",onMouseUp:()=>Z.onPick(G),children:[$?"\u25B8 ":" ",Q.body]},Q.key)}),z>0?y("text",{fg:X.textMuted,wrapMode:"none",children:J("newTask.picker.moreBelow",{count:z})}):null,Z.footer]})}function Z6(Z,X,J){return X===J?{fg:Z.primary,attributes:wF.BOLD|wF.UNDERLINE}:{fg:Z.textMuted}}function yq(Z){let{theme:X}=w0(),J=Z.arrow!==!1;return U0("box",{flexDirection:"row",flexWrap:"wrap",gap:2,children:[Z.label,Z.choices.map((z)=>{let Q=Z.selected===z,Y=J?Q?"\u25B8 ":" ":"";return y("text",{fg:Q?X.primary:X.textMuted,attributes:Q?wF.BOLD:void 0,wrapMode:"none",flexShrink:0,onMouseUp:()=>Z.onPick(z),children:Y+(Z.display?Z.display(z):z)},z)}),Z.children]})}var wX=h(async()=>{P1();b0();await S1()});import{TextAttributes as wq}from"@opentui/core";function VR0(Z){let{theme:X}=w0(),J=M4(),z=m0(),Q=_7(),[Y,G]=vq.useState(()=>({...l50,repo:Z.defaultRepo??Z.repos[0]??""})),[$,U]=vq.useState("name"),[K,M]=vq.useState(()=>{let n=Z.repos.indexOf(Z.defaultRepo??"");return n>=0?n:0}),[D,W]=vq.useState(null),[j,C]=vq.useState(0),_=yF(Y.schedule),L=(n)=>{U("schedule"),C(Math.min(Math.max(n,0),yX.length-1))},w=()=>{Z.onCancel(),J.clear()},R=(n)=>{G((f)=>({...f,...n})),W(null)},T=(n)=>{let f=Z.repos[X5(n,Z.repos.length)];if(!f)return;M(X5(n,Z.repos.length)),R({repo:f})};function E(){if(p50(Y)){Z.onSubmit({name:Y.name.trim(),repo:Y.repo.trim(),prompt:Y.prompt.trim(),schedule:Y.schedule.trim()}),J.clear();return}let n=d50(Y);if(n)U(n),W(z(`automations.missing.${n}`))}let S=i50(Y.schedule,Date.now()),I=d6(Z.repos,K),k=I.items.map((n,f)=>({key:n,body:e3(n,Z.repos),accent:I.start+f===K}));N1(()=>({bindings:[{key:"tab",cmd:()=>U((n)=>dV(n,1))},{key:"shift+tab",cmd:()=>U((n)=>dV(n,-1))},...$==="repo"?[{key:"up",cmd:()=>T(K-1)},{key:"down",cmd:()=>T(K+1)}]:[],...$==="schedule"?[{key:"left",cmd:()=>C((n)=>rx(n,-1))},{key:"right",cmd:()=>C((n)=>rx(n,1))},{key:"up",cmd:()=>{let n=yX[j];if(!n)return;R({schedule:tx(Y.schedule,j,sx(n,_[j]??"*",1))})}},{key:"down",cmd:()=>{let n=yX[j];if(!n)return;R({schedule:tx(Y.schedule,j,sx(n,_[j]??"*",-1))})}}]:[],...$==="confirm"?[{key:"return",cmd:()=>E()}]:[]]}));let m=(n,f)=>y("text",{fg:$===n?X.primary:X.textMuted,attributes:$===n?wq.BOLD|wq.UNDERLINE:void 0,onMouseUp:()=>U(n),children:f});return U0("box",{paddingLeft:Q,paddingRight:Q,gap:1,children:[U0("box",{flexDirection:"row",justifyContent:"space-between",children:[y("text",{attributes:wq.BOLD,fg:X.text,children:z("automations.newTitle")}),y("text",{fg:X.textMuted,onMouseUp:()=>w(),children:"esc"})]}),U0("box",{gap:0,children:[m("name",z("automations.fieldName")),y("input",{value:Y.name,placeholder:z("automations.namePlaceholder"),focused:$==="name",onMouseUp:()=>U("name"),onInput:(n)=>R({name:n}),onSubmit:()=>U(dV("name"))})]}),U0("box",{gap:0,children:[m("repo",z("automations.fieldRepo")),Z.repos.length===0?y("text",{fg:X.textMuted,children:z("automations.needRepo")}):y(i6,{window:I,cursor:K,rows:k,onPick:T})]}),U0("box",{gap:0,children:[m("prompt",z("automations.fieldPrompt")),y("input",{value:Y.prompt,placeholder:z("automations.promptPlaceholder"),focused:$==="prompt",onMouseUp:()=>U("prompt"),onInput:(n)=>R({prompt:n}),onSubmit:()=>U(dV("prompt"))})]}),U0("box",{gap:0,children:[m("schedule",z("automations.fieldSchedule")),y("box",{flexDirection:"row",gap:2,paddingLeft:1,children:yX.map((n,f)=>{let o=$==="schedule"&&f===j;return U0("box",{flexDirection:"column",onMouseUp:()=>L(f),children:[y("text",{fg:o?X.primary:X.text,attributes:o?wq.BOLD|wq.UNDERLINE:void 0,wrapMode:"none",children:_[f]??"*"}),y("text",{fg:o?X.textMuted:X.borderSubtle,wrapMode:"none",children:z(`automations.cronField.${n}`)})]},n)})}),y("box",{flexDirection:"row",gap:1,paddingLeft:1,children:S.kind==="ok"?y("text",{fg:X.success,wrapMode:"none",children:`${ex(Y.schedule)??""}${ex(Y.schedule)?" \xB7 ":""}${S.relative} \xB7 ${S.absolute}`}):y("text",{fg:X.error,wrapMode:"none",children:S.kind==="never"?z("automations.cronNever"):z("automations.cronInvalid")})})]}),D?U0("text",{fg:X.error,wrapMode:"word",children:["\u203B ",D]}):null,y("box",{flexDirection:"row",justifyContent:"flex-end",paddingTop:1,paddingBottom:1,children:y("text",{fg:$==="confirm"?X.primary:X.text,attributes:$==="confirm"?wq.BOLD:void 0,onMouseUp:()=>E(),children:`[ ${z("common.create")} ]`})})]})}var vq,r50;var t50=h(async()=>{n50();o50();b2();M3();P1();b0();await T1([S1(),v4(),S5(),wX()]);vq=p0(n0(),1);r50={show(Z,X){return x8(Z,(J)=>y(VR0,{repos:X.repos,...X.defaultRepo?{defaultRepo:X.defaultRepo}:{},onSubmit:(z)=>J(z),onCancel:()=>J(void 0)}))}}});import{TextAttributes as vF}from"@opentui/core";function e50(Z,X){if(!Z)return"\u2014";let J=Date.parse(Z);if(!Number.isFinite(J))return"\u2014";let z=J-X,{minutes:Q,hours:Y}=IF(Math.abs(z));if(Q<1)return z>=0?"now":"just now";if(Q<60)return z>=0?`in ${Q}m`:`${Q}m ago`;if(Y<24)return z>=0?`in ${Y}h`:`${Y}h ago`;return new Date(J).toLocaleDateString()}function NR0(Z){return Z.split("/").filter(Boolean).pop()??Z}function Z70(Z){let{theme:X}=w0(),J=M4(),z=m0(),[Q,Y]=X6.useState(null),[G,$]=X6.useState(!1),[U,K]=X6.useState([]),[M,D]=X6.useState(0),[W,j]=X6.useState(null),[C,_]=X6.useState(null),L=()=>D((f)=>f+1);X6.useEffect(()=>{let f=!1,o=Z.orchestrator;if(!o){Y([]);return}let l=()=>{o.listAutomations().then((H0)=>{if(f)return;Y(H0.automations),$(H0.keepsDaemonAlive)}).catch(()=>{if(!f)Y((H0)=>H0??[])})};l();let Z0=setInterval(l,BR0);return()=>{f=!0,clearInterval(Z0)}},[Z.orchestrator,M]);let w=Q??[],[R,T]=X6.useState(0);X6.useEffect(()=>{T((f)=>X5(f,w.length))},[w.length]);let E=w[R];X6.useEffect(()=>{let f=!1,o=Z.orchestrator;if(!o||!E){K([]);return}return o.automationRuns(E.id).then((l)=>{if(!f)K(l.runs)}).catch(()=>{if(!f)K([])}),()=>{f=!0}},[Z.orchestrator,E,M]);async function S(){let f=Z.orchestrator;if(!f||!E||W)return;j(E.id);try{await f.setAutomationEnabled(E.id,!E.enabled),L()}catch(o){_(o instanceof Error?o.message:String(o))}finally{j(null)}}async function I(){let f=Z.orchestrator;if(!f||!E||W)return;j(E.id),_(z("automations.running",{name:E.name}));try{let o=await f.runAutomationNow(E.id);_(z("automations.ranWith",{name:E.name,status:o.status})),L()}catch(o){_(o instanceof Error?o.message:String(o))}finally{j(null)}}async function k(){let f=Z.orchestrator;if(!f||W)return;let o=[...new Set(f.listTasks().map((Z0)=>Z0.repo))].filter(Boolean);if(o.length===0){_(z("automations.needRepo"));return}let l=await r50.show(J,{repos:o,...Z.focusRepo?{defaultRepo:Z.focusRepo}:{}});if(!l)return;j("new");try{await f.createAutomation(l),L()}catch(Z0){_(Z0 instanceof Error?Z0.message:String(Z0))}finally{j(null)}}async function m(){let f=Z.orchestrator;if(!f||!E||W)return;if(await n4.show(J,z("automations.deleteTitle"),z("automations.deleteBody",{name:E.name}),z("common.cancel"),z("automations.deleteButton"))!==!0)return;j(E.id);try{await f.deleteAutomation(E.id),L()}catch(l){_(l instanceof Error?l.message:String(l))}finally{j(null)}}N1(()=>({enabled:Z.focused!==!1,bindings:[...u7(Z.onClose),{key:"j",cmd:()=>T((f)=>X5(f+1,w.length))},{key:"down",cmd:()=>T((f)=>X5(f+1,w.length))},{key:"k",cmd:()=>T((f)=>X5(f-1,w.length))},{key:"up",cmd:()=>T((f)=>X5(f-1,w.length))},{key:"n",cmd:()=>void k()},{key:"r",cmd:()=>L()},{key:"e",cmd:()=>void S()},{key:"s",cmd:()=>void I()},{key:"d",cmd:()=>void m()},{key:"return",cmd:()=>{let f=U.find((o)=>o.taskId)?.taskId;if(f)Z.onOpenTask?.(f)}}]}));let n=Date.now();return U0("box",{flexDirection:"column",flexGrow:1,paddingTop:1,paddingLeft:2,paddingRight:2,children:[U0("box",{flexDirection:"row",gap:1,flexShrink:0,children:[y("text",{attributes:vF.BOLD,fg:X.primary,wrapMode:"none",flexShrink:0,children:z("automations.title")}),y("text",{fg:X.borderSubtle,wrapMode:"none",flexBasis:0,flexGrow:1,flexShrink:1,children:"\u2500".repeat(240)}),y("text",{fg:G?X.success:X.textMuted,wrapMode:"none",flexShrink:0,children:G?z("automations.holdingDaemon"):z("automations.notHolding")})]}),Q===null?y("box",{paddingTop:1,children:y("text",{fg:X.textMuted,children:z("common.loading")})}):w.length===0?U0("box",{flexDirection:"column",paddingTop:1,gap:1,children:[y("text",{fg:X.textMuted,children:z("automations.empty")}),y("text",{fg:X.text,children:z("automations.emptyHint")})]}):y("box",{flexDirection:"column",marginTop:1,flexGrow:1,gap:0,children:w.map((f,o)=>{let l=o===R;return U0("box",{flexDirection:"row",flexShrink:0,border:!0,borderColor:l?X.borderActive:X.borderSubtle,paddingLeft:1,paddingRight:1,gap:1,...l?{backgroundColor:X.backgroundElement}:{},children:[y("text",{fg:f.enabled?X.text:X.textMuted,attributes:l?vF.BOLD:void 0,wrapMode:"none",flexShrink:1,children:f.name}),y("text",{fg:X.borderSubtle,wrapMode:"none",flexBasis:0,flexGrow:1,flexShrink:1,children:"\u2500".repeat(240)}),y("text",{fg:X.textMuted,wrapMode:"none",flexShrink:1,children:`${NR0(f.repo)} \xB7 ${f.schedule}`}),f.enabled?null:y("text",{fg:X.warning,wrapMode:"none",flexShrink:0,children:`${z("automations.paused")} \xB7`}),y("text",{fg:X.textMuted,wrapMode:"none",flexShrink:0,children:e50(f.nextRunAt,n)})]},f.id)})}),y("box",{flexDirection:"column",marginTop:1,border:!0,borderColor:X.border,padding:1,flexShrink:0,children:E?U0(o5,{children:[U0("box",{flexDirection:"row",justifyContent:"space-between",gap:2,children:[y("text",{fg:X.text,wrapMode:"none",flexShrink:1,flexGrow:1,children:E.prompt}),y("text",{fg:W===E.id?X.textMuted:X.primary,attributes:vF.BOLD,wrapMode:"none",flexShrink:0,onMouseUp:()=>void I(),children:z("automations.runNow")})]}),E.precheck?y("text",{fg:X.textMuted,children:z("automations.precheck",{command:E.precheck.command})}):null,y("text",{attributes:vF.BOLD,fg:X.text,children:z("automations.recentRuns")}),U.length===0?y("text",{fg:X.textMuted,children:z("automations.noRuns")}):U.slice(0,5).map((f)=>{let o=MR0[f.status]??"muted",l=o==="success"?X.success:o==="warning"?X.warning:o==="error"?X.error:X.textMuted;return y("text",{fg:l,children:`#${f.runNumber} ${f.status}${f.error?` \u2014 ${f.error}`:""} ${e50(f.at,n)}`},f.id)})]}):y("text",{fg:X.textMuted,children:z("automations.noSelection")})}),C?y("text",{fg:X.textMuted,children:C}):null]})}var X6,BR0=5000,MR0;var X70=h(async()=>{b2();P1();b0();await T1([S1(),v4(),S5(),t9(),t50()]);X6=p0(n0(),1),MR0={dispatched:"success",skipped_precheck:"muted",skipped_missed:"warning",skipped_unavailable:"warning",dispatch_failed:"error"}});function J70(Z){return WR0[Z]??"parked"}var WR0;var z70=h(()=>{WR0={backlog:"active",in_progress:"active",in_review:"parked",error:"parked",done:"terminal",canceled:"terminal",open:"active",doing:"active",hold:"parked"}});function Q70(Z,X,J){let z=Z.find(($)=>$.issues.length>0)?.issues[0]?.id??null;if(X==null)return z;let Q=-1,Y=-1;for(let[$,U]of Z.entries()){let K=U.issues.findIndex((M)=>M.id===X);if(K!==-1){Q=$,Y=K;break}}if(Q===-1)return z;if(J==="up"||J==="down"){let $=Z[Q]?.issues??[],U=J==="up"?Y-1:Y+1;return $[Math.max(0,Math.min(U,$.length-1))]?.id??X}let G=J==="left"?-1:1;for(let $=Q+G;$>=0&&$<Z.length;$+=G){let U=Z[$]?.issues??[];if(U.length===0)continue;return U[Math.min(Y,U.length-1)]?.id??X}return X}function OR0(Z){let X=J70(Z.status);if(X==="terminal")return"done";if(X==="parked")return"parked";if(Z.taskId!==void 0&&Z.taskId!=="")return"in_progress";return"backlog"}function Jy(Z){return Z!==void 0&&jR0.includes(Z)}function Y70(Z,X){let J=0;return{columns:Z.map((Q)=>{if(Q.key!=="in_progress")return Q;let Y=[],G=[];for(let $ of Q.issues)if($.taskId!==void 0&&$.taskId!==""&&Jy(X($.taskId)))Y.push($);else G.push($);return J=Y.length,Y.length===0?Q:{...Q,issues:[...Y,...G]}}),attentionCount:J}}function FR0(Z,X){if(Z.created!==X.created)return Z.created<X.created?1:-1;return X.id-Z.id}function G70(Z){let X={backlog:[],in_progress:[],parked:[],done:[]};for(let J of Z)X[OR0(J)].push(J);return DR0.map((J)=>{let z=J==="done"||J==="parked",Q=X[J].sort(FR0);if(!z||Q.length<=Xy)return{key:J,issues:Q,hiddenCount:0};return{key:J,issues:Q.slice(0,Xy),hiddenCount:Q.length-Xy}})}var DR0,Xy=20,jR0;var zy=h(()=>{z70();DR0=["backlog","in_progress","parked","done"];jR0=["permission_needed","rate_limited","error"]});import{randomBytes as H70}from"crypto";import{existsSync as Qy,mkdirSync as LR0,writeFileSync as _R0}from"fs";import{isAbsolute as AR0,join as CR0}from"path";function TR0(Z){if(Z.startsWith('"')&&Z.endsWith('"')||Z.startsWith("'")&&Z.endsWith("'"))return Z.slice(1,-1);return Z}function SR0(Z){let J=`__DOUBLE_BACKSLASH_${H70(8).toString("hex")}__`;return Z.replace(/\\\\/g,J).replace(/\\(.)/g,"$1").replaceAll(J,"\\")}function U70(Z,X=Qy){let J=SR0(TR0(Z.trim()));if(!ER0.test(J))return null;if(!AR0(J))return null;return X(J)?J:null}function fq(Z,X=Qy){let J=Z.split(`
|
|
709
|
+
`))Q++;return Q}function yx(Z){return Mc(Z).map((X)=>({path:X.path,added:X.added,deleted:X.deleted}))}function xE0(Z){let X=[];for(let J of uD(Z)){let z;if(J.x==="?"&&J.y==="?")z="?";else{let Y=J.y!==" "?J.y:J.x;if(Y==="M"||Y==="A"||Y==="D"||Y==="R"||Y==="C"||Y==="U"||Y==="T")z=Y;else continue}let Q=J.path;if(Q.length===0)continue;if(Q.endsWith("/")&&z!=="?")continue;X.push({path:Q,status:z})}return X}var p40=h(()=>{cD();LV()});function d40(Z){switch(Z){case"all":return"files.tabs.all";case"changes":return"files.tabs.changes"}}function i40(Z){return O5({"files.nav":(X,J)=>{if((J??0)%2===0)Z.moveDown();else Z.moveUp()},"files.hierarchy":(X,J)=>{if((J??0)%2===0)Z.collapseOrParent();else Z.expandOrDescend()},"files.tab":(X,J)=>{let z=Z.currentTab(),Q=Tq.indexOf(z);if(Q<0)return;let Y=(J??0)%2===0?-1:1,G=Tq[(Q+Y+Tq.length)%Tq.length];if(G)Z.setTab(G)},"files.open":()=>Z.openCurrent(),"files.mention":()=>Z.mentionCurrent?.(),"files.openExternal":()=>Z.openExternal(),"files.refresh":()=>Z.refresh(),"files.scope":()=>Z.toggleScope?.(),"files.diff":()=>Z.openDiff?.()})}var Tq;var wx=h(()=>{n9();Tq=["all","changes"]});import{spawn as yE0}from"child_process";import{existsSync as wE0}from"fs";import{platform as vE0}from"os";function _F(Z){if(!Z)return;let X=vE0();if(X==="linux"){if(wE0("/proc/sys/fs/binfmt_misc/WSLInterop")||process.env.WSL_DISTRO_NAME){hV("wslview",[Z],()=>{let J=yE0("wslpath",["-w",Z],{stdio:["ignore","pipe","ignore"]}),z="";J.stdout?.on("data",(Q)=>{z+=Q.toString()}),J.on("close",(Q)=>{if(Q===0)hV("explorer.exe",[z.trim()])})});return}hV("xdg-open",[Z]);return}if(X==="darwin"){hV("open",[Z]);return}if(X==="win32"){hV("cmd.exe",["/c","start","",Z]);return}}function hV(Z,X,J){Qz(Z,X,{onError:J?()=>J():void 0})}var vx=h(()=>{YV()});import{watch as fE0}from"fs";function n40(Z){switch(Z){case"M":return"warning";case"A":return"success";case"D":return"error";case"?":return"textMuted";case"R":case"C":case"U":case"T":return"info"}}function a40(Z,X){let J=Z.toLowerCase();if(J.includes("not a git repository"))return X("files.error.notGitRepo");if(J.includes("does not exist")||J.includes("enoent"))return X("files.error.pathMissing");if(J.includes("permission denied")||J.includes("eacces"))return X("files.error.permissionDenied");if(J.includes("git: not found")||J.includes("command not found"))return X("files.error.gitNotInstalled");let z=Z.indexOf(": ");if(z>=0&&Z.startsWith("git "))return Z.slice(z+2).trim()||X("files.error.gitFailed");return Z.trim()||X("files.error.gitFailed")}function o40(Z){let X=0,J=0;for(let z of Z){if(z.kind!=="status")continue;if(z.added!=null)X=Math.max(X,String(z.added).length+1);if(z.deleted!=null)J=Math.max(J,String(z.deleted).length+1)}return{added:X,deleted:J}}function s40(Z,X){let J=(X.added>0?X.added+1:0)+(X.deleted>0?X.deleted+1:0);return Math.max(8,Z-6-J)}function fx(Z,X,J){let z=J==="-"?"\u2212":J;return Z==null?" ".repeat(X):`${z}${Z}`.padStart(X)}function bx(Z,X){let J=new Set(Z);if(J.has(X))J.delete(X);else J.add(X);return J}function r40(Z,X){let J=Z[X];if(!J||J.kind!=="dir")return null;if(!J.expanded&&J.hasChildren)return{type:"expand",path:J.path};if(J.expanded&&X+1<Z.length)return{type:"cursor",index:X+1};return null}function t40(Z,X){let J=Z[X];if(!J)return null;if(J.kind==="dir"&&J.expanded)return{type:"collapse",path:J.path};if(J.kind!=="dir"&&J.kind!=="file")return null;let z=J.depth-1;if(z<0)return null;for(let Q=X-1;Q>=0;Q--){let Y=Z[Q];if(!Y)continue;if(Y.kind==="dir"&&Y.depth===z)return{type:"cursor",index:Q}}return null}function AF(Z,X,J){if(X<=0)return null;if(J<Z)return J;if(J>=Z+X)return J-X+1;return null}function bE0(Z){if(Z===".git"||Z.startsWith(".git/")||Z.startsWith(".git\\"))return!1;if(Z.startsWith("node_modules/")||Z.startsWith("node_modules\\"))return!1;return!0}function e40(Z,X,J=500){let z=null,Q=null;try{Q=fE0(Z,{recursive:!0},(Y,G)=>{if(G==null)return;if(!bE0(G.toString()))return;if(z!=null)clearTimeout(z);z=setTimeout(()=>{z=null,X()},J)}),Q.on("error",()=>{})}catch{}return()=>{if(z!=null)clearTimeout(z);if(Q!=null)Q.close()}}var CF=()=>{};function gx(Z,X,J,z,Q={}){if(Z.length===0)return X;let Y=new Map;for(let U of Z)Y.set(J(U),U);let G=Z.length===X.length,$=Array(X.length);for(let U=0;U<X.length;U++){let K=X[U],M=Y.get(J(K));if(M&&z(M,K)&&(!Q.samePosition||Z[U]===M)){if($[U]=M,G&&Z[U]!==M)G=!1}else $[U]=K,G=!1}return G?Z:$}function kx(Z,X,J,z){for(let Q of Z.children)if(Q.isDir){let Y=X.has(Q.path);if(z.push({kind:"dir",path:Q.path,name:Q.name,depth:J,expanded:Y,hasChildren:Q.children.length>0}),Y)kx(Q,X,J+1,z)}else z.push({kind:"file",path:Q.path,name:Q.name,depth:J})}function Z50(Z,X){return sj(Z,X)}function X50(Z,X=gE0){let J=[];for(let z of Z){if(z.children==null){J.push({kind:"status",path:z.path,status:z.status,added:z.added,deleted:z.deleted});continue}let Q=X.has(z.path);if(J.push({kind:"status",path:z.path,status:z.status,added:z.added,deleted:z.deleted,fileCount:z.children.length,expanded:Q}),Q)for(let Y of z.children)J.push({kind:"status",path:Y.path,status:Y.status,added:Y.added,deleted:Y.deleted,child:!0})}return J}function kE0(Z){return`${Z.kind}\x00${Z.path}`}function mE0(Z,X){if(Z.kind!==X.kind||Z.path!==X.path)return!1;switch(Z.kind){case"file":{let J=X;return Z.name===J.name&&Z.depth===J.depth}case"dir":{let J=X;return Z.name===J.name&&Z.depth===J.depth&&Z.expanded===J.expanded&&Z.hasChildren===J.hasChildren}case"status":{let J=X;return Z.status===J.status&&Z.added===J.added&&Z.deleted===J.deleted&&Z.fileCount===J.fileCount&&Z.expanded===J.expanded&&Z.child===J.child}}}function J50(Z,X){return gx(Z,X,kE0,mE0)}function z50(Z,X){if(Z===X)return!0;if(Z==null||X==null)return!1;if(Z.length!==X.length)return!1;for(let J=0;J<Z.length;J++)if(Z[J]!==X[J])return!1;return!0}function Q50(Z,X){if(Z===X)return!0;if(Z==null||X==null)return!1;if(Z.length!==X.length)return!1;for(let J=0;J<Z.length;J++){let z=Z[J],Q=X[J];if(z.path!==Q.path||z.status!==Q.status||z.added!==Q.added||z.deleted!==Q.deleted)return!1;let Y=z.children,G=Q.children;if(Y==null!==(G==null))return!1;if(Y&&G){if(Y.length!==G.length)return!1;for(let $=0;$<Y.length;$++){let U=Y[$],K=G[$];if(U.path!==K.path||U.status!==K.status||U.added!==K.added||U.deleted!==K.deleted)return!1}}}return!0}var gE0;var mx=h(()=>{gE0=new Set});function Y50(Z){let X={name:"",path:"",isDir:!0,children:[]};for(let J of Z){if(!J)continue;let z=J.split("/").filter((Y)=>Y.length>0);if(z.length===0)continue;let Q=X;for(let Y=0;Y<z.length;Y++){let G=z[Y],U=Y!==z.length-1,K=Q.children.find((M)=>M.name===G&&M.isDir===U);if(!K)K={name:G,path:z.slice(0,Y+1).join("/"),isDir:U,children:[]},Q.children.push(K);Q=K}}return G50(X),X}function G50(Z){Z.children.sort((X,J)=>{if(X.isDir!==J.isDir)return X.isDir?-1:1;return X.name.localeCompare(J.name)});for(let X of Z.children)G50(X)}function hE0(Z){return Z.hint?.keys??Z.keys[0]}function g2(Z){let X=i9(Z);if(!X)return null;let J=hE0(X);return J&&J.length>0?J:null}function uE0(Z){if(Z.keys.length>0)return Z.hint?.keys??Z.keys[0]??null;return Z.prefixKeys?.length?null:Z.hint?.keys??null}function cE0(Z,X){if(Z.scope==="global")return!0;if(X===null)return!1;if(Z.scope===X)return!0;return X==="terminal"&&Z.scope==="workspace"}function $50(Z,X,J,z){let Q=[],Y=[],G=[],$=new Map;for(let K of Z){let M=uE0(K),D=cE0(K,X),W=z?z.direct.has(K.id):D,j=z?z.prefix.has(K.id):D;if(M){let C={binding:K,primary:M,aliases:K.keys.filter((L)=>L!==M)},_=K.keys.length===0&&!K.prefixKeys?.length&&D;if(W&&(D||K.presentation==="onePress")||_)if(K.presentation==="onePress")Y.push(C);else Q.push(C);else if(!D&&K.scope!=="global"){let L=$.get(K.scope);if(L)L.push(C);else $.set(K.scope,[C])}}if(J&&j&&K.prefixKeys?.length)G.push({binding:K,primary:`${J} + ${K.prefixKeys[0]}`,aliases:K.prefixKeys.slice(1).map((C)=>`${J} + ${C}`)})}let U=[];if(Q.length)U.push({kind:"here",scope:X??void 0,rows:Q});if(Y.length)U.push({kind:"direct",rows:Y});if(G.length)U.push({kind:"prefix",rows:G});for(let[K,M]of $)U.push({kind:"other",scope:K,rows:M});return U}var uV=h(()=>{n9()});function Pq(Z){return Z!==!1}function EF(Z){return Pq(Z.get(Sq,!0))}function RF(Z){let X=!EF(Z);if(Z.set(Sq,X),X)for(let J of Object.values(cV))Z.set(J,!1)}function q50(Z,X){return Pq(Z)&&X!==!0}function H50(Z,X){let J=[];if(X!==null&&Z.prefix.size>0)J.push({chord:X,msg:"commands"});else if(Z.inputPassthrough){let z=Z.direct.has("focus.sidebar")?g2("focus.sidebar"):null;if(z)J.push({chord:z,msg:"sidebar"})}if(Z.direct.has("help.open")){let z=g2("help.open");if(z)J.push({chord:z,msg:"help"})}return J}function U50(Z,X){return lE0[Z].flatMap((J)=>{if(X==="always"&&J.always!==!0)return[];let z=g2(J.id);return z?[{cap:z,msg:J.msg}]:[]})}function K50(Z){let X=[],J=g2("sidebar.nav"),z=g2("sidebar.select");if(J&&z)X.push({msg:"keysBare",params:{nav:L5(J),open:L5(z)}});let Q=g2("chat.tab.new"),Y=g2("focus.next");if(Q&&Y)X.push({msg:"keysOnePress",params:{newTab:L5(Q),focusNext:L5(Y)}});if(Z!==null)X.push({msg:"keysPrefix",params:{prefix:L5(Z)}});let G=g2("help.open");if(G)X.push({msg:"keysHelp",params:{help:L5(G)}});return X}var Sq="hints.keyboard.enabled",cV,lE0;var lV=h(()=>{UY();uV();cV={sidebar:"hints.sidebar.used",files:"hints.files.used"};lE0={sidebar:[{id:"sidebar.nav",msg:"move"},{id:"sidebar.select",msg:"open"}],files:[{id:"files.nav",msg:"move"},{id:"files.hierarchy",msg:"collapse"},{id:"files.open",msg:"open",always:!0},{id:"files.diff",msg:"diff",always:!0}]}});import{TextAttributes as V50}from"@opentui/core";function hx(Z){if(!Z)return"Global";if(Z==="sidebar")return"Sidebar";if(Z==="workspace")return"Workspace";if(Z==="files")return"Files";if(Z==="terminal")return"Terminal";return"Dialog"}function B50(Z){return Z.split(" + ").map((X)=>L5(X)).join(" + ")}function pE0(Z,X){if(Z.kind==="here")return X("help.here",{surface:JX("category",hx(Z.scope))});if(Z.kind==="direct")return X("help.direct");if(Z.kind==="prefix")return X("help.afterPrefix");return X("help.otherPane",{surface:JX("category",hx(Z.scope))})}function Iq(Z){let X=M4(),{theme:J}=w0(),z=m0(),Q=_7(),Y=RX(),G=T8(),$=TF.useMemo(()=>$50(Z2,Z.currentScope??null,G.key,Z.reachability),[Y,Z.currentScope,Z.reachability,G.key]),U=()=>Z.onClose?Z.onClose():X.clear(),K=TF.useRef(null),M=(W)=>{let j=K.current;if(!j)return;j.scrollTo({x:0,y:Math.max(0,j.scrollTop+W)})},D=(W)=>{let j=K.current;if(!j)return;j.scrollTo({x:0,y:W==="top"?0:Number.MAX_SAFE_INTEGER})};return N1(()=>({bindings:[{key:"?",cmd:U},{key:"up",cmd:()=>M(-1)},{key:"down",cmd:()=>M(1)},{key:"pageup",cmd:()=>M(-(K.current?.viewport.height??10))},{key:"pagedown",cmd:()=>M(K.current?.viewport.height??10)},{key:"home",cmd:()=>D("top")},{key:"end",cmd:()=>D("bottom")}]})),U0("box",{paddingLeft:Q,paddingRight:Q,gap:1,flexShrink:1,children:[U0("box",{flexDirection:"row",justifyContent:"space-between",flexShrink:0,children:[U0("box",{flexDirection:"column",gap:0,children:[y("text",{attributes:V50.BOLD,fg:J.text,children:z("help.title")}),y("text",{fg:J.textMuted,children:Z.currentScope?z("help.focused",{surface:JX("category",hx(Z.currentScope))}):z("help.allBindings")}),y("text",{fg:J.textMuted,children:z("help.grammar",{prefix:G.key?L5(G.key):z("help.disabled")})})]}),y("text",{fg:J.textMuted,onMouseUp:U,children:z("help.esc")})]}),y("scrollbox",{ref:(W)=>{K.current=W},flexShrink:1,flexGrow:1,stickyScroll:!1,verticalScrollbarOptions:{trackOptions:{backgroundColor:J.backgroundDialog,foregroundColor:J.borderActive}},children:y("box",{paddingBottom:1,gap:1,paddingRight:1,children:$.map((W,j)=>U0("box",{gap:0,children:[y("text",{fg:J.accent,attributes:V50.BOLD,children:pE0(W,z)}),W.rows.map((C)=>{return U0("box",{flexDirection:"row",gap:2,paddingLeft:1,children:[y("box",{width:18,children:y("text",{fg:J.primary,children:B50(C.primary)})}),y("box",{flexGrow:1,children:y("text",{fg:J.text,children:JX("desc",C.binding.id)})}),C.aliases.length>0?y("box",{children:y("text",{fg:J.textMuted,children:`(${C.aliases.map(B50).join(", ")})`})}):null]},`${W.kind}-${C.binding.id}`)})]},`${W.kind}-${W.scope??j}`))})})]})}var TF;var ux=h(async()=>{UY();uV();S8();s3();P1();b0();await T1([S1(),v4(),S5()]);TF=p0(n0(),1);Iq.show=(Z,X)=>{let J=e$(),z=J.inputPassthrough?"terminal":X;Z.replace(()=>y(Iq,{currentScope:z,reachability:J}))}});function cx(Z){let X=m0(),J=w2(),z=Yn(),Q=vn();RX(),gO();let[Y,G]=xq.useState({tokens:[],modal:!1});xq.useEffect(()=>{let K=Pq(J?.get(Sq,!0)),M=rQ()||(Q?.stack.length??0)>0,D=K&&!M?H50(e$(),T8().key):null;G((W)=>{let j=D??(K?W.tokens:[]);return W.modal===M&&W.tokens.length===j.length&&W.tokens.every((C,_)=>C.chord===j[_]?.chord&&C.msg===j[_]?.msg)?W:{tokens:j,modal:M}})});let $=Y.modal?{commands:void 0,sidebar:void 0,help:void 0}:{commands:()=>void Tn(),sidebar:z?()=>z.setFocused("sidebar"):void 0,help:Q?()=>Iq.show(Q,z?.focused??"sidebar"):void 0},U=Y.tokens.map((K)=>({text:Z?.compact?L5(K.chord):X(`hints.status.${K.msg}`,{key:L5(K.chord)}),onPress:$[K.msg]}));if(Z?.onOpenSettings&&!Z.compact&&Pq(J?.get(Sq,!0)))U.push({text:`[${X("hints.status.settings")}]`,bindingId:"settings.open",onPress:Y.modal?void 0:Z.onOpenSettings});return U}function M50(Z){let{theme:X}=w0(),J=cx({onOpenSettings:Z.onOpenSettings,compact:Z.compact});if(J.length===0)return null;return y("box",{flexDirection:"row",flexShrink:0,children:J.flatMap((z,Q)=>[Q>0?y("text",{fg:X.textMuted,wrapMode:"none",children:" \xB7 "},`sep-${z.text}`):null,U0("box",{position:"relative",onMouseUp:z.onPress,children:[y("text",{fg:X.textMuted,wrapMode:"none",children:z.text}),z.bindingId?y(s9,{bindingId:z.bindingId,cover:!0}):null]},z.text)])})}function SF(Z){let X=w2();return xq.useCallback(()=>{if(!X)return;if(X.get(cV[Z],!1)!==!0)X.set(cV[Z],!0)},[X,Z])}function PF(Z){let X=m0(),{theme:J}=w0(),z=w2();RX();let Q=z?.get(Sq,!0),Y=z?.get(cV[Z.pane],!1);if(!Pq(Q))return null;let G=U50(Z.pane,q50(Q,Y)?"firstUse":"always");if(G.length===0)return null;return y("text",{fg:J.textMuted,wrapMode:"none",children:G.map(($)=>`${L5($.cap)} ${X(`hints.pane.${$.msg}`)}`).join(" \xB7 ")})}var xq;var pV=h(async()=>{UY();lV();S8();s3();I8();P1();b0();await T1([JV(),S1(),v4(),S5(),ux(),_q()]);xq=p0(n0(),1)});import{TextAttributes as lx}from"@opentui/core";function N50(Z){let{theme:X}=w0(),J=m0(),z=T8().key,Q=z?`[${L5(z)} P]`:null;return U0(o5,{children:[Z.onZenToggle||Z.onCreatePR?U0("box",{flexDirection:"row",flexWrap:"wrap",justifyContent:"flex-end",gap:2,paddingBottom:1,flexShrink:0,children:[Z.onZenToggle?U0("box",{position:"relative",flexDirection:"row",gap:1,flexShrink:0,onMouseUp:(Y)=>{Y.stopPropagation(),Z.onZenToggle?.()},children:[y("text",{fg:X.accent,attributes:lx.BOLD,wrapMode:"none",children:"[~]"}),y("text",{fg:X.text,wrapMode:"none",children:J("files.actions.zen")}),y(s9,{bindingId:"workspace.zenToggle"})]}):null,Z.onCreatePR?U0("box",{flexDirection:"row",gap:1,flexShrink:0,onMouseUp:(Y)=>{Y.stopPropagation(),Z.onCreatePR?.()},children:[Q?U0("box",{position:"relative",children:[y("text",{fg:X.accent,attributes:lx.BOLD,wrapMode:"none",children:Q}),y(s9,{bindingId:"files.createPR",cover:!0})]}):null,y("text",{fg:X.text,wrapMode:"none",children:J("files.actions.createPR")})]}):null]}):null,y("box",{flexDirection:"row",paddingBottom:0,flexShrink:0,gap:2,children:Tq.map((Y)=>{let G=Z.tab===Y;return y("text",{fg:G?X.primary:X.textMuted,attributes:G?lx.BOLD:void 0,wrapMode:"none",onMouseUp:()=>Z.onSelectTab(Y),children:J(d40(Y))},Y)})}),Z.tab==="changes"?U0("box",{flexDirection:"column",paddingBottom:1,flexShrink:0,gap:0,children:[U0("text",{fg:X.textMuted,wrapMode:"none",children:[Z.scope==="branch"&&Z.base!=null?J("files.scope.branch",{base:Z.base}):J("files.scope.working"),Z.base!=null?` ${J("files.scope.toggleHint")}`:""]}),y("text",{fg:X.textMuted,wrapMode:"none",children:J("files.legend.changes")})]}):y("box",{flexDirection:"row",paddingBottom:1,flexShrink:0})]})}var W50=h(async()=>{UY();S8();wx();P1();b0();await T1([_q(),S1()])});function xX(Z,X){let J=Z.background.a===0;if(X.cursor){if(J)return{marker:"\u258C",markerColor:Z.focusAccent??Z.primary,backgroundColor:void 0};return{marker:"\u258C",markerColor:Z.text,backgroundColor:Z.backgroundElement}}if(X.selected)return{marker:"\u258C",markerColor:Z.borderActive,backgroundColor:J?void 0:Z.background};return{marker:" ",markerColor:void 0,backgroundColor:void 0}}import{TextAttributes as dE0}from"@opentui/core";var D50,O50;var j50=h(async()=>{CF();mx();b0();await S1();D50=p0(n0(),1),O50=D50.memo(function(X){let{theme:J}=w0(),z=xX(J,{cursor:X.cursor}),Q=y("text",{fg:z.markerColor,wrapMode:"none",children:z.marker}),Y=z.backgroundColor,G=X.row;if(G.kind==="dir"){let C=" ".repeat(G.depth);return U0("box",{flexDirection:"row",gap:0,backgroundColor:Y,onMouseUp:()=>X.onActivate(X.row,X.index),children:[Q,y("box",{flexGrow:1,paddingRight:1,children:y("text",{fg:J.textMuted,attributes:dE0.BOLD,wrapMode:"none",children:`${C}${G.expanded?"\u25BE":"\u25B8"} ${G.name}/`})})]})}if(G.kind==="file"){let C=" ".repeat(G.depth);return U0("box",{flexDirection:"row",gap:0,backgroundColor:Y,onMouseUp:()=>X.onActivate(X.row,X.index),children:[Q,y("box",{flexGrow:1,paddingRight:1,children:y("text",{fg:J.text,wrapMode:"none",children:`${C} ${G.name}`})})]})}let $=G.fileCount!==void 0,U=$?G.expanded?"\u25BE ":"\u25B8 ":"",K=$?` (${G.fileCount})`:"",M=G.child?" ":"",D=X.pathBudget-U.length-K.length-M.length,W=n40(G.status),j=W==="success"?J.success:W==="warning"?J.warning:W==="error"?J.error:W==="info"?J.info:J.textMuted;return U0("box",{flexDirection:"row",gap:0,backgroundColor:Y,onMouseUp:()=>X.onActivate(X.row,X.index),children:[Q,U0("box",{flexDirection:"row",flexGrow:1,gap:1,paddingRight:1,children:[y("text",{fg:j,wrapMode:"none",children:G.status}),y("text",{fg:$?J.textMuted:J.text,wrapMode:"none",flexGrow:1,children:`${M}${U}${Z50(G.path,D)}${K}`}),X.statWidths.added>0?y("text",{fg:J.success,wrapMode:"none",children:fx(G.added,X.statWidths.added,"+")}):null,X.statWidths.deleted>0?y("text",{fg:J.error,wrapMode:"none",children:fx(G.deleted,X.statWidths.deleted,"-")}):null]})]})})});function F50(Z){let{theme:X}=w0(),J=m0(),z=q5(),[Q,Y]=b4.useState("all"),[G,$]=b4.useState("working"),[U,K]=b4.useState(!1),[M,D]=b4.useState(null),[W,j]=b4.useState(0),[C,_]=b4.useState(0),[L,w]=b4.useState(null),[R,T]=b4.useState(null),[E,S]=b4.useState(null),[I,k]=b4.useState(()=>new Set),m=z1(Z.worktreePath),n=z1(Q),f=z1(L),o=z1(R),l=z1(G),Z0=z1(M),H0=z1(U),N0=z1(Z.onOpenFile),B0=b4.useRef(0),q0=b4.useCallback(async(_0,S0,y0)=>{let v0=++B0.current;if(S0==null){w(null),T(null),S(null);return}S(null);try{if(_0==="all"){let a0=await m40(S0,y0);if(y0?.aborted||v0!==B0.current||m.current!==S0)return;w((Y1)=>z50(Y1,a0)?Y1:a0)}else if(_0==="changes"){let a0=l.current==="branch"&&Z0.current!=null,Y1=a0?await l40(S0,Z0.current,y0):await h40(S0,y0);if(y0?.aborted||v0!==B0.current||m.current!==S0)return;if(!a0&&Y1.length===0&&!H0.current&&Z0.current!=null){$("branch");return}T((G0)=>Q50(G0,Y1)?G0:Y1)}}catch(a0){if(y0?.aborted)return;let Y1=J1(a0);if(v0===B0.current&&m.current===S0)S(Y1)}},[]);b4.useEffect(()=>{w(null),T(null),S(null),j(0),k(new Set),$("working"),K(!1);let _0=new AbortController;return q0(n.current,Z.worktreePath,_0.signal),()=>_0.abort()},[Z.worktreePath,q0]),b4.useEffect(()=>{let _0=Z.worktreePath;if(_0==null){D(null);return}let S0=!1,y0=new AbortController;return c40(_0,Z.prBaseRef,y0.signal).then((v0)=>{if(!S0)D(v0)}).catch(()=>{if(!S0)D(null)}),()=>{S0=!0,y0.abort()}},[Z.worktreePath,Z.prBaseRef]),b4.useEffect(()=>{if(n.current!=="changes")return;let _0=m.current;if(_0==null)return;let S0=new AbortController;return q0("changes",_0,S0.signal),()=>S0.abort()},[G,M,q0]),b4.useEffect(()=>{let _0=Z.worktreePath;if(_0==null)return;if(process.env.KOBE_FILETREE_WATCH!=="1")return;return e40(_0,()=>_((S0)=>S0+1))},[Z.worktreePath]),b4.useEffect(()=>{j(0);let _0=m.current;if(_0==null)return;let S0=new AbortController;if(Q==="all"){if(f.current==null)q0("all",_0,S0.signal)}else if(Q==="changes"){if(o.current==null)q0("changes",_0,S0.signal)}return()=>S0.abort()},[Q,q0]),b4.useEffect(()=>{if(C===0)return;let _0=m.current;if(_0==null)return;let S0=new AbortController;return q0(n.current,_0,S0.signal),()=>S0.abort()},[C,q0]);let u=b4.useMemo(()=>L==null?null:Y50(L),[L]),p=b4.useRef([]),r=b4.useMemo(()=>{let _0=[];if(Q==="all"){if(u!=null)kx(u,I,0,_0)}else if(Q==="changes"){if(R!=null)_0.push(...X50(R,I))}let S0=J50(p.current,_0);return p.current=S0,S0},[Q,u,I,R]);b4.useEffect(()=>{if(r.length===0)return;j((_0)=>_0>r.length-1?r.length-1:_0)},[r]);let i=b4.useMemo(()=>o40(r),[r]),K0=Z.paneWidth??z.width,e=b4.useMemo(()=>s40(K0,i),[K0,i]);function a(_0){if(!_0)return;if(_0.type==="cursor")j(_0.index);else if(_0.type==="expand")k((S0)=>new Set(S0).add(_0.path));else k((S0)=>bx(S0,_0.path))}let X0=b4.useCallback((_0)=>{if(_0.kind==="dir"||_0.path.endsWith("/"))k((S0)=>bx(S0,_0.path));else N0.current(_0.path)},[]),O0=b4.useCallback((_0,S0)=>{j(S0),X0(_0)},[X0]),Q0=SF("files");N1(()=>({enabled:Z.focused??!0,bindings:i40({moveDown:()=>{if(Q0(),r.length===0)return;j((_0)=>Math.min(_0+1,r.length-1))},moveUp:()=>{if(Q0(),r.length===0)return;j((_0)=>Math.max(_0-1,0))},setTab:Y,currentTab:()=>Q,openCurrent:()=>{Q0();let _0=r[W];if(_0)X0(_0)},mentionCurrent:()=>{let _0=r[W];if(!_0||_0.kind==="dir"||_0.path.endsWith("/"))return;Z.onMention?.(_0.path)},openExternal:()=>{let _0=r[W];if(!_0||_0.kind==="dir"||_0.path.endsWith("/"))return;if(!Z.worktreePath)return;_F(`${Z.worktreePath}/${_0.path}`)},refresh:()=>{_((_0)=>_0+1)},toggleScope:()=>{if(Q!=="changes")return;if(M==null)return;K(!0),$((_0)=>_0==="working"?"branch":"working")},openDiff:()=>{let _0=r[W];if(!_0||_0.kind==="dir"||_0.path.endsWith("/"))return;Z.onOpenDiff?.(_0.path,G==="branch"&&M!=null?M:void 0)},expandOrDescend:()=>a(r40(r,W)),collapseOrParent:()=>{if(Q!=="all")return;a(t40(r,W))}})}));let A0=b4.useRef(null);b4.useEffect(()=>{let _0=A0.current;if(!_0||r.length===0)return;let S0=AF(_0.scrollTop,_0.viewport.height,W);if(S0!=null)_0.scrollTo({x:0,y:S0})},[W,r]);let I0=Q==="all"&&L!=null||Q==="changes"&&R!=null;return U0("box",{flexDirection:"column",flexGrow:1,paddingLeft:0,paddingRight:0,children:[y(N50,{tab:Q,scope:G,base:M,onSelectTab:Y,onZenToggle:Z.onZenToggle,onCreatePR:Z.onCreatePR}),y("scrollbox",{ref:(_0)=>{A0.current=_0},flexGrow:1,verticalScrollbarOptions:{trackOptions:{foregroundColor:"transparent"}},children:Z.worktreePath==null?y("box",{paddingTop:1,paddingLeft:1,children:y("text",{fg:X.textMuted,children:J("files.empty.noTask")})}):E!=null?U0("box",{paddingTop:1,paddingLeft:1,flexDirection:"column",gap:0,children:[y("text",{fg:X.error,wrapMode:"word",children:a40(E,J)}),y("text",{fg:X.textMuted,wrapMode:"word",children:J("files.error.retryHint")})]}):r.length===0&&I0?y("box",{paddingTop:1,paddingLeft:1,children:y("text",{fg:X.textMuted,children:Q==="all"?J("files.empty.noFiles"):J("files.empty.noChanges")})}):r.length>0?y("box",{flexShrink:0,gap:0,paddingRight:1,children:r.map((_0,S0)=>y(O50,{row:_0,index:S0,cursor:S0===W,statWidths:i,pathBudget:e,onActivate:O0},`${_0.kind}:${_0.path}`))}):null}),Z.worktreePath!=null?y("box",{flexDirection:"row",justifyContent:"flex-end",paddingTop:1,flexShrink:0,children:y(PF,{pane:"files"})}):null]})}var b4;var L50=h(async()=>{p40();wx();vx();CF();mx();P1();F7();b0();await T1([Z5(),pV(),S1(),v4(),W50(),j50()]);b4=p0(n0(),1)});function A50(Z){let{theme:X,transparentBackground:J}=w0(),z=IO(),Q=q5(),Y=J?X.border:X.borderSubtle,G=Math.max(_50,Q.width-_X),$=Math.max(_50,Math.min(iE0,Math.floor(G/3)));return y("box",{width:$,flexShrink:0,borderColor:z.focused==="files"?X.focusAccent:Y,onMouseUp:()=>z.setFocused("files"),children:y(F50,{worktreePath:Z.worktree,paneWidth:$-2,prBaseRef:Z.prBaseRef,focused:Z.focused,onOpenFile:Z.onOpenFile,onOpenDiff:Z.onOpenDiff,onZenToggle:Z.onZenToggle,onCreatePR:Z.onCreatePR})})}var _50=22,iE0=34;var C50=h(async()=>{Mz();b0();await T1([Z5(),JV(),S1(),L50()])});function E50(Z,X=8){let J=Math.min(1,Math.max(0,Z))*X,z=Math.floor(J),Q=Math.round((J-z)*8);if(Q===8)z+=1,Q=0;let Y=z<X?nE0[Q]??"":"";return`${"\u2588".repeat(z)}${Y}`.padEnd(X,"\u2591")}var nE0;var px=h(()=>{nE0=["","\u258F","\u258E","\u258D","\u258C","\u258B","\u258A","\u2589"]});function ix(Z,X){if(Z==null||Z<=X)return"";let J=new Date(Z),z=`${R50(J.getHours())}:${R50(J.getMinutes())}`;if(Z-X<86400000)return`\u2192 ${z}`;return`\u2192 ${J.getMonth()+1}/${J.getDate()} ${z}`}function T50(Z,X){return Z.windows.map((J)=>({label:J.label,percentText:`${J.percent}%`,resetText:ix(J.resetsAt,X),tone:dx(J.percent)}))}function S50(Z,X){let J=Z.windows.find((z)=>z.kind==="session")??Z.windows[0];if(!J)return null;return{label:J.label,percentText:`${J.percent}%`,resetText:ix(J.resetsAt,X),tone:dx(J.percent)}}function P50(Z,X){let J=Math.min(8,Z.windows.reduce((z,Q)=>Math.max(z,Q.label.length),2));return Z.windows.map((z)=>({label:(z.label.length>J?z.label.slice(0,J):z.label).padEnd(J),bar:E50(z.percent/100,aE0),percentText:`${String(z.percent).padStart(3)}%`,resetText:ix(z.resetsAt,X),tone:dx(z.percent)}))}var aE0=10,dx=(Z)=>Z>=95?"crit":Z>=75?"warn":"ok",R50=(Z)=>String(Z).padStart(2,"0");var nx=h(()=>{px()});function oE0(Z){let{theme:X}=w0(),J=H4(Z.orchestrator.usageSnapshotSignal());if(!J||J.size===0)return null;let z={ok:X.success,warn:X.warning,crit:X.error},Q=Date.now();if(Z.narrow)return y("box",{flexDirection:"row",gap:2,children:[...J.entries()].flatMap(([Y,G])=>{let $=S50(G,Q);if(!$)return[];return[U0("box",{flexDirection:"row",gap:1,children:[y("text",{fg:X.textMuted,wrapMode:"none",children:g5(Y).toUpperCase()}),y("text",{fg:z[$.tone],wrapMode:"none",children:$.percentText})]},Y)]})});return y("box",{flexDirection:"row",gap:2,children:[...J.entries()].map(([Y,G])=>U0("box",{flexDirection:"row",gap:1,children:[y("text",{fg:X.textMuted,wrapMode:"none",children:g5(Y).toUpperCase()}),T50(G,Q).map(($,U)=>U0("box",{flexDirection:"row",gap:1,children:[y("text",{fg:X.textMuted,wrapMode:"none",children:U===0?$.label:`\xB7 ${$.label}`}),y("text",{fg:z[$.tone],wrapMode:"none",children:$.percentText}),$.resetText?y("text",{fg:X.textMuted,wrapMode:"none",children:$.resetText}):null]},$.label))]},Y))})}function I50(Z){let{theme:X}=w0(),J=q5(),z=$3(J.width),Q=H4(Z.orchestrator.usageSnapshotSignal()),Y=cx({onOpenSettings:Z.onOpenSettings}),G=Q!=null&&Q.size>0||Y.length>0;return y(Z40,{children:U0("box",{flexDirection:"column",flexGrow:1,backgroundColor:X.background,children:[y("box",{flexDirection:"row",flexGrow:1,children:Z.children}),G?U0("box",{flexDirection:"row",flexShrink:0,height:1,paddingLeft:1,paddingRight:1,gap:2,children:[y("box",{flexGrow:1,flexDirection:"row",children:y(oE0,{orchestrator:Z.orchestrator,narrow:z})}),y(M50,{onOpenSettings:z?void 0:Z.onOpenSettings,compact:z})]}):null]})})}var x50=h(async()=>{Q8();nx();i3();b0();await T1([Z5(),pV(),_q(),S1()])});import{TextAttributes as sE0}from"@opentui/core";function rE0(Z){if(!Z)return Z;return Z.charAt(0).toUpperCase()+Z.slice(1)}function n4(Z){let X=M4(),{theme:J}=w0(),z=m0(),Q=_7(),[Y,G]=y50.useState(Z.initialActive??"confirm");return N1(()=>({bindings:[{key:"return",cmd:()=>{if(Y==="confirm")Z.onConfirm?.();if(Y==="cancel")Z.onCancel?.();X.clear()}},{key:"left",cmd:()=>G(($)=>$==="confirm"?"cancel":"confirm")},{key:"right",cmd:()=>G(($)=>$==="confirm"?"cancel":"confirm")}]})),U0("box",{paddingLeft:Q,paddingRight:Q,paddingBottom:1,gap:0,children:[U0("box",{flexDirection:"row",justifyContent:"space-between",children:[y("text",{attributes:sE0.BOLD,fg:J.text,children:Z.title}),y("text",{fg:J.textMuted,onMouseUp:()=>X.clear(),children:"esc"})]}),y("text",{fg:J.textMuted,children:Z.message}),y("box",{flexDirection:"row",justifyContent:"flex-end",paddingTop:1,children:["cancel","confirm"].map(($)=>y("box",{paddingLeft:1,paddingRight:1,backgroundColor:$===Y?J.primary:void 0,onMouseUp:()=>{if($==="confirm")Z.onConfirm?.();if($==="cancel")Z.onCancel?.();X.clear()},children:y("text",{fg:$===Y?J.selectedListItemText:J.textMuted,children:rE0($==="cancel"?Z.label??z("common.cancel"):Z.confirmLabel??z("common.confirm"))})},$))})]})}var y50;var t9=h(async()=>{P1();b0();await T1([S1(),v4(),S5()]);y50=p0(n0(),1);n4.show=(Z,X,J,z,Q,Y)=>{return x8(Z,(G)=>y(n4,{title:X,message:J,onConfirm:()=>G(!0),onCancel:()=>G(!1),label:z,confirmLabel:Q,initialActive:Y?.initialActive}),{size:"small"})}});function w50(Z){return!Z.dialogOpen&&!Z.settingsOpen&&!Z.worktreesOpen&&!Z.updateOpen}function v50(Z){return Z.settingsOpen&&!Z.dialogOpen}function f50(Z,X,J){let z=tE0.filter((G)=>G!=="files"||J.filesVisible),Q=z.indexOf(Z);if(Q<0)return(X>0?z[z.length-1]:z[0])??null;let Y=Math.min(Math.max(Q+X,0),z.length-1);return Y===Q?null:z[Y]??null}var tE0;var b50=h(()=>{tE0=["sidebar","workspace","files"]});function eE0(Z){let X=Z.kind==="pane"?["plugin","pane","open",Z.target]:["plugin","action","invoke",Z.target],[J,...z]=[...rG(),...X];Qz(J,z,{onError:(Q)=>console.warn(`[rove/plugins] ${Z.target}: ${String(Q)}`)})}function g50(Z){N1(()=>({enabled:Z,bindings:ci().map((X)=>({key:X.chord,cmd:()=>eE0(X)}))}))}var k50=h(async()=>{tG();YV();XV();await v4()});function m50(Z){let{focus:X,dialog:J}=Z,z=m0(),Q=i4();function Y(){try{Q?.destroy()}catch(M){console.error("Rove: renderer.destroy() failed during quit:",M)}process.exit(0)}async function G(){if(await n4.show(J,z("workspace.quit.confirmTitle"),z("workspace.quit.confirmBody"),z("common.cancel"),z("workspace.quit.confirmLabel")))Y()}function $(M){let D=f50(X.focused,M,{filesVisible:Z.filesPaneVisible!==!1});if(D)X.setFocused(D)}let U={dialogOpen:Z.dialog.stack.length>0,settingsOpen:Z.pages.settingsOpen,worktreesOpen:Z.pages.worktreesOpen,updateOpen:Z.pages.updateOpen,kanbanOpen:Z.pages.kanbanOpen,automationsOpen:Z.pages.automationsOpen,workItemsOpen:Z.pages.workItemsOpen},K=w50(U);N1(()=>({enabled:K,bindings:[...O5({"help.open":()=>Iq.show(J,X.focused),"focus.previous":q8(()=>$(-1)),"focus.next":q8(()=>$(1)),"workspace.zenToggle":q8(()=>Z.toggleZen()),"attention.next":()=>Z.jumpToNextAttention(),"inbox.show":q8(()=>Z.openInbox()),"kanban.open":q8(()=>Z.pages.openKanban()),"automations.open":q8(()=>Z.pages.openAutomations()),"workItems.open":q8(()=>Z.pages.openWorkItems()),"task.moveMode":q8(()=>Z.enterMoveMode()),"settings.open":q8(()=>Z.pages.openSettings()),"files.createPR":q8(()=>Z.createPR()),"task.openEditor":q8(()=>{if(Z.selectedId)Z.openTaskWorktree(Z.selectedId)})})]})),N1(()=>({enabled:K&&X.focused!=="sidebar",bindings:O5({"focus.sidebar":()=>X.setFocused("sidebar")})})),N1(()=>({enabled:K&&X.focused==="sidebar",bindings:O5({"app.quit":(M,D)=>{if(D===1){Y();return}G()},"settings.open.sidebar":()=>Z.pages.openSettings(),"worktrees.open.sidebar":()=>Z.pages.openWorktrees(),"tasks.update":()=>Z.pages.openUpdate()})})),N1(()=>({enabled:K&&X.focused==="sidebar"&&!Z.searchActive,bindings:O5({"task.new":()=>Z.createTask(),"tasks.openWorktree":()=>{if(Z.selectedId)Z.openTaskWorktree(Z.selectedId)},"tasks.renameBranch":()=>{let M=Z.selectedId;if(M)Z.renameBranch(M)},"tasks.cycleEngine":()=>{let M=Z.selectedId;if(M)Z.cycleVendor(M)},"tasks.focusEngine":()=>X.setFocused("workspace"),"sidebar.sort":()=>Z.toggleSortMode()})})),N1(()=>({enabled:v50(U),bindings:u7(Z.pages.closeSettings)})),g50(K)}var h50=h(async()=>{S8();s3();P1();b50();await T1([Z5(),ux(),v4(),t9(),k50()])});function c50(Z){return Z==="terminal"?"sidebar":"workspace"}var u50;var ax=h(()=>{u50=[{nav:"kanban",labelKey:"tasks.nav.kanban",bindingId:"kanban.open"},{nav:"automations",labelKey:"tasks.nav.automations",bindingId:"automations.open"},{nav:"issues",labelKey:"tasks.nav.issues",bindingId:"workItems.open"}]});function IF(Z){let X=Math.round(Z/60000),J=Math.round(X/60);return{minutes:X,hours:J,days:Math.round(J/24)}}function dV(Z,X=1){let J=xF.indexOf(Z);if(J<0)return"name";let z=(J+X+xF.length)%xF.length;return xF[z]}function p50(Z){return Z.name.trim().length>0&&Z.repo.trim().length>0&&Z.prompt.trim().length>0&&zq(Z.schedule.trim())}function d50(Z){if(Z.name.trim().length===0)return"name";if(Z.repo.trim().length===0)return"repo";if(Z.prompt.trim().length===0)return"prompt";if(!zq(Z.schedule.trim()))return"schedule";return null}function i50(Z,X){let J=Z.trim();if(!zq(J))return{kind:"invalid"};let z;try{z=Qq(J,X)}catch{return{kind:"never"}}return{kind:"ok",nextRunMs:z,relative:ZR0(z-X),absolute:zR0(z,X)}}function ZR0(Z){let{minutes:X,hours:J,days:z}=IF(Z);if(X<60)return`in ${Math.max(1,X)}m`;if(J<24)return`in ${J}h`;return`in ${z}d`}function zR0(Z,X){let J=new Date(Z),z=`${String(J.getHours()).padStart(2,"0")}:${String(J.getMinutes()).padStart(2,"0")}`,Q=new Date(X);if(J.getFullYear()===Q.getFullYear()&&J.getMonth()===Q.getMonth()&&J.getDate()===Q.getDate())return z;let G=XR0[J.getDay()]??"";if(Z-X<518400000)return`${G} ${z}`;return`${G} ${JR0[J.getMonth()]??""} ${J.getDate()}, ${z}`}var xF,l50,XR0,JR0;var n50=h(()=>{HV();xF=["name","repo","prompt","schedule","confirm"];l50={name:"",repo:"",prompt:"",schedule:"0 9 * * MON-FRI"};XR0=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],JR0=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function yF(Z){let X=Z.trim().split(/\s+/).filter(Boolean);return yX.map((J,z)=>X[z]??"*")}function a50(Z){return yX.map((X,J)=>Z[J]??"*").join(" ")}function ox(Z,X){let J=[];for(let z=Z;z<=X;z++)J.push(String(z));return J}function sx(Z,X,J){let z=UR0[Z],Q=z.indexOf(X.trim().toUpperCase());if(Q<0)return(J>0?z[0]:z[z.length-1])??X;let Y=(Q+J+z.length)%z.length;return z[Y]??X}function rx(Z,X){return Math.min(Math.max(Z+X,0),yX.length-1)}function tx(Z,X,J){let z=yF(Z);if(X<0||X>=yX.length)return a50(z);return z[X]=J,a50(z)}function ex(Z){let[X,J,z,Q,Y]=yF(Z);if(Q!=="*"||z!=="*")return null;if(X===void 0||J===void 0||Y===void 0)return null;let G=KR0(X,J);if(!G)return null;if(Y==="*")return G.startsWith("every ")?G:`every day ${G}`;if(Y==="MON-FRI")return`weekdays ${G}`;if(Y==="SAT,SUN")return`weekends ${G}`;let $=HR0[Y.toUpperCase()];if($)return`${$} ${G}`;return null}function KR0(Z,X){if(X==="*"){if(Z==="*")return"every minute";if(Z.startsWith("*/"))return`every ${Z.slice(2)}m`;if(/^\d+$/.test(Z))return`hourly at :${Z.padStart(2,"0")}`;return null}if(X.startsWith("*/")&&Z==="0")return`every ${X.slice(2)}h`;if(/^\d+$/.test(X)&&/^\d+$/.test(Z))return`at ${X.padStart(2,"0")}:${Z.padStart(2,"0")}`;return null}var yX,QR0,YR0,GR0,$R0,qR0,HR0,UR0;var o50=h(()=>{yX=["minute","hour","dayOfMonth","month","dayOfWeek"];QR0=["*","*/5","*/10","*/15","*/30",...ox(0,59)],YR0=["*","*/2","*/3","*/4","*/6","*/12",...ox(0,23)],GR0=["*",...ox(1,31)],$R0=["*","JAN","FEB","MAR","APR","MAY","JUN","JUL","AUG","SEP","OCT","NOV","DEC"],qR0=["*","MON-FRI","SAT,SUN","MON","TUE","WED","THU","FRI","SAT","SUN"],HR0={MON:"Mondays",TUE:"Tuesdays",WED:"Wednesdays",THU:"Thursdays",FRI:"Fridays",SAT:"Saturdays",SUN:"Sundays"};UR0={minute:QR0,hour:YR0,dayOfMonth:GR0,month:$R0,dayOfWeek:qR0}});function Zy(Z,X){if(!Z)return!0;let J=Z.toLowerCase(),z=X.toLowerCase(),Q=0;for(let Y=0;Y<z.length&&Q<J.length;Y++)if(z.charCodeAt(Y)===J.charCodeAt(Q))Q++;return Q===J.length}function iV(Z,X){let J=s50(X)-s50(Z);if(J!==0)return J;return String(X.id).localeCompare(String(Z.id))}function s50(Z){let X=Date.parse(Z.updatedAt||Z.createdAt);return Number.isFinite(X)?X:0}function t3(Z){let X=Z.split("/").filter(Boolean);return X[X.length-1]??Z}function KY(Z){return Z.trim().replace(/[\\/]+$/,"")||Z}function e3(Z,X){let J=t3(Z);if(!X.some((Q)=>Q!==Z&&t3(Q)===J))return J;return Z.replace(/[\\/]+$/,"").split(/[\\/]+/).slice(-2).join("/")}var M3=()=>{};import{TextAttributes as wF}from"@opentui/core";function i6(Z){let{theme:X}=w0(),J=m0(),z=Z.window.total-Z.window.start-Z.window.items.length;return U0("box",{gap:0,paddingLeft:2,paddingBottom:Z.paddingBottom,children:[Z.window.start>0?y("text",{fg:X.textMuted,wrapMode:"none",children:J("newTask.picker.moreAbove",{count:Z.window.start})}):null,Z.rows.map((Q,Y)=>{let G=Z.window.start+Y,$=G===Z.cursor;return U0("text",{fg:$?X.primary:Q.accent?X.accent:X.textMuted,attributes:$?wF.BOLD:void 0,wrapMode:"none",onMouseUp:()=>Z.onPick(G),children:[$?"\u25B8 ":" ",Q.body]},Q.key)}),z>0?y("text",{fg:X.textMuted,wrapMode:"none",children:J("newTask.picker.moreBelow",{count:z})}):null,Z.footer]})}function Z6(Z,X,J){return X===J?{fg:Z.primary,attributes:wF.BOLD|wF.UNDERLINE}:{fg:Z.textMuted}}function yq(Z){let{theme:X}=w0(),J=Z.arrow!==!1;return U0("box",{flexDirection:"row",flexWrap:"wrap",gap:2,children:[Z.label,Z.choices.map((z)=>{let Q=Z.selected===z,Y=J?Q?"\u25B8 ":" ":"";return y("text",{fg:Q?X.primary:X.textMuted,attributes:Q?wF.BOLD:void 0,wrapMode:"none",flexShrink:0,onMouseUp:()=>Z.onPick(z),children:Y+(Z.display?Z.display(z):z)},z)}),Z.children]})}var wX=h(async()=>{P1();b0();await S1()});import{TextAttributes as wq}from"@opentui/core";function VR0(Z){let{theme:X}=w0(),J=M4(),z=m0(),Q=_7(),[Y,G]=vq.useState(()=>({...l50,repo:Z.defaultRepo??Z.repos[0]??""})),[$,U]=vq.useState("name"),[K,M]=vq.useState(()=>{let n=Z.repos.indexOf(Z.defaultRepo??"");return n>=0?n:0}),[D,W]=vq.useState(null),[j,C]=vq.useState(0),_=yF(Y.schedule),L=(n)=>{U("schedule"),C(Math.min(Math.max(n,0),yX.length-1))},w=()=>{Z.onCancel(),J.clear()},R=(n)=>{G((f)=>({...f,...n})),W(null)},T=(n)=>{let f=Z.repos[X5(n,Z.repos.length)];if(!f)return;M(X5(n,Z.repos.length)),R({repo:f})};function E(){if(p50(Y)){Z.onSubmit({name:Y.name.trim(),repo:Y.repo.trim(),prompt:Y.prompt.trim(),schedule:Y.schedule.trim()}),J.clear();return}let n=d50(Y);if(n)U(n),W(z(`automations.missing.${n}`))}let S=i50(Y.schedule,Date.now()),I=d6(Z.repos,K),k=I.items.map((n,f)=>({key:n,body:e3(n,Z.repos),accent:I.start+f===K}));N1(()=>({bindings:[{key:"tab",cmd:()=>U((n)=>dV(n,1))},{key:"shift+tab",cmd:()=>U((n)=>dV(n,-1))},...$==="repo"?[{key:"up",cmd:()=>T(K-1)},{key:"down",cmd:()=>T(K+1)}]:[],...$==="schedule"?[{key:"left",cmd:()=>C((n)=>rx(n,-1))},{key:"right",cmd:()=>C((n)=>rx(n,1))},{key:"up",cmd:()=>{let n=yX[j];if(!n)return;R({schedule:tx(Y.schedule,j,sx(n,_[j]??"*",1))})}},{key:"down",cmd:()=>{let n=yX[j];if(!n)return;R({schedule:tx(Y.schedule,j,sx(n,_[j]??"*",-1))})}}]:[],...$==="confirm"?[{key:"return",cmd:()=>E()}]:[]]}));let m=(n,f)=>y("text",{fg:$===n?X.primary:X.textMuted,attributes:$===n?wq.BOLD|wq.UNDERLINE:void 0,onMouseUp:()=>U(n),children:f});return U0("box",{paddingLeft:Q,paddingRight:Q,gap:1,children:[U0("box",{flexDirection:"row",justifyContent:"space-between",children:[y("text",{attributes:wq.BOLD,fg:X.text,children:z("automations.newTitle")}),y("text",{fg:X.textMuted,onMouseUp:()=>w(),children:"esc"})]}),U0("box",{gap:0,children:[m("name",z("automations.fieldName")),y("input",{value:Y.name,placeholder:z("automations.namePlaceholder"),focused:$==="name",onMouseUp:()=>U("name"),onInput:(n)=>R({name:n}),onSubmit:()=>U(dV("name"))})]}),U0("box",{gap:0,children:[m("repo",z("automations.fieldRepo")),Z.repos.length===0?y("text",{fg:X.textMuted,children:z("automations.needRepo")}):y(i6,{window:I,cursor:K,rows:k,onPick:T})]}),U0("box",{gap:0,children:[m("prompt",z("automations.fieldPrompt")),y("input",{value:Y.prompt,placeholder:z("automations.promptPlaceholder"),focused:$==="prompt",onMouseUp:()=>U("prompt"),onInput:(n)=>R({prompt:n}),onSubmit:()=>U(dV("prompt"))})]}),U0("box",{gap:0,children:[m("schedule",z("automations.fieldSchedule")),y("box",{flexDirection:"row",gap:2,paddingLeft:1,children:yX.map((n,f)=>{let o=$==="schedule"&&f===j;return U0("box",{flexDirection:"column",onMouseUp:()=>L(f),children:[y("text",{fg:o?X.primary:X.text,attributes:o?wq.BOLD|wq.UNDERLINE:void 0,wrapMode:"none",children:_[f]??"*"}),y("text",{fg:o?X.textMuted:X.borderSubtle,wrapMode:"none",children:z(`automations.cronField.${n}`)})]},n)})}),y("box",{flexDirection:"row",gap:1,paddingLeft:1,children:S.kind==="ok"?y("text",{fg:X.success,wrapMode:"none",children:`${ex(Y.schedule)??""}${ex(Y.schedule)?" \xB7 ":""}${S.relative} \xB7 ${S.absolute}`}):y("text",{fg:X.error,wrapMode:"none",children:S.kind==="never"?z("automations.cronNever"):z("automations.cronInvalid")})})]}),D?U0("text",{fg:X.error,wrapMode:"word",children:["\u203B ",D]}):null,y("box",{flexDirection:"row",justifyContent:"flex-end",paddingTop:1,paddingBottom:1,children:y("text",{fg:$==="confirm"?X.primary:X.text,attributes:$==="confirm"?wq.BOLD:void 0,onMouseUp:()=>E(),children:`[ ${z("common.create")} ]`})})]})}var vq,r50;var t50=h(async()=>{n50();o50();b2();M3();P1();b0();await T1([S1(),v4(),S5(),wX()]);vq=p0(n0(),1);r50={show(Z,X){return x8(Z,(J)=>y(VR0,{repos:X.repos,...X.defaultRepo?{defaultRepo:X.defaultRepo}:{},onSubmit:(z)=>J(z),onCancel:()=>J(void 0)}))}}});import{TextAttributes as vF}from"@opentui/core";function e50(Z,X){if(!Z)return"\u2014";let J=Date.parse(Z);if(!Number.isFinite(J))return"\u2014";let z=J-X,{minutes:Q,hours:Y}=IF(Math.abs(z));if(Q<1)return z>=0?"now":"just now";if(Q<60)return z>=0?`in ${Q}m`:`${Q}m ago`;if(Y<24)return z>=0?`in ${Y}h`:`${Y}h ago`;return new Date(J).toLocaleDateString()}function NR0(Z){return Z.split("/").filter(Boolean).pop()??Z}function Z70(Z){let{theme:X}=w0(),J=M4(),z=m0(),[Q,Y]=X6.useState(null),[G,$]=X6.useState(!1),[U,K]=X6.useState([]),[M,D]=X6.useState(0),[W,j]=X6.useState(null),[C,_]=X6.useState(null),L=()=>D((f)=>f+1);X6.useEffect(()=>{let f=!1,o=Z.orchestrator;if(!o){Y([]);return}let l=()=>{o.listAutomations().then((H0)=>{if(f)return;Y(H0.automations),$(H0.keepsDaemonAlive)}).catch(()=>{if(!f)Y((H0)=>H0??[])})};l();let Z0=setInterval(l,BR0);return()=>{f=!0,clearInterval(Z0)}},[Z.orchestrator,M]);let w=Q??[],[R,T]=X6.useState(0);X6.useEffect(()=>{T((f)=>X5(f,w.length))},[w.length]);let E=w[R];X6.useEffect(()=>{let f=!1,o=Z.orchestrator;if(!o||!E){K([]);return}return o.automationRuns(E.id).then((l)=>{if(!f)K(l.runs)}).catch(()=>{if(!f)K([])}),()=>{f=!0}},[Z.orchestrator,E,M]);async function S(){let f=Z.orchestrator;if(!f||!E||W)return;j(E.id);try{await f.setAutomationEnabled(E.id,!E.enabled),L()}catch(o){_(o instanceof Error?o.message:String(o))}finally{j(null)}}async function I(){let f=Z.orchestrator;if(!f||!E||W)return;j(E.id),_(z("automations.running",{name:E.name}));try{let o=await f.runAutomationNow(E.id);_(z("automations.ranWith",{name:E.name,status:o.status})),L()}catch(o){_(o instanceof Error?o.message:String(o))}finally{j(null)}}async function k(){let f=Z.orchestrator;if(!f||W)return;let o=[...new Set(f.listTasks().map((Z0)=>Z0.repo))].filter(Boolean);if(o.length===0){_(z("automations.needRepo"));return}let l=await r50.show(J,{repos:o,...Z.focusRepo?{defaultRepo:Z.focusRepo}:{}});if(!l)return;j("new");try{await f.createAutomation(l),L()}catch(Z0){_(Z0 instanceof Error?Z0.message:String(Z0))}finally{j(null)}}async function m(){let f=Z.orchestrator;if(!f||!E||W)return;if(await n4.show(J,z("automations.deleteTitle"),z("automations.deleteBody",{name:E.name}),z("common.cancel"),z("automations.deleteButton"))!==!0)return;j(E.id);try{await f.deleteAutomation(E.id),L()}catch(l){_(l instanceof Error?l.message:String(l))}finally{j(null)}}N1(()=>({enabled:Z.focused!==!1,bindings:[...u7(Z.onClose),{key:"j",cmd:()=>T((f)=>X5(f+1,w.length))},{key:"down",cmd:()=>T((f)=>X5(f+1,w.length))},{key:"k",cmd:()=>T((f)=>X5(f-1,w.length))},{key:"up",cmd:()=>T((f)=>X5(f-1,w.length))},{key:"n",cmd:()=>void k()},{key:"r",cmd:()=>L()},{key:"e",cmd:()=>void S()},{key:"s",cmd:()=>void I()},{key:"d",cmd:()=>void m()},{key:"return",cmd:()=>{let f=U.find((o)=>o.taskId)?.taskId;if(f)Z.onOpenTask?.(f)}}]}));let n=Date.now();return U0("box",{flexDirection:"column",flexGrow:1,paddingTop:1,paddingLeft:2,paddingRight:2,children:[U0("box",{flexDirection:"row",gap:1,flexShrink:0,children:[y("text",{attributes:vF.BOLD,fg:X.primary,wrapMode:"none",flexShrink:0,children:z("automations.title")}),y("text",{fg:X.borderSubtle,wrapMode:"none",flexBasis:0,flexGrow:1,flexShrink:1,children:"\u2500".repeat(240)}),y("text",{fg:G?X.success:X.textMuted,wrapMode:"none",flexShrink:0,children:G?z("automations.holdingDaemon"):z("automations.notHolding")})]}),Q===null?y("box",{paddingTop:1,children:y("text",{fg:X.textMuted,children:z("common.loading")})}):w.length===0?U0("box",{flexDirection:"column",paddingTop:1,gap:1,children:[y("text",{fg:X.textMuted,children:z("automations.empty")}),y("text",{fg:X.text,children:z("automations.emptyHint")})]}):y("box",{flexDirection:"column",marginTop:1,flexGrow:1,gap:0,children:w.map((f,o)=>{let l=o===R;return U0("box",{flexDirection:"row",flexShrink:0,border:!0,borderColor:l?X.borderActive:X.borderSubtle,paddingLeft:1,paddingRight:1,gap:1,...l?{backgroundColor:X.backgroundElement}:{},children:[y("text",{fg:f.enabled?X.text:X.textMuted,attributes:l?vF.BOLD:void 0,wrapMode:"none",flexShrink:1,children:f.name}),y("text",{fg:X.borderSubtle,wrapMode:"none",flexBasis:0,flexGrow:1,flexShrink:1,children:"\u2500".repeat(240)}),y("text",{fg:X.textMuted,wrapMode:"none",flexShrink:1,children:`${NR0(f.repo)} \xB7 ${f.schedule}`}),f.enabled?null:y("text",{fg:X.warning,wrapMode:"none",flexShrink:0,children:`${z("automations.paused")} \xB7`}),y("text",{fg:X.textMuted,wrapMode:"none",flexShrink:0,children:e50(f.nextRunAt,n)})]},f.id)})}),y("box",{flexDirection:"column",marginTop:1,border:!0,borderColor:X.border,padding:1,flexShrink:0,children:E?U0(o5,{children:[U0("box",{flexDirection:"row",justifyContent:"space-between",gap:2,children:[y("text",{fg:X.text,wrapMode:"none",flexShrink:1,flexGrow:1,children:E.prompt}),y("text",{fg:W===E.id?X.textMuted:X.primary,attributes:vF.BOLD,wrapMode:"none",flexShrink:0,onMouseUp:()=>void I(),children:z("automations.runNow")})]}),E.precheck?y("text",{fg:X.textMuted,children:z("automations.precheck",{command:E.precheck.command})}):null,y("text",{attributes:vF.BOLD,fg:X.text,children:z("automations.recentRuns")}),U.length===0?y("text",{fg:X.textMuted,children:z("automations.noRuns")}):U.slice(0,5).map((f)=>{let o=MR0[f.status]??"muted",l=o==="success"?X.success:o==="warning"?X.warning:o==="error"?X.error:X.textMuted;return y("text",{fg:l,children:`#${f.runNumber} ${f.status}${f.error?` \u2014 ${f.error}`:""} ${e50(f.at,n)}`},f.id)})]}):y("text",{fg:X.textMuted,children:z("automations.noSelection")})}),C?y("text",{fg:X.textMuted,children:C}):null]})}var X6,BR0=5000,MR0;var X70=h(async()=>{b2();P1();b0();await T1([S1(),v4(),S5(),t9(),t50()]);X6=p0(n0(),1),MR0={dispatched:"success",skipped_precheck:"muted",skipped_missed:"warning",skipped_unavailable:"warning",dispatch_failed:"error"}});function J70(Z){return WR0[Z]??"parked"}var WR0;var z70=h(()=>{WR0={backlog:"active",in_progress:"active",in_review:"parked",error:"parked",done:"terminal",canceled:"terminal",open:"active",doing:"active",hold:"parked"}});function Q70(Z,X,J){let z=Z.find(($)=>$.issues.length>0)?.issues[0]?.id??null;if(X==null)return z;let Q=-1,Y=-1;for(let[$,U]of Z.entries()){let K=U.issues.findIndex((M)=>M.id===X);if(K!==-1){Q=$,Y=K;break}}if(Q===-1)return z;if(J==="up"||J==="down"){let $=Z[Q]?.issues??[],U=J==="up"?Y-1:Y+1;return $[Math.max(0,Math.min(U,$.length-1))]?.id??X}let G=J==="left"?-1:1;for(let $=Q+G;$>=0&&$<Z.length;$+=G){let U=Z[$]?.issues??[];if(U.length===0)continue;return U[Math.min(Y,U.length-1)]?.id??X}return X}function OR0(Z){let X=J70(Z.status);if(X==="terminal")return"done";if(X==="parked")return"parked";if(Z.taskId!==void 0&&Z.taskId!=="")return"in_progress";return"backlog"}function Jy(Z){return Z!==void 0&&jR0.includes(Z)}function Y70(Z,X){let J=0;return{columns:Z.map((Q)=>{if(Q.key!=="in_progress")return Q;let Y=[],G=[];for(let $ of Q.issues)if($.taskId!==void 0&&$.taskId!==""&&Jy(X($.taskId)))Y.push($);else G.push($);return J=Y.length,Y.length===0?Q:{...Q,issues:[...Y,...G]}}),attentionCount:J}}function FR0(Z,X){if(Z.created!==X.created)return Z.created<X.created?1:-1;return X.id-Z.id}function G70(Z){let X={backlog:[],in_progress:[],parked:[],done:[]};for(let J of Z)X[OR0(J)].push(J);return DR0.map((J)=>{let z=J==="done"||J==="parked",Q=X[J].sort(FR0);if(!z||Q.length<=Xy)return{key:J,issues:Q,hiddenCount:0};return{key:J,issues:Q.slice(0,Xy),hiddenCount:Q.length-Xy}})}var DR0,Xy=20,jR0;var zy=h(()=>{z70();DR0=["backlog","in_progress","parked","done"];jR0=["permission_needed","rate_limited","error"]});import{randomBytes as H70}from"crypto";import{existsSync as Qy,mkdirSync as LR0,writeFileSync as _R0}from"fs";import{isAbsolute as AR0,join as CR0}from"path";function TR0(Z){if(Z.startsWith('"')&&Z.endsWith('"')||Z.startsWith("'")&&Z.endsWith("'"))return Z.slice(1,-1);return Z}function SR0(Z){let J=`__DOUBLE_BACKSLASH_${H70(8).toString("hex")}__`;return Z.replace(/\\\\/g,J).replace(/\\(.)/g,"$1").replaceAll(J,"\\")}function U70(Z,X=Qy){let J=SR0(TR0(Z.trim()));if(!ER0.test(J))return null;if(!AR0(J))return null;return X(J)?J:null}function fq(Z,X=Qy){let J=Z.split(`
|
|
710
710
|
`).map((Q)=>Q.trim()).filter((Q)=>Q.length>0);if(J.length===0)return null;let z=[];for(let Q of J){let Y=U70(Q,X);if(!Y)return null;z.push(Y)}return z}function nV(Z,X){return RR0.test(Z)?`pdf[${X}]`:`images[${X}]`}function K70(Z,X){if(X.length===0)return Z;let J=X.map((z,Q)=>`${nV(z,Q)}: ${z}`).join(`
|
|
711
711
|
`);return`${Z}
|
|
712
712
|
|
|
@@ -769,7 +769,7 @@ Follow these steps to create a PR:
|
|
|
769
769
|
- Push to origin.
|
|
770
770
|
- Use \`gh pr create --base {{targetBranch}}\` to create a PR onto the target branch. Keep the title under 80 characters. Keep the description under five sentences. Describe not just changes made in this session but ALL changes since the branch diverged from the target.
|
|
771
771
|
|
|
772
|
-
If any of these steps fail, ask the user for help.`,KI0;var FZ0=h(()=>{QX();QB();KI0=[yw.join(".rove","pr-instructions.md"),yw.join(".kobe","pr-instructions.md")]});function BI0(Z){let X=Z.gather??ww,J=Z.build??jZ0;return async function(){let Q=Z.worktree,Y=Z.sendToEngineFn.current;if(!Q||!Y)return;let G=await X(Q);if(G.branch===G.targetBranch)return Z.notifyError(Z.t("files.toast.prOnTargetBranch",{branch:G.branch}));let $=await J(Q,G);if(Z.selectedWorktreeRef.current!==Q||Z.sendToEngineFn.current!==Y)return;Y($)}}function LZ0(Z){let X=m0();return BI0({...Z,t:X})}var _Z0=h(()=>{FZ0();P1()});import{basename as MI0}from"path";function AZ0(Z){let X=null;try{X=U80(MI0(Z))}catch{return!1}if(!X)return!1;let[J,...z]=[...rG(),"plugin","action","invoke",X.qualifiedAction,Z];return Qz(J,z,{onError:(Q)=>console.warn(`[rove/plugins] ${X?.qualifiedAction}: ${String(Q)}`)})}var CZ0=h(()=>{tG();Ey();YV()});import{join as NI0}from"path";function EZ0(Z){let{orch:X,worktree:J,selectedId:z,focus:Q,openEditorTabFn:Y,openDiffTabFn:G,selectedWorktreeRef:$}=Z;async function U(M){let D=J;if(!D)return;let W=NI0(D,M);X.reportUiEvent("file.will-open",z??void 0,{path:W});let j=(L)=>X.reportUiEvent("file.opened",z??void 0,{path:W,via:L});if(AZ0(W))return j("plugin");let C=Y.current,_=C?await Ce(D,W):null;if(!_)return _F(W),j("external");if($.current!==D||Y.current!==C)return;C?.(["sh","-c",_.command],_.label),j("editor"),Q.setFocused("workspace")}function K(M,D){let W=xD(M);G.current?.(M,W,D)}return{openFileInEditor:U,openDiff:K}}var RZ0=h(()=>{EI();uQ();vx();CZ0()});function TZ0(Z){let{orchestrator:X,worktree:J,selectedId:z,focus:Q,notifyError:Y}=Z,G=SL.useRef(null),$=SL.useRef(null),U=SL.useRef(null),K=z1(J),M=LZ0({worktree:J,sendToEngineFn:$,selectedWorktreeRef:K,notifyError:Y}),{openFileInEditor:D,openDiff:W}=EZ0({orch:X,worktree:J,selectedId:z,focus:Q,openEditorTabFn:G,openDiffTabFn:U,selectedWorktreeRef:K});return{onEditorTabReady:(j)=>{G.current=j},onEngineSendReady:(j)=>{$.current=j},onDiffTabReady:(j)=>{U.current=j},onOpenFile:D,onOpenDiff:W,onCreatePR:()=>void M()}}var SL;var SZ0=h(()=>{F7();_Z0();RZ0();SL=p0(n0(),1)});import{TextAttributes as vw}from"@opentui/core";function LI0(Z,X){if(Z==="permission_needed")return X.warning;if(Z==="turn_complete")return X.success;if(Z==="prompt_deferred")return X.warning;return X.error}function _I0(Z){if(Z==="permission_needed")return"?";if(Z==="turn_complete")return"\u2713";if(Z==="rate_limited")return"\u25F7";if(Z==="prompt_deferred")return"\u2261";return"!"}function AI0(Z){if(Z==="permission_needed")return"workspace.inbox.state.needsInput";if(Z==="turn_complete")return"workspace.inbox.state.done";if(Z==="rate_limited")return"workspace.inbox.state.rateLimited";if(Z==="prompt_deferred")return"workspace.inbox.state.promptDeferred";return"workspace.inbox.state.error"}function xZ0(Z,X,J,z){let Q=X?kV(z,Z,X):void 0;return Q?aJ(Q,J?.vendor??P4):""}function PZ0(Z,X,J){return{label:xZ0(Z.taskId,Z.tabId,X,J),available:_Y(Z,X,(z)=>PX(J,Z.taskId,z))}}function CI0(Z){if(Z.activity?.state!=="running")return;let X=rF;return{glyph:X[Z.frame%X.length]??X[0]??"\u280B",label:Z.t("workspace.inbox.state.running"),color:Z.theme.textMuted}}function TI0(Z){return $6.useSyncExternalStore(Z?JL:EI0,Z?XL:RI0)}function IZ0(Z){let{theme:X}=w0(),J=q5(),z=Math.min(80,J.width-2)-6,Q=` ${Z.age}`,Y=Z.badge?` ${Z.badge.glyph} ${Z.badge.label}`:"",G=(j)=>[...j].reduce((C,_)=>C+pQ(_.codePointAt(0)??0),0),$=z-G(Q)-G(Y),U=Z.badge!==void 0&&$<FI0,K=Z.badge?U?` ${Z.badge.glyph}`:Y:"",M=o3(Z.identity,z-G(Q)-G(K),pQ),D=o3(Z.subtitle,z,pQ),W=xX(X,{cursor:Z.active});return U0("box",{flexDirection:"row",paddingRight:2,backgroundColor:W.backgroundColor,onMouseUp:(j)=>{j.stopPropagation(),Z.onOpen()},children:[U0("box",{flexDirection:"column",flexShrink:0,paddingRight:1,children:[y("text",{fg:W.markerColor,wrapMode:"none",children:W.marker}),y("text",{fg:W.markerColor,wrapMode:"none",children:W.marker})]}),U0("box",{flexDirection:"column",flexBasis:0,flexGrow:1,flexShrink:1,children:[U0("box",{flexDirection:"row",children:[y("text",{fg:X.text,attributes:Z.active?vw.BOLD:void 0,wrapMode:"none",flexBasis:0,flexGrow:1,flexShrink:1,children:M}),Z.badge?y("text",{fg:Z.badge.color,wrapMode:"none",flexShrink:0,children:K}):null,y("text",{fg:X.textMuted,wrapMode:"none",flexShrink:0,children:Q})]}),y("box",{flexDirection:"row",children:y("text",{fg:X.textMuted,wrapMode:"none",flexBasis:0,flexGrow:1,flexShrink:1,children:D})})]})]})}function SI0(Z){let{theme:X}=w0(),J=m0(),z=q5(),[Q,Y]=$6.useState(0),[G,$]=$6.useState(()=>Date.now()),{availableItems:U}=$6.useMemo(()=>EL(Z.items,Z.tasks,(m,n)=>PX(Z.kv,m,n)),[Z.items,Z.tasks,Z.kv]),K=$6.useMemo(()=>Tw(Z.kv),[Z.kv]),M=Z.selectedId?SX(Z.selectedId):null,D=$6.useMemo(()=>qZ0(U,Z.tasks,{selectedId:Z.selectedId,selectedTabId:M,visits:K,tabExists:(m,n)=>PX(Z.kv,m,n)}),[U,Z.tasks,Z.selectedId,M,K,Z.kv]),W=D.filter((m)=>m.kind==="attention").length,j=D.some((m)=>m.kind==="recent"&&Z.engineStates?.get(m.task.id)?.state==="running"),C=TI0(j),_=Math.max(1,Math.min(WI0,Math.floor((z.height-OI0)/DI0))),L=Iw(D,Q),{visible:w,hiddenAbove:R,hiddenBelow:T}=HZ0(D,L,_),E=[...new Set(Z.tasks.map((m)=>m.repo))];$6.useEffect(()=>{if(Q!==L)Y(L)},[Q,L]),$6.useEffect(()=>{let m=setInterval(()=>$(Date.now()),jI0);return()=>clearInterval(m)},[]);function S(m){if(D.length===0)return;Y(Pw(D,L,m))}function I(){return D[L]}function k(m){if(m.kind==="recent"){Z.onOpenTask(m.task.id,m.tabId);return}if(m.kind!=="attention")return;let n=Z.tasks.find((f)=>f.id===m.item.taskId);Z.onOpen(m.item,PZ0(m.item,n,Z.kv).available)}return N1(()=>({bindings:O5({"inbox.nav":(m,n)=>S((n??0)%2===0?1:-1),"inbox.open":()=>{let m=I();if(m)k(m)},"inbox.delete":()=>{let m=I();if(m?.kind==="attention")Z.onDelete(m.item)}})})),U0("box",{flexDirection:"column",paddingLeft:1,paddingRight:1,children:[U0("box",{flexDirection:"row",flexShrink:0,justifyContent:"space-between",children:[U0("box",{flexDirection:"row",children:[y("text",{fg:X.focusAccent,attributes:vw.BOLD,wrapMode:"none",children:J("workspace.inbox.title")}),y("text",{fg:X.textMuted,wrapMode:"none",children:` ${W}`})]}),y("text",{fg:X.textMuted,wrapMode:"none",onMouseUp:Z.onClose,children:"esc"})]}),D.length===0?y("box",{paddingTop:1,paddingBottom:1,children:y("text",{fg:X.textMuted,wrapMode:"none",children:J("workspace.inbox.empty")})}):U0("box",{flexDirection:"column",gap:1,paddingTop:1,paddingBottom:1,children:[R>0?y("text",{fg:X.textMuted,wrapMode:"none",flexShrink:0,children:J("workspace.inbox.more",{count:String(R)})}):null,w.map((m)=>{let n=D.indexOf(m);if(m.kind==="header")return y("text",{fg:X.textMuted,attributes:vw.BOLD,wrapMode:"none",flexShrink:0,children:J(`workspace.inbox.section.${m.section}`)},m.id);let f=n===L,o=()=>{Y(n),k(m)};if(m.kind==="recent"){let q0=e3(m.task.repo,E),u=m.task.kind==="main"?q0:m.task.title,p=xZ0(m.task.id,m.tabId,m.task,Z.kv);return y(IZ0,{identity:p?`${q0} \u203A ${p}`:u===q0?q0:`${q0} \u203A ${u}`,subtitle:u,badge:CI0({activity:Z.engineStates?.get(m.task.id),task:m.task,frame:C,theme:X,t:J}),age:vX(m.at,G),active:f,onOpen:o},m.id)}let l=m.item,Z0=Z.tasks.find((q0)=>q0.id===l.taskId),H0=PZ0(l,Z0,Z.kv),N0=Z0?.title??l.taskId,B0=Z0?e3(Z0.repo,E):"";return y(IZ0,{identity:H0.label?`${B0} \u203A ${H0.label}`:B0||N0,subtitle:N0,badge:{glyph:_I0(l.state),label:J(AI0(l.state)),color:LI0(l.state,X)},age:vX(l.at,G),active:f,onOpen:o},m.id)}),T>0?y("text",{fg:X.textMuted,wrapMode:"none",flexShrink:0,children:J("workspace.inbox.more",{count:String(T)})}):null]}),U0("box",{flexDirection:"row",flexShrink:0,gap:2,paddingTop:1,children:[y("text",{fg:X.textMuted,wrapMode:"none",children:J("workspace.inbox.openHint")}),y("text",{fg:X.textMuted,wrapMode:"none",children:J("workspace.inbox.
|
|
772
|
+
If any of these steps fail, ask the user for help.`,KI0;var FZ0=h(()=>{QX();QB();KI0=[yw.join(".rove","pr-instructions.md"),yw.join(".kobe","pr-instructions.md")]});function BI0(Z){let X=Z.gather??ww,J=Z.build??jZ0;return async function(){let Q=Z.worktree,Y=Z.sendToEngineFn.current;if(!Q||!Y)return;let G=await X(Q);if(G.branch===G.targetBranch)return Z.notifyError(Z.t("files.toast.prOnTargetBranch",{branch:G.branch}));let $=await J(Q,G);if(Z.selectedWorktreeRef.current!==Q||Z.sendToEngineFn.current!==Y)return;Y($)}}function LZ0(Z){let X=m0();return BI0({...Z,t:X})}var _Z0=h(()=>{FZ0();P1()});import{basename as MI0}from"path";function AZ0(Z){let X=null;try{X=U80(MI0(Z))}catch{return!1}if(!X)return!1;let[J,...z]=[...rG(),"plugin","action","invoke",X.qualifiedAction,Z];return Qz(J,z,{onError:(Q)=>console.warn(`[rove/plugins] ${X?.qualifiedAction}: ${String(Q)}`)})}var CZ0=h(()=>{tG();Ey();YV()});import{join as NI0}from"path";function EZ0(Z){let{orch:X,worktree:J,selectedId:z,focus:Q,openEditorTabFn:Y,openDiffTabFn:G,selectedWorktreeRef:$}=Z;async function U(M){let D=J;if(!D)return;let W=NI0(D,M);X.reportUiEvent("file.will-open",z??void 0,{path:W});let j=(L)=>X.reportUiEvent("file.opened",z??void 0,{path:W,via:L});if(AZ0(W))return j("plugin");let C=Y.current,_=C?await Ce(D,W):null;if(!_)return _F(W),j("external");if($.current!==D||Y.current!==C)return;C?.(["sh","-c",_.command],_.label),j("editor"),Q.setFocused("workspace")}function K(M,D){let W=xD(M);G.current?.(M,W,D)}return{openFileInEditor:U,openDiff:K}}var RZ0=h(()=>{EI();uQ();vx();CZ0()});function TZ0(Z){let{orchestrator:X,worktree:J,selectedId:z,focus:Q,notifyError:Y}=Z,G=SL.useRef(null),$=SL.useRef(null),U=SL.useRef(null),K=z1(J),M=LZ0({worktree:J,sendToEngineFn:$,selectedWorktreeRef:K,notifyError:Y}),{openFileInEditor:D,openDiff:W}=EZ0({orch:X,worktree:J,selectedId:z,focus:Q,openEditorTabFn:G,openDiffTabFn:U,selectedWorktreeRef:K});return{onEditorTabReady:(j)=>{G.current=j},onEngineSendReady:(j)=>{$.current=j},onDiffTabReady:(j)=>{U.current=j},onOpenFile:D,onOpenDiff:W,onCreatePR:()=>void M()}}var SL;var SZ0=h(()=>{F7();_Z0();RZ0();SL=p0(n0(),1)});import{TextAttributes as vw}from"@opentui/core";function LI0(Z,X){if(Z==="permission_needed")return X.warning;if(Z==="turn_complete")return X.success;if(Z==="prompt_deferred")return X.warning;return X.error}function _I0(Z){if(Z==="permission_needed")return"?";if(Z==="turn_complete")return"\u2713";if(Z==="rate_limited")return"\u25F7";if(Z==="prompt_deferred")return"\u2261";return"!"}function AI0(Z){if(Z==="permission_needed")return"workspace.inbox.state.needsInput";if(Z==="turn_complete")return"workspace.inbox.state.done";if(Z==="rate_limited")return"workspace.inbox.state.rateLimited";if(Z==="prompt_deferred")return"workspace.inbox.state.promptDeferred";return"workspace.inbox.state.error"}function xZ0(Z,X,J,z){let Q=X?kV(z,Z,X):void 0;return Q?aJ(Q,J?.vendor??P4):""}function PZ0(Z,X,J){return{label:xZ0(Z.taskId,Z.tabId,X,J),available:_Y(Z,X,(z)=>PX(J,Z.taskId,z))}}function CI0(Z){if(Z.activity?.state!=="running")return;let X=rF;return{glyph:X[Z.frame%X.length]??X[0]??"\u280B",label:Z.t("workspace.inbox.state.running"),color:Z.theme.textMuted}}function TI0(Z){return $6.useSyncExternalStore(Z?JL:EI0,Z?XL:RI0)}function IZ0(Z){let{theme:X}=w0(),J=q5(),z=Math.min(80,J.width-2)-6,Q=` ${Z.age}`,Y=Z.badge?` ${Z.badge.glyph} ${Z.badge.label}`:"",G=(j)=>[...j].reduce((C,_)=>C+pQ(_.codePointAt(0)??0),0),$=z-G(Q)-G(Y),U=Z.badge!==void 0&&$<FI0,K=Z.badge?U?` ${Z.badge.glyph}`:Y:"",M=o3(Z.identity,z-G(Q)-G(K),pQ),D=o3(Z.subtitle,z,pQ),W=xX(X,{cursor:Z.active});return U0("box",{flexDirection:"row",paddingRight:2,backgroundColor:W.backgroundColor,onMouseUp:(j)=>{j.stopPropagation(),Z.onOpen()},children:[U0("box",{flexDirection:"column",flexShrink:0,paddingRight:1,children:[y("text",{fg:W.markerColor,wrapMode:"none",children:W.marker}),y("text",{fg:W.markerColor,wrapMode:"none",children:W.marker})]}),U0("box",{flexDirection:"column",flexBasis:0,flexGrow:1,flexShrink:1,children:[U0("box",{flexDirection:"row",children:[y("text",{fg:X.text,attributes:Z.active?vw.BOLD:void 0,wrapMode:"none",flexBasis:0,flexGrow:1,flexShrink:1,children:M}),Z.badge?y("text",{fg:Z.badge.color,wrapMode:"none",flexShrink:0,children:K}):null,y("text",{fg:X.textMuted,wrapMode:"none",flexShrink:0,children:Q})]}),y("box",{flexDirection:"row",children:y("text",{fg:X.textMuted,wrapMode:"none",flexBasis:0,flexGrow:1,flexShrink:1,children:D})})]})]})}function SI0(Z){let{theme:X}=w0(),J=m0(),z=q5(),[Q,Y]=$6.useState(0),[G,$]=$6.useState(()=>Date.now()),{availableItems:U}=$6.useMemo(()=>EL(Z.items,Z.tasks,(m,n)=>PX(Z.kv,m,n)),[Z.items,Z.tasks,Z.kv]),K=$6.useMemo(()=>Tw(Z.kv),[Z.kv]),M=Z.selectedId?SX(Z.selectedId):null,D=$6.useMemo(()=>qZ0(U,Z.tasks,{selectedId:Z.selectedId,selectedTabId:M,visits:K,tabExists:(m,n)=>PX(Z.kv,m,n)}),[U,Z.tasks,Z.selectedId,M,K,Z.kv]),W=D.filter((m)=>m.kind==="attention").length,j=D.some((m)=>m.kind==="recent"&&Z.engineStates?.get(m.task.id)?.state==="running"),C=TI0(j),_=Math.max(1,Math.min(WI0,Math.floor((z.height-OI0)/DI0))),L=Iw(D,Q),{visible:w,hiddenAbove:R,hiddenBelow:T}=HZ0(D,L,_),E=[...new Set(Z.tasks.map((m)=>m.repo))];$6.useEffect(()=>{if(Q!==L)Y(L)},[Q,L]),$6.useEffect(()=>{let m=setInterval(()=>$(Date.now()),jI0);return()=>clearInterval(m)},[]);function S(m){if(D.length===0)return;Y(Pw(D,L,m))}function I(){return D[L]}function k(m){if(m.kind==="recent"){Z.onOpenTask(m.task.id,m.tabId);return}if(m.kind!=="attention")return;let n=Z.tasks.find((f)=>f.id===m.item.taskId);Z.onOpen(m.item,PZ0(m.item,n,Z.kv).available)}return N1(()=>({bindings:O5({"inbox.nav":(m,n)=>S((n??0)%2===0?1:-1),"inbox.open":()=>{let m=I();if(m)k(m)},"inbox.delete":()=>{let m=I();if(m?.kind==="attention")Z.onDelete(m.item)}})})),U0("box",{flexDirection:"column",paddingLeft:1,paddingRight:1,children:[U0("box",{flexDirection:"row",flexShrink:0,justifyContent:"space-between",children:[U0("box",{flexDirection:"row",children:[y("text",{fg:X.focusAccent,attributes:vw.BOLD,wrapMode:"none",children:J("workspace.inbox.title")}),y("text",{fg:X.textMuted,wrapMode:"none",children:` ${W}`})]}),y("text",{fg:X.textMuted,wrapMode:"none",onMouseUp:Z.onClose,children:"esc"})]}),D.length===0?y("box",{paddingTop:1,paddingBottom:1,children:y("text",{fg:X.textMuted,wrapMode:"none",children:J("workspace.inbox.empty")})}):U0("box",{flexDirection:"column",gap:1,paddingTop:1,paddingBottom:1,children:[R>0?y("text",{fg:X.textMuted,wrapMode:"none",flexShrink:0,children:J("workspace.inbox.more",{count:String(R)})}):null,w.map((m)=>{let n=D.indexOf(m);if(m.kind==="header")return y("text",{fg:X.textMuted,attributes:vw.BOLD,wrapMode:"none",flexShrink:0,children:J(`workspace.inbox.section.${m.section}`)},m.id);let f=n===L,o=()=>{Y(n),k(m)};if(m.kind==="recent"){let q0=e3(m.task.repo,E),u=m.task.kind==="main"?q0:m.task.title,p=xZ0(m.task.id,m.tabId,m.task,Z.kv);return y(IZ0,{identity:p?`${q0} \u203A ${p}`:u===q0?q0:`${q0} \u203A ${u}`,subtitle:u,badge:CI0({activity:Z.engineStates?.get(m.task.id),task:m.task,frame:C,theme:X,t:J}),age:vX(m.at,G),active:f,onOpen:o},m.id)}let l=m.item,Z0=Z.tasks.find((q0)=>q0.id===l.taskId),H0=PZ0(l,Z0,Z.kv),N0=Z0?.title??l.taskId,B0=Z0?e3(Z0.repo,E):"";return y(IZ0,{identity:H0.label?`${B0} \u203A ${H0.label}`:B0||N0,subtitle:N0,badge:{glyph:_I0(l.state),label:J(AI0(l.state)),color:LI0(l.state,X)},age:vX(l.at,G),active:f,onOpen:o},m.id)}),T>0?y("text",{fg:X.textMuted,wrapMode:"none",flexShrink:0,children:J("workspace.inbox.more",{count:String(T)})}):null]}),U0("box",{flexDirection:"row",flexShrink:0,gap:2,paddingTop:1,children:[y("text",{fg:X.textMuted,wrapMode:"none",children:J("workspace.inbox.openHint")}),y("text",{fg:X.textMuted,wrapMode:"none",children:J("workspace.inbox.clearHint")})]})]})}function PL(Z){let X=M4(),J=P8(),z=H4(Z.orchestrator.attentionInboxSignal()),Q=H4(Z.orchestrator.tasksSignal()),Y=H4(Z.orchestrator.engineStateSignal());return y(SI0,{items:z,tasks:Q,kv:J,selectedId:Z.selectedId,engineStates:Y,onOpen:Z.onOpen,onOpenTask:Z.onOpenTask,onDelete:Z.onDelete,onClose:()=>X.clear()})}var $6,WI0=6,DI0=3,OI0=12,jI0=30000,FI0=16,EI0=()=>()=>{},RI0=()=>0;var yZ0=h(async()=>{by();aV();uy();M3();h5();w7();s3();I8();P1();i3();RL();K8();b0();await T1([Z5(),S1(),v4(),S5()]);$6=p0(n0(),1);PL.show=(Z,X)=>{Z.replace(()=>y(PL,{...X})),Z.setSize("medium"),Z.setPlacement("upper-fifth")}});async function wZ0(Z){let X=await ZX();if(!X)return"unavailable";try{let J=`${Z.taskId}::${Z.tabId}`,z;try{z=await E$(X.rpc,J,Z.prompt,{screenManifest:Z.manifest})}catch(Q){if(Q instanceof u3)return"deferred-again";throw Q}if(!z)return"unavailable";return await Z.orch.resolveDeferredPrompt(Z.deferredId),"inserted"}finally{X.close()}}function vZ0(Z){return Z?O1(Z).screenManifest:void 0}var fZ0=h(()=>{R$();e4()});function AY(Z,X,J){Z.catch((z)=>J(`Couldn't ${X}: ${J1(z)}`))}var fw=()=>{};function bZ0(Z,X,J,z){return AY(J.dismissAttention(Z.taskId,Z.tabId,Z.at),"dismiss",z),X}var gZ0=h(()=>{fw()});function CY(Z){return`${YZ0(Z)}\x00${Z.at}`}function IL(Z){return Z.map(CY).sort().join(`
|
|
773
773
|
`)}function kZ0(Z){let{orchestrator:X}=Z,J=m0(),{availableItems:z,unavailableItems:Q}=ZZ.useMemo(()=>EL(Z.items,Z.tasks,(I,k)=>PX(Z.kv,I,k)),[Z.items,Z.tasks,Z.kv]),Y=Z.selectedId?new Set(Sw(z,{taskId:Z.selectedId,tabId:SX(Z.selectedId)}).map(CY)):null,G=Y&&Y.size>0?z.filter((I)=>!Y.has(CY(I))):z,$=GZ0(G),U=z1(Z.notifyError),K=z1(Q),M=IL(Q),D=ZZ.useRef(new Set);ZZ.useEffect(()=>{let I=K.current;if(IL(I)!==M)return;let k=new Set(I.map(CY));for(let m of D.current)if(!k.has(m))D.current.delete(m);for(let m of I){let n=CY(m);if(D.current.has(n))continue;D.current.add(n),AY(X.dismissAttention(m.taskId,m.tabId,m.at),"dismiss",U.current)}},[M,X]);async function W(I,k,m){try{let n=await X.getDeferredPrompt(k);if(!n){AY(X.dismissAttention(I.taskId,I.tabId,I.at),"dismiss",Z.notifyError);return}let f=await wZ0({orch:X,taskId:I.taskId,tabId:I.tabId??"tab-1",prompt:n.prompt,deferredId:k,manifest:vZ0(m)});if(f==="deferred-again")Z.notifyInfo(J("workspace.inbox.deferredStillQueued"));else if(f==="unavailable")Z.notifyInfo(J("workspace.inbox.deferredUnavailable"))}catch{Z.notifyError(J("workspace.inbox.deferredInsertFailed"))}}function j(I,k){let m=X.getTask(I.taskId),n=k??_Y(I,m,(o)=>PX(Z.kv,I.taskId,o)),f=I.detail?.deferredPrompt?.id;if(I.state==="prompt_deferred"&&I.tabId&&f){if(Z.dialog.stack.length>0)Z.dialog.clear({refocus:!1});Z.selectTask(I.taskId),Oz(I.taskId,I.tabId),Z.focusWorkspace(),W(I,f,m?.vendor);return}if(!bZ0(I,n,X,Z.notifyError))return;if(Z.dialog.stack.length>0)Z.dialog.clear({refocus:!1});if(Z.selectTask(I.taskId),I.tabId)Oz(I.taskId,I.tabId);Z.focusWorkspace()}function C(I,k){if(Z.dialog.stack.length>0)Z.dialog.clear({refocus:!1});if(Z.selectTask(I),k)Oz(I,k);Z.focusWorkspace()}function _(){PL.show(Z.dialog,{orchestrator:X,selectedId:Z.selectedId,onOpen:j,onOpenTask:C,onDelete:(I)=>AY(X.dismissAttention(I.taskId,I.tabId,I.at),"dismiss",Z.notifyError)})}let L=z1(z),w=IL(z),R=z1(Z.selectedId),T=ZZ.useRef(new Set),E=ZZ.useCallback((I,k)=>{let m=new Set(I.map(CY));for(let n of T.current)if(!m.has(n))T.current.delete(n);for(let n of Sw(I,k)){let f=CY(n);if(T.current.has(f))continue;T.current.add(f),AY(X.dismissAttention(n.taskId,n.tabId,n.at),"dismiss",U.current)}},[X]);function S(I,k){E(L.current,{taskId:I,tabId:k}),QZ0(Z.kv,{taskId:I,tabId:k,at:Date.now()})}return ZZ.useEffect(()=>{let I=L.current;if(IL(I)!==w)return;let k=R.current;if(!k)return;let m=SX(k);if(!m)return;E(I,{taskId:k,tabId:m})},[w,E]),{availableItems:G,counts:$,openItem:j,show:_,resolveVisited:S}}var ZZ;var mZ0=h(async()=>{P1();F7();RL();fZ0();gZ0();fw();K8();await yZ0();ZZ=p0(n0(),1)});function hZ0(Z){let X=fJ(Z.vendor),{sessionId:J}=x9(X,Z.vendor),z=m6(),Q={...z.tabs[0],sessionId:J},Y={...z,tabs:[Q]},G=w$(Y,Q,X,{live:!1,shell:Z.shell??F5(),prompt:j70(Z.issue,Z.api),task:{id:Z.taskId,kind:"task",vendor:Z.vendor,repo:Z.repoRoot},worktreePath:Z.worktreePath});return{ptyKey:q7(Z.taskId,Q.id),command:G.command,initialInput:G.initialInput,firstMessage:G.firstMessage,engineBin:G.engineBin,tabsSnapshot:lQ(Y,Q.id,!0)}}function uZ0(Z){let X=fJ(Z.vendor),J={...Z.tab,spawned:!1},z={tabs:[J],activeId:J.id,nextOrdinal:J.ordinal+1},Q=w$(z,J,X,{live:!1,shell:Z.shell??F5(),prompt:Z.prompt,task:{id:Z.taskId,kind:"main",vendor:Z.vendor,repo:Z.repoRoot},worktreePath:Z.worktreePath});return{ptyKey:q7(Z.taskId,J.id),command:Q.command,firstMessage:Q.firstMessage,engineBin:Q.engineBin}}var cZ0=h(()=>{E2();Q8();gF();B3();h5()});function lZ0(Z,X){let J=m0(),z=P8();async function Q(K){X.closeKanban(),X.selectTask(K),await X.enterTask(K)}async function Y(K,M){if(K.jump)await Q(M);else X.notifyInfo(J("kanban.detail.startedBackground",{title:Gy(K.issue)}))}async function G(K,M){let{repoRoot:D,issue:W,vendor:j}=K,C=await Z.ensureMainTask(D);await Z.setVendor(C.id,j),await Z.mutateIssue(D,{type:"setStatus",id:W.id,status:"doing"}).catch((w)=>console.error("[rove kanban] issue setStatus failed:",w));let{tab:_}=Ix(z,C.id,F5(),{vendor:j}),L=uZ0({taskId:C.id,repoRoot:D,worktreePath:C.worktreePath,tab:_,vendor:j,prompt:F70(W,M)});N4().acquire(L.ptyKey,C.worktreePath,{command:L.command,firstMessage:L.firstMessage,engineBin:L.engineBin}),await Y(K,C.id)}async function $(K,M){let{repoRoot:D,issue:W,vendor:j}=K;zX(D,j),AQ(D);let C=await Z.createTask({repo:D,title:Gy(W),vendor:j});await Z.mutateIssue(D,{type:"link",id:W.id,taskId:C.id}).catch((w)=>console.error("[rove kanban] issue link failed:",w));let _=await Z.ensureWorktree(C.id),L=hZ0({issue:W,taskId:C.id,repoRoot:D,worktreePath:_,vendor:j,api:M});return N4().acquire(L.ptyKey,_,{command:L.command,initialInput:L.initialInput,firstMessage:L.firstMessage,engineBin:L.engineBin}),z.set(m5(C.id),L.tabsSnapshot),{task:C,worktreePath:_,tab:L.tabsSnapshot.tabs[0]}}async function U(K){try{let M=w6();if(K.placement==="project"){await G(K,M);return}let{task:D,worktreePath:W,tab:j}=await $(K,M);if(K.placement==="projectWorktree"){let C=await Z.ensureMainTask(K.repoRoot);Ix(z,C.id,F5(),{vendor:K.vendor,sessionId:j.sessionId??null,ptyTask:{id:D.id,worktree:W}}),await Y(K,C.id);return}await Y(K,D.id)}catch(M){X.notifyError(`Couldn't start issue chat: ${J1(M)}`)}}return{start:U}}var pZ0=h(()=>{Q8();gF();s4();c9();B3();Y2();cZ0();I8();P1();K8()});import{readlinkSync as PI0}from"fs";function II0(Z){for(let X of Z.split(`
|
|
774
774
|
`))if(X.startsWith("n")&&X.length>1)return X.slice(1);return null}async function dZ0(Z,X=xI0){if(!Number.isInteger(Z)||Z<=0)return null;try{return PI0(`/proc/${Z}/cwd`)}catch{}try{return II0(await X(Z))}catch{return null}}var xI0=async(Z)=>{let X=Bun.spawn(["lsof","-a","-p",String(Z),"-d","cwd","-Fn"],{stdout:"pipe",stderr:"ignore"});return await new Response(X.stdout).text()};var iZ0=()=>{};function nZ0(Z){if(!Z.repoRoot||!Z.harnessLive)return{kind:"stay"};let X=Z.ownerTasks.filter((J)=>J.dir!=="");if(Z.cwd){let J=Z.cwd,z=X.find((Q)=>Q.kind==="task"&&yI0(J,Q.dir));if(z)return{kind:"fold",taskId:z.id}}for(let J of["main","dir"]){let z=X.find((Q)=>Q.kind===J&&(Q.dir===Z.cwd||Q.dir===Z.repoRoot));if(z)return{kind:"fold",taskId:z.id}}return{kind:"adopt",repo:Z.repoRoot,known:Z.knownRepos.has(Z.repoRoot)}}var yI0=(Z,X)=>Z===X||Z.startsWith(`${X}/`);async function wI0(Z,X){if((process.env.KOBE_TERMINAL_BACKEND??"hosted")!=="hosted")return!1;try{return(await(await HY()).request("pty.rename",{from:Z,to:X})).renamed===!0}catch{return!1}}async function aZ0(Z,X,J){let z=Z.rename??wI0,Q=(Dz(Z.kv,X)?.tabs??[{id:"tab-1"}]).map(($)=>$.id),Y=1+(Dz(Z.kv,J)?.tabs??[]).reduce(($,U)=>Math.max($,vI0(U.id)),0),G=[];for(let $ of Q){let U=q7(X,$),K=await z(U,q7(J,`tab-${Y}`));if(!K)Y++,K=await z(U,q7(J,`tab-${Y}`));if(!K)continue;G.push(`tab-${Y}`),Y++}if(G.length===0)return null;return HL(Z.kv,J,G),{activeTabId:G[0]}}var vI0=(Z)=>Number(/^tab-(\d+)$/.exec(Z)?.[1]??0);var oZ0=h(()=>{jq();h5();ay();K8()});function bI0(Z){return Z.filter((X)=>!X.deletion&&X.scratch!==!0&&X.worktreePath!=="").map((X)=>({id:X.id,kind:X.kind??"task",dir:MX(X.worktreePath)}))}function rZ0(Z){let{tasks:X,orchestrator:J,kv:z,notifyInfo:Q}=Z,Y=z1(Z.onFold),G=Z.enabled??!0,$=X.filter((U)=>U.kind==="dir"&&U.scratch===!0).map((U)=>U.id).join(",");sZ0.useEffect(()=>{if(!G||$==="")return;let U=!1,K=new Set,M=async()=>{let W=X.filter((w)=>w.kind==="dir"&&w.scratch===!0);if(W.length===0)return;let j=new Set([...v3(),...X.map((w)=>w.repo)]),C=bI0(X),_=N4(),L=mX();for(let w of W){if(K.has(w.id))continue;let R=q7(w.id,"tab-1"),T=_.get(R)?.shellPid??null;if(T===null||T===void 0)continue;if(!L.get(R))continue;let E=await dZ0(T);if(U||!E)continue;let S=MX(E),I=MX(RJ(S)),k=nZ0({cwd:S,repoRoot:fA(I)?I:null,harnessLive:!0,knownRepos:j,ownerTasks:C});if(U||k.kind==="stay")continue;K.add(w.id);try{if(k.kind==="fold"){let m=await aZ0({kv:z},w.id,k.taskId);if(!m)throw Error("fold did not move any session");await Y.current(w.id,k.taskId,m.activeTabId);continue}if(await J.adoptScratchRepo(w.id,k.repo),!k.known)Q(U1("tasks.toast.scratchAdopted",{repo:t3(k.repo)}))}catch{K.delete(w.id)}}};M();let D=setInterval(()=>void M(),fI0);return()=>{U=!0,clearInterval(D)}},[G,$,J,z,Q,X])}var sZ0,fI0=5000;var tZ0=h(()=>{iZ0();zj();s4();c3();M3();Y2();YB();h5();F7();oZ0();sZ0=p0(n0(),1)});import{homedir as gI0}from"os";function ZX0(Z){let{orchestrator:X,enterTask:J,forgetTaskTabs:z,notifyError:Q}=Z;return rZ0({tasks:Z.tasks,orchestrator:X,kv:Z.kv,notifyInfo:Z.notifyInfo,onFold:async($,U,K)=>{if(Z.selectedId()===$)Z.selectTask(U),Oz(U,K);await X.deleteTask($,{force:!0}),z($)}}),{openScratchShell:()=>{X.openDirectoryTask({dir:gI0(),scratch:!0}).then(($)=>J($.id)).catch(($)=>Q(U1("tasks.toast.scratchOpenFailed",{message:$ instanceof Error?$.message:String($)})))},onScratchExit:($)=>{if(eZ0.has($))return;eZ0.add($),(async()=>{try{await X.deleteTask($,{force:!0}),z($),await Uw({orch:X,tasks:Z.tasks,taskId:$,logger:console,logPrefix:"[rove scratch]",updateActiveTask:!0})}catch(U){Q(U1("tasks.toast.scratchCloseFailed",{message:U instanceof Error?U.message:String(U)}))}})()}}}var eZ0;var XX0=h(()=>{c3();Kw();K8();tZ0();eZ0=new Set});async function JX0(Z,X){let J=Z.getTask(X);if(J?.deletion)return Z.reportError(new sJ(X)),!1;if(!J?.worktreePath)try{await Z.ensureWorktree(X)}catch(z){return Z.reportError(z),!1}if(Z.isCurrent?.()===!1)return!1;return Z.selectTask(X),Z.focusWorkspace(),!0}function zX0(Z,X,J){let z=(G)=>G?Z.find(($)=>$.id===G&&!$.deletion):void 0,Q=z(X)??z(J);if(Q)return Q;let Y=Z.filter((G)=>!G.deletion);if(Y.length>0)return Y.reduce((G,$)=>$.updatedAt>G.updatedAt?$:G);return Z.find((G)=>!G.deletion)}var QX0=h(()=>{YX()});function YX0(Z){let{orch:X,tasks:J,activeTaskId:z,kv:Q}=Z,[Y,G]=m2.useState(()=>X.activeTaskSignal()()??qq()),$=m2.useRef(!1),U=m2.useRef(!1),K=m2.useRef(!1);m2.useEffect(()=>{if(!$.current&&z&&J.some((R)=>R.id===z)){if($.current=!0,!U.current&&Y!==z){G(z);return}}if(!K.current&&!U.current&&Y&&J.some((R)=>R.id===Y))K.current=!0,Z.focusWorkspace();if(Y&&J.some((R)=>R.id===Y&&!R.deletion))return;G(zX0(J,z,qq())?.id??null)},[J,z,Y,Z.focusWorkspace]);let M=m2.useRef(!1);m2.useEffect(()=>{if(M.current||J.length===0)return;M.current=!0,Iu(Q,J.map((R)=>R.id))},[J,Q]);let D=z1(Z.notifyWorktreeGone),W=m2.useRef(new Set),j=m2.useRef(new Map);m2.useEffect(()=>{let R=new Set(J.filter((S)=>!S.deletion).map((S)=>S.id)),T=N4();for(let S of W.current)if(!R.has(S))T.releaseWhere((I)=>I===S||I.startsWith(`${S}::`));W.current=R;let E=new Map;for(let S of J)E.set(S.id,S.worktreePath);for(let[S,I]of j.current)if(E.get(S)===""&&I!==""){let m=Dz(Q,S)?.tabs.length??0;T.releaseWhere((f)=>f===S||f.startsWith(`${S}::`)),mV(Q,S);let n=J.find((f)=>f.id===S);D.current?.({taskId:S,title:n?.title??S,branch:n?.branch??"",closed:m})}j.current=E},[J,Q]);function C(R){if(U.current=!0,Y===R){if(X.activeTaskSignal()()!==R)X.setActiveTask(R).catch((E)=>console.error("[rove workspace] setActiveTask failed:",E));return}G(R),X.setActiveTask(R).catch((E)=>console.error("[rove workspace] setActiveTask failed:",E));let T=J.find((E)=>E.id===R)?.kind==="main"?"project.opened":"task.opened";X.reportUiEvent(T,R)}let _=m2.useRef(0);async function L(R){let T=++_.current;await JX0({getTask:(E)=>J.find((S)=>S.id===E),ensureWorktree:(E)=>X.ensureWorktree(E),selectTask:C,focusWorkspace:Z.focusWorkspace,reportError:(E)=>console.error("[rove workspace] task.ensureWorktree failed:",E),isCurrent:()=>_.current===T},R)}let w=Y?J.find((R)=>R.id===Y):void 0;return{selectedId:Y,setSelectedId:G,selectedTask:w,selectTask:C,activateTask:L}}var m2;var GX0=h(()=>{Xj();Y2();F7();K8();QX0();m2=p0(n0(),1)});function $X0(Z){let{kv:X,focus:J}=Z,[z,Q]=xL.useState(()=>X.get(kq,!1)===!0);function Y(){let G=!z;if(Q(G),X.set(kq,G),G)J.setFocused("workspace")}return xL.useEffect(()=>{if(J.focused==="files")Q(!1)},[J.focused]),{zen:z,toggleZen:Y}}var xL;var qX0=h(()=>{Sy();xL=p0(n0(),1)});var HX0={};o1(HX0,{startWorkspaceHost:()=>mI0});function kI0(Z){let{theme:X,transparentBackground:J}=w0(),z=J?X.border:X.borderSubtle,Q=M4(),Y=P8(),G=IO(),$=q5(),U=a9(),K=Z.orchestrator;f40(K,U.notify,Q);let{tasks:M,activeTaskId:D,engineState:W,engineLifecycle:j,engineTabState:C,sidebarEngineState:_,inboxItems:L,taskJobs:w,worktreeChanges:R,transcriptActivity:T}=DZ0(K),[E,S]=yL.useState(!1),I=m0(),k=(X1)=>{U.notify({kind:"error",taskId:X1.taskId,tabId:"",title:I("tasks.toast.worktreeGoneTitle",{title:X1.title}),body:I("tasks.toast.worktreeGoneBody",{count:String(X1.closed),branch:X1.branch||"\u2014"})})},{selectedId:m,setSelectedId:n,selectedTask:f,selectTask:o,activateTask:l}=YX0({orch:K,tasks:M,activeTaskId:D,focusWorkspace:()=>G.setFocused("workspace"),kv:Y,notifyWorktreeGone:k}),Z0=f?.worktreePath||null,{sortMode:H0,toggleSortMode:N0,moveMode:B0,setMoveMode:q0,notifyError:u,notifyInfo:p,onLocalMergeRequest:r}=g40({kv:Y,notif:U,tasks:M,selectedId:m,setSelectedId:n}),i=kZ0({orchestrator:K,items:L,tasks:M,kv:Y,dialog:Q,selectedId:m,selectTask:o,focusWorkspace:()=>G.setFocused("workspace"),notifyError:u,notifyInfo:p}),{jumpToNextAttention:K0}=VZ0({tasks:M,engineState:W,engineTabState:C,inboxItems:i.availableItems,selectedId:m,kv:Y,notif:U,openAttention:i.openItem,noTasksMessage:I("workspace.attention.none")}),{createTask:e,deleteTask:a,renameTask:X0,renameBranch:O0,cycleVendor:Q0,togglePin:A0,moveTask:I0}=E60({orchestrator:K,tasks:()=>M,dialog:Q,notifyError:u,notifyInfo:p,selectedId:()=>m,setSelectedId:n,selectedTask:()=>f,activateTask:l,forgetTaskTabs:(X1)=>mV(Y,X1)}),_0=TZ0({orchestrator:K,worktree:Z0,selectedId:m,focus:G,notifyError:u}),S0=M70(K,{selectTask:n,enterTask:l,notifyError:u}),y0=ZX0({orchestrator:K,tasks:M,kv:Y,selectedId:()=>m,selectTask:n,enterTask:(X1)=>void l(X1),forgetTaskTabs:(X1)=>mV(Y,X1),notifyError:u,notifyInfo:p}),{zen:v0,toggleZen:a0}=$X0({kv:Y,focus:G});yL.useEffect(()=>{return Px((X1,m1,h1)=>K.reportUiEvent(X1,m1,h1)),()=>Px(null)},[K]);let Y1=S80(G),G0=m===null?null:SX(m),T0=lZ0(K,{selectTask:n,enterTask:l,closeKanban:Y1.closeKanban,notifyError:u,notifyInfo:p}),Z1=P80({orchestrator:K,pages:Y1,focus:G,dialog:Q,kv:Y,dims:$,selectedTask:f,activeTaskId:D,tasks:M,engineState:W,startIssueChat:T0.start,activateTask:l});m50({focus:G,dialog:Q,pages:Y1,filesPaneVisible:!v0&&Y1.nav==="terminal"&&Z1.showSidebar&&Z1.showContent,searchActive:E,selectedId:m,openTaskWorktree:(X1)=>x60(X1,{tasks:M,ensureWorktree:K.ensureWorktree.bind(K),notifyError:u}),createTask:()=>void e(),renameBranch:(X1)=>void O0(X1),cycleVendor:(X1)=>void Q0(X1),toggleZen:a0,jumpToNextAttention:K0,openInbox:i.show,createPR:()=>void _0.onCreatePR(),enterMoveMode:()=>{let X1=m??M[0]?.id;if(!X1)return;G.setFocused("sidebar"),n(String(X1)),q0(!0)},toggleSortMode:N0});let j1=Q.stack.length>0?null:G.focused;if(Z1.settingsPage)return Z1.settingsPage;if(Z1.fullWindowPage)return Z1.fullWindowPage;return U0(I50,{orchestrator:K,onOpenSettings:Y1.openSettings,children:[Z1.showSidebar?y(l30,{width:Z1.showContent?_X:$.width,nav:Y1.nav,onNavChange:Y1.goToNav,tasks:M,selectedId:m,selectedTabId:G0,onSelect:(X1)=>{o(X1),Y1.setNav("terminal")},onActivate:(X1)=>{Y1.setNav("terminal"),l(X1)},onSelectTab:(X1,m1)=>{let h1=Y1.nav==="terminal"&&G.focused!=="sidebar"&&X1===m&&m1===G0;Y1.setNav("terminal"),Oz(X1,m1),G.setFocused(h1?"sidebar":"workspace")},engineState:_,engineTabState:C,engineLifecycle:j,taskJobs:w,worktreeChanges:R,transcriptActivity:T,focused:j1==="sidebar",onAddTask:()=>void e(),onDeleteRequest:(X1)=>void a(X1),onRenameRequest:(X1)=>void X0(X1),onPinRequest:(X1)=>void A0(X1),moveMode:B0,onMoveRequest:(X1,m1)=>void I0(X1,m1),onMoveModeExit:()=>q0(!1),onLocalMergeRequest:r,onSearchActiveChange:S,sortMode:H0,headerStatus:{label:`${I("workspace.inbox.title")} ${i.counts.total}`,emphasize:i.counts.total>0},onHeaderStatusClick:i.show,zenActive:v0,onZenClick:a0,onFocusRequest:()=>G.setFocused("sidebar"),recentTask:Z1.recentTask}):null,Z1.showContent?y("box",{flexGrow:1,flexShrink:1,borderColor:G.focused==="workspace"?X.focusAccent:z,onMouseUp:()=>G.setFocused("workspace"),children:Z1.contentPage??y(XZ0,{task:f,worktree:Z0,orchestrator:K,focused:j1==="workspace",onRequestFocus:()=>G.setFocused("workspace"),onEditorTabReady:_0.onEditorTabReady,onEngineSendReady:_0.onEngineSendReady,onDiffTabReady:_0.onDiffTabReady,onQuickFork:S0.onQuickFork,initialPrompt:S0.initialPromptFor(f?.id),onTabVisited:i.resolveVisited,onScratchExit:y0.onScratchExit,onOpenScratch:y0.openScratchShell})}):null,!v0&&Z1.contentPage==null&&Z1.showSidebar&&Z1.showContent?y(A50,{worktree:Z0,prBaseRef:f?.prStatus?.baseRef,focused:j1==="files",onOpenFile:(X1)=>void _0.onOpenFile(X1),onOpenDiff:_0.onOpenDiff,onZenToggle:a0,onCreatePR:()=>void _0.onCreatePR()}):null,y(G40,{}),y(J40,{left:1,width:_X-2})]})}async function mI0(){await tQ({logContext:"workspace",providers:{kv:!0,focus:!0,notifications:!0},setup:async()=>{let Z=await lJ(),X=new HX(Z,{role:"gui"});return await X.init(),process.env.KOBE_DAEMON_SOCKET_PATH=Z.socketPath,{root:()=>y(kI0,{orchestrator:X}),onDestroy:()=>{X.dispose(),N4().detachAll()}}}})}var yL;var UX0=h(async()=>{z3();eK();Mz();Y2();I8();sQ();P1();k40();y60();bF();K8();BZ0();OZ0();SZ0();pZ0();XX0();GX0();qX0();b0();await T1([Z5(),z40(),$40(),JV(),S1(),QV(),b40(),S5(),C50(),x50(),h50(),I80(),p30(),R60(),JZ0(),mZ0()]);yL=p0(n0(),1)});var bw={};o1(bw,{startTui:()=>hI0});async function hI0(){SI(),sI(),await Je(),await nI();let{loadPluginEngines:Z}=await Promise.resolve().then(() => (pC(),Tk));Z();let{startWorkspaceHost:X}=await UX0().then(() => HX0);await X()}var gw=h(()=>{aI();bj();RV()});import{statSync as uI0}from"fs";import{resolve as cI0}from"path";function KX0(Z){return Z==="."||Z===".."||Z.startsWith("./")||Z.startsWith("../")||Z.startsWith("/")||Z==="~"||Z.startsWith("~/")}async function VX0(Z){let X=cI0(process.cwd(),L8(Z)),J=!1;try{J=uI0(X).isDirectory()}catch{J=!1}if(!J)process.stderr.write(`${E1()}: "${Z}" is not a directory (resolved to ${X}).
|
|
775
775
|
`),process.exit(1);await Wq({daemon:async(Y)=>{let{taskId:G}=await Y.request("task.openDir",{dir:X});await Y.request("task.setActive",{taskId:G})},local:async(Y)=>{let G=await Y.openDirectoryTask({dir:X}),{writeLastActiveTaskId:$}=await Promise.resolve().then(() => (Xj(),jr));$(String(G.id))}});let{publishKobeTerminalTitle:z}=await Promise.resolve().then(() => rI);z();let{startTui:Q}=await Promise.resolve().then(() => (gw(),bw));await Q()}var BX0=h(()=>{EJ();oI();Q5()});function MX0(Z=E1()){return[`${Z} ${e1}`,"",`Usage: ${Z} [command] [options]`,"","Run with no command to launch PureTUI.",`Run \`${Z} .\` (or \`${Z} <path>\`) to open a directory as a standalone task.`,"","Commands:"," web [options] Launch the browser dashboard"," completions <shell> Generate shell completion script (bash/zsh/fish)"," add [path] Save a repo path for the new-task picker"," remove [path] Forget a saved project (inverse of add; non-destructive)"," adopt [glob] Import existing git worktrees as tasks"," export [--csv|--json] Print the task list (json/csv/table; daemon-free)"," repo <verb> Per-repo init script + first prompt (show|set|unset)",` api <verb> Scriptable RPC surface for agents (see \`${Z} api --help\`)`," daemon <verb> Manage the daemon (start|stop|status|restart)"," doctor [--report|--fix] Diagnose daemon/PTY/engines/git; --fix walks the remedies",` config [--path] Open ${Z}'s config file (state.json) in your editor`," reset [--hard] Stop runtimes; optionally wipe task/UI state"," theme <verb> Manage user themes (list|add|remove)",` skill <verb> Install the ${Z} agent skill (install|status|command|print)`," plugin <verb> Install and run plugins (install|link|list|action|\u2026)"," feedback Send feedback to GitHub Discussions",` update [version|list] Self-update ${Z}, or browse versions with \`list\``,"","Options:"," -v, --version Print version"," -h, --help Print this help"," --skill Print the agent skill file and exit"].join(`
|