@codexhost/cli-linux-arm64 0.18.0-beta.5 → 0.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -164,7 +164,7 @@ if(n===null||r===null)return null;let i=Yf();return i.anchor.set(n.key,n.offset,
164
164
  `)){let t=lm();n!==``&&t.append(hf(n)),e.append(t)}e.selectEnd()},{discrete:!0,tag:Gd})}paste(e){let t=e.replace(jb,``);t!==``&&this.applyEdit(()=>{let e=z();if(R(e)){e.insertText(t);return}let n=W();n.getChildrenSize()===0&&n.append(lm()),n.selectEnd().insertText(t)},Kd)}caretSpan(){if(this.projection.selection!==null)return this.projection.selection;let e=this.projection.detectText.length;return{start:e,end:e}}replaceText(e,t){let n=!1;return this.applyEdit(()=>{n=kb(e,t)}),n}insertAsyncText(e,t){let n=!1,r=t.replace(jb,``);return this.applyEdit(()=>{n=kb(e,r)},Kd),n}insertReference(e,t,n){let r=!1;return this.applyEdit(()=>{r=Ab(e,n===` `?[ib(t)]:[ib(t),hf(` `)])}),r}insertFileReferences(e,t){if(e.length===0)return!0;let n=!1;return this.applyEdit(()=>{let r=Eb(e=>this.occurrenceIdOf(e)),i=t?.end??r.selection?.end??r.detectText.length,a=r.detectText.slice(0,i),o=e.flatMap(e=>[ib(e),hf(` `)]);a!==``&&!/\s$/u.test(a)&&o.unshift(hf(` `)),n=Ab({start:i,end:i},o)},Kd),n}refreshClaimDecoration(){Sb(this.editor)}clearCommittedDraft(e){this.editor.update(()=>{let t=Cb(),n=e(t.clipboardText);if(n!==null){kb({start:0,end:wb(t,n)},``);return}let r=W();r.clear(),r.selectEnd()},{discrete:!0,tag:Gd})}restoreDraft(e,t){this.editor.update(()=>{let n=W();n.clear();let r=lm();n.append(r);let i=e=>{let t=e.replace(jb,``).split(`
165
165
  `);for(let e=0;e<t.length;e+=1){let i=t[e];i!==``&&r.append(hf(i)),e<t.length-1&&(r=lm(),n.append(r))}},a=0;for(let n of t)i(e.slice(a,n.offset)),r.append(new rb({source:n.source,ref:n.ref,label:n.label,...n.appearance===void 0?{}:{appearance:n.appearance},clipboardText:n.clipboardText},n.invalid===!0)),a=n.offset+n.length;i(e.slice(a)),n.selectEnd()},{discrete:!0,tag:Gd})}clearHistory(){this.editor.dispatchCommand(rd,void 0)}};function Nb(e){switch(e){case`plain`:return`plain`;case`claimed`:return`claimed`;default:return`frozen`}}function Pb(e,t){return e.clipboardText!==t.clipboardText||e.detectText!==t.detectText||e.occurrences.length!==t.occurrences.length||t.occurrences.some((t,n)=>{let r=e.occurrences[n];return r===void 0||r.occurrenceId!==t.occurrenceId||r.invalid!==t.invalid})}let Fb=[],Ib=/* @__PURE__ */ new Map;var Lb=class{deps;state;notices=(0,f.createSnapshotStore)(null);get editor(){return this.draftEditor.editor}actions={captureInsertion:e=>{let t=this.projection.detectText.length;return{...e===`end`?{start:t,end:t}:this.caretSpan(),draftRev:this.rev}},bindPrimaryAction:e=>(this.primaryAction=e,this.publish(),()=>{this.primaryAction===e&&(this.primaryAction=void 0,this.publish())}),insertText:(e,t)=>this.snapshot.phase===`adjudicating`||this.snapshot.phase===`submitting`||this.disposed||t.draftRev!==this.rev?!1:this.draftEditor.insertAsyncText(t,e),setDraft:e=>{this.setDraft(e)},persistDraft:()=>{this.persistCurrentDraft()},addAttachments:e=>this.addAttachments(e),removeAttachment:e=>{this.removeAttachment(e)},pruneAttachments:e=>{this.pruneAttachments(e)},submit:()=>{this.submit(`queue`)}};primaryAction;core=new yc;draftEditor;get projection(){return this.draftEditor.projection}rev=0;unregister;noticeSeq=0;lastPublishedDraft;draftSnapshotCache;attachmentIds=[];disposed=!1;persistDraft;filePicker;detachedDrafts=/* @__PURE__ */ new Map;failedDetached=/* @__PURE__ */ new Map;failedRestoreRev;restoringFailures=!1;attachmentFlightSeq=0;attachmentFlights=/* @__PURE__ */ new Map;unsubscribeInbox;constructor(e){this.deps=e,this.draftEditor=new Mb({onUpdate:()=>{this.onEditorUpdate()},openReference:(e,t)=>this.deps.inputTriggers?.()?.openReference(e,t)??!1,activeClaimToken:()=>this.activeClaimToken(),lexicon:()=>this.lexicon.getSnapshot(),resolveLexicon:()=>this.deps.inputTriggers?.()?.lexicon}),this.unregister=this.draftEditor.register(),this.state=(0,f.createSnapshotStore)(this.compose()),this.unsubscribeInbox=e.inbox?.subscribe(()=>{this.publish()})}onEditorUpdate(){Pb(this.draftEditor.refreshProjection(),this.projection)&&(this.rev+=1,!this.restoringFailures&&this.failedRestoreRev!==void 0&&(this.failedDetached.clear(),this.failedRestoreRev=void 0),this.dispatchRun({type:`draft-changed`,draft:this.projection.clipboardText}));let e=this.projection.caret;e!==null&&this.deps.inputTriggers?.()?.track(this.projection.detectText,e,{tier:Nb(this.core.state.phase)},this.rev)}setDraft(e){let t=Ys(e);t.references.length===0?this.draftEditor.setDraft(t.text):this.draftEditor.restoreDraft(t.text,t.references)}refreshLexiconSubscription(){this.disposed||this.draftEditor.refreshLexiconSubscription()}get draftSnapshot(){if(this.draftSnapshotCache?.revision===this.rev)return this.draftSnapshotCache.value;let e=Zs(this.projection.clipboardText,this.projection.occurrences);return this.draftSnapshotCache={revision:this.rev,value:e},e}persistCurrentDraft(){this.persistDraft?.(this.draftSnapshot)}requestDraftInitialization(e){return this.draftInitializationBlocked()?`blocked`:e.prompt===void 0&&e.clearPreviousDraft!==!0||e.clearPreviousDraft!==!0&&(this.snapshot.draft!==``||this.attachmentIds.length>0)?`preserved`:(this.setDraft(e.prompt??``),`applied`)}draftInitializationBlocked(){let{phase:e}=this.core.state;return this.disposed||e===`adjudicating`||e===`submitting`||this.detachedDrafts.size>0||this.attachmentFlights.size>0}canInsertReferences(){let e=this.editor.getRootElement();return!this.disposed&&this.editor.isEditable()&&e!==null&&e.isConnected&&e.getClientRects().length>0&&(this.snapshot.phase===`plain`||this.snapshot.phase===`claimed`)}insertReferences(e,t){return!this.canInsertReferences()||t.draftRev!==this.rev?!1:this.draftEditor.insertFileReferences(e,t)}addAttachments(e){return this.snapshot.phase===`adjudicating`||this.snapshot.phase===`submitting`?!1:(e.length===0||(this.attachmentIds=[...this.attachmentIds,...e],this.publish()),!0)}addFiles(e,t){return this.snapshot.phase===`adjudicating`||this.snapshot.phase===`submitting`||!this.draftEditor.insertFileReferences(e)?!1:(this.attachmentIds=[...this.attachmentIds,...t],this.publish(),!0)}removeAttachment(e){if(this.snapshot.phase===`adjudicating`||this.snapshot.phase===`submitting`)return!1;let t=this.attachmentIds.filter(t=>t!==e);return t.length!==this.attachmentIds.length&&(this.attachmentIds=t,this.publish(),!0)}pruneAttachments(e){let t=new Set(e),n=this.attachmentIds.filter(e=>t.has(e));n.length!==this.attachmentIds.length&&(this.attachmentIds=n,this.publish())}commitSend(e){let t=new Set(e);this.attachmentIds=this.attachmentIds.filter(e=>!t.has(e)),this.dispatchRun({type:`send-committed`})}paste(e){this.draftEditor.paste(e)}submit(e=`queue`,t){if(this.disposed)return;let n=Date.now(),r;if(this.snapshot.phase===`plain`&&(this.snapshot.draft.trim()!==``||this.attachmentIds.length>0))try{r=this.deps.submissionState?.()}catch{}let i=Object.freeze({timestamp:n,mode:e,...t===void 0?{}:{source:t},...r===void 0?{}:{state:r}});if(this.snapshot.draft.trim()===``&&this.attachmentIds.length>0){if(this.snapshot.phase===`plain`){let t=[...this.attachmentIds],n=new AbortController;this.attachmentFlightSeq+=1;let r=this.attachmentFlightSeq;this.attachmentFlights.set(r,{controller:n,attachmentIds:t}),this.commitSend(t),this.notifySubmission(i),this.deps.defaultSink(``,t,e,n.signal).then(e=>{!this.disposed&&this.attachmentFlights.delete(r)&&e.kind!==`success`&&(this.restoreAttachments(t),e.text!==void 0&&this.notify(`error`,e.text))},e=>{!this.disposed&&this.attachmentFlights.delete(r)&&(this.restoreAttachments(t),this.notify(`error`,e instanceof Error?e.message:String(e)))})}return}let a=this.snapshot;if(a.phase===`claimed`&&this.attachmentIds.length>0&&a.claim?.attachments!==!0){this.notify(`error`,this.deps.commandAttachments.unsupportedNotice(a.claim?.token??a.draft));return}this.dispatchRun({type:`enter`,mode:e,draft:this.projection.clipboardText,submission:i});let o=this.snapshot.phase;(o===`adjudicating`||o===`submitting`)&&(this.deps.popup?.()?.dismiss(),this.deps.inputTriggers?.()?.track(this.projection.detectText,0,{tier:`frozen`},this.rev))}arbitrate(e,t){return this.deps.inputTriggers?.()?.arbitrate(e,t)??`pass`}steerQueue(){this.deps.steerQueue?.()}space(){let e=this.deps.inputTriggers?.();return e!==void 0&&e.onSpace()}dismissPopup(){this.deps.popup?.()?.dismiss()}caretSpan(){return this.draftEditor.caretSpan()}lexicon={getSnapshot:()=>this.deps.inputTriggers?.()?.lexicon.getSnapshot()??Ib,subscribe:e=>this.deps.inputTriggers?.()?.lexicon.subscribe(e)??(()=>{})};beginCommand(e,t){let n=this.core.state.phase;return n!==`plain`&&n!==`claimed`||t.draftRev!==this.rev||this.projection.detectText.slice(0,t.start).trim()!==``||!this.draftEditor.replaceText({start:0,end:t.end},e.token)?!1:(this.dispatchRun({type:`claim`,claim:e}),!0)}insertReference(e,t){let n=this.core.state.phase;if(n!==`plain`&&n!==`claimed`||t.draftRev!==this.rev)return!1;let r=this.projection.detectText.slice(t.end,t.end+1);return this.draftEditor.insertReference(t,e,r)}consumeToken(e){return e.kind===`span`?e.span.draftRev!==this.rev||e.span.start===e.span.end?!1:this.draftEditor.replaceText(e.span,``):e.token===``||this.projection.clipboardText.trim()!==e.token?!1:(this.setDraft(``),!0)}insertText(e,t,n=!1){return t.draftRev===this.rev&&this.draftEditor.replaceText(t,e)}notify(e,t){this.noticeSeq+=1,this.notices.set({level:e,text:t,seq:this.noticeSeq})}focus(){this.editor.getRootElement()?.focus({preventScroll:!0}),this.editor.focus()}dispose(){if(this.disposed)return[];let e=new Set(this.attachmentIds);for(let t of this.detachedDrafts.values())for(let n of t.attachmentIds)e.add(n);for(let t of this.attachmentFlights.values()){for(let n of t.attachmentIds)e.add(n);t.controller.abort()}return this.disposed=!0,this.dispatchRun({type:`release`}),this.unsubscribeInbox?.(),this.unregister(),this.detachedDrafts.clear(),this.failedDetached.clear(),this.attachmentFlights.clear(),[...e]}get snapshot(){return this.state.getSnapshot()}bindDraftPersistence(e){return this.persistDraft=e,()=>{this.persistDraft===e&&(this.persistDraft=void 0)}}bindFilePicker(e){return this.filePicker=e,()=>{this.filePicker===e&&(this.filePicker=void 0)}}canPickFiles(){return this.filePicker?.available()===!0}pickFiles(){return this.filePicker===void 0||!this.filePicker.available()?!1:(this.filePicker.open(),!0)}activeClaimToken(){let e=this.core.state;return(e.phase===`claimed`||e.phase===`submitting`)&&e.claim!==void 0?e.claim.token:null}dispatchRun(e){let t=this.activeClaimToken(),n=this.core.dispatch(e);this.run(n),this.activeClaimToken()!==t&&this.draftEditor.refreshClaimDecoration()}run(e){for(let t of e)this.execute(t);this.publish()}execute(e){switch(e.type){case`notice`:this.noticeSeq+=1,this.notices.set({level:e.level,text:e.text,seq:this.noticeSeq});return;case`adjudicate`:this.adjudicate(e.attempt,e.draft);return;case`begin-submit`:this.beginSubmit(e.attempt,e.claim,e.args);return;case`default-sink`:this.sinkSerialized(e.attempt,e.draft,e.mode);return;case`commit-draft`:this.commitDraft(e.retainSuffixOf);return}}commitDraft(e){this.draftEditor.clearCommittedDraft(t=>e!==null&&t!==e&&t.startsWith(e)?e.length:null),this.draftEditor.clearHistory()}sinkSerialized(e,t,n){this.notifySubmission(e.submission);let r=[...this.attachmentIds];this.attachmentIds=[];let i=this.projection.occurrences,a={draft:t,occurrences:i,attachmentIds:r};if(this.detachedDrafts.set(e.seq,a),this.failedRestoreRev===this.rev&&(this.failedDetached.clear(),this.failedRestoreRev=void 0),i.length===0){this.settleSink(e,this.deps.defaultSink(t.trim(),r,n,e.signal));return}let o=this.deps.inputTriggers?.();Promise.all(i.map(async t=>{if(o===void 0)throw Error(`no serializer for reference source "${t.source}"`);return{offset:t.offset,length:t.length,text:await o.serializeReference(t.source,t.ref,e.signal)}})).then(i=>{if(this.disposed)return;let a=``,o=0;for(let e of i)a+=t.slice(o,e.offset)+e.text,o=e.offset+e.length;a+=t.slice(o),this.settleSink(e,this.deps.defaultSink(a.trim(),r,n,e.signal))},t=>{if(this.dead(e))return;let n=t instanceof Error?t.message:String(t);this.settleDetachedFailure(e,n)})}notifySubmission(e){if(e!==void 0)try{this.deps.messageSubmitted?.(e)}catch{}}settleSink(e,t){t.then(t=>{this.dead(e)||(t.kind===`success`?(this.detachedDrafts.delete(e.seq),this.dispatchRun({type:`sink-settled`,attempt:e,ok:!0,outcome:t})):this.settleDetachedFailure(e,t.text))},t=>{this.dead(e)||this.settleDetachedFailure(e,t instanceof Error?t.message:String(t))})}settleDetachedFailure(e,t){let n=this.detachedDrafts.get(e.seq);n!==void 0&&(this.detachedDrafts.delete(e.seq),this.restoreAttachments(n.attachmentIds),this.failedDetached.set(e.seq,n),(this.projection.clipboardText===``||this.failedRestoreRev===this.rev)&&this.restoreFailedDrafts(),this.dispatchRun({type:`sink-settled`,attempt:e,ok:!1,...t===void 0?{}:{message:t}}))}restoreFailedDrafts(){let e=[...this.failedDetached.entries()].sort(([e],[t])=>e-t).map(([,e])=>e);if(e.length===0)return;let t=``,n=[];for(let r of e){let e=t.length+(t===``?0:2);t!==``&&(t+=`
166
166
 
167
- `),t+=r.draft;for(let t of r.occurrences)n.push({...t,offset:e+t.offset})}this.restoringFailures=!0;try{this.draftEditor.restoreDraft(t,n),this.draftEditor.clearHistory(),this.failedRestoreRev=this.rev}finally{this.restoringFailures=!1}}restoreAttachments(e){if(e.length===0)return;let t=new Set(this.attachmentIds),n=e.filter(e=>!t.has(e));n.length!==0&&(this.attachmentIds=[...n,...this.attachmentIds],this.publish())}adjudicate(e,t){let n=this.deps.inputTriggers?.();n===void 0?this.dispatchRun({type:`adjudicated`,attempt:e,outcome:void 0}):n.adjudicate(t.trim(),e.signal,{attachments:this.attachmentIds.length}).then(t=>{this.dead(e)||this.dispatchRun({type:`adjudicated`,attempt:e,outcome:t})},t=>{if(this.dead(e))return;let n=t instanceof Error?t.message:String(t);this.dispatchRun({type:`adjudication-failed`,attempt:e,message:n})})}beginSubmit(e,t,n){let r=t.attachments===!0?[...this.attachmentIds]:[];Promise.resolve().then(async()=>{let i=r.length>0?await this.deps.commandAttachments.serialize(r):[];if(!this.dead(e))return t.submit(n,this.deps.actx,i)}).then(t=>{if(!(t===void 0||this.dead(e))){if(t.kind===`success`&&r.length>0){let e=new Set(r);this.attachmentIds=this.attachmentIds.filter(t=>!e.has(t)),this.deps.commandAttachments.release(r)}this.dispatchRun({type:`submit-settled`,attempt:e,ok:t.kind===`success`,draft:this.projection.clipboardText,outcome:t,...t.kind===`error`&&t.text===void 0?{message:`command failed`}:{}})}},t=>{if(this.dead(e))return;let n=t instanceof Error?t.message:String(t);this.dispatchRun({type:`submit-settled`,attempt:e,ok:!1,draft:this.projection.clipboardText,message:n})})}dead(e){return this.disposed||e.signal.aborted}compose(){let e=this.core.state;return{draft:this.projection.clipboardText,attachmentIds:this.attachmentIds,draftRev:this.rev,...this.primaryAction===void 0?{}:{primaryAction:this.primaryAction},phase:e.phase,...e.claim===void 0?{}:{claim:e.claim},occurrences:this.projection.occurrences,queue:this.deps.inbox?.getSnapshot()?.[`next-turn`]??Fb}}publish(){let e=this.compose();this.state.set(e);let t=this.draftSnapshot;t!==this.lastPublishedDraft&&(this.lastPublishedDraft=t,this.persistDraft?.(t))}};function Rb(e,t){let{state:n,timestamp:r,mode:i}=t;if(n===void 0)return;let a=n.model;e.get(`productAnalytics`)?.track(`send_button_click`,{...n.sessionId===void 0?{}:{session_id:n.sessionId},...a===void 0?{}:{model_name:`${a.provider}/${a.name}`,...a.effort===void 0?{}:{thinking_effort:a.effort}},run_mode:n.runMode,msg_type:n.running?i:`default`},r)}var zb=class{rootCtx;t;shells=/* @__PURE__ */ new WeakMap;constructor(e,t){this.rootCtx=e,this.t=t}for(e){let t=this.sessions(),n=t.sessionOf(e),r=n===void 0?void 0:t.binding(n.sessionId);if(r===void 0||r.session!==n)throw Error(`conversation.input.for requires a retained Session scope`);return this.shellFor(r)}captureReferenceInsertion(e){let t=this.sessions(),n=this.shells.get(e);if(t.binding(e.sessionId)!==e||n===void 0)return;let r=n.actions.captureInsertion(),i=this.rootCtx.conversation.blocks.storeFor(e.sessionId),a=this.rootCtx.uiSession.sessionStatus,o=!1,s=()=>{let s=e.session.getSnapshot();return!o&&t.binding(e.sessionId)===e&&s.openState===`open`&&!s.removed&&i.getSnapshot()===void 0&&a.getSnapshot().get(e.sessionId)?.pendingInteraction===void 0&&n.snapshot.draftRev===r.draftRev&&n.canInsertReferences()};return{getSnapshot:s,subscribe:r=>{let o=[t.list.subscribe(r),e.session.subscribe(r),n.state.subscribe(r),i.subscribe(r),a.subscribe(r),n.editor.registerEditableListener(r),n.editor.registerRootListener(r)];return()=>o.forEach(e=>e())},insert:e=>{let t=s();return o=!0,t&&n.insertReferences([e],r)}}}requestDraftInitialization(e,t){if(this.sessions().binding(e.sessionId)!==e)throw Error(`conversation.input.requestDraftInitialization requires a retained Session binding`);return this.shellFor(e).requestDraftInitialization(t)}shellFor(e){let t=this.shells.get(e);if(t!==void 0)return t;let{session:n,ctx:r}=e,i=new Lb({actx:r,submissionState:()=>{let e=n.getSnapshot(),t=n.projections.faceOf(`modelSelection`).getSnapshot(),r=n.projections.faceOf(`plan`).getSnapshot(),i=n.projections.faceOf(`goal`).getSnapshot(),a=t?.next??t?.lastUsed;return Object.freeze({...e.blank?{}:{sessionId:e.sessionId},...a==null?{}:{model:Object.freeze({provider:a.provider,name:a.model,...a.reasoningEffort===void 0?{}:{effort:a.reasoningEffort}})},runMode:r?.active?`plan`:i?.goal.phase===`active`?`goal`:`default`,running:e.running})},messageSubmitted:e=>{Rb(this.rootCtx,e)},inputTriggers:()=>this.controller(r),popup:()=>this.popup(r),inbox:n.projections.faceOf(`inbox`),defaultSink:(e,t,r,i)=>this.sink(n,e,t,r,i),steerQueue:()=>{this.steerQueue(n,i)},commandAttachments:{serialize:async e=>(await this.conversation().serializeDraftAttachments(e)).attachments,release:e=>{let t=this.rootCtx.get(`conversation`);for(let n of e)t?.releaseDraftAttachment(n)},unsupportedNotice:e=>this.t(`command.attachmentsUnsupported`,{command:e.trim().replace(/^\//u,``)})}});return this.shells.set(e,i),r.effect(()=>{let t=[r.on(`slash/input-begin-command`,e=>i.beginCommand(e.claim,e.span)?!0:void 0),r.on(`slash/input-insert-reference`,e=>i.insertReference(e.reference,e.span)?!0:void 0),r.on(`slash/input-consume-token`,e=>i.consumeToken(e.guard)?!0:void 0),r.on(`slash/input-insert-text`,e=>i.insertText(e.text,e.span,e.continue===!0)?!0:void 0)];return()=>{for(let e of t)e();let n=i.dispose();this.shells.delete(e);let r=this.rootCtx.get(`conversation`);for(let e of n)r?.releaseDraftAttachment(e)}},`conversation.input: session shell`),r.inject([`inputTriggers`],e=>{e.effect(()=>(i.refreshLexiconSubscription(),()=>{i.refreshLexiconSubscription()}),`conversation.input: reference catalogs`)}),i.setDraft(tc(e.sessionId)),i}shell(e){let t=this.sessions().binding(e);if(t===void 0)throw Error(`conversation.input: session "${e}" resolved no binding`);return this.shellFor(t)}keyboard(e){return this.shell(e)}canPickFiles(e){let t=this.sessions().binding(e);return t!==void 0&&this.shells.get(t)?.canPickFiles()===!0}pickFiles(e){let t=this.sessions().binding(e);t!==void 0&&this.shells.get(t)?.pickFiles()}inputTriggers(e){let t=this.sessions().binding(e);return t===void 0?void 0:this.controller(t.ctx)}sink(e,t,n,r,i){return t===``&&n.length===0?Promise.resolve({kind:`success`}):this.conversation().sendSession(e,t,n,r,i)}async steerQueue(e,t){let n=e.projections.faceOf(`inbox`).getSnapshot()?.[`next-turn`]??[];if(n.length!==0)for(let r of n){let n=await e.updateQueue(r.id,{kind:`steer`});if(!n.ok){if(n.error.code===`session/steer-unavailable`||n.error.code===`session/queue-item-not-found`)return;t.notify(`error`,this.t(`queue.steerFailed`));return}}}controller(e){if(this.sessions().sessionOf(e)!==void 0)return this.rootCtx.get(`inputTriggers`)?.sessionOf(e)}popup(e){if(this.sessions().sessionOf(e)!==void 0)return this.rootCtx.get(`commandUi`)?.popupFor(e)}sessions(){let e=this.rootCtx.get(`sessions`);if(e===void 0)throw Error(`conversation.input: sessions service unavailable`);return e}conversation(){let e=this.rootCtx.get(`conversation`);if(e===void 0)throw Error(`conversation.input: conversation service unavailable`);return e}};let Bb=`busyEnter`,Vb=[`queue`,`steer`],Hb=`queue`,Ub={[Bb]:T.union([...Vb]).default(Hb)};T.object(Ub);function Wb(e,t,n,r){return!t||!r?`queue`:n===`enter`?e:e===`queue`?`steer`:`queue`}var Gb=class{busyEnter=(0,f.createSnapshotStore)(Hb);unsubscribe;host;constructor(e){this.host=e,e!==void 0&&(this.unsubscribe=e.subscribe(()=>{this.adopt(e)}),this.adopt(e))}dispose(){this.unsubscribe?.()}setBusyEnter(e){this.busyEnter.getSnapshot()!==e&&(this.busyEnter.set(e),this.host?.set(Bb,e))}adopt(e){let t=e.getSnapshot().value;t!==void 0&&this.busyEnter.getSnapshot()!==t.busyEnter&&this.busyEnter.set(t.busyEnter)}};let Kb=`conversation`,qb=`描述你的任务以生成计划`,Jb=`describe your task to generate plan`,Yb={"shortcut.newline":`换行`,"shortcut.complementary":`使用互补的 Queue/Steer 方式`,"shortcut.slash":`打开命令菜单`,"shortcut.mention":`打开引用菜单`,"hint.plan":qb,"hint.goal":`输入目标,智能体将持续执行`,"hint.goal.active":`当前目标进行中。可输入 edit 修改 / pause 暂停 / resume 继续 / clear 清除`,"placeholder.plan":qb,"placeholder.default":`发消息或创建任务, / 调用指令, @ 文件或对话`,"placeholder.unavailable":`会话不可用`,"placeholder.parentOffline":`父会话已离线,无法继续发送;仍可停止当前运行`,"placeholder.hero":`描述你想要构建的内容, / 调用指令, @ 文件或对话`,"placeholder.workspace":`选择一个工作区开始`,"placeholder.preparing":`正在准备对话…`,"placeholder.steerQueue":`Cmd/Ctrl+Enter 插话发送全部排队消息`,"input.commands":`添加文件或调用指令`,"input.commandsOnly":`调用指令`,"input.imagesAndCommands":`添加图片或调用指令`,"attachment.unavailable":`当前 Web 连接不支持附件上传。`,"input.file":`文件`,"input.stop":`停止生成`,"input.send":`发送消息`,"input.send.queue":`排队发送`,"input.send.steer":`插话发送`,"attachment.pending":`待发送附件`,"attachment.scrollLeft":`向左滚动附件`,"attachment.scrollRight":`向右滚动附件`,"reference.dropTitle":`松开以引用聊天`,"attachment.dropTitle":`文件或图片拖动到此处即可添加`,"attachment.dropDesc":`图片限制:最多 {count} 张,每张 {size}`,"attachment.dropBlocked":`当前无法添加文件或图片`,"attachment.directoryDesktopOnly":`只有桌面端支持添加文件夹,浏览器里请添加单个文件`,"attachment.pathUnavailable":`无法获取文件夹路径,请重新拖入`,"attachment.pathUnsupported":`路径含有无法引用的字符,请改名后再试`,"image.pending":`待发送图片`,"image.openOriginal":`查看原图`,"image.openOriginalLabel":`{label},点击查看原图`,"image.remove":`移除图片 {name}`,"image.original":`原图`,"image.label":`图片`,"image.loadFailed":`图片不可用,点击重试`,"image.loading":`图片加载中…`,"image.preview":`原图预览`,"image.closePreview":`关闭原图预览`,"image.unsupportedType":`仅支持 PNG、JPG、WebP、GIF 格式的图片`,"image.tooMany":`一条消息最多添加 {count} 张图片`,"image.fileTooLarge":`单张图片不能超过 {size}`,"image.totalTooLarge":`图片总大小超过 {size},请移除部分图片`,"image.tooManyPixels":`图片分辨率过大,请压缩后重试`,"image.dimensionTooLarge":`图片宽高不能超过 {size}px,请缩小后重试`,"image.modelUnsupported":`当前模型不支持图片,请切换支持图片的模型`,"image.sendFailed":`图片发送失败({reason}),请重新添加图片后再试`,"file.unavailable":`已上传文件不可用或被修改,请重新选择`,"file.pending":`待发送文件`,"file.remove":`移除文件 {name}`,"file.uploading":`上传中…`,"file.uploadFailed":`上传失败,点击重试`,"file.retry":`重试上传 {name}`,"file.stillUploading":`文件还在上传,请等待上传完成后发送`,"file.sessionUnavailable":`会话不可用,无法上传文件`,"file.notStaged":`文件尚未上传成功,请重新添加后再试`,"file.label":`文件`,"context.aria":`上下文已用 {percent}`,"context.used":`上下文已用`,"context.system":`系统提示词`,"context.tools":`工具定义`,"context.messages":`对话消息`,"settings.enter.title":`繁忙时的发送行为`,"settings.enter.description":`智能体运行时 Enter 键和发送按钮的行为;Cmd/Ctrl+Enter 使用另一行为`,"settings.enter.queue":`排队发送`,"settings.enter.steer":`插话发送`,"hero.headline":`今天想做点什么?`,"hero.preview":`Web`,"hero.chooseWorkspace":`选择工作区`,"hero.noWorkspace":`不选择工作区`,"session.hierarchy":`会话层级`,"todo.title":`任务`,"todo.progress.done":`{done} 已完成`,"todo.progress.active":`{active} 进行中`,"todo.progress.pending":`{pending} 待处理`,"todo.status.completed":`已完成`,"todo.status.inProgress":`进行中`,"todo.status.pending":`待处理`,"todo.rowTitle":`更新任务清单`,"tool.title.createGoal":`创建目标`,"tool.title.getGoal":`查看目标`,"tool.title.updateGoal":`更新目标`,"tool.preparing.content":`{kilobytes}KB`,"tool.title.createSchedule":`创建定时任务`,"tool.title.listSchedules":`查看定时任务`,"tool.title.deleteSchedule":`删除定时任务`,"tool.title.updateSchedule":`修改定时任务`,"detail.state":`状态`,"detail.todo.completed":`已完成`,"detail.todo.in_progress":`进行中`,"detail.todo.pending":`待处理`,"detail.todo.empty":`任务清单为空`,"todo.diff.initial":`首次记录`,"todo.diff.compare":`与上次清单相比`,"todo.diff.unavailable":`旧清单不可用`,"todo.diff.noChanges":`清单没有变化`,"todo.diff.added":`新增 {count}`,"todo.diff.updated":`更新 {count}`,"todo.diff.removed":`移除 {count}`,"todo.diff.unchanged":`{count} 项未变化`,"todo.diff.addedItem":`新增`,"todo.diff.updatedItem":`状态变化`,"todo.diff.movedItem":`顺序调整`,"todo.diff.removedItem":`移除`,"detail.goal.empty":`没有目标`,"detail.goal.active":`进行中`,"detail.goal.disarmed":`等待继续`,"detail.goal.paused":`已暂停`,"detail.goal.blocked":`受阻`,"detail.goal.complete":`已完成`,"detail.goal.rounds":`执行轮次`,"detail.goal.reason":`受阻原因`,"detail.days":`{count} 天`,"detail.hours":`{count} 小时`,"detail.minutes":`{count} 分钟`,"detail.seconds":`{count} 秒`,"detail.schedule.once":`单次`,"detail.schedule.every":`每 {interval}`,"detail.schedule.when":`计划时间`,"detail.schedule.frequency":`重复`,"detail.schedule.scheduled":`等待触发`,"detail.schedule.overdue":`已到期,等待会话恢复`,"detail.schedule.empty":`没有定时任务`,"detail.schedule.deleted":`已删除`,"detail.schedule.count":`{count} 个定时任务`,"detail.schedule.daily":`每天 {time}({zone})`,"detail.schedule.weekly":`每周 {days} {time}({zone})`,"detail.schedule.cron":`Cron {expression}({zone})`,"detail.weekday.1":`周一`,"detail.weekday.2":`周二`,"detail.weekday.3":`周三`,"detail.weekday.4":`周四`,"detail.weekday.5":`周五`,"detail.weekday.6":`周六`,"detail.weekday.7":`周日`,"detail.weekday.join":`、`,"tool.title.inspectProviders":`检查提供方`,"tool.title.queryRuntime":`查询运行时`,"tool.title.inspectPlugins":`检查动态插件`,"tool.title.workflow":`运行工作流`,"tool.title.ralph":`运行循环工作流`,"tool.title.readEvent":`读取事件`,"tool.title.searchEvents":`搜索事件`,"tool.title.traceEvent":`追踪事件`,"tool.title.searchSessions":`搜索会话`,"tool.title.traceSession":`追踪会话`,"tool.title.listModels":`查看可用模型`,"tool.title.subagent":`创建子智能体`,"tool.title.listAgents":`查看子智能体`,"tool.title.sendMessage":`发送消息`,"tool.title.interruptAgent":`中断智能体`,"tool.title.listJobs":`查看后台任务`,"tool.title.readJob":`读取任务输出`,"tool.title.killJob":`取消后台任务`,"tool.title.openTerminal":`创建终端`,"tool.title.readTerminal":`读取终端`,"tool.title.listTerminals":`查看终端`,"tool.title.signalTerminal":`发送终端信号`,"tool.title.closeTerminal":`关闭终端`,"tool.title.lsp":`查询代码符号`,"tool.title.findDefinition":`查找定义`,"tool.title.findReferences":`查找引用`,"tool.title.findImplementation":`查找实现`,"tool.title.hoverSymbol":`查看符号信息`,"tool.title.spawnTeammate":`创建队友`,"tool.title.createTeamTask":`创建团队任务`,"tool.title.getTeamTask":`读取团队任务`,"tool.title.updateTeamTask":`更新团队任务`,"tool.title.listTeamTasks":`查看团队任务`,"tool.title.waitAgent":`等待子智能体`,"detail.recordedResult":`调用结果`,"detail.empty":`暂无结果`,"detail.none":`无`,"detail.yes":`是`,"detail.no":`否`,"detail.moreInInspect":`另有 {count} 项,可在「查看」中读取`,"detail.status.running":`运行中`,"detail.status.idle":`空闲`,"detail.status.ready":`就绪`,"detail.status.inactive":`未运行`,"detail.status.provisioning":`准备中`,"detail.status.failed":`失败`,"detail.status.completed":`已完成`,"detail.status.deleted":`已删除`,"detail.status.killed":`已取消`,"detail.status.accepted":`已接收`,"detail.status.queued":`已入队`,"detail.status.exited":`已退出`,"detail.field.id":`ID`,"detail.field.revision":`版本`,"detail.field.platform":`平台`,"detail.field.provider":`提供方`,"detail.field.model":`模型`,"detail.field.role":`角色`,"detail.field.context":`上下文`,"detail.field.owner":`负责人`,"detail.field.ready":`可开始`,"detail.field.dependencies":`前置任务`,"detail.field.writeScopes":`文件范围`,"detail.field.warnings":`提示`,"detail.field.diagnostics":`诊断`,"detail.field.methods":`方法`,"detail.field.inputSchema":`输入 Schema`,"detail.field.outputSchema":`输出 Schema`,"detail.field.currentPackage":`当前包`,"detail.field.nextPackage":`待运行的包`,"detail.field.latestRun":`最近运行`,"detail.field.packages":`版本包`,"detail.field.registrations":`注册项`,"detail.field.props":`属性`,"detail.field.data":`数据`,"detail.field.source":`来源`,"detail.field.content":`内容`,"detail.field.message":`消息`,"detail.field.messageId":`消息 ID`,"detail.field.root":`根节点`,"detail.field.pid":`进程 ID`,"detail.field.type":`类型`,"detail.field.time":`时间`,"detail.field.seq":`事件序号`,"detail.field.turn":`轮次`,"detail.field.step":`步骤`,"detail.field.callId":`调用 ID`,"detail.field.agents":`启动智能体数`,"detail.field.result":`结果`,"detail.field.parent":`父级`,"detail.field.depth":`层级`,"detail.field.exitCode":`退出码`,"detail.field.signal":`信号`,"detail.field.previousStatus":`中断前状态`,"detail.field.agent":`智能体 ID`,"detail.field.job":`任务 ID`,"detail.field.task":`任务内容`,"detail.field.processGroup":`进程组`,"detail.field.availability":`可用状态`,"detail.field.bestMatch":`最相关事件`,"detail.field.target":`目标事件`,"detail.field.surface":`记录状态`,"detail.agents.count":`{count} 个智能体`,"detail.jobs.count":`{count} 个后台任务`,"detail.terminals.count":`{count} 个终端`,"detail.tasks.count":`{count} 个团队任务`,"detail.tasks.nextPage":`后面还有任务;下一页位置为 {cursor}`,"detail.locations.count":`{count} 个位置`,"detail.location":`第 {line} 行,第 {column} 列`,"detail.receipt.delivered":`消息已送达`,"detail.receipt.interrupt":`已请求中断`,"detail.receipt.started":`已启动`,"detail.receipt.cancel":`已请求取消`,"detail.receipt.alreadyFinished":`任务已结束`,"detail.receipt.signal":`信号已发送`,"detail.receipt.closed":`已关闭`,"detail.receipt.closing":`关闭中`,"detail.wait.noProgress":`没有正在运行的子智能体`,"detail.wait.title":`子智能体状态`,"detail.wait.timeout":`等待超时`,"detail.wait.changed":`检测到变化`,"detail.agent.reply":`智能体回复`,"detail.models.title":`可用模型`,"detail.output.lines":`第 {begin}–{end} 行,共 {total} 行`,"detail.output.truncated":`输出已截断`,"detail.providers.count":`{count} 个检查提供方`,"detail.plugins.count":`{count} 个动态插件`,"detail.workflow.script":`工作流脚本`,"detail.ralph.reportedComplete":`智能体报告完成`,"detail.ralph.reportedBlocker":`智能体报告受阻`,"detail.ralph.limit":`已达到轮次上限`,"detail.report.nextSteps":`待完成事项`,"detail.trace.replacedBy":`被替换为`,"detail.trace.replacementChain":`替换链`,"detail.trace.replaces":`替换的事件`,"detail.trace.sources":`引用来源`,"detail.trace.derived":`派生事件`,"detail.trace.ancestors":`祖先会话`,"detail.trace.descendants":`后代会话`,"detail.matches.count":`{count} 条匹配`,"detail.matches.capped":`已达到结果上限,可缩小搜索范围`,"detail.event.neighbors":`前后事件`,"todo.completed":`{done}/{total} 已完成`,"command.attachmentsUnsupported":`/{command} 不接受附件,请先移除附件`,"ask.rowTitle":`提问`,"ask.waiting":`等待回答`,"ask.pending":`已继续工作,仍可回答`,"ask.pendingDetail":`等待中的问题仍可在输入框中回答`,"ask.reopen":`回答`,"ask.review":`查看回答`,"ask.closed":`已结束`,"ask.closedDetail":`该问题已结束,结果见下方对话`,"ask.cancelled":`已取消`,"ask.cancelledDetail":`本轮已取消,未提交回答`,"ask.interrupted":`已中断`,"ask.interruptedDetail":`本轮已中断,未提交回答`,"ask.answered":`{answered}/{total} 已回答`,"ask.skipped":`未回答`,"bash.running":`运行中`,"bash.failed":`失败`,"bash.stopped":`已停止`,"tool.output.showFull":`显示完整输出(共 {size} KB)`,"tool.output.loading":`正在加载完整输出…`,"tool.output.retry":`重试加载完整输出`,"tool.output.failed":`加载失败,请重试。`,"tool.output.stale":`工具输出已变化,请刷新会话。`,"row.running":`运行中`,"row.preparing":`正在准备调用`,"row.failed":`失败`,"row.stopped":`已停止`,"row.input":`输入`,"row.output":`输出`,"row.inspect":`查看`,"tool.title.search":`搜索`,"tool.title.read":`读取`,"tool.title.bash":`运行命令`,"tool.title.write":`写入`,"tool.title.edit":`编辑`,"tool.title.filesChanging":`{count} 个文件已更改`,"tool.title.filesEdited":`已编辑 {count} 个文件`,"tool.title.code":`代码`,"tool.title.generic":`工具调用`,"tool.contextCompaction.action":`压缩上下文`,"tool.contextCompaction.running":`正在压缩…`,"tool.contextCompaction.completed":`上下文已压缩`,"tool.title.inspect":`查询 Cordis 环境`,"tool.title.runCordis":`运行 Cordis 插件`,"tool.title.stopCordis":`停止 Cordis 插件`,"tool.title.removeCordis":`移除 Cordis 插件`,"tool.title.pwsh":`运行命令`,"tool.title.readImage":`读取图片`,"tool.title.grep":`搜索文件内容`,"tool.title.glob":`查找文件`,"tool.title.webSearch":`网页搜索`,"tool.title.webFetch":`网页获取`,"tool.autoReviewRejected":`Auto review 已拒绝`,"tool.autoReviewNotExecuted":`工具未执行。原因:{reason}`,"tool.autoReviewReasonFallback":`Auto review 未授权此次操作`,"diff.collapseAria":`收起差异`,"diff.expandAria":`展开其余 {count} 行差异`,"diff.expandRest":`… 其余 {count} 行`,"read.window":`显示 {shown} / {total} 行`,"read.collapseAria":`收起内容`,"read.expandAria":`展开其余 {count} 行`,"read.expandRest":`… 其余 {count} 行`,"search.paths":`{shown} 个路径`,"search.paths.truncated":`显示 {shown} / 共 {total} 个路径`,"search.matches":`{shown} 处匹配 · {files} 个文件`,"search.matches.truncated":`显示 {shown} / 共 {total} 处匹配 · {files} 个文件`,"search.noResults":`无结果`,"search.collapseAria":`收起结果`,"search.expandAria":`展开其余 {count} 行结果`,"search.expandRest":`… 其余 {count} 行`,"web.noResults":`未找到结果`,"web.sourcesTruncated":`来源列表已截断`,"web.http":`HTTP`,"web.contentTruncated":`内容已截断`,"details.running":`运行中…`,"queue.count":`{n} 条排队消息`,"queue.sending":`发送中…`,"queue.image":`排队消息图片`,"queue.file":`排队文件 {name}`,"queue.edit":`编辑排队消息`,"queue.edit.unsupported":`包含非文本内容,暂不支持编辑`,"queue.save":`保存排队消息`,"queue.cancelEdit":`取消编辑`,"queue.remove":`删除排队消息`,"queue.steer":`插话发送`,"queue.steer.unavailable":`仅运行中可插话发送`,"queue.resume":`继续队列`,"queue.paused.interrupted":`队列已因你中断当前任务而暂停。请选择一条继续。`,"queue.paused.unknown":`任务结果未知,队列已暂停且不会自动重试。`,"queue.paused.failed":`上一项未正常完成,队列已暂停。`,"error.sessionInUse":`当前会话已被占用,可能是其他正在运行的 DSH 导致的(如其他 dsh web、桌面端),请退出其他正在运行的 DSH 后重试。`,"queue.editFailed":`编辑失败:这条消息可能已经开始发送。`,"queue.removeFailed":`删除失败:这条消息可能已经开始发送。`,"queue.steerFailed":`插话发送失败,请重试。`,"queue.resumeFailed":`继续队列失败,请重试。`,"terminal.signal":`信号 {signal}`,"terminal.exitCode":`退出码 {code}`,"terminal.noExitCode":`未正常退出`,"terminal.running":`运行中`,"terminal.failed":`失败`,"terminal.done":`已完成`,"terminal.noOutput":`无输出`,"terminal.collapseAria":`收起输出`,"terminal.expandAria":`展开其余 {n} 行输出`,"terminal.expandRest":`… 其余 {n} 行`,"terminal.sendInput":`(发送输入)`,"terminal.session":`终端 {sessionId}`},Xb={"shortcut.newline":`New line`,"shortcut.complementary":`Use the complementary Queue / Steer action`,"shortcut.slash":`Open command menu`,"shortcut.mention":`Open reference menu`,"hint.plan":Jb,"hint.goal":`describe the objective for a long-running task`,"hint.goal.active":`goal active — edit / pause / resume / clear`,"placeholder.plan":Jb,"placeholder.default":`Message or run a task, / commands, @ files or sessions`,"placeholder.unavailable":`Session unavailable`,"placeholder.parentOffline":`Parent session offline; sending is unavailable but you can still stop the run`,"placeholder.hero":`Describe what you want to build, / commands, @ files or sessions`,"placeholder.workspace":`Choose a workspace to start`,"placeholder.preparing":`Preparing conversation…`,"placeholder.steerQueue":`Cmd/Ctrl+Enter steers all queued messages`,"input.commands":`Add files or run commands`,"input.commandsOnly":`Run commands`,"input.imagesAndCommands":`Add images or run commands`,"attachment.unavailable":`Attachment uploads are unavailable on this Web connection.`,"input.file":`File`,"input.stop":`Stop generating`,"input.send":`Send message`,"input.send.queue":`Queue message`,"input.send.steer":`Steer message`,"attachment.pending":`Pending attachments`,"attachment.scrollLeft":`Scroll attachments left`,"attachment.scrollRight":`Scroll attachments right`,"reference.dropTitle":`Release to reference chat`,"attachment.dropTitle":`Drag files or images here to add them`,"attachment.dropDesc":`Image limit: up to {count} images, {size} each`,"attachment.dropBlocked":`Files and images cannot be added right now`,"attachment.directoryDesktopOnly":`Folders can only be added in the desktop app; add individual files in the browser`,"attachment.pathUnavailable":`Could not obtain the folder path; drag it in again`,"attachment.pathUnsupported":`The path contains characters a reference cannot carry; rename it and try again`,"image.pending":`Pending images`,"image.openOriginal":`View original`,"image.openOriginalLabel":`{label}, click to view original`,"image.remove":`Remove image {name}`,"image.original":`Original image`,"image.label":`Image`,"image.loadFailed":`Image unavailable; click to retry`,"image.loading":`Loading image…`,"image.preview":`Original image preview`,"image.closePreview":`Close original image preview`,"image.unsupportedType":`Only PNG, JPG, WebP, and GIF images are supported`,"image.tooMany":`A message can include up to {count} images`,"image.fileTooLarge":`Each image must be smaller than {size}`,"image.totalTooLarge":`Images exceed {size} in total; remove some and try again`,"image.tooManyPixels":`Image resolution is too high; compress it and try again`,"image.dimensionTooLarge":`Image sides must be at most {size}px; downscale it and try again`,"image.modelUnsupported":`The current model does not support images; switch to a model that does`,"image.sendFailed":`Sending images failed ({reason}); re-add them and try again`,"file.unavailable":`The uploaded file is unavailable or changed; select it again`,"file.pending":`Pending files`,"file.remove":`Remove file {name}`,"file.uploading":`Uploading…`,"file.uploadFailed":`Upload failed; click to retry`,"file.retry":`Retry uploading {name}`,"file.stillUploading":`Files are still uploading; send after they finish`,"file.sessionUnavailable":`Session unavailable; files cannot be uploaded`,"file.notStaged":`The file has not finished uploading; re-add it and try again`,"file.label":`File`,"context.aria":`{percent} of context used`,"context.used":`of context used`,"context.system":`System prompt`,"context.tools":`Tool definitions`,"context.messages":`Messages`,"settings.enter.title":`Send behavior while busy`,"settings.enter.description":`What Enter and the Send button do while the agent is running; Cmd/Ctrl+Enter uses the other behavior`,"settings.enter.queue":`Queue`,"settings.enter.steer":`Steer`,"hero.headline":`What should we build today?`,"hero.preview":`Web`,"hero.chooseWorkspace":`Choose workspace`,"hero.noWorkspace":`No workspace`,"session.hierarchy":`Session hierarchy`,"todo.title":`To-dos`,"todo.progress.done":`{done} completed`,"todo.progress.active":`{active} in progress`,"todo.progress.pending":`{pending} pending`,"todo.status.completed":`Completed`,"todo.status.inProgress":`In progress`,"todo.status.pending":`Pending`,"todo.rowTitle":`Update to-do list`,"tool.title.createGoal":`Create goal`,"tool.title.getGoal":`View goal`,"tool.title.updateGoal":`Update goal`,"tool.preparing.content":`{kilobytes}KB`,"tool.title.createSchedule":`Create reminder`,"tool.title.listSchedules":`List reminders`,"tool.title.deleteSchedule":`Delete reminder`,"tool.title.updateSchedule":`Update reminder`,"detail.state":`Status`,"detail.todo.completed":`Completed`,"detail.todo.in_progress":`In progress`,"detail.todo.pending":`Pending`,"detail.todo.empty":`The to-do list is empty`,"todo.diff.initial":`Initial list`,"todo.diff.compare":`Changes since the previous list`,"todo.diff.unavailable":`Previous list unavailable`,"todo.diff.noChanges":`No changes to the list`,"todo.diff.added":`{count} added`,"todo.diff.updated":`{count} updated`,"todo.diff.removed":`{count} removed`,"todo.diff.unchanged":`{count} unchanged`,"todo.diff.addedItem":`Added`,"todo.diff.updatedItem":`Status changed`,"todo.diff.movedItem":`Reordered`,"todo.diff.removedItem":`Removed`,"detail.goal.empty":`No goal`,"detail.goal.active":`Active`,"detail.goal.disarmed":`Awaiting continuation`,"detail.goal.paused":`Paused`,"detail.goal.blocked":`Blocked`,"detail.goal.complete":`Completed`,"detail.goal.rounds":`Rounds`,"detail.goal.reason":`Blocker`,"detail.days":`{count} d`,"detail.hours":`{count} h`,"detail.minutes":`{count} min`,"detail.seconds":`{count} s`,"detail.schedule.once":`Once`,"detail.schedule.every":`Every {interval}`,"detail.schedule.when":`Scheduled for`,"detail.schedule.frequency":`Repeat`,"detail.schedule.scheduled":`Scheduled`,"detail.schedule.overdue":`Overdue, awaiting session resume`,"detail.schedule.empty":`No reminders`,"detail.schedule.deleted":`Deleted`,"detail.schedule.count":`{count} reminders`,"detail.schedule.daily":`Every day at {time} ({zone})`,"detail.schedule.weekly":`Weekly on {days} at {time} ({zone})`,"detail.schedule.cron":`Cron {expression} ({zone})`,"detail.weekday.1":`Mon`,"detail.weekday.2":`Tue`,"detail.weekday.3":`Wed`,"detail.weekday.4":`Thu`,"detail.weekday.5":`Fri`,"detail.weekday.6":`Sat`,"detail.weekday.7":`Sun`,"detail.weekday.join":`, `,"tool.title.inspectProviders":`Inspect providers`,"tool.title.queryRuntime":`Query runtime`,"tool.title.inspectPlugins":`Inspect plugins`,"tool.title.workflow":`Run workflow`,"tool.title.ralph":`Run ralph loop`,"tool.title.readEvent":`Read event`,"tool.title.searchEvents":`Search events`,"tool.title.traceEvent":`Trace event`,"tool.title.searchSessions":`Search sessions`,"tool.title.traceSession":`Trace session`,"tool.title.listModels":`List models`,"tool.title.subagent":`Create subagent`,"tool.title.listAgents":`List subagents`,"tool.title.sendMessage":`Send message`,"tool.title.interruptAgent":`Interrupt agent`,"tool.title.listJobs":`List background jobs`,"tool.title.readJob":`Read job output`,"tool.title.killJob":`Cancel background job`,"tool.title.openTerminal":`Open terminal`,"tool.title.readTerminal":`Read terminal`,"tool.title.listTerminals":`List terminals`,"tool.title.signalTerminal":`Signal terminal`,"tool.title.closeTerminal":`Close terminal`,"tool.title.lsp":`Query code symbols`,"tool.title.findDefinition":`Find definition`,"tool.title.findReferences":`Find references`,"tool.title.findImplementation":`Find implementation`,"tool.title.hoverSymbol":`Inspect symbol`,"tool.title.spawnTeammate":`Create teammate`,"tool.title.createTeamTask":`Create team task`,"tool.title.getTeamTask":`Read team task`,"tool.title.updateTeamTask":`Update team task`,"tool.title.listTeamTasks":`List team tasks`,"tool.title.waitAgent":`Wait for subagent`,"detail.recordedResult":`Recorded result`,"detail.empty":`No results`,"detail.none":`None`,"detail.yes":`Yes`,"detail.no":`No`,"detail.moreInInspect":`{count} more items available in Inspect`,"detail.status.running":`Running`,"detail.status.idle":`Idle`,"detail.status.ready":`Ready`,"detail.status.inactive":`Inactive`,"detail.status.provisioning":`Provisioning`,"detail.status.failed":`Failed`,"detail.status.completed":`Completed`,"detail.status.deleted":`Deleted`,"detail.status.killed":`Cancelled`,"detail.status.accepted":`Accepted`,"detail.status.queued":`Queued`,"detail.status.exited":`Exited`,"detail.field.id":`ID`,"detail.field.revision":`Revision`,"detail.field.platform":`Platform`,"detail.field.provider":`Provider`,"detail.field.model":`Model`,"detail.field.role":`Role`,"detail.field.context":`Context`,"detail.field.owner":`Owner`,"detail.field.ready":`Ready`,"detail.field.dependencies":`Dependencies`,"detail.field.writeScopes":`Write scopes`,"detail.field.warnings":`Warnings`,"detail.field.diagnostics":`Diagnostics`,"detail.field.methods":`Methods`,"detail.field.inputSchema":`Input schema`,"detail.field.outputSchema":`Output schema`,"detail.field.currentPackage":`Current package`,"detail.field.nextPackage":`Next package`,"detail.field.latestRun":`Latest run`,"detail.field.packages":`Packages`,"detail.field.registrations":`Registrations`,"detail.field.props":`Props`,"detail.field.data":`Data`,"detail.field.source":`Source`,"detail.field.content":`Content`,"detail.field.message":`Message`,"detail.field.messageId":`Message ID`,"detail.field.root":`Root`,"detail.field.pid":`Process ID`,"detail.field.type":`Type`,"detail.field.time":`Time`,"detail.field.seq":`Event sequence`,"detail.field.turn":`Turn`,"detail.field.step":`Step`,"detail.field.callId":`Call ID`,"detail.field.agents":`Agents started`,"detail.field.result":`Result`,"detail.field.parent":`Parent`,"detail.field.depth":`Depth`,"detail.field.exitCode":`Exit code`,"detail.field.signal":`Signal`,"detail.field.previousStatus":`Previous status`,"detail.field.agent":`Agent ID`,"detail.field.job":`Job ID`,"detail.field.task":`Task`,"detail.field.processGroup":`Process group`,"detail.field.availability":`Availability`,"detail.field.bestMatch":`Best match`,"detail.field.target":`Target event`,"detail.field.surface":`Record status`,"detail.agents.count":`{count} agents`,"detail.jobs.count":`{count} background jobs`,"detail.terminals.count":`{count} terminals`,"detail.tasks.count":`{count} team tasks`,"detail.tasks.nextPage":`More tasks available; next cursor is {cursor}`,"detail.locations.count":`{count} locations`,"detail.location":`Line {line}, column {column}`,"detail.receipt.delivered":`Message delivered`,"detail.receipt.interrupt":`Interrupt requested`,"detail.receipt.started":`Started`,"detail.receipt.cancel":`Cancellation requested`,"detail.receipt.alreadyFinished":`Already finished`,"detail.receipt.signal":`Signal delivered`,"detail.receipt.closed":`Closed`,"detail.receipt.closing":`Closing`,"detail.wait.noProgress":`No active subagents`,"detail.wait.title":`Subagent activity`,"detail.wait.timeout":`Wait timed out`,"detail.wait.changed":`Change detected`,"detail.agent.reply":`Agent response`,"detail.models.title":`Available models`,"detail.output.lines":`Lines {begin}–{end} of {total}`,"detail.output.truncated":`Output truncated`,"detail.providers.count":`{count} inspect providers`,"detail.plugins.count":`{count} dynamic plugins`,"detail.workflow.script":`Workflow script`,"detail.ralph.reportedComplete":`Worker reported completion`,"detail.ralph.reportedBlocker":`Worker reported a blocker`,"detail.ralph.limit":`Round limit reached`,"detail.report.nextSteps":`Remaining work`,"detail.trace.replacedBy":`Replaced by`,"detail.trace.replacementChain":`Replacement chain`,"detail.trace.replaces":`Replaced events`,"detail.trace.sources":`Source events`,"detail.trace.derived":`Derived events`,"detail.trace.ancestors":`Ancestor sessions`,"detail.trace.descendants":`Descendant sessions`,"detail.matches.count":`{count} matches`,"detail.matches.capped":`Result limit reached; narrow the search for more`,"detail.event.neighbors":`Surrounding events`,"todo.completed":`{done}/{total} completed`,"command.attachmentsUnsupported":`/{command} does not accept attachments; remove them first`,"ask.rowTitle":`Ask question`,"ask.waiting":`waiting`,"ask.pending":`continued; answer still available`,"ask.pendingDetail":`These pending questions remain answerable from the composer.`,"ask.reopen":`Answer`,"ask.review":`View answers`,"ask.closed":`closed`,"ask.closedDetail":`This question is closed; its outcome is in the conversation below.`,"ask.cancelled":`cancelled`,"ask.cancelledDetail":`This question set was cancelled before answers were submitted.`,"ask.interrupted":`interrupted`,"ask.interruptedDetail":`This question set was interrupted before answers were submitted.`,"ask.answered":`{answered}/{total} answered`,"ask.skipped":`Not answered`,"bash.running":`Running`,"bash.failed":`Failed`,"bash.stopped":`Stopped`,"tool.output.showFull":`Show full output ({size} KB total)`,"tool.output.loading":`Loading full output…`,"tool.output.retry":`Retry loading full output`,"tool.output.failed":`Could not load output. Please retry.`,"tool.output.stale":`Tool output changed. Refresh the conversation.`,"row.running":`Running`,"row.preparing":`Preparing tool call`,"row.failed":`Failed`,"row.stopped":`Stopped`,"row.input":`IN`,"row.output":`OUT`,"row.inspect":`Inspect`,"tool.title.search":`Search`,"tool.title.read":`Read`,"tool.title.bash":`Bash`,"tool.title.write":`Write`,"tool.title.edit":`Edit`,"tool.title.filesChanging":`{count} files changed`,"tool.title.filesEdited":`Edited {count} files`,"tool.title.code":`Code`,"tool.title.generic":`Tool call`,"tool.contextCompaction.action":`Compact context`,"tool.contextCompaction.running":`Compacting context…`,"tool.contextCompaction.completed":`Context compacted`,"tool.title.inspect":`Query Cordis environment`,"tool.title.runCordis":`Run Cordis Plugin`,"tool.title.stopCordis":`Stop Cordis Plugin`,"tool.title.removeCordis":`Remove Cordis Plugin`,"tool.title.pwsh":`Pwsh`,"tool.title.readImage":`Read image`,"tool.title.grep":`Grep`,"tool.title.glob":`Glob`,"tool.title.webSearch":`Search`,"tool.title.webFetch":`Fetch`,"tool.autoReviewRejected":`Rejected by Auto review`,"tool.autoReviewNotExecuted":`Tool was not executed. Reason: {reason}`,"tool.autoReviewReasonFallback":`Auto review did not authorize this action`,"diff.collapseAria":`Collapse diff`,"diff.expandAria":`Expand {count} more diff lines`,"diff.expandRest":`… {count} more lines`,"read.window":`Showing {shown} of {total} lines`,"read.collapseAria":`Collapse content`,"read.expandAria":`Expand {count} more lines`,"read.expandRest":`… {count} more lines`,"search.paths":`{shown} paths`,"search.paths.truncated":`Showing {shown} of {total} paths`,"search.matches":`{shown} matches · {files} files`,"search.matches.truncated":`Showing {shown} of {total} matches · {files} files`,"search.noResults":`No results`,"search.collapseAria":`Collapse results`,"search.expandAria":`Expand {count} more result lines`,"search.expandRest":`… {count} more lines`,"web.noResults":`No results found`,"web.sourcesTruncated":`Source list truncated`,"web.http":`HTTP`,"web.contentTruncated":`Content truncated`,"details.running":`Running…`,"queue.count":`{n} queued messages`,"queue.sending":`Sending…`,"queue.image":`Queued message image`,"queue.file":`Queued file {name}`,"queue.edit":`Edit queued message`,"queue.edit.unsupported":`Contains non-text content; editing is not supported yet`,"queue.save":`Save queued message`,"queue.cancelEdit":`Cancel editing`,"queue.remove":`Remove queued message`,"queue.steer":`Steer queued message`,"queue.steer.unavailable":`Steering is available only while the agent is running`,"queue.resume":`Resume queue`,"queue.paused.interrupted":`Queue paused because you interrupted. Choose a message to resume.`,"queue.paused.unknown":`Outcome unknown. The queue is paused and will not retry automatically.`,"queue.paused.failed":`The previous turn did not finish normally. The queue is paused.`,"error.sessionInUse":`This session is already in use, possibly by another running DSH instance (such as dsh web or the desktop app). Quit other running DSH instances and try again.`,"queue.editFailed":`Edit failed: this message may have already started sending.`,"queue.removeFailed":`Removal failed: this message may have already started sending.`,"queue.steerFailed":`Steering failed. Try again.`,"queue.resumeFailed":`Could not resume the queue. Try again.`,"terminal.signal":`signal {signal}`,"terminal.exitCode":`exit code {code}`,"terminal.noExitCode":`no exit code`,"terminal.running":`Running`,"terminal.failed":`Failed`,"terminal.done":`Done`,"terminal.noOutput":`No output`,"terminal.collapseAria":`Collapse output`,"terminal.expandAria":`Expand the remaining {n} output lines`,"terminal.expandRest":`… {n} more lines`,"terminal.sendInput":`(send input)`,"terminal.session":`Terminal {sessionId}`},Zb=`@deepseek-ai/dsh-client-ui-conversation/QueueDock.module.css`;if(typeof document<`u`&&document.querySelector(`style[data-plugin-css=`+JSON.stringify(Zb)+`]`)===null){let e=document.createElement(`style`);e.dataset.plugin=`@deepseek-ai/dsh-client-ui-conversation`,e.dataset.pluginCss=Zb,e.textContent=`.COptxG_dock{box-sizing:border-box;width:calc(100% - var(--dsh-composer-side-clearance) - var(--dsh-composer-side-clearance) - var(--dsh-composer-dock-inset) - var(--dsh-composer-dock-inset));max-width:calc(var(--dsh-composer-card-max-width) - var(--dsh-composer-dock-inset) - var(--dsh-composer-dock-inset));margin:0 auto calc(0px - var(--dsh-composer-stack-gap) - 3px);padding:0 var(--dsh-composer-dock-inset);flex:none}.COptxG_panel{isolation:isolate;border-radius:var(--dsw-radius-lg) var(--dsw-radius-lg) 0 0;--dsh-scrollbar-thumb:var(--dsw-alias-scrollbar-bg-l2);--dsh-scrollbar-thumb-hover:var(--dsw-alias-scrollbar-hover-l2);width:100%;padding:2px 0;position:relative;overflow:hidden}.COptxG_panel:before{z-index:-1;border-radius:inherit;background:var(--dsw-specific-menu);backdrop-filter:var(--dsw-menu-backdrop-filter);content:"";pointer-events:none;position:absolute;inset:0}.COptxG_panel:after{border:.5px solid var(--dsw-alias-border-l1);border-radius:inherit;content:"";pointer-events:none;border-bottom:none;position:absolute;inset:0}.COptxG_paused{color:var(--dsw-alias-label-tertiary);font:var(--dsw-font-xs-13);padding:6px 12px 2px}.COptxG_header{box-sizing:border-box;border-radius:var(--dsw-radius-md);width:100%;height:36px;color:var(--dsw-alias-label-primary);text-align:left;cursor:pointer;background:0 0;border:none;align-items:center;gap:10px;padding:4px 12px;display:flex}.COptxG_header:focus-visible{outline:var(--dsw-focus-ring-width) solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:-2px}.COptxG_header:disabled{cursor:default}.COptxG_lead{color:var(--dsw-alias-label-tertiary);flex:none;place-items:center;display:grid}.COptxG_count{min-width:0;font-family:Inter, var(--dsw-font-family);flex:auto;font-size:13px;font-weight:500;line-height:24px}.COptxG_chevron{width:14px;height:14px;color:var(--dsw-alias-label-tertiary);flex:none;place-items:center;display:grid}.COptxG_list{max-height:180px;margin:0;padding:0;list-style:none;overflow-y:auto}.COptxG_row{box-sizing:border-box;border-radius:var(--dsw-radius-md);align-items:center;gap:10px;width:100%;min-height:36px;padding:4px 5px 4px 12px;display:flex}.COptxG_row+.COptxG_row{box-shadow:inset 0 1px 0 var(--dsw-alias-border-l1)}.COptxG_attachments{flex:none;gap:4px;min-width:0;max-width:55%;display:flex;overflow:hidden}.COptxG_pendingRow .COptxG_attachments{flex-shrink:1}.COptxG_file{border:.5px solid var(--dsw-alias-border-l1);border-radius:var(--dsw-radius-sm);background:var(--dsw-alias-bg-base);box-sizing:border-box;flex:0 180px;align-items:center;gap:4px;min-width:74px;height:24px;padding:0 6px;display:inline-flex;overflow:hidden}.COptxG_fileIcon{flex:none;width:16px;height:16px;display:inline-flex}.COptxG_fileName{min-width:0;color:var(--dsw-alias-label-primary-dimmed);font:var(--dsw-font-xs-13);text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.COptxG_fileSize{color:var(--dsw-alias-label-tertiary);white-space:nowrap;flex:none;font-size:10px}.COptxG_thumb{border:.5px solid var(--dsw-alias-border-l1);border-radius:var(--dsw-radius-xs);background:var(--dsw-alias-bg-base);object-fit:cover;width:24px;height:24px}.COptxG_preview{min-width:0;font:var(--dsw-font-xs-13);font-family:Inter, var(--dsw-font-family);color:var(--dsw-alias-label-primary-dimmed);text-overflow:ellipsis;white-space:nowrap;word-break:break-word;flex:auto;overflow:hidden}.COptxG_actions{flex:none;align-items:center;gap:10px;display:flex}.COptxG_status{color:var(--dsw-alias-label-tertiary);font:var(--dsw-font-xs-13);white-space:nowrap;flex:none}.COptxG_action{corner-shape:round;width:28px;height:28px;color:var(--dsw-alias-label-tertiary);cursor:pointer;background:0 0;border:none;border-radius:999px;flex:none;place-items:center;padding:0;display:grid}.COptxG_action:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover)}.COptxG_action:focus-visible{outline:var(--dsw-focus-ring-width) solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:-2px}.COptxG_action:disabled{cursor:default;opacity:.45}`,document.head.appendChild(e)}var Z={action:`COptxG_action`,actions:`COptxG_actions`,attachments:`COptxG_attachments`,chevron:`COptxG_chevron`,count:`COptxG_count`,dock:`COptxG_dock`,file:`COptxG_file`,fileIcon:`COptxG_fileIcon`,fileName:`COptxG_fileName`,fileSize:`COptxG_fileSize`,header:`COptxG_header`,lead:`COptxG_lead`,list:`COptxG_list`,panel:`COptxG_panel`,paused:`COptxG_paused`,pendingRow:`COptxG_pendingRow`,preview:`COptxG_preview`,row:`COptxG_row`,status:`COptxG_status`,thumb:`COptxG_thumb`};let Qb=[];function $b(e){let t=e.filter(e=>e.type!==`image`&&e.type!==`file`).map(e=>e.type===`text`?e.text:`[${e.type}]`).join(` `).replace(/\s+/g,` `).trim(),n=Array.from(t);return n.length>200?`${n.slice(0,200).join(``)}…`:t}function ex(e){return e.every(e=>e.type===`text`)?e.map(e=>e.text).join(``):null}function tx(e){let t=[];for(let n of e){if(n.type===`image`){let{attachment:e}=n;e!==void 0&&t.push({type:`image`,attachment:e})}if(n.type===`file`){let{attachment:e}=n;e!==void 0&&t.push({type:`file`,attachment:e})}}return t}function nx({attachment:e,label:t}){return/* @__PURE__ */ (0,h.jsxs)(`span`,{className:Z.file,"aria-label":t,title:e.name,children:[/* @__PURE__ */ (0,h.jsx)(`span`,{className:Z.fileIcon,"aria-hidden":!0,children:/* @__PURE__ */ (0,h.jsx)(d.FileTypeIcon,{path:e.name,size:16})}),/* @__PURE__ */ (0,h.jsx)(`span`,{className:Z.fileName,children:e.name}),/* @__PURE__ */ (0,h.jsx)(`span`,{className:Z.fileSize,children:(0,d.fileSizeText)(e.bytes)})]})}function rx({attachment:e,loadImage:t,label:n}){let[r,i]=(0,g.useState)(null);return(0,g.useEffect)(()=>{let n=!0;return t(e).then(e=>{n&&i(e)},()=>{}),()=>{n=!1}},[e,t]),r===null?/* @__PURE__ */ (0,h.jsx)(`span`,{className:Z.thumb,"aria-hidden":!0}):/* @__PURE__ */ (0,h.jsx)(`img`,{className:Z.thumb,src:r,alt:n})}function ix({useSession:e,useProjection:t,updateQueue:n,editQueue:r,notify:i,loadImage:a,t:o}){let s=t(`inbox`),c=t(`queueState`),l=e(e=>e.pendingSubmissions),u=(0,g.useMemo)(()=>{let e=s?.[`next-turn`]??Qb,t=new Set(l.filter(e=>e.placement===`transcript`).map(e=>e.requestId));return t.size===0?e:e.filter(({source:e})=>e.kind!==`user`||!(`rpcId`in e)||!t.has(e.rpcId))},[s,l]),f=(0,g.useMemo)(()=>{let e=new Set(u.flatMap(({source:e})=>e.kind===`user`&&`rpcId`in e?[e.rpcId]:[]));return l.filter(t=>t.placement===`queued`&&!e.has(t.requestId))},[l,u]),p=u.length+f.length,m=e(e=>e.running),_=e(e=>e.subagent===null||e.subagent.address.mode===`continuable`),v=(0,g.useRef)(!1),[y,ee]=(0,g.useState)(null),[b,x]=(0,g.useState)(!0),S=(0,g.useId)(),te=c?.pausedReason??null,ne=te===`interrupted`?o(`queue.paused.interrupted`):te===`outcome-unknown`?o(`queue.paused.unknown`):te===`failed`?o(`queue.paused.failed`):null;if((0,g.useEffect)(()=>{p===0&&!b&&x(!0)},[b,p]),p===0)return null;let re=_&&y!==null,ie=!b||re,ae=p===1||ie,oe=async(e,t,r)=>{if(v.current)return!1;v.current=!0,ee(e);try{return typeof t==`function`?await t():await n(e,t),!0}catch{return i(`error`,r),!1}finally{v.current=!1,ee(t=>t===e?null:t)}};return/* @__PURE__ */ (0,h.jsx)(`div`,{className:Z.dock,"data-queue-dock":``,children:/* @__PURE__ */ (0,h.jsxs)(`div`,{className:Z.panel,children:[ne!==null&&/* @__PURE__ */ (0,h.jsx)(`div`,{className:Z.paused,role:`status`,children:ne}),p>1&&/* @__PURE__ */ (0,h.jsxs)(`button`,{type:`button`,className:Z.header,"aria-controls":S,"aria-expanded":ie,disabled:re,onClick:()=>{x(e=>!e)},children:[/* @__PURE__ */ (0,h.jsx)(`span`,{className:Z.lead,"aria-hidden":!0,children:/* @__PURE__ */ (0,h.jsx)(d.IconQueueOutlineRegular,{})}),/* @__PURE__ */ (0,h.jsx)(`span`,{className:Z.count,children:o(`queue.count`,{n:p})}),!ae&&f.length>0&&/* @__PURE__ */ (0,h.jsx)(`span`,{className:Z.status,role:`status`,children:o(`queue.sending`)}),/* @__PURE__ */ (0,h.jsx)(`span`,{className:Z.chevron,"aria-hidden":!0,children:ie?/* @__PURE__ */ (0,h.jsx)(d.IconChevronDownOutlineRegular,{}):/* @__PURE__ */ (0,h.jsx)(d.IconChevronUpOutlineRegular,{})})]}),/* @__PURE__ */ (0,h.jsxs)(`ul`,{id:S,className:Z.list,hidden:!ae,children:[ae&&u.map(e=>{let t=tx(e.content),n=ex(e.content);return/* @__PURE__ */ (0,h.jsxs)(`li`,{className:Z.row,children:[p===1&&/* @__PURE__ */ (0,h.jsx)(`span`,{className:Z.lead,"aria-hidden":!0,children:/* @__PURE__ */ (0,h.jsx)(d.IconQueueOutlineRegular,{})}),t.length>0&&/* @__PURE__ */ (0,h.jsx)(`span`,{className:Z.attachments,children:t.map((e,t)=>e.type===`image`?/* @__PURE__ */ (0,h.jsx)(rx,{attachment:e.attachment,loadImage:a,label:o(`queue.image`)},`${e.attachment.attachmentId}:${t}`):/* @__PURE__ */ (0,h.jsx)(nx,{attachment:e.attachment,label:o(`queue.file`,{name:e.attachment.name})},`${e.attachment.attachmentId}:${e.attachment.name}:${t}`))}),/* @__PURE__ */ (0,h.jsx)(`span`,{className:Z.preview,children:(0,d.projectUserText)($b(e.content),[])}),_&&/* @__PURE__ */ (0,h.jsxs)(`div`,{className:Z.actions,children:[/* @__PURE__ */ (0,h.jsx)(d.Tooltip,{portal:!0,label:o(`queue.edit`),side:`bottom`,delayMs:500,disabled:n===null,children:/* @__PURE__ */ (0,h.jsx)(`button`,{type:`button`,className:Z.action,"aria-label":o(`queue.edit`),title:n===null?o(`queue.edit.unsupported`):void 0,disabled:y!==null||n===null,onClick:()=>{n!==null&&oe(e.id,()=>r(e.id,n),o(`queue.editFailed`))},children:/* @__PURE__ */ (0,h.jsx)(d.IconEditOutlineRegular,{size:14})})}),/* @__PURE__ */ (0,h.jsx)(d.Tooltip,{portal:!0,label:o(`queue.remove`),side:`bottom`,delayMs:500,children:/* @__PURE__ */ (0,h.jsx)(`button`,{type:`button`,className:Z.action,"aria-label":o(`queue.remove`),disabled:y!==null,onClick:()=>{oe(e.id,{kind:`remove`},o(`queue.removeFailed`))},children:/* @__PURE__ */ (0,h.jsx)(d.IconTrashOutlineRegular,{size:14})})}),/* @__PURE__ */ (0,h.jsx)(d.Tooltip,{portal:!0,label:o(m?`queue.steer`:`queue.resume`),side:`bottom`,delayMs:500,children:/* @__PURE__ */ (0,h.jsx)(`button`,{type:`button`,className:Z.action,"aria-label":o(m?`queue.steer`:`queue.resume`),disabled:y!==null,onClick:()=>{oe(e.id,{kind:`steer`},o(m?`queue.steerFailed`:`queue.resumeFailed`))},children:/* @__PURE__ */ (0,h.jsx)(d.IconSendOutlineRegular,{})})})]})]},e.id)}),ae&&f.map(e=>/* @__PURE__ */ (0,h.jsxs)(`li`,{className:`${Z.row} ${Z.pendingRow}`,"data-submission-echo":``,children:[p===1&&/* @__PURE__ */ (0,h.jsx)(`span`,{className:Z.lead,"aria-hidden":!0,children:/* @__PURE__ */ (0,h.jsx)(d.IconQueueOutlineRegular,{})}),e.attachments.length>0&&/* @__PURE__ */ (0,h.jsx)(`span`,{className:Z.attachments,children:e.attachments.map((e,t)=>e.type===`image`?/* @__PURE__ */ (0,h.jsx)(`img`,{className:Z.thumb,src:e.value.previewUrl,alt:o(`queue.image`)},`${e.value.previewUrl}:${t}`):/* @__PURE__ */ (0,h.jsx)(nx,{attachment:e.value,label:o(`queue.file`,{name:e.value.name})},`${e.value.attachmentId}:${e.value.name}:${t}`))}),/* @__PURE__ */ (0,h.jsx)(`span`,{className:Z.preview,children:(0,d.projectUserText)(e.text,[])}),/* @__PURE__ */ (0,h.jsx)(`span`,{className:Z.status,role:`status`,children:o(`queue.sending`)}),_&&/* @__PURE__ */ (0,h.jsxs)(`div`,{className:Z.actions,children:[/* @__PURE__ */ (0,h.jsx)(`button`,{type:`button`,className:Z.action,"aria-label":o(`queue.edit`),title:o(`queue.sending`),disabled:!0,children:/* @__PURE__ */ (0,h.jsx)(d.IconEditOutlineRegular,{size:14})}),/* @__PURE__ */ (0,h.jsx)(`button`,{type:`button`,className:Z.action,"aria-label":o(`queue.remove`),title:o(`queue.sending`),disabled:!0,children:/* @__PURE__ */ (0,h.jsx)(d.IconTrashOutlineRegular,{size:14})}),/* @__PURE__ */ (0,h.jsx)(`button`,{type:`button`,className:Z.action,"aria-label":o(`queue.steer`),title:o(`queue.sending`),disabled:!0,children:/* @__PURE__ */ (0,h.jsx)(d.IconSendOutlineRegular,{})})]})]},e.requestId))]})]})})}let ax={name:`conversation-queue-dock`,inject:[`slots`,`conversation`,`sessions`,`uiConversation`],apply(e,t){e.slots.inject(`conversation.input.dock`,()=>e.slots.register({name:`conversation.input.dock`,id:`queue`,order:20,locale:Kb,inject:n=>{let r=e.sessions.scope(n);if(r===void 0)throw Error(`queue dock: session "${n}" resolved no scope`);let i=r.get(`conversation`);if(i===void 0)throw Error(`queue dock: conversation service unavailable`);return{updateQueue:(e,t)=>i.updateQueue(e,t),editQueue:async(e,r)=>{let a=t.shell(n);await i.updateQueue(e,{kind:`remove`});let o=a.draftSnapshot;a.setDraft({...o,text:o.text===``?r:`${o.text}\n${r}`}),a.actions.persistDraft(),a.focus()},notify:(e,t)=>{i.input.for(r).notify(e,t)},loadImage:t=>e.uiConversation.imageUrl(n,t)}}},ix))}},ox=`@deepseek-ai/dsh-client-ui-conversation/EnterBehaviorRow.module.css`;if(typeof document<`u`&&document.querySelector(`style[data-plugin-css=`+JSON.stringify(ox)+`]`)===null){let e=document.createElement(`style`);e.dataset.plugin=`@deepseek-ai/dsh-client-ui-conversation`,e.dataset.pluginCss=ox,e.textContent=`._2CWexq_row{border-bottom:.5px solid var(--dsw-alias-border-l2);align-items:center;gap:8px;padding:16px 0;display:flex}._2CWexq_rowText{flex-direction:column;flex:1;gap:4px;min-width:0;padding-right:48px;display:flex}._2CWexq_title{color:var(--dsw-alias-label-primary);font-size:14px;font-weight:400;line-height:22px}._2CWexq_desc{color:var(--dsw-alias-label-tertiary);font-size:12px;font-weight:400;line-height:18px}._2CWexq_selector{border-radius:var(--dsw-radius-md);background:var(--dsw-alias-bg-module-platform);height:36px;font:inherit;color:var(--dsw-alias-label-primary);cursor:pointer;border:none;align-items:center;gap:12px;padding:0 14px;font-size:14px;line-height:22px;display:inline-flex}._2CWexq_selector:hover{background:var(--dsw-alias-interactive-bg-hover)}._2CWexq_chevron{flex:none}`,document.head.appendChild(e)}var sx={chevron:`_2CWexq_chevron`,desc:`_2CWexq_desc`,row:`_2CWexq_row`,rowText:`_2CWexq_rowText`,selector:`_2CWexq_selector`,title:`_2CWexq_title`};let cx=[{id:`queue`,label:`settings.enter.queue`},{id:`steer`,label:`settings.enter.steer`}];function lx({useBusyEnter:e,setBusyEnter:t,t:n}){let r=e(e=>e),[i,a]=(0,g.useState)(!1),o=r===`queue`?`settings.enter.queue`:`settings.enter.steer`;return/* @__PURE__ */ (0,h.jsxs)(`div`,{className:sx.row,children:[/* @__PURE__ */ (0,h.jsxs)(`div`,{className:sx.rowText,children:[/* @__PURE__ */ (0,h.jsx)(`div`,{className:sx.title,children:n(`settings.enter.title`)}),/* @__PURE__ */ (0,h.jsx)(`div`,{className:sx.desc,children:n(`settings.enter.description`)})]}),/* @__PURE__ */ (0,h.jsx)(d.Menu,{open:i,onClose:()=>{a(!1)},items:cx.map(e=>({id:e.id,label:n(e.label)})),selectedId:r,onSelect:e=>{a(!1),t(e)},align:`end`,portal:!0,anchor:/* @__PURE__ */ (0,h.jsxs)(`button`,{type:`button`,className:sx.selector,"aria-haspopup":`menu`,"aria-expanded":i,onClick:()=>{a(e=>!e)},children:[n(o),/* @__PURE__ */ (0,h.jsx)(d.IconChevronDownOutlineRegular,{className:sx.chevron})]})})]})}let ux={views:{get:()=>void 0,grouped:()=>void 0},activeTargets:/* @__PURE__ */ new Set};function dx(e,t){return t.activeTargets.size>0||!e.blank&&!e.awaitingFirstTurn||e.running?`active`:e.promptAttempted?`engaging`:`blank`}let fx=`@deepseek-ai/dsh-client-ui-conversation/ConversationRoot.module.css`;if(typeof document<`u`&&document.querySelector(`style[data-plugin-css=`+JSON.stringify(fx)+`]`)===null){let e=document.createElement(`style`);e.dataset.plugin=`@deepseek-ai/dsh-client-ui-conversation`,e.dataset.pluginCss=fx,e.textContent=`.ncnpZW_root{background:var(--dsw-alias-bg-base);flex-direction:column;min-width:0;height:100%;display:flex;position:relative}.ncnpZW_header{box-sizing:border-box;border-bottom:.5px solid var(--dsw-alias-border-l3);flex:none;grid-template-columns:auto minmax(0,1fr);min-height:76px;padding:10px 28px 0 20px;display:grid}.ncnpZW_header:where(:not(:has(.ncnpZW_tabs))){min-height:0;padding-bottom:10px}.ncnpZW_headerBlank{border-bottom:none;min-height:0;padding-bottom:0}.ncnpZW_headerBlank .ncnpZW_headerCorner{margin-left:auto}html:not([data-platform=darwin]) .ncnpZW_headerSessionless{padding-top:0}html:not([data-platform=darwin]) .ncnpZW_headerSessionless .ncnpZW_titleRow{min-height:0}[data-platform=darwin] .ncnpZW_headerLeading,[data-platform=darwin] .ncnpZW_headerActions,[data-platform=darwin] .ncnpZW_headerUtilities,[data-platform=darwin] .ncnpZW_headerCorner{-webkit-app-region:no-drag}.ncnpZW_titleRow{min-height:30px;grid-column:2;align-items:center;gap:0;padding-inline-start:max(0px, calc(var(--dsh-frame-leading-clearance,0px) - 20px));display:flex;container-type:inline-size}[data-phone] .ncnpZW_header:has([data-slot="conversation.header.navigation"] button){padding-top:env(safe-area-inset-top)}[data-phone] .ncnpZW_header:has([data-slot="conversation.header.navigation"] button) .ncnpZW_titleRow{min-height:44px}.ncnpZW_titleCluster{flex:1;align-items:center;gap:10px;min-width:0;display:flex}.ncnpZW_headerLeading{flex:none;grid-area:1/1;align-items:center;gap:8px;display:flex}.ncnpZW_crumbs{white-space:nowrap;align-items:center;gap:4px;min-width:0;display:flex;overflow:hidden}.ncnpZW_crumbSeg{align-items:center;gap:4px;min-width:0;display:inline-flex}.ncnpZW_crumbSep{color:var(--dsw-alias-label-caption);font-size:14px;line-height:20px}.ncnpZW_crumb{border-radius:var(--dsw-radius-md);max-width:220px;color:var(--dsw-alias-label-tertiary);text-overflow:ellipsis;white-space:nowrap;cursor:pointer;background:0 0;border:none;padding:4px 8px;font-size:14px;line-height:20px;display:inline-block;overflow:hidden}.ncnpZW_crumbSubagent{font-size:12px;line-height:18px}button.ncnpZW_crumb:hover{background:var(--dsw-alias-interactive-bg-hover)}.ncnpZW_crumbCurrent{color:var(--dsw-alias-label-primary);cursor:default;font-weight:500}.ncnpZW_headerActions{flex:none;align-items:center;gap:8px;display:flex}.ncnpZW_headerUtilities{flex:none;align-items:center;gap:8px;margin-left:20px;display:flex}.ncnpZW_headerUtilities:empty{display:none}.ncnpZW_headerCorner{flex:none;align-items:center;margin-left:8px;margin-right:-16px;display:flex}.ncnpZW_headerCorner:empty{display:none}.ncnpZW_tabs{z-index:1;grid-column:1/-1;gap:36px;margin-top:10px;padding-left:8px;display:flex;position:relative}.ncnpZW_tab{color:var(--dsw-alias-label-tertiary);cursor:pointer;background:0 0;border:none;padding:0 0 9px;font-size:13px;font-weight:500;line-height:16px;position:relative}.ncnpZW_tab:after{content:"";background:0 0;border-radius:2px;height:2px;position:absolute;bottom:-1px;left:0;right:0}.ncnpZW_tabActive{color:var(--dsw-alias-state-business-primary)}.ncnpZW_tabActive:after{background:var(--dsw-alias-state-business-primary)}.ncnpZW_viewArea{flex-direction:column;flex:1;min-height:0;display:flex}.ncnpZW_widthHandle{z-index:0;width:min(10px, calc((100% - var(--dsh-chat-content-width)) / 2 - 24px - 24px));cursor:col-resize;position:absolute;top:0;bottom:0}.ncnpZW_widthHandle[data-side=left]{right:calc(50% + var(--dsh-chat-content-width) / 2 + 24px)}.ncnpZW_widthHandle[data-side=right]{left:calc(50% + var(--dsh-chat-content-width) / 2 + 24px)}.ncnpZW_widthHandle:after{content:"";background:linear-gradient(to bottom, transparent calc(var(--dsh-width-handle-pointer-y,50%) - 36px), var(--dsw-alias-scrollbar-bg-l1) calc(var(--dsh-width-handle-pointer-y,50%) - 8px), var(--dsw-alias-scrollbar-bg-l1) calc(var(--dsh-width-handle-pointer-y,50%) + 8px), transparent calc(var(--dsh-width-handle-pointer-y,50%) + 36px));opacity:0;pointer-events:none;border-radius:2px;width:2px;position:absolute;top:0;bottom:0}.ncnpZW_widthHandle[data-side=left]:after{right:4px}.ncnpZW_widthHandle[data-side=right]:after{left:4px}.ncnpZW_widthHandle:hover:after,.ncnpZW_widthHandle[data-dragging]:after{opacity:1}.ncnpZW_widthHandle[data-dragging]{z-index:8}.ncnpZW_root:has([data-conversation-composer-overlay]) .ncnpZW_widthHandle{display:none}.ncnpZW_composerStack{--dsh-composer-stack-gap:6px;gap:var(--dsh-composer-stack-gap);flex-direction:column;display:flex}.ncnpZW_composerSeat{--dsh-composer-text-max-height:336px;flex-direction:column;flex:none;display:flex}.ncnpZW_root[data-phase=active]{overflow:hidden}.ncnpZW_root[data-phase=active] .ncnpZW_header{flex:none}.ncnpZW_body{--dsh-chat-content-width:var(--dsh-chat-user-width,clamp(680px, calc(var(--dsh-conversation-column-width,0px) * .64), 920px));--dsh-composer-card-max-width:calc(var(--dsh-chat-content-width) + 32px);--dsh-composer-side-clearance:16px;--dsh-composer-dock-inset:8px;flex-direction:column;flex:1;min-height:0;display:flex;position:relative}.ncnpZW_embeddedBody{--dsh-chat-content-width:min(calc(100% - 32px), 920px);--dsh-composer-card-max-width:min(calc(100% - 16px), 952px);--dsh-composer-side-clearance:8px;--dsh-composer-dock-inset:8px;overflow:hidden}.ncnpZW_scrollBody{scrollbar-gutter:stable;flex-direction:column;flex:1;min-height:0;margin-right:2px;display:flex;overflow-y:auto}.ncnpZW_scrollBody::-webkit-scrollbar-track{margin:2px}.ncnpZW_root[data-phase=active] .ncnpZW_viewArea,.ncnpZW_embeddedBody[data-content-phase=active] .ncnpZW_viewArea{flex:1 0 auto;min-height:auto}.ncnpZW_root[data-phase=active] .ncnpZW_composerSeat,.ncnpZW_embeddedBody[data-content-phase=active] .ncnpZW_composerSeat{z-index:7;background:var(--dsh-phone-composer-mask,linear-gradient(180deg, color-mix(in srgb, var(--dsw-alias-bg-base) 0%, transparent) 0px, var(--dsw-alias-bg-base) 36px));position:sticky;bottom:0}@supports (backdrop-filter:blur(14px)){[data-phone] .ncnpZW_composerSeat:where(:has([data-chain-overlay-fallback=conversation\\.composer]:only-child [data-composer-card])){--dsh-phone-composer-mask:linear-gradient(180deg, transparent 0px, color-mix(in srgb, var(--dsw-alias-bg-base) 60%, transparent) 36px, color-mix(in srgb, var(--dsw-alias-bg-base) 60%, transparent) calc(100% - 28px), var(--dsw-alias-bg-base) 100%)}}@media (prefers-reduced-transparency:reduce),(prefers-contrast:more),(forced-colors:active){[data-phone] .ncnpZW_composerSeat{--dsh-phone-composer-mask:initial}}.ncnpZW_root[data-phase=active] .ncnpZW_composerSeat:has([data-trigger-menu]){z-index:9}.ncnpZW_scrollBody:has([data-conversation-composer-overlay]){scrollbar-gutter:auto;position:relative;overflow:hidden auto}.ncnpZW_scrollBody:has([data-conversation-composer-overlay])>[data-slot=conversation\\.session]>.ncnpZW_viewArea{flex:1 1 0;min-height:0;overflow:hidden}.ncnpZW_scrollBody:has([data-conversation-composer-overlay])>.ncnpZW_composerSeat{right:var(--dsh-scrollbar-width);position:absolute;bottom:0;left:0}.ncnpZW_composerHero{width:min(calc(var(--dsh-composer-card-max-width) + 2 * var(--dsh-composer-side-clearance)), 100%);z-index:1;align-self:center;gap:8px;padding-bottom:32px}.ncnpZW_heroWorkspaceRow{align-items:center;gap:2px;min-width:0;margin-top:4px;padding:0 16px 0 20px;display:flex}.ncnpZW_root[data-phase=hero] .ncnpZW_scrollBody,.ncnpZW_embeddedBody[data-content-phase=hero] .ncnpZW_scrollBody{justify-content:center;overflow-y:auto}.ncnpZW_root[data-phase=settling] .ncnpZW_composerSeat,.ncnpZW_embeddedBody[data-content-phase=settling] .ncnpZW_composerSeat{visibility:hidden}`,document.head.appendChild(e)}var Q={body:`ncnpZW_body`,composerHero:`ncnpZW_composerHero`,composerSeat:`ncnpZW_composerSeat`,composerStack:`ncnpZW_composerStack`,crumb:`ncnpZW_crumb`,crumbCurrent:`ncnpZW_crumbCurrent`,crumbSeg:`ncnpZW_crumbSeg`,crumbSep:`ncnpZW_crumbSep`,crumbSubagent:`ncnpZW_crumbSubagent`,crumbs:`ncnpZW_crumbs`,embeddedBody:`ncnpZW_embeddedBody`,header:`ncnpZW_header`,headerActions:`ncnpZW_headerActions`,headerBlank:`ncnpZW_headerBlank`,headerCorner:`ncnpZW_headerCorner`,headerLeading:`ncnpZW_headerLeading`,headerSessionless:`ncnpZW_headerSessionless`,headerUtilities:`ncnpZW_headerUtilities`,heroWorkspaceRow:`ncnpZW_heroWorkspaceRow`,root:`ncnpZW_root`,scrollBody:`ncnpZW_scrollBody`,tab:`ncnpZW_tab`,tabActive:`ncnpZW_tabActive`,tabs:`ncnpZW_tabs`,titleCluster:`ncnpZW_titleCluster`,titleRow:`ncnpZW_titleRow`,viewArea:`ncnpZW_viewArea`,widthHandle:`ncnpZW_widthHandle`};let px=`dsh.conversation.contentWidth`;function mx(){let e=localStorage.getItem(px);if(e===null)return null;let t=Number(e);return Number.isFinite(t)&&t>0?t:null}function hx(e,t){let n=Math.max(640,e-176);return t===null?Math.max(680,Math.min(e*.64,920)):Math.min(Math.max(t,640),n)}function gx(e,t){if(e.deltaMode===1){let n=Number.parseFloat(getComputedStyle(t).lineHeight);return e.deltaY*(Number.isFinite(n)?n:16)}return e.deltaMode===2?e.deltaY*t.clientHeight:e.deltaY}function _x(e){let t=(0,g.useRef)(!1),n=(0,g.useRef)(0),r=(0,g.useRef)(0),i=(0,g.useRef)(0),a=(0,g.useRef)(null),o=(0,g.useRef)(e);o.current=e;let s=()=>{let e=i.current-r.current,t=o.current.side===`right`?e:-e;return n.current+t*2},c=()=>{a.current!==null&&(cancelAnimationFrame(a.current),a.current=null)},l=(0,g.useCallback)(e=>{e.button===0&&(e.preventDefault(),e.currentTarget.setPointerCapture(e.pointerId),r.current=e.clientX,i.current=e.clientX,n.current=o.current.onStart(),t.current=!0,e.currentTarget.toggleAttribute(`data-dragging`,!0))},[]),u=(0,g.useCallback)(e=>{if(!t.current||!e.currentTarget.hasPointerCapture(e.pointerId))return;let n=e.currentTarget.getBoundingClientRect();e.currentTarget.style.setProperty(`--dsh-width-handle-pointer-y`,`${e.clientY-n.top}px`),i.current=e.clientX,a.current??=requestAnimationFrame(()=>{a.current=null,o.current.onDrag(s())})},[]),d=(0,g.useCallback)(e=>{t.current&&e.currentTarget.hasPointerCapture(e.pointerId)&&(t.current=!1,e.currentTarget.toggleAttribute(`data-dragging`,!1),e.currentTarget.releasePointerCapture(e.pointerId),c(),i.current=e.clientX,i.current!==r.current&&o.current.onCommit(s()),o.current.onEnd())},[]),f=(0,g.useCallback)(e=>{t.current&&(t.current=!1,e.currentTarget.toggleAttribute(`data-dragging`,!1),c(),o.current.onEnd())},[]),p=(0,g.useCallback)(e=>{let t=e.currentTarget.parentElement;
167
+ `),t+=r.draft;for(let t of r.occurrences)n.push({...t,offset:e+t.offset})}this.restoringFailures=!0;try{this.draftEditor.restoreDraft(t,n),this.draftEditor.clearHistory(),this.failedRestoreRev=this.rev}finally{this.restoringFailures=!1}}restoreAttachments(e){if(e.length===0)return;let t=new Set(this.attachmentIds),n=e.filter(e=>!t.has(e));n.length!==0&&(this.attachmentIds=[...n,...this.attachmentIds],this.publish())}adjudicate(e,t){let n=this.deps.inputTriggers?.();n===void 0?this.dispatchRun({type:`adjudicated`,attempt:e,outcome:void 0}):n.adjudicate(t.trim(),e.signal,{attachments:this.attachmentIds.length}).then(t=>{this.dead(e)||this.dispatchRun({type:`adjudicated`,attempt:e,outcome:t})},t=>{if(this.dead(e))return;let n=t instanceof Error?t.message:String(t);this.dispatchRun({type:`adjudication-failed`,attempt:e,message:n})})}beginSubmit(e,t,n){let r=t.attachments===!0?[...this.attachmentIds]:[];Promise.resolve().then(async()=>{let i=r.length>0?await this.deps.commandAttachments.serialize(r):[];if(!this.dead(e))return t.submit(n,this.deps.actx,i)}).then(t=>{if(!(t===void 0||this.dead(e))){if(t.kind===`success`&&r.length>0){let e=new Set(r);this.attachmentIds=this.attachmentIds.filter(t=>!e.has(t)),this.deps.commandAttachments.release(r)}this.dispatchRun({type:`submit-settled`,attempt:e,ok:t.kind===`success`,draft:this.projection.clipboardText,outcome:t,...t.kind===`error`&&t.text===void 0?{message:`command failed`}:{}})}},t=>{if(this.dead(e))return;let n=t instanceof Error?t.message:String(t);this.dispatchRun({type:`submit-settled`,attempt:e,ok:!1,draft:this.projection.clipboardText,message:n})})}dead(e){return this.disposed||e.signal.aborted}compose(){let e=this.core.state;return{draft:this.projection.clipboardText,attachmentIds:this.attachmentIds,draftRev:this.rev,...this.primaryAction===void 0?{}:{primaryAction:this.primaryAction},phase:e.phase,...e.claim===void 0?{}:{claim:e.claim},occurrences:this.projection.occurrences,queue:this.deps.inbox?.getSnapshot()?.[`next-turn`]??Fb}}publish(){let e=this.compose();this.state.set(e);let t=this.draftSnapshot;t!==this.lastPublishedDraft&&(this.lastPublishedDraft=t,this.persistDraft?.(t))}};function Rb(e,t){let{state:n,timestamp:r,mode:i}=t;if(n===void 0)return;let a=n.model;e.get(`productAnalytics`)?.track(`send_button_click`,{...n.sessionId===void 0?{}:{session_id:n.sessionId},...a===void 0?{}:{model_name:`${a.provider}/${a.name}`,...a.effort===void 0?{}:{thinking_effort:a.effort}},run_mode:n.runMode,msg_type:n.running?i:`default`},r)}var zb=class{rootCtx;t;shells=/* @__PURE__ */ new WeakMap;constructor(e,t){this.rootCtx=e,this.t=t}for(e){let t=this.sessions(),n=t.sessionOf(e),r=n===void 0?void 0:t.binding(n.sessionId);if(r===void 0||r.session!==n)throw Error(`conversation.input.for requires a retained Session scope`);return this.shellFor(r)}captureReferenceInsertion(e){let t=this.sessions(),n=this.shells.get(e);if(t.binding(e.sessionId)!==e||n===void 0)return;let r=this.rootCtx.get(`conversation`);if(r===void 0)return;let i=n.actions.captureInsertion(),a=r.blocks.storeFor(e.sessionId),o=this.rootCtx.uiSession.sessionStatus,s=!1,c=()=>{let r=e.session.getSnapshot();return!s&&t.binding(e.sessionId)===e&&r.openState===`open`&&!r.removed&&a.getSnapshot()===void 0&&o.getSnapshot().get(e.sessionId)?.pendingInteraction===void 0&&n.snapshot.draftRev===i.draftRev&&n.canInsertReferences()};return{getSnapshot:c,subscribe:r=>{let i=[t.list.subscribe(r),e.session.subscribe(r),n.state.subscribe(r),a.subscribe(r),o.subscribe(r),n.editor.registerEditableListener(r),n.editor.registerRootListener(r)];return()=>i.forEach(e=>e())},insert:e=>{let t=c();return s=!0,t&&n.insertReferences([e],i)}}}requestDraftInitialization(e,t){if(this.sessions().binding(e.sessionId)!==e)throw Error(`conversation.input.requestDraftInitialization requires a retained Session binding`);return this.shellFor(e).requestDraftInitialization(t)}shellFor(e){let t=this.shells.get(e);if(t!==void 0)return t;let{session:n,ctx:r}=e,i=new Lb({actx:r,submissionState:()=>{let e=n.getSnapshot(),t=n.projections.faceOf(`modelSelection`).getSnapshot(),r=n.projections.faceOf(`plan`).getSnapshot(),i=n.projections.faceOf(`goal`).getSnapshot(),a=t?.next??t?.lastUsed;return Object.freeze({...e.blank?{}:{sessionId:e.sessionId},...a==null?{}:{model:Object.freeze({provider:a.provider,name:a.model,...a.reasoningEffort===void 0?{}:{effort:a.reasoningEffort}})},runMode:r?.active?`plan`:i?.goal.phase===`active`?`goal`:`default`,running:e.running})},messageSubmitted:e=>{Rb(this.rootCtx,e)},inputTriggers:()=>this.controller(r),popup:()=>this.popup(r),inbox:n.projections.faceOf(`inbox`),defaultSink:(e,t,r,i)=>this.sink(n,e,t,r,i),steerQueue:()=>{this.steerQueue(n,i)},commandAttachments:{serialize:async e=>(await this.conversation().serializeDraftAttachments(e)).attachments,release:e=>{let t=this.rootCtx.get(`conversation`);for(let n of e)t?.releaseDraftAttachment(n)},unsupportedNotice:e=>this.t(`command.attachmentsUnsupported`,{command:e.trim().replace(/^\//u,``)})}});return this.shells.set(e,i),r.effect(()=>{let t=[r.on(`slash/input-begin-command`,e=>i.beginCommand(e.claim,e.span)?!0:void 0),r.on(`slash/input-insert-reference`,e=>i.insertReference(e.reference,e.span)?!0:void 0),r.on(`slash/input-consume-token`,e=>i.consumeToken(e.guard)?!0:void 0),r.on(`slash/input-insert-text`,e=>i.insertText(e.text,e.span,e.continue===!0)?!0:void 0)];return()=>{for(let e of t)e();let n=i.dispose();this.shells.delete(e);let r=this.rootCtx.get(`conversation`);for(let e of n)r?.releaseDraftAttachment(e)}},`conversation.input: session shell`),r.inject([`inputTriggers`],e=>{e.effect(()=>(i.refreshLexiconSubscription(),()=>{i.refreshLexiconSubscription()}),`conversation.input: reference catalogs`)}),i.setDraft(tc(e.sessionId)),i}shell(e){let t=this.sessions().binding(e);if(t===void 0)throw Error(`conversation.input: session "${e}" resolved no binding`);return this.shellFor(t)}keyboard(e){return this.shell(e)}canPickFiles(e){let t=this.sessions().binding(e);return t!==void 0&&this.shells.get(t)?.canPickFiles()===!0}pickFiles(e){let t=this.sessions().binding(e);t!==void 0&&this.shells.get(t)?.pickFiles()}inputTriggers(e){let t=this.sessions().binding(e);return t===void 0?void 0:this.controller(t.ctx)}sink(e,t,n,r,i){return t===``&&n.length===0?Promise.resolve({kind:`success`}):this.conversation().sendSession(e,t,n,r,i)}async steerQueue(e,t){let n=e.projections.faceOf(`inbox`).getSnapshot()?.[`next-turn`]??[];if(n.length!==0)for(let r of n){let n=await e.updateQueue(r.id,{kind:`steer`});if(!n.ok){if(n.error.code===`session/steer-unavailable`||n.error.code===`session/queue-item-not-found`)return;t.notify(`error`,this.t(`queue.steerFailed`));return}}}controller(e){if(this.sessions().sessionOf(e)!==void 0)return this.rootCtx.get(`inputTriggers`)?.sessionOf(e)}popup(e){if(this.sessions().sessionOf(e)!==void 0)return this.rootCtx.get(`commandUi`)?.popupFor(e)}sessions(){let e=this.rootCtx.get(`sessions`);if(e===void 0)throw Error(`conversation.input: sessions service unavailable`);return e}conversation(){let e=this.rootCtx.get(`conversation`);if(e===void 0)throw Error(`conversation.input: conversation service unavailable`);return e}};let Bb=`busyEnter`,Vb=[`queue`,`steer`],Hb=`queue`,Ub={[Bb]:T.union([...Vb]).default(Hb)};T.object(Ub);function Wb(e,t,n,r){return!t||!r?`queue`:n===`enter`?e:e===`queue`?`steer`:`queue`}var Gb=class{busyEnter=(0,f.createSnapshotStore)(Hb);unsubscribe;host;constructor(e){this.host=e,e!==void 0&&(this.unsubscribe=e.subscribe(()=>{this.adopt(e)}),this.adopt(e))}dispose(){this.unsubscribe?.()}setBusyEnter(e){this.busyEnter.getSnapshot()!==e&&(this.busyEnter.set(e),this.host?.set(Bb,e))}adopt(e){let t=e.getSnapshot().value;t!==void 0&&this.busyEnter.getSnapshot()!==t.busyEnter&&this.busyEnter.set(t.busyEnter)}};let Kb=`conversation`,qb=`描述你的任务以生成计划`,Jb=`describe your task to generate plan`,Yb={"shortcut.newline":`换行`,"shortcut.complementary":`使用互补的 Queue/Steer 方式`,"shortcut.slash":`打开命令菜单`,"shortcut.mention":`打开引用菜单`,"hint.plan":qb,"hint.goal":`输入目标,智能体将持续执行`,"hint.goal.active":`当前目标进行中。可输入 edit 修改 / pause 暂停 / resume 继续 / clear 清除`,"placeholder.plan":qb,"placeholder.default":`发消息或创建任务, / 调用指令, @ 文件或对话`,"placeholder.unavailable":`会话不可用`,"placeholder.parentOffline":`父会话已离线,无法继续发送;仍可停止当前运行`,"placeholder.hero":`描述你想要构建的内容, / 调用指令, @ 文件或对话`,"placeholder.workspace":`选择一个工作区开始`,"placeholder.preparing":`正在准备对话…`,"placeholder.steerQueue":`Cmd/Ctrl+Enter 插话发送全部排队消息`,"input.commands":`添加文件或调用指令`,"input.commandsOnly":`调用指令`,"input.imagesAndCommands":`添加图片或调用指令`,"attachment.unavailable":`当前 Web 连接不支持附件上传。`,"input.file":`文件`,"input.stop":`停止生成`,"input.send":`发送消息`,"input.send.queue":`排队发送`,"input.send.steer":`插话发送`,"attachment.pending":`待发送附件`,"attachment.scrollLeft":`向左滚动附件`,"attachment.scrollRight":`向右滚动附件`,"reference.dropTitle":`松开以引用聊天`,"attachment.dropTitle":`文件或图片拖动到此处即可添加`,"attachment.dropDesc":`图片限制:最多 {count} 张,每张 {size}`,"attachment.dropBlocked":`当前无法添加文件或图片`,"attachment.directoryDesktopOnly":`只有桌面端支持添加文件夹,浏览器里请添加单个文件`,"attachment.pathUnavailable":`无法获取文件夹路径,请重新拖入`,"attachment.pathUnsupported":`路径含有无法引用的字符,请改名后再试`,"image.pending":`待发送图片`,"image.openOriginal":`查看原图`,"image.openOriginalLabel":`{label},点击查看原图`,"image.remove":`移除图片 {name}`,"image.original":`原图`,"image.label":`图片`,"image.loadFailed":`图片不可用,点击重试`,"image.loading":`图片加载中…`,"image.preview":`原图预览`,"image.closePreview":`关闭原图预览`,"image.unsupportedType":`仅支持 PNG、JPG、WebP、GIF 格式的图片`,"image.tooMany":`一条消息最多添加 {count} 张图片`,"image.fileTooLarge":`单张图片不能超过 {size}`,"image.totalTooLarge":`图片总大小超过 {size},请移除部分图片`,"image.tooManyPixels":`图片分辨率过大,请压缩后重试`,"image.dimensionTooLarge":`图片宽高不能超过 {size}px,请缩小后重试`,"image.modelUnsupported":`当前模型不支持图片,请切换支持图片的模型`,"image.sendFailed":`图片发送失败({reason}),请重新添加图片后再试`,"file.unavailable":`已上传文件不可用或被修改,请重新选择`,"file.pending":`待发送文件`,"file.remove":`移除文件 {name}`,"file.uploading":`上传中…`,"file.uploadFailed":`上传失败,点击重试`,"file.retry":`重试上传 {name}`,"file.stillUploading":`文件还在上传,请等待上传完成后发送`,"file.sessionUnavailable":`会话不可用,无法上传文件`,"file.notStaged":`文件尚未上传成功,请重新添加后再试`,"file.label":`文件`,"context.aria":`上下文已用 {percent}`,"context.used":`上下文已用`,"context.system":`系统提示词`,"context.tools":`工具定义`,"context.messages":`对话消息`,"settings.enter.title":`繁忙时的发送行为`,"settings.enter.description":`智能体运行时 Enter 键和发送按钮的行为;Cmd/Ctrl+Enter 使用另一行为`,"settings.enter.queue":`排队发送`,"settings.enter.steer":`插话发送`,"hero.headline":`今天想做点什么?`,"hero.preview":`Web`,"hero.chooseWorkspace":`选择工作区`,"hero.noWorkspace":`不选择工作区`,"session.hierarchy":`会话层级`,"todo.title":`任务`,"todo.progress.done":`{done} 已完成`,"todo.progress.active":`{active} 进行中`,"todo.progress.pending":`{pending} 待处理`,"todo.status.completed":`已完成`,"todo.status.inProgress":`进行中`,"todo.status.pending":`待处理`,"todo.rowTitle":`更新任务清单`,"tool.title.createGoal":`创建目标`,"tool.title.getGoal":`查看目标`,"tool.title.updateGoal":`更新目标`,"tool.preparing.content":`{kilobytes}KB`,"tool.title.createSchedule":`创建定时任务`,"tool.title.listSchedules":`查看定时任务`,"tool.title.deleteSchedule":`删除定时任务`,"tool.title.updateSchedule":`修改定时任务`,"detail.state":`状态`,"detail.todo.completed":`已完成`,"detail.todo.in_progress":`进行中`,"detail.todo.pending":`待处理`,"detail.todo.empty":`任务清单为空`,"todo.diff.initial":`首次记录`,"todo.diff.compare":`与上次清单相比`,"todo.diff.unavailable":`旧清单不可用`,"todo.diff.noChanges":`清单没有变化`,"todo.diff.added":`新增 {count}`,"todo.diff.updated":`更新 {count}`,"todo.diff.removed":`移除 {count}`,"todo.diff.unchanged":`{count} 项未变化`,"todo.diff.addedItem":`新增`,"todo.diff.updatedItem":`状态变化`,"todo.diff.movedItem":`顺序调整`,"todo.diff.removedItem":`移除`,"detail.goal.empty":`没有目标`,"detail.goal.active":`进行中`,"detail.goal.disarmed":`等待继续`,"detail.goal.paused":`已暂停`,"detail.goal.blocked":`受阻`,"detail.goal.complete":`已完成`,"detail.goal.rounds":`执行轮次`,"detail.goal.reason":`受阻原因`,"detail.days":`{count} 天`,"detail.hours":`{count} 小时`,"detail.minutes":`{count} 分钟`,"detail.seconds":`{count} 秒`,"detail.schedule.once":`单次`,"detail.schedule.every":`每 {interval}`,"detail.schedule.when":`计划时间`,"detail.schedule.frequency":`重复`,"detail.schedule.scheduled":`等待触发`,"detail.schedule.overdue":`已到期,等待会话恢复`,"detail.schedule.empty":`没有定时任务`,"detail.schedule.deleted":`已删除`,"detail.schedule.count":`{count} 个定时任务`,"detail.schedule.daily":`每天 {time}({zone})`,"detail.schedule.weekly":`每周 {days} {time}({zone})`,"detail.schedule.cron":`Cron {expression}({zone})`,"detail.weekday.1":`周一`,"detail.weekday.2":`周二`,"detail.weekday.3":`周三`,"detail.weekday.4":`周四`,"detail.weekday.5":`周五`,"detail.weekday.6":`周六`,"detail.weekday.7":`周日`,"detail.weekday.join":`、`,"tool.title.inspectProviders":`检查提供方`,"tool.title.queryRuntime":`查询运行时`,"tool.title.inspectPlugins":`检查动态插件`,"tool.title.workflow":`运行工作流`,"tool.title.ralph":`运行循环工作流`,"tool.title.readEvent":`读取事件`,"tool.title.searchEvents":`搜索事件`,"tool.title.traceEvent":`追踪事件`,"tool.title.searchSessions":`搜索会话`,"tool.title.traceSession":`追踪会话`,"tool.title.listModels":`查看可用模型`,"tool.title.subagent":`创建子智能体`,"tool.title.listAgents":`查看子智能体`,"tool.title.sendMessage":`发送消息`,"tool.title.interruptAgent":`中断智能体`,"tool.title.listJobs":`查看后台任务`,"tool.title.readJob":`读取任务输出`,"tool.title.killJob":`取消后台任务`,"tool.title.openTerminal":`创建终端`,"tool.title.readTerminal":`读取终端`,"tool.title.listTerminals":`查看终端`,"tool.title.signalTerminal":`发送终端信号`,"tool.title.closeTerminal":`关闭终端`,"tool.title.lsp":`查询代码符号`,"tool.title.findDefinition":`查找定义`,"tool.title.findReferences":`查找引用`,"tool.title.findImplementation":`查找实现`,"tool.title.hoverSymbol":`查看符号信息`,"tool.title.spawnTeammate":`创建队友`,"tool.title.createTeamTask":`创建团队任务`,"tool.title.getTeamTask":`读取团队任务`,"tool.title.updateTeamTask":`更新团队任务`,"tool.title.listTeamTasks":`查看团队任务`,"tool.title.waitAgent":`等待子智能体`,"detail.recordedResult":`调用结果`,"detail.empty":`暂无结果`,"detail.none":`无`,"detail.yes":`是`,"detail.no":`否`,"detail.moreInInspect":`另有 {count} 项,可在「查看」中读取`,"detail.status.running":`运行中`,"detail.status.idle":`空闲`,"detail.status.ready":`就绪`,"detail.status.inactive":`未运行`,"detail.status.provisioning":`准备中`,"detail.status.failed":`失败`,"detail.status.completed":`已完成`,"detail.status.deleted":`已删除`,"detail.status.killed":`已取消`,"detail.status.accepted":`已接收`,"detail.status.queued":`已入队`,"detail.status.exited":`已退出`,"detail.field.id":`ID`,"detail.field.revision":`版本`,"detail.field.platform":`平台`,"detail.field.provider":`提供方`,"detail.field.model":`模型`,"detail.field.role":`角色`,"detail.field.context":`上下文`,"detail.field.owner":`负责人`,"detail.field.ready":`可开始`,"detail.field.dependencies":`前置任务`,"detail.field.writeScopes":`文件范围`,"detail.field.warnings":`提示`,"detail.field.diagnostics":`诊断`,"detail.field.methods":`方法`,"detail.field.inputSchema":`输入 Schema`,"detail.field.outputSchema":`输出 Schema`,"detail.field.currentPackage":`当前包`,"detail.field.nextPackage":`待运行的包`,"detail.field.latestRun":`最近运行`,"detail.field.packages":`版本包`,"detail.field.registrations":`注册项`,"detail.field.props":`属性`,"detail.field.data":`数据`,"detail.field.source":`来源`,"detail.field.content":`内容`,"detail.field.message":`消息`,"detail.field.messageId":`消息 ID`,"detail.field.root":`根节点`,"detail.field.pid":`进程 ID`,"detail.field.type":`类型`,"detail.field.time":`时间`,"detail.field.seq":`事件序号`,"detail.field.turn":`轮次`,"detail.field.step":`步骤`,"detail.field.callId":`调用 ID`,"detail.field.agents":`启动智能体数`,"detail.field.result":`结果`,"detail.field.parent":`父级`,"detail.field.depth":`层级`,"detail.field.exitCode":`退出码`,"detail.field.signal":`信号`,"detail.field.previousStatus":`中断前状态`,"detail.field.agent":`智能体 ID`,"detail.field.job":`任务 ID`,"detail.field.task":`任务内容`,"detail.field.processGroup":`进程组`,"detail.field.availability":`可用状态`,"detail.field.bestMatch":`最相关事件`,"detail.field.target":`目标事件`,"detail.field.surface":`记录状态`,"detail.agents.count":`{count} 个智能体`,"detail.jobs.count":`{count} 个后台任务`,"detail.terminals.count":`{count} 个终端`,"detail.tasks.count":`{count} 个团队任务`,"detail.tasks.nextPage":`后面还有任务;下一页位置为 {cursor}`,"detail.locations.count":`{count} 个位置`,"detail.location":`第 {line} 行,第 {column} 列`,"detail.receipt.delivered":`消息已送达`,"detail.receipt.interrupt":`已请求中断`,"detail.receipt.started":`已启动`,"detail.receipt.cancel":`已请求取消`,"detail.receipt.alreadyFinished":`任务已结束`,"detail.receipt.signal":`信号已发送`,"detail.receipt.closed":`已关闭`,"detail.receipt.closing":`关闭中`,"detail.wait.noProgress":`没有正在运行的子智能体`,"detail.wait.title":`子智能体状态`,"detail.wait.timeout":`等待超时`,"detail.wait.changed":`检测到变化`,"detail.agent.reply":`智能体回复`,"detail.models.title":`可用模型`,"detail.output.lines":`第 {begin}–{end} 行,共 {total} 行`,"detail.output.truncated":`输出已截断`,"detail.providers.count":`{count} 个检查提供方`,"detail.plugins.count":`{count} 个动态插件`,"detail.workflow.script":`工作流脚本`,"detail.ralph.reportedComplete":`智能体报告完成`,"detail.ralph.reportedBlocker":`智能体报告受阻`,"detail.ralph.limit":`已达到轮次上限`,"detail.report.nextSteps":`待完成事项`,"detail.trace.replacedBy":`被替换为`,"detail.trace.replacementChain":`替换链`,"detail.trace.replaces":`替换的事件`,"detail.trace.sources":`引用来源`,"detail.trace.derived":`派生事件`,"detail.trace.ancestors":`祖先会话`,"detail.trace.descendants":`后代会话`,"detail.matches.count":`{count} 条匹配`,"detail.matches.capped":`已达到结果上限,可缩小搜索范围`,"detail.event.neighbors":`前后事件`,"todo.completed":`{done}/{total} 已完成`,"command.attachmentsUnsupported":`/{command} 不接受附件,请先移除附件`,"ask.rowTitle":`提问`,"ask.waiting":`等待回答`,"ask.pending":`已继续工作,仍可回答`,"ask.pendingDetail":`等待中的问题仍可在输入框中回答`,"ask.reopen":`回答`,"ask.review":`查看回答`,"ask.closed":`已结束`,"ask.closedDetail":`该问题已结束,结果见下方对话`,"ask.cancelled":`已取消`,"ask.cancelledDetail":`本轮已取消,未提交回答`,"ask.interrupted":`已中断`,"ask.interruptedDetail":`本轮已中断,未提交回答`,"ask.answered":`{answered}/{total} 已回答`,"ask.skipped":`未回答`,"bash.running":`运行中`,"bash.failed":`失败`,"bash.stopped":`已停止`,"tool.output.showFull":`显示完整输出(共 {size} KB)`,"tool.output.loading":`正在加载完整输出…`,"tool.output.retry":`重试加载完整输出`,"tool.output.failed":`加载失败,请重试。`,"tool.output.stale":`工具输出已变化,请刷新会话。`,"row.running":`运行中`,"row.preparing":`正在准备调用`,"row.failed":`失败`,"row.stopped":`已停止`,"row.input":`输入`,"row.output":`输出`,"row.inspect":`查看`,"tool.title.search":`搜索`,"tool.title.read":`读取`,"tool.title.bash":`运行命令`,"tool.title.write":`写入`,"tool.title.edit":`编辑`,"tool.title.filesChanging":`{count} 个文件已更改`,"tool.title.filesEdited":`已编辑 {count} 个文件`,"tool.title.code":`代码`,"tool.title.generic":`工具调用`,"tool.contextCompaction.action":`压缩上下文`,"tool.contextCompaction.running":`正在压缩…`,"tool.contextCompaction.completed":`上下文已压缩`,"tool.title.inspect":`查询 Cordis 环境`,"tool.title.runCordis":`运行 Cordis 插件`,"tool.title.stopCordis":`停止 Cordis 插件`,"tool.title.removeCordis":`移除 Cordis 插件`,"tool.title.pwsh":`运行命令`,"tool.title.readImage":`读取图片`,"tool.title.grep":`搜索文件内容`,"tool.title.glob":`查找文件`,"tool.title.webSearch":`网页搜索`,"tool.title.webFetch":`网页获取`,"tool.autoReviewRejected":`Auto review 已拒绝`,"tool.autoReviewNotExecuted":`工具未执行。原因:{reason}`,"tool.autoReviewReasonFallback":`Auto review 未授权此次操作`,"diff.collapseAria":`收起差异`,"diff.expandAria":`展开其余 {count} 行差异`,"diff.expandRest":`… 其余 {count} 行`,"read.window":`显示 {shown} / {total} 行`,"read.collapseAria":`收起内容`,"read.expandAria":`展开其余 {count} 行`,"read.expandRest":`… 其余 {count} 行`,"search.paths":`{shown} 个路径`,"search.paths.truncated":`显示 {shown} / 共 {total} 个路径`,"search.matches":`{shown} 处匹配 · {files} 个文件`,"search.matches.truncated":`显示 {shown} / 共 {total} 处匹配 · {files} 个文件`,"search.noResults":`无结果`,"search.collapseAria":`收起结果`,"search.expandAria":`展开其余 {count} 行结果`,"search.expandRest":`… 其余 {count} 行`,"web.noResults":`未找到结果`,"web.sourcesTruncated":`来源列表已截断`,"web.http":`HTTP`,"web.contentTruncated":`内容已截断`,"details.running":`运行中…`,"queue.count":`{n} 条排队消息`,"queue.sending":`发送中…`,"queue.image":`排队消息图片`,"queue.file":`排队文件 {name}`,"queue.edit":`编辑排队消息`,"queue.edit.unsupported":`包含非文本内容,暂不支持编辑`,"queue.save":`保存排队消息`,"queue.cancelEdit":`取消编辑`,"queue.remove":`删除排队消息`,"queue.steer":`插话发送`,"queue.steer.unavailable":`仅运行中可插话发送`,"queue.resume":`继续队列`,"queue.paused.interrupted":`队列已因你中断当前任务而暂停。请选择一条继续。`,"queue.paused.unknown":`任务结果未知,队列已暂停且不会自动重试。`,"queue.paused.failed":`上一项未正常完成,队列已暂停。`,"error.sessionInUse":`当前会话已被占用,可能是其他正在运行的 DSH 导致的(如其他 dsh web、桌面端),请退出其他正在运行的 DSH 后重试。`,"queue.editFailed":`编辑失败:这条消息可能已经开始发送。`,"queue.removeFailed":`删除失败:这条消息可能已经开始发送。`,"queue.steerFailed":`插话发送失败,请重试。`,"queue.resumeFailed":`继续队列失败,请重试。`,"terminal.signal":`信号 {signal}`,"terminal.exitCode":`退出码 {code}`,"terminal.noExitCode":`未正常退出`,"terminal.running":`运行中`,"terminal.failed":`失败`,"terminal.done":`已完成`,"terminal.noOutput":`无输出`,"terminal.collapseAria":`收起输出`,"terminal.expandAria":`展开其余 {n} 行输出`,"terminal.expandRest":`… 其余 {n} 行`,"terminal.sendInput":`(发送输入)`,"terminal.session":`终端 {sessionId}`},Xb={"shortcut.newline":`New line`,"shortcut.complementary":`Use the complementary Queue / Steer action`,"shortcut.slash":`Open command menu`,"shortcut.mention":`Open reference menu`,"hint.plan":Jb,"hint.goal":`describe the objective for a long-running task`,"hint.goal.active":`goal active — edit / pause / resume / clear`,"placeholder.plan":Jb,"placeholder.default":`Message or run a task, / commands, @ files or sessions`,"placeholder.unavailable":`Session unavailable`,"placeholder.parentOffline":`Parent session offline; sending is unavailable but you can still stop the run`,"placeholder.hero":`Describe what you want to build, / commands, @ files or sessions`,"placeholder.workspace":`Choose a workspace to start`,"placeholder.preparing":`Preparing conversation…`,"placeholder.steerQueue":`Cmd/Ctrl+Enter steers all queued messages`,"input.commands":`Add files or run commands`,"input.commandsOnly":`Run commands`,"input.imagesAndCommands":`Add images or run commands`,"attachment.unavailable":`Attachment uploads are unavailable on this Web connection.`,"input.file":`File`,"input.stop":`Stop generating`,"input.send":`Send message`,"input.send.queue":`Queue message`,"input.send.steer":`Steer message`,"attachment.pending":`Pending attachments`,"attachment.scrollLeft":`Scroll attachments left`,"attachment.scrollRight":`Scroll attachments right`,"reference.dropTitle":`Release to reference chat`,"attachment.dropTitle":`Drag files or images here to add them`,"attachment.dropDesc":`Image limit: up to {count} images, {size} each`,"attachment.dropBlocked":`Files and images cannot be added right now`,"attachment.directoryDesktopOnly":`Folders can only be added in the desktop app; add individual files in the browser`,"attachment.pathUnavailable":`Could not obtain the folder path; drag it in again`,"attachment.pathUnsupported":`The path contains characters a reference cannot carry; rename it and try again`,"image.pending":`Pending images`,"image.openOriginal":`View original`,"image.openOriginalLabel":`{label}, click to view original`,"image.remove":`Remove image {name}`,"image.original":`Original image`,"image.label":`Image`,"image.loadFailed":`Image unavailable; click to retry`,"image.loading":`Loading image…`,"image.preview":`Original image preview`,"image.closePreview":`Close original image preview`,"image.unsupportedType":`Only PNG, JPG, WebP, and GIF images are supported`,"image.tooMany":`A message can include up to {count} images`,"image.fileTooLarge":`Each image must be smaller than {size}`,"image.totalTooLarge":`Images exceed {size} in total; remove some and try again`,"image.tooManyPixels":`Image resolution is too high; compress it and try again`,"image.dimensionTooLarge":`Image sides must be at most {size}px; downscale it and try again`,"image.modelUnsupported":`The current model does not support images; switch to a model that does`,"image.sendFailed":`Sending images failed ({reason}); re-add them and try again`,"file.unavailable":`The uploaded file is unavailable or changed; select it again`,"file.pending":`Pending files`,"file.remove":`Remove file {name}`,"file.uploading":`Uploading…`,"file.uploadFailed":`Upload failed; click to retry`,"file.retry":`Retry uploading {name}`,"file.stillUploading":`Files are still uploading; send after they finish`,"file.sessionUnavailable":`Session unavailable; files cannot be uploaded`,"file.notStaged":`The file has not finished uploading; re-add it and try again`,"file.label":`File`,"context.aria":`{percent} of context used`,"context.used":`of context used`,"context.system":`System prompt`,"context.tools":`Tool definitions`,"context.messages":`Messages`,"settings.enter.title":`Send behavior while busy`,"settings.enter.description":`What Enter and the Send button do while the agent is running; Cmd/Ctrl+Enter uses the other behavior`,"settings.enter.queue":`Queue`,"settings.enter.steer":`Steer`,"hero.headline":`What should we build today?`,"hero.preview":`Web`,"hero.chooseWorkspace":`Choose workspace`,"hero.noWorkspace":`No workspace`,"session.hierarchy":`Session hierarchy`,"todo.title":`To-dos`,"todo.progress.done":`{done} completed`,"todo.progress.active":`{active} in progress`,"todo.progress.pending":`{pending} pending`,"todo.status.completed":`Completed`,"todo.status.inProgress":`In progress`,"todo.status.pending":`Pending`,"todo.rowTitle":`Update to-do list`,"tool.title.createGoal":`Create goal`,"tool.title.getGoal":`View goal`,"tool.title.updateGoal":`Update goal`,"tool.preparing.content":`{kilobytes}KB`,"tool.title.createSchedule":`Create reminder`,"tool.title.listSchedules":`List reminders`,"tool.title.deleteSchedule":`Delete reminder`,"tool.title.updateSchedule":`Update reminder`,"detail.state":`Status`,"detail.todo.completed":`Completed`,"detail.todo.in_progress":`In progress`,"detail.todo.pending":`Pending`,"detail.todo.empty":`The to-do list is empty`,"todo.diff.initial":`Initial list`,"todo.diff.compare":`Changes since the previous list`,"todo.diff.unavailable":`Previous list unavailable`,"todo.diff.noChanges":`No changes to the list`,"todo.diff.added":`{count} added`,"todo.diff.updated":`{count} updated`,"todo.diff.removed":`{count} removed`,"todo.diff.unchanged":`{count} unchanged`,"todo.diff.addedItem":`Added`,"todo.diff.updatedItem":`Status changed`,"todo.diff.movedItem":`Reordered`,"todo.diff.removedItem":`Removed`,"detail.goal.empty":`No goal`,"detail.goal.active":`Active`,"detail.goal.disarmed":`Awaiting continuation`,"detail.goal.paused":`Paused`,"detail.goal.blocked":`Blocked`,"detail.goal.complete":`Completed`,"detail.goal.rounds":`Rounds`,"detail.goal.reason":`Blocker`,"detail.days":`{count} d`,"detail.hours":`{count} h`,"detail.minutes":`{count} min`,"detail.seconds":`{count} s`,"detail.schedule.once":`Once`,"detail.schedule.every":`Every {interval}`,"detail.schedule.when":`Scheduled for`,"detail.schedule.frequency":`Repeat`,"detail.schedule.scheduled":`Scheduled`,"detail.schedule.overdue":`Overdue, awaiting session resume`,"detail.schedule.empty":`No reminders`,"detail.schedule.deleted":`Deleted`,"detail.schedule.count":`{count} reminders`,"detail.schedule.daily":`Every day at {time} ({zone})`,"detail.schedule.weekly":`Weekly on {days} at {time} ({zone})`,"detail.schedule.cron":`Cron {expression} ({zone})`,"detail.weekday.1":`Mon`,"detail.weekday.2":`Tue`,"detail.weekday.3":`Wed`,"detail.weekday.4":`Thu`,"detail.weekday.5":`Fri`,"detail.weekday.6":`Sat`,"detail.weekday.7":`Sun`,"detail.weekday.join":`, `,"tool.title.inspectProviders":`Inspect providers`,"tool.title.queryRuntime":`Query runtime`,"tool.title.inspectPlugins":`Inspect plugins`,"tool.title.workflow":`Run workflow`,"tool.title.ralph":`Run ralph loop`,"tool.title.readEvent":`Read event`,"tool.title.searchEvents":`Search events`,"tool.title.traceEvent":`Trace event`,"tool.title.searchSessions":`Search sessions`,"tool.title.traceSession":`Trace session`,"tool.title.listModels":`List models`,"tool.title.subagent":`Create subagent`,"tool.title.listAgents":`List subagents`,"tool.title.sendMessage":`Send message`,"tool.title.interruptAgent":`Interrupt agent`,"tool.title.listJobs":`List background jobs`,"tool.title.readJob":`Read job output`,"tool.title.killJob":`Cancel background job`,"tool.title.openTerminal":`Open terminal`,"tool.title.readTerminal":`Read terminal`,"tool.title.listTerminals":`List terminals`,"tool.title.signalTerminal":`Signal terminal`,"tool.title.closeTerminal":`Close terminal`,"tool.title.lsp":`Query code symbols`,"tool.title.findDefinition":`Find definition`,"tool.title.findReferences":`Find references`,"tool.title.findImplementation":`Find implementation`,"tool.title.hoverSymbol":`Inspect symbol`,"tool.title.spawnTeammate":`Create teammate`,"tool.title.createTeamTask":`Create team task`,"tool.title.getTeamTask":`Read team task`,"tool.title.updateTeamTask":`Update team task`,"tool.title.listTeamTasks":`List team tasks`,"tool.title.waitAgent":`Wait for subagent`,"detail.recordedResult":`Recorded result`,"detail.empty":`No results`,"detail.none":`None`,"detail.yes":`Yes`,"detail.no":`No`,"detail.moreInInspect":`{count} more items available in Inspect`,"detail.status.running":`Running`,"detail.status.idle":`Idle`,"detail.status.ready":`Ready`,"detail.status.inactive":`Inactive`,"detail.status.provisioning":`Provisioning`,"detail.status.failed":`Failed`,"detail.status.completed":`Completed`,"detail.status.deleted":`Deleted`,"detail.status.killed":`Cancelled`,"detail.status.accepted":`Accepted`,"detail.status.queued":`Queued`,"detail.status.exited":`Exited`,"detail.field.id":`ID`,"detail.field.revision":`Revision`,"detail.field.platform":`Platform`,"detail.field.provider":`Provider`,"detail.field.model":`Model`,"detail.field.role":`Role`,"detail.field.context":`Context`,"detail.field.owner":`Owner`,"detail.field.ready":`Ready`,"detail.field.dependencies":`Dependencies`,"detail.field.writeScopes":`Write scopes`,"detail.field.warnings":`Warnings`,"detail.field.diagnostics":`Diagnostics`,"detail.field.methods":`Methods`,"detail.field.inputSchema":`Input schema`,"detail.field.outputSchema":`Output schema`,"detail.field.currentPackage":`Current package`,"detail.field.nextPackage":`Next package`,"detail.field.latestRun":`Latest run`,"detail.field.packages":`Packages`,"detail.field.registrations":`Registrations`,"detail.field.props":`Props`,"detail.field.data":`Data`,"detail.field.source":`Source`,"detail.field.content":`Content`,"detail.field.message":`Message`,"detail.field.messageId":`Message ID`,"detail.field.root":`Root`,"detail.field.pid":`Process ID`,"detail.field.type":`Type`,"detail.field.time":`Time`,"detail.field.seq":`Event sequence`,"detail.field.turn":`Turn`,"detail.field.step":`Step`,"detail.field.callId":`Call ID`,"detail.field.agents":`Agents started`,"detail.field.result":`Result`,"detail.field.parent":`Parent`,"detail.field.depth":`Depth`,"detail.field.exitCode":`Exit code`,"detail.field.signal":`Signal`,"detail.field.previousStatus":`Previous status`,"detail.field.agent":`Agent ID`,"detail.field.job":`Job ID`,"detail.field.task":`Task`,"detail.field.processGroup":`Process group`,"detail.field.availability":`Availability`,"detail.field.bestMatch":`Best match`,"detail.field.target":`Target event`,"detail.field.surface":`Record status`,"detail.agents.count":`{count} agents`,"detail.jobs.count":`{count} background jobs`,"detail.terminals.count":`{count} terminals`,"detail.tasks.count":`{count} team tasks`,"detail.tasks.nextPage":`More tasks available; next cursor is {cursor}`,"detail.locations.count":`{count} locations`,"detail.location":`Line {line}, column {column}`,"detail.receipt.delivered":`Message delivered`,"detail.receipt.interrupt":`Interrupt requested`,"detail.receipt.started":`Started`,"detail.receipt.cancel":`Cancellation requested`,"detail.receipt.alreadyFinished":`Already finished`,"detail.receipt.signal":`Signal delivered`,"detail.receipt.closed":`Closed`,"detail.receipt.closing":`Closing`,"detail.wait.noProgress":`No active subagents`,"detail.wait.title":`Subagent activity`,"detail.wait.timeout":`Wait timed out`,"detail.wait.changed":`Change detected`,"detail.agent.reply":`Agent response`,"detail.models.title":`Available models`,"detail.output.lines":`Lines {begin}–{end} of {total}`,"detail.output.truncated":`Output truncated`,"detail.providers.count":`{count} inspect providers`,"detail.plugins.count":`{count} dynamic plugins`,"detail.workflow.script":`Workflow script`,"detail.ralph.reportedComplete":`Worker reported completion`,"detail.ralph.reportedBlocker":`Worker reported a blocker`,"detail.ralph.limit":`Round limit reached`,"detail.report.nextSteps":`Remaining work`,"detail.trace.replacedBy":`Replaced by`,"detail.trace.replacementChain":`Replacement chain`,"detail.trace.replaces":`Replaced events`,"detail.trace.sources":`Source events`,"detail.trace.derived":`Derived events`,"detail.trace.ancestors":`Ancestor sessions`,"detail.trace.descendants":`Descendant sessions`,"detail.matches.count":`{count} matches`,"detail.matches.capped":`Result limit reached; narrow the search for more`,"detail.event.neighbors":`Surrounding events`,"todo.completed":`{done}/{total} completed`,"command.attachmentsUnsupported":`/{command} does not accept attachments; remove them first`,"ask.rowTitle":`Ask question`,"ask.waiting":`waiting`,"ask.pending":`continued; answer still available`,"ask.pendingDetail":`These pending questions remain answerable from the composer.`,"ask.reopen":`Answer`,"ask.review":`View answers`,"ask.closed":`closed`,"ask.closedDetail":`This question is closed; its outcome is in the conversation below.`,"ask.cancelled":`cancelled`,"ask.cancelledDetail":`This question set was cancelled before answers were submitted.`,"ask.interrupted":`interrupted`,"ask.interruptedDetail":`This question set was interrupted before answers were submitted.`,"ask.answered":`{answered}/{total} answered`,"ask.skipped":`Not answered`,"bash.running":`Running`,"bash.failed":`Failed`,"bash.stopped":`Stopped`,"tool.output.showFull":`Show full output ({size} KB total)`,"tool.output.loading":`Loading full output…`,"tool.output.retry":`Retry loading full output`,"tool.output.failed":`Could not load output. Please retry.`,"tool.output.stale":`Tool output changed. Refresh the conversation.`,"row.running":`Running`,"row.preparing":`Preparing tool call`,"row.failed":`Failed`,"row.stopped":`Stopped`,"row.input":`IN`,"row.output":`OUT`,"row.inspect":`Inspect`,"tool.title.search":`Search`,"tool.title.read":`Read`,"tool.title.bash":`Bash`,"tool.title.write":`Write`,"tool.title.edit":`Edit`,"tool.title.filesChanging":`{count} files changed`,"tool.title.filesEdited":`Edited {count} files`,"tool.title.code":`Code`,"tool.title.generic":`Tool call`,"tool.contextCompaction.action":`Compact context`,"tool.contextCompaction.running":`Compacting context…`,"tool.contextCompaction.completed":`Context compacted`,"tool.title.inspect":`Query Cordis environment`,"tool.title.runCordis":`Run Cordis Plugin`,"tool.title.stopCordis":`Stop Cordis Plugin`,"tool.title.removeCordis":`Remove Cordis Plugin`,"tool.title.pwsh":`Pwsh`,"tool.title.readImage":`Read image`,"tool.title.grep":`Grep`,"tool.title.glob":`Glob`,"tool.title.webSearch":`Search`,"tool.title.webFetch":`Fetch`,"tool.autoReviewRejected":`Rejected by Auto review`,"tool.autoReviewNotExecuted":`Tool was not executed. Reason: {reason}`,"tool.autoReviewReasonFallback":`Auto review did not authorize this action`,"diff.collapseAria":`Collapse diff`,"diff.expandAria":`Expand {count} more diff lines`,"diff.expandRest":`… {count} more lines`,"read.window":`Showing {shown} of {total} lines`,"read.collapseAria":`Collapse content`,"read.expandAria":`Expand {count} more lines`,"read.expandRest":`… {count} more lines`,"search.paths":`{shown} paths`,"search.paths.truncated":`Showing {shown} of {total} paths`,"search.matches":`{shown} matches · {files} files`,"search.matches.truncated":`Showing {shown} of {total} matches · {files} files`,"search.noResults":`No results`,"search.collapseAria":`Collapse results`,"search.expandAria":`Expand {count} more result lines`,"search.expandRest":`… {count} more lines`,"web.noResults":`No results found`,"web.sourcesTruncated":`Source list truncated`,"web.http":`HTTP`,"web.contentTruncated":`Content truncated`,"details.running":`Running…`,"queue.count":`{n} queued messages`,"queue.sending":`Sending…`,"queue.image":`Queued message image`,"queue.file":`Queued file {name}`,"queue.edit":`Edit queued message`,"queue.edit.unsupported":`Contains non-text content; editing is not supported yet`,"queue.save":`Save queued message`,"queue.cancelEdit":`Cancel editing`,"queue.remove":`Remove queued message`,"queue.steer":`Steer queued message`,"queue.steer.unavailable":`Steering is available only while the agent is running`,"queue.resume":`Resume queue`,"queue.paused.interrupted":`Queue paused because you interrupted. Choose a message to resume.`,"queue.paused.unknown":`Outcome unknown. The queue is paused and will not retry automatically.`,"queue.paused.failed":`The previous turn did not finish normally. The queue is paused.`,"error.sessionInUse":`This session is already in use, possibly by another running DSH instance (such as dsh web or the desktop app). Quit other running DSH instances and try again.`,"queue.editFailed":`Edit failed: this message may have already started sending.`,"queue.removeFailed":`Removal failed: this message may have already started sending.`,"queue.steerFailed":`Steering failed. Try again.`,"queue.resumeFailed":`Could not resume the queue. Try again.`,"terminal.signal":`signal {signal}`,"terminal.exitCode":`exit code {code}`,"terminal.noExitCode":`no exit code`,"terminal.running":`Running`,"terminal.failed":`Failed`,"terminal.done":`Done`,"terminal.noOutput":`No output`,"terminal.collapseAria":`Collapse output`,"terminal.expandAria":`Expand the remaining {n} output lines`,"terminal.expandRest":`… {n} more lines`,"terminal.sendInput":`(send input)`,"terminal.session":`Terminal {sessionId}`},Zb=`@deepseek-ai/dsh-client-ui-conversation/QueueDock.module.css`;if(typeof document<`u`&&document.querySelector(`style[data-plugin-css=`+JSON.stringify(Zb)+`]`)===null){let e=document.createElement(`style`);e.dataset.plugin=`@deepseek-ai/dsh-client-ui-conversation`,e.dataset.pluginCss=Zb,e.textContent=`.COptxG_dock{box-sizing:border-box;width:calc(100% - var(--dsh-composer-side-clearance) - var(--dsh-composer-side-clearance) - var(--dsh-composer-dock-inset) - var(--dsh-composer-dock-inset));max-width:calc(var(--dsh-composer-card-max-width) - var(--dsh-composer-dock-inset) - var(--dsh-composer-dock-inset));margin:0 auto calc(0px - var(--dsh-composer-stack-gap) - 3px);padding:0 var(--dsh-composer-dock-inset);flex:none}.COptxG_panel{isolation:isolate;border-radius:var(--dsw-radius-lg) var(--dsw-radius-lg) 0 0;--dsh-scrollbar-thumb:var(--dsw-alias-scrollbar-bg-l2);--dsh-scrollbar-thumb-hover:var(--dsw-alias-scrollbar-hover-l2);width:100%;padding:2px 0;position:relative;overflow:hidden}.COptxG_panel:before{z-index:-1;border-radius:inherit;background:var(--dsw-specific-menu);backdrop-filter:var(--dsw-menu-backdrop-filter);content:"";pointer-events:none;position:absolute;inset:0}.COptxG_panel:after{border:.5px solid var(--dsw-alias-border-l1);border-radius:inherit;content:"";pointer-events:none;border-bottom:none;position:absolute;inset:0}.COptxG_paused{color:var(--dsw-alias-label-tertiary);font:var(--dsw-font-xs-13);padding:6px 12px 2px}.COptxG_header{box-sizing:border-box;border-radius:var(--dsw-radius-md);width:100%;height:36px;color:var(--dsw-alias-label-primary);text-align:left;cursor:pointer;background:0 0;border:none;align-items:center;gap:10px;padding:4px 12px;display:flex}.COptxG_header:focus-visible{outline:var(--dsw-focus-ring-width) solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:-2px}.COptxG_header:disabled{cursor:default}.COptxG_lead{color:var(--dsw-alias-label-tertiary);flex:none;place-items:center;display:grid}.COptxG_count{min-width:0;font-family:Inter, var(--dsw-font-family);flex:auto;font-size:13px;font-weight:500;line-height:24px}.COptxG_chevron{width:14px;height:14px;color:var(--dsw-alias-label-tertiary);flex:none;place-items:center;display:grid}.COptxG_list{max-height:180px;margin:0;padding:0;list-style:none;overflow-y:auto}.COptxG_row{box-sizing:border-box;border-radius:var(--dsw-radius-md);align-items:center;gap:10px;width:100%;min-height:36px;padding:4px 5px 4px 12px;display:flex}.COptxG_row+.COptxG_row{box-shadow:inset 0 1px 0 var(--dsw-alias-border-l1)}.COptxG_attachments{flex:none;gap:4px;min-width:0;max-width:55%;display:flex;overflow:hidden}.COptxG_pendingRow .COptxG_attachments{flex-shrink:1}.COptxG_file{border:.5px solid var(--dsw-alias-border-l1);border-radius:var(--dsw-radius-sm);background:var(--dsw-alias-bg-base);box-sizing:border-box;flex:0 180px;align-items:center;gap:4px;min-width:74px;height:24px;padding:0 6px;display:inline-flex;overflow:hidden}.COptxG_fileIcon{flex:none;width:16px;height:16px;display:inline-flex}.COptxG_fileName{min-width:0;color:var(--dsw-alias-label-primary-dimmed);font:var(--dsw-font-xs-13);text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.COptxG_fileSize{color:var(--dsw-alias-label-tertiary);white-space:nowrap;flex:none;font-size:10px}.COptxG_thumb{border:.5px solid var(--dsw-alias-border-l1);border-radius:var(--dsw-radius-xs);background:var(--dsw-alias-bg-base);object-fit:cover;width:24px;height:24px}.COptxG_preview{min-width:0;font:var(--dsw-font-xs-13);font-family:Inter, var(--dsw-font-family);color:var(--dsw-alias-label-primary-dimmed);text-overflow:ellipsis;white-space:nowrap;word-break:break-word;flex:auto;overflow:hidden}.COptxG_actions{flex:none;align-items:center;gap:10px;display:flex}.COptxG_status{color:var(--dsw-alias-label-tertiary);font:var(--dsw-font-xs-13);white-space:nowrap;flex:none}.COptxG_action{corner-shape:round;width:28px;height:28px;color:var(--dsw-alias-label-tertiary);cursor:pointer;background:0 0;border:none;border-radius:999px;flex:none;place-items:center;padding:0;display:grid}.COptxG_action:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover)}.COptxG_action:focus-visible{outline:var(--dsw-focus-ring-width) solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:-2px}.COptxG_action:disabled{cursor:default;opacity:.45}`,document.head.appendChild(e)}var Z={action:`COptxG_action`,actions:`COptxG_actions`,attachments:`COptxG_attachments`,chevron:`COptxG_chevron`,count:`COptxG_count`,dock:`COptxG_dock`,file:`COptxG_file`,fileIcon:`COptxG_fileIcon`,fileName:`COptxG_fileName`,fileSize:`COptxG_fileSize`,header:`COptxG_header`,lead:`COptxG_lead`,list:`COptxG_list`,panel:`COptxG_panel`,paused:`COptxG_paused`,pendingRow:`COptxG_pendingRow`,preview:`COptxG_preview`,row:`COptxG_row`,status:`COptxG_status`,thumb:`COptxG_thumb`};let Qb=[];function $b(e){let t=e.filter(e=>e.type!==`image`&&e.type!==`file`).map(e=>e.type===`text`?e.text:`[${e.type}]`).join(` `).replace(/\s+/g,` `).trim(),n=Array.from(t);return n.length>200?`${n.slice(0,200).join(``)}…`:t}function ex(e){return e.every(e=>e.type===`text`)?e.map(e=>e.text).join(``):null}function tx(e){let t=[];for(let n of e){if(n.type===`image`){let{attachment:e}=n;e!==void 0&&t.push({type:`image`,attachment:e})}if(n.type===`file`){let{attachment:e}=n;e!==void 0&&t.push({type:`file`,attachment:e})}}return t}function nx({attachment:e,label:t}){return/* @__PURE__ */ (0,h.jsxs)(`span`,{className:Z.file,"aria-label":t,title:e.name,children:[/* @__PURE__ */ (0,h.jsx)(`span`,{className:Z.fileIcon,"aria-hidden":!0,children:/* @__PURE__ */ (0,h.jsx)(d.FileTypeIcon,{path:e.name,size:16})}),/* @__PURE__ */ (0,h.jsx)(`span`,{className:Z.fileName,children:e.name}),/* @__PURE__ */ (0,h.jsx)(`span`,{className:Z.fileSize,children:(0,d.fileSizeText)(e.bytes)})]})}function rx({attachment:e,loadImage:t,label:n}){let[r,i]=(0,g.useState)(null);return(0,g.useEffect)(()=>{let n=!0;return t(e).then(e=>{n&&i(e)},()=>{}),()=>{n=!1}},[e,t]),r===null?/* @__PURE__ */ (0,h.jsx)(`span`,{className:Z.thumb,"aria-hidden":!0}):/* @__PURE__ */ (0,h.jsx)(`img`,{className:Z.thumb,src:r,alt:n})}function ix({useSession:e,useProjection:t,updateQueue:n,editQueue:r,notify:i,loadImage:a,t:o}){let s=t(`inbox`),c=t(`queueState`),l=e(e=>e.pendingSubmissions),u=(0,g.useMemo)(()=>{let e=s?.[`next-turn`]??Qb,t=new Set(l.filter(e=>e.placement===`transcript`).map(e=>e.requestId));return t.size===0?e:e.filter(({source:e})=>e.kind!==`user`||!(`rpcId`in e)||!t.has(e.rpcId))},[s,l]),f=(0,g.useMemo)(()=>{let e=new Set(u.flatMap(({source:e})=>e.kind===`user`&&`rpcId`in e?[e.rpcId]:[]));return l.filter(t=>t.placement===`queued`&&!e.has(t.requestId))},[l,u]),p=u.length+f.length,m=e(e=>e.running),_=e(e=>e.subagent===null||e.subagent.address.mode===`continuable`),v=(0,g.useRef)(!1),[y,ee]=(0,g.useState)(null),[b,x]=(0,g.useState)(!0),S=(0,g.useId)(),te=c?.pausedReason??null,ne=te===`interrupted`?o(`queue.paused.interrupted`):te===`outcome-unknown`?o(`queue.paused.unknown`):te===`failed`?o(`queue.paused.failed`):null;if((0,g.useEffect)(()=>{p===0&&!b&&x(!0)},[b,p]),p===0)return null;let re=_&&y!==null,ie=!b||re,ae=p===1||ie,oe=async(e,t,r)=>{if(v.current)return!1;v.current=!0,ee(e);try{return typeof t==`function`?await t():await n(e,t),!0}catch{return i(`error`,r),!1}finally{v.current=!1,ee(t=>t===e?null:t)}};return/* @__PURE__ */ (0,h.jsx)(`div`,{className:Z.dock,"data-queue-dock":``,children:/* @__PURE__ */ (0,h.jsxs)(`div`,{className:Z.panel,children:[ne!==null&&/* @__PURE__ */ (0,h.jsx)(`div`,{className:Z.paused,role:`status`,children:ne}),p>1&&/* @__PURE__ */ (0,h.jsxs)(`button`,{type:`button`,className:Z.header,"aria-controls":S,"aria-expanded":ie,disabled:re,onClick:()=>{x(e=>!e)},children:[/* @__PURE__ */ (0,h.jsx)(`span`,{className:Z.lead,"aria-hidden":!0,children:/* @__PURE__ */ (0,h.jsx)(d.IconQueueOutlineRegular,{})}),/* @__PURE__ */ (0,h.jsx)(`span`,{className:Z.count,children:o(`queue.count`,{n:p})}),!ae&&f.length>0&&/* @__PURE__ */ (0,h.jsx)(`span`,{className:Z.status,role:`status`,children:o(`queue.sending`)}),/* @__PURE__ */ (0,h.jsx)(`span`,{className:Z.chevron,"aria-hidden":!0,children:ie?/* @__PURE__ */ (0,h.jsx)(d.IconChevronDownOutlineRegular,{}):/* @__PURE__ */ (0,h.jsx)(d.IconChevronUpOutlineRegular,{})})]}),/* @__PURE__ */ (0,h.jsxs)(`ul`,{id:S,className:Z.list,hidden:!ae,children:[ae&&u.map(e=>{let t=tx(e.content),n=ex(e.content);return/* @__PURE__ */ (0,h.jsxs)(`li`,{className:Z.row,children:[p===1&&/* @__PURE__ */ (0,h.jsx)(`span`,{className:Z.lead,"aria-hidden":!0,children:/* @__PURE__ */ (0,h.jsx)(d.IconQueueOutlineRegular,{})}),t.length>0&&/* @__PURE__ */ (0,h.jsx)(`span`,{className:Z.attachments,children:t.map((e,t)=>e.type===`image`?/* @__PURE__ */ (0,h.jsx)(rx,{attachment:e.attachment,loadImage:a,label:o(`queue.image`)},`${e.attachment.attachmentId}:${t}`):/* @__PURE__ */ (0,h.jsx)(nx,{attachment:e.attachment,label:o(`queue.file`,{name:e.attachment.name})},`${e.attachment.attachmentId}:${e.attachment.name}:${t}`))}),/* @__PURE__ */ (0,h.jsx)(`span`,{className:Z.preview,children:(0,d.projectUserText)($b(e.content),[])}),_&&/* @__PURE__ */ (0,h.jsxs)(`div`,{className:Z.actions,children:[/* @__PURE__ */ (0,h.jsx)(d.Tooltip,{portal:!0,label:o(`queue.edit`),side:`bottom`,delayMs:500,disabled:n===null,children:/* @__PURE__ */ (0,h.jsx)(`button`,{type:`button`,className:Z.action,"aria-label":o(`queue.edit`),title:n===null?o(`queue.edit.unsupported`):void 0,disabled:y!==null||n===null,onClick:()=>{n!==null&&oe(e.id,()=>r(e.id,n),o(`queue.editFailed`))},children:/* @__PURE__ */ (0,h.jsx)(d.IconEditOutlineRegular,{size:14})})}),/* @__PURE__ */ (0,h.jsx)(d.Tooltip,{portal:!0,label:o(`queue.remove`),side:`bottom`,delayMs:500,children:/* @__PURE__ */ (0,h.jsx)(`button`,{type:`button`,className:Z.action,"aria-label":o(`queue.remove`),disabled:y!==null,onClick:()=>{oe(e.id,{kind:`remove`},o(`queue.removeFailed`))},children:/* @__PURE__ */ (0,h.jsx)(d.IconTrashOutlineRegular,{size:14})})}),/* @__PURE__ */ (0,h.jsx)(d.Tooltip,{portal:!0,label:o(m?`queue.steer`:`queue.resume`),side:`bottom`,delayMs:500,children:/* @__PURE__ */ (0,h.jsx)(`button`,{type:`button`,className:Z.action,"aria-label":o(m?`queue.steer`:`queue.resume`),disabled:y!==null,onClick:()=>{oe(e.id,{kind:`steer`},o(m?`queue.steerFailed`:`queue.resumeFailed`))},children:/* @__PURE__ */ (0,h.jsx)(d.IconSendOutlineRegular,{})})})]})]},e.id)}),ae&&f.map(e=>/* @__PURE__ */ (0,h.jsxs)(`li`,{className:`${Z.row} ${Z.pendingRow}`,"data-submission-echo":``,children:[p===1&&/* @__PURE__ */ (0,h.jsx)(`span`,{className:Z.lead,"aria-hidden":!0,children:/* @__PURE__ */ (0,h.jsx)(d.IconQueueOutlineRegular,{})}),e.attachments.length>0&&/* @__PURE__ */ (0,h.jsx)(`span`,{className:Z.attachments,children:e.attachments.map((e,t)=>e.type===`image`?/* @__PURE__ */ (0,h.jsx)(`img`,{className:Z.thumb,src:e.value.previewUrl,alt:o(`queue.image`)},`${e.value.previewUrl}:${t}`):/* @__PURE__ */ (0,h.jsx)(nx,{attachment:e.value,label:o(`queue.file`,{name:e.value.name})},`${e.value.attachmentId}:${e.value.name}:${t}`))}),/* @__PURE__ */ (0,h.jsx)(`span`,{className:Z.preview,children:(0,d.projectUserText)(e.text,[])}),/* @__PURE__ */ (0,h.jsx)(`span`,{className:Z.status,role:`status`,children:o(`queue.sending`)}),_&&/* @__PURE__ */ (0,h.jsxs)(`div`,{className:Z.actions,children:[/* @__PURE__ */ (0,h.jsx)(`button`,{type:`button`,className:Z.action,"aria-label":o(`queue.edit`),title:o(`queue.sending`),disabled:!0,children:/* @__PURE__ */ (0,h.jsx)(d.IconEditOutlineRegular,{size:14})}),/* @__PURE__ */ (0,h.jsx)(`button`,{type:`button`,className:Z.action,"aria-label":o(`queue.remove`),title:o(`queue.sending`),disabled:!0,children:/* @__PURE__ */ (0,h.jsx)(d.IconTrashOutlineRegular,{size:14})}),/* @__PURE__ */ (0,h.jsx)(`button`,{type:`button`,className:Z.action,"aria-label":o(`queue.steer`),title:o(`queue.sending`),disabled:!0,children:/* @__PURE__ */ (0,h.jsx)(d.IconSendOutlineRegular,{})})]})]},e.requestId))]})]})})}let ax={name:`conversation-queue-dock`,inject:[`slots`,`conversation`,`sessions`,`uiConversation`],apply(e,t){e.slots.inject(`conversation.input.dock`,()=>e.slots.register({name:`conversation.input.dock`,id:`queue`,order:20,locale:Kb,inject:n=>{let r=e.sessions.scope(n);if(r===void 0)throw Error(`queue dock: session "${n}" resolved no scope`);let i=r.get(`conversation`);if(i===void 0)throw Error(`queue dock: conversation service unavailable`);return{updateQueue:(e,t)=>i.updateQueue(e,t),editQueue:async(e,r)=>{let a=t.shell(n);await i.updateQueue(e,{kind:`remove`});let o=a.draftSnapshot;a.setDraft({...o,text:o.text===``?r:`${o.text}\n${r}`}),a.actions.persistDraft(),a.focus()},notify:(e,t)=>{i.input.for(r).notify(e,t)},loadImage:t=>e.uiConversation.imageUrl(n,t)}}},ix))}},ox=`@deepseek-ai/dsh-client-ui-conversation/EnterBehaviorRow.module.css`;if(typeof document<`u`&&document.querySelector(`style[data-plugin-css=`+JSON.stringify(ox)+`]`)===null){let e=document.createElement(`style`);e.dataset.plugin=`@deepseek-ai/dsh-client-ui-conversation`,e.dataset.pluginCss=ox,e.textContent=`._2CWexq_row{border-bottom:.5px solid var(--dsw-alias-border-l2);align-items:center;gap:8px;padding:16px 0;display:flex}._2CWexq_rowText{flex-direction:column;flex:1;gap:4px;min-width:0;padding-right:48px;display:flex}._2CWexq_title{color:var(--dsw-alias-label-primary);font-size:14px;font-weight:400;line-height:22px}._2CWexq_desc{color:var(--dsw-alias-label-tertiary);font-size:12px;font-weight:400;line-height:18px}._2CWexq_selector{border-radius:var(--dsw-radius-md);background:var(--dsw-alias-bg-module-platform);height:36px;font:inherit;color:var(--dsw-alias-label-primary);cursor:pointer;border:none;align-items:center;gap:12px;padding:0 14px;font-size:14px;line-height:22px;display:inline-flex}._2CWexq_selector:hover{background:var(--dsw-alias-interactive-bg-hover)}._2CWexq_chevron{flex:none}`,document.head.appendChild(e)}var sx={chevron:`_2CWexq_chevron`,desc:`_2CWexq_desc`,row:`_2CWexq_row`,rowText:`_2CWexq_rowText`,selector:`_2CWexq_selector`,title:`_2CWexq_title`};let cx=[{id:`queue`,label:`settings.enter.queue`},{id:`steer`,label:`settings.enter.steer`}];function lx({useBusyEnter:e,setBusyEnter:t,t:n}){let r=e(e=>e),[i,a]=(0,g.useState)(!1),o=r===`queue`?`settings.enter.queue`:`settings.enter.steer`;return/* @__PURE__ */ (0,h.jsxs)(`div`,{className:sx.row,children:[/* @__PURE__ */ (0,h.jsxs)(`div`,{className:sx.rowText,children:[/* @__PURE__ */ (0,h.jsx)(`div`,{className:sx.title,children:n(`settings.enter.title`)}),/* @__PURE__ */ (0,h.jsx)(`div`,{className:sx.desc,children:n(`settings.enter.description`)})]}),/* @__PURE__ */ (0,h.jsx)(d.Menu,{open:i,onClose:()=>{a(!1)},items:cx.map(e=>({id:e.id,label:n(e.label)})),selectedId:r,onSelect:e=>{a(!1),t(e)},align:`end`,portal:!0,anchor:/* @__PURE__ */ (0,h.jsxs)(`button`,{type:`button`,className:sx.selector,"aria-haspopup":`menu`,"aria-expanded":i,onClick:()=>{a(e=>!e)},children:[n(o),/* @__PURE__ */ (0,h.jsx)(d.IconChevronDownOutlineRegular,{className:sx.chevron})]})})]})}let ux={views:{get:()=>void 0,grouped:()=>void 0},activeTargets:/* @__PURE__ */ new Set};function dx(e,t){return t.activeTargets.size>0||!e.blank&&!e.awaitingFirstTurn||e.running?`active`:e.promptAttempted?`engaging`:`blank`}let fx=`@deepseek-ai/dsh-client-ui-conversation/ConversationRoot.module.css`;if(typeof document<`u`&&document.querySelector(`style[data-plugin-css=`+JSON.stringify(fx)+`]`)===null){let e=document.createElement(`style`);e.dataset.plugin=`@deepseek-ai/dsh-client-ui-conversation`,e.dataset.pluginCss=fx,e.textContent=`.ncnpZW_root{background:var(--dsw-alias-bg-base);flex-direction:column;min-width:0;height:100%;display:flex;position:relative}.ncnpZW_header{box-sizing:border-box;border-bottom:.5px solid var(--dsw-alias-border-l3);flex:none;grid-template-columns:auto minmax(0,1fr);min-height:76px;padding:10px 28px 0 20px;display:grid}.ncnpZW_header:where(:not(:has(.ncnpZW_tabs))){min-height:0;padding-bottom:10px}.ncnpZW_headerBlank{border-bottom:none;min-height:0;padding-bottom:0}.ncnpZW_headerBlank .ncnpZW_headerCorner{margin-left:auto}html:not([data-platform=darwin]) .ncnpZW_headerSessionless{padding-top:0}html:not([data-platform=darwin]) .ncnpZW_headerSessionless .ncnpZW_titleRow{min-height:0}[data-platform=darwin] .ncnpZW_headerLeading,[data-platform=darwin] .ncnpZW_headerActions,[data-platform=darwin] .ncnpZW_headerUtilities,[data-platform=darwin] .ncnpZW_headerCorner{-webkit-app-region:no-drag}.ncnpZW_titleRow{min-height:30px;grid-column:2;align-items:center;gap:0;padding-inline-start:max(0px, calc(var(--dsh-frame-leading-clearance,0px) - 20px));display:flex;container-type:inline-size}[data-phone] .ncnpZW_header:has([data-slot="conversation.header.navigation"] button){padding-top:env(safe-area-inset-top)}[data-phone] .ncnpZW_header:has([data-slot="conversation.header.navigation"] button) .ncnpZW_titleRow{min-height:44px}.ncnpZW_titleCluster{flex:1;align-items:center;gap:10px;min-width:0;display:flex}.ncnpZW_headerLeading{flex:none;grid-area:1/1;align-items:center;gap:8px;display:flex}.ncnpZW_crumbs{white-space:nowrap;align-items:center;gap:4px;min-width:0;display:flex;overflow:hidden}.ncnpZW_crumbSeg{align-items:center;gap:4px;min-width:0;display:inline-flex}.ncnpZW_crumbSep{color:var(--dsw-alias-label-caption);font-size:14px;line-height:20px}.ncnpZW_crumb{border-radius:var(--dsw-radius-md);max-width:220px;color:var(--dsw-alias-label-tertiary);text-overflow:ellipsis;white-space:nowrap;cursor:pointer;background:0 0;border:none;padding:4px 8px;font-size:14px;line-height:20px;display:inline-block;overflow:hidden}.ncnpZW_crumbSubagent{font-size:12px;line-height:18px}button.ncnpZW_crumb:hover{background:var(--dsw-alias-interactive-bg-hover)}.ncnpZW_crumbCurrent{color:var(--dsw-alias-label-primary);cursor:default;font-weight:500}.ncnpZW_headerActions{flex:none;align-items:center;gap:8px;display:flex}.ncnpZW_headerUtilities{flex:none;align-items:center;gap:8px;margin-left:20px;display:flex}.ncnpZW_headerUtilities:empty{display:none}.ncnpZW_headerCorner{flex:none;align-items:center;margin-left:8px;margin-right:-16px;display:flex}.ncnpZW_headerCorner:empty{display:none}.ncnpZW_tabs{z-index:1;grid-column:1/-1;gap:36px;margin-top:10px;padding-left:8px;display:flex;position:relative}.ncnpZW_tab{color:var(--dsw-alias-label-tertiary);cursor:pointer;background:0 0;border:none;padding:0 0 9px;font-size:13px;font-weight:500;line-height:16px;position:relative}.ncnpZW_tab:after{content:"";background:0 0;border-radius:2px;height:2px;position:absolute;bottom:-1px;left:0;right:0}.ncnpZW_tabActive{color:var(--dsw-alias-state-business-primary)}.ncnpZW_tabActive:after{background:var(--dsw-alias-state-business-primary)}.ncnpZW_viewArea{flex-direction:column;flex:1;min-height:0;display:flex}.ncnpZW_widthHandle{z-index:0;width:min(10px, calc((100% - var(--dsh-chat-content-width)) / 2 - 24px - 24px));cursor:col-resize;position:absolute;top:0;bottom:0}.ncnpZW_widthHandle[data-side=left]{right:calc(50% + var(--dsh-chat-content-width) / 2 + 24px)}.ncnpZW_widthHandle[data-side=right]{left:calc(50% + var(--dsh-chat-content-width) / 2 + 24px)}.ncnpZW_widthHandle:after{content:"";background:linear-gradient(to bottom, transparent calc(var(--dsh-width-handle-pointer-y,50%) - 36px), var(--dsw-alias-scrollbar-bg-l1) calc(var(--dsh-width-handle-pointer-y,50%) - 8px), var(--dsw-alias-scrollbar-bg-l1) calc(var(--dsh-width-handle-pointer-y,50%) + 8px), transparent calc(var(--dsh-width-handle-pointer-y,50%) + 36px));opacity:0;pointer-events:none;border-radius:2px;width:2px;position:absolute;top:0;bottom:0}.ncnpZW_widthHandle[data-side=left]:after{right:4px}.ncnpZW_widthHandle[data-side=right]:after{left:4px}.ncnpZW_widthHandle:hover:after,.ncnpZW_widthHandle[data-dragging]:after{opacity:1}.ncnpZW_widthHandle[data-dragging]{z-index:8}.ncnpZW_root:has([data-conversation-composer-overlay]) .ncnpZW_widthHandle{display:none}.ncnpZW_composerStack{--dsh-composer-stack-gap:6px;gap:var(--dsh-composer-stack-gap);flex-direction:column;display:flex}.ncnpZW_composerSeat{--dsh-composer-text-max-height:336px;flex-direction:column;flex:none;display:flex}.ncnpZW_root[data-phase=active]{overflow:hidden}.ncnpZW_root[data-phase=active] .ncnpZW_header{flex:none}.ncnpZW_body{--dsh-chat-content-width:var(--dsh-chat-user-width,clamp(680px, calc(var(--dsh-conversation-column-width,0px) * .64), 920px));--dsh-composer-card-max-width:calc(var(--dsh-chat-content-width) + 32px);--dsh-composer-side-clearance:16px;--dsh-composer-dock-inset:8px;flex-direction:column;flex:1;min-height:0;display:flex;position:relative}.ncnpZW_embeddedBody{--dsh-chat-content-width:min(calc(100% - 32px), 920px);--dsh-composer-card-max-width:min(calc(100% - 16px), 952px);--dsh-composer-side-clearance:8px;--dsh-composer-dock-inset:8px;overflow:hidden}.ncnpZW_scrollBody{scrollbar-gutter:stable;flex-direction:column;flex:1;min-height:0;margin-right:2px;display:flex;overflow-y:auto}.ncnpZW_scrollBody::-webkit-scrollbar-track{margin:2px}.ncnpZW_root[data-phase=active] .ncnpZW_viewArea,.ncnpZW_embeddedBody[data-content-phase=active] .ncnpZW_viewArea{flex:1 0 auto;min-height:auto}.ncnpZW_root[data-phase=active] .ncnpZW_composerSeat,.ncnpZW_embeddedBody[data-content-phase=active] .ncnpZW_composerSeat{z-index:7;background:var(--dsh-phone-composer-mask,linear-gradient(180deg, color-mix(in srgb, var(--dsw-alias-bg-base) 0%, transparent) 0px, var(--dsw-alias-bg-base) 36px));position:sticky;bottom:0}@supports (backdrop-filter:blur(14px)){[data-phone] .ncnpZW_composerSeat:where(:has([data-chain-overlay-fallback=conversation\\.composer]:only-child [data-composer-card])){--dsh-phone-composer-mask:linear-gradient(180deg, transparent 0px, color-mix(in srgb, var(--dsw-alias-bg-base) 60%, transparent) 36px, color-mix(in srgb, var(--dsw-alias-bg-base) 60%, transparent) calc(100% - 28px), var(--dsw-alias-bg-base) 100%)}}@media (prefers-reduced-transparency:reduce),(prefers-contrast:more),(forced-colors:active){[data-phone] .ncnpZW_composerSeat{--dsh-phone-composer-mask:initial}}.ncnpZW_root[data-phase=active] .ncnpZW_composerSeat:has([data-trigger-menu]){z-index:9}.ncnpZW_scrollBody:has([data-conversation-composer-overlay]){scrollbar-gutter:auto;position:relative;overflow:hidden auto}.ncnpZW_scrollBody:has([data-conversation-composer-overlay])>[data-slot=conversation\\.session]>.ncnpZW_viewArea{flex:1 1 0;min-height:0;overflow:hidden}.ncnpZW_scrollBody:has([data-conversation-composer-overlay])>.ncnpZW_composerSeat{right:var(--dsh-scrollbar-width);position:absolute;bottom:0;left:0}.ncnpZW_composerHero{width:min(calc(var(--dsh-composer-card-max-width) + 2 * var(--dsh-composer-side-clearance)), 100%);z-index:1;align-self:center;gap:8px;padding-bottom:32px}.ncnpZW_heroWorkspaceRow{align-items:center;gap:2px;min-width:0;margin-top:4px;padding:0 16px 0 20px;display:flex}.ncnpZW_root[data-phase=hero] .ncnpZW_scrollBody,.ncnpZW_embeddedBody[data-content-phase=hero] .ncnpZW_scrollBody{justify-content:center;overflow-y:auto}.ncnpZW_root[data-phase=settling] .ncnpZW_composerSeat,.ncnpZW_embeddedBody[data-content-phase=settling] .ncnpZW_composerSeat{visibility:hidden}`,document.head.appendChild(e)}var Q={body:`ncnpZW_body`,composerHero:`ncnpZW_composerHero`,composerSeat:`ncnpZW_composerSeat`,composerStack:`ncnpZW_composerStack`,crumb:`ncnpZW_crumb`,crumbCurrent:`ncnpZW_crumbCurrent`,crumbSeg:`ncnpZW_crumbSeg`,crumbSep:`ncnpZW_crumbSep`,crumbSubagent:`ncnpZW_crumbSubagent`,crumbs:`ncnpZW_crumbs`,embeddedBody:`ncnpZW_embeddedBody`,header:`ncnpZW_header`,headerActions:`ncnpZW_headerActions`,headerBlank:`ncnpZW_headerBlank`,headerCorner:`ncnpZW_headerCorner`,headerLeading:`ncnpZW_headerLeading`,headerSessionless:`ncnpZW_headerSessionless`,headerUtilities:`ncnpZW_headerUtilities`,heroWorkspaceRow:`ncnpZW_heroWorkspaceRow`,root:`ncnpZW_root`,scrollBody:`ncnpZW_scrollBody`,tab:`ncnpZW_tab`,tabActive:`ncnpZW_tabActive`,tabs:`ncnpZW_tabs`,titleCluster:`ncnpZW_titleCluster`,titleRow:`ncnpZW_titleRow`,viewArea:`ncnpZW_viewArea`,widthHandle:`ncnpZW_widthHandle`};let px=`dsh.conversation.contentWidth`;function mx(){let e=localStorage.getItem(px);if(e===null)return null;let t=Number(e);return Number.isFinite(t)&&t>0?t:null}function hx(e,t){let n=Math.max(640,e-176);return t===null?Math.max(680,Math.min(e*.64,920)):Math.min(Math.max(t,640),n)}function gx(e,t){if(e.deltaMode===1){let n=Number.parseFloat(getComputedStyle(t).lineHeight);return e.deltaY*(Number.isFinite(n)?n:16)}return e.deltaMode===2?e.deltaY*t.clientHeight:e.deltaY}function _x(e){let t=(0,g.useRef)(!1),n=(0,g.useRef)(0),r=(0,g.useRef)(0),i=(0,g.useRef)(0),a=(0,g.useRef)(null),o=(0,g.useRef)(e);o.current=e;let s=()=>{let e=i.current-r.current,t=o.current.side===`right`?e:-e;return n.current+t*2},c=()=>{a.current!==null&&(cancelAnimationFrame(a.current),a.current=null)},l=(0,g.useCallback)(e=>{e.button===0&&(e.preventDefault(),e.currentTarget.setPointerCapture(e.pointerId),r.current=e.clientX,i.current=e.clientX,n.current=o.current.onStart(),t.current=!0,e.currentTarget.toggleAttribute(`data-dragging`,!0))},[]),u=(0,g.useCallback)(e=>{if(!t.current||!e.currentTarget.hasPointerCapture(e.pointerId))return;let n=e.currentTarget.getBoundingClientRect();e.currentTarget.style.setProperty(`--dsh-width-handle-pointer-y`,`${e.clientY-n.top}px`),i.current=e.clientX,a.current??=requestAnimationFrame(()=>{a.current=null,o.current.onDrag(s())})},[]),d=(0,g.useCallback)(e=>{t.current&&e.currentTarget.hasPointerCapture(e.pointerId)&&(t.current=!1,e.currentTarget.toggleAttribute(`data-dragging`,!1),e.currentTarget.releasePointerCapture(e.pointerId),c(),i.current=e.clientX,i.current!==r.current&&o.current.onCommit(s()),o.current.onEnd())},[]),f=(0,g.useCallback)(e=>{t.current&&(t.current=!1,e.currentTarget.toggleAttribute(`data-dragging`,!1),c(),o.current.onEnd())},[]),p=(0,g.useCallback)(e=>{let t=e.currentTarget.parentElement;
168
168
  /* v8 ignore next -- a width handle renders only inside the Conversation body. */
169
169
  if(t===null)return;let n=t.querySelector(`:scope > [data-conversation-scroll]`);
170
170
  /* v8 ignore next -- the Conversation body always contains its direct scroll element. */
@@ -1,6 +1,6 @@
1
- window.__ModuleLoader__.load({id:`@deepseek-ai/dsh-client-ui-settings-general`,factory:e=>{var t={exports:{}},n=t.exports;Object.defineProperty(n,Symbol.toStringTag,{value:`Module`});let r=e("@deepseek-ai/dsh-client-ui-slots"),i=e("@deepseek-ai/dsh-client-ui-primitives"),a=e("@deepseek-ai/dsh-client-store"),o=e("react"),s=e("react-dom"),c=e("react/jsx-runtime");function l(){return(0,a.defineStore)({init:()=>({open:!1,activeId:void 0}),actions:{open:e=>{e.open=!0},close:e=>{e.open=!1,e.activeId=void 0},select:(e,t)=>{e.activeId=t},openSection:(e,t)=>{e.activeId=t,e.open=!0}}})}function u(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`){if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=u(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function d(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=u(e))&&(r&&(r+=` `),r+=t);return r}let f=`@deepseek-ai/dsh-client-ui-settings-general/SettingsRoot.module.css`;if(typeof document<`u`&&document.querySelector(`style[data-plugin-css=`+JSON.stringify(f)+`]`)===null){let e=document.createElement(`style`);e.dataset.plugin=`@deepseek-ai/dsh-client-ui-settings-general`,e.dataset.pluginCss=f,e.textContent=`.xLlTGq_triggerRow{flex:none;align-items:center;gap:8px;width:calc(100% + 4px);margin:4px -2px;display:flex;position:relative}.xLlTGq_triggerRow.xLlTGq_railRow{width:36px;margin:8px 0 10px}.xLlTGq_trigger{box-sizing:border-box;border-radius:var(--dsw-radius-md);cursor:pointer;width:auto;min-width:0;height:42px;color:var(--dsw-alias-label-primary);background:0 0;border:none;flex:1;align-items:center;gap:8px;margin:0;padding:0 10px 0 8px;font-family:inherit;font-size:14px;line-height:22px;display:flex;overflow:hidden}.xLlTGq_trigger:hover{background:var(--dsw-alias-interactive-bg-hover)}.xLlTGq_trigger.xLlTGq_rail{flex:none;justify-content:center;gap:0;width:36px;height:36px;margin:0;padding:0}.xLlTGq_triggerLabel{white-space:nowrap;overflow:hidden}.xLlTGq_overlay{z-index:1000;justify-content:center;align-items:center;display:flex;position:fixed;inset:0}.xLlTGq_mask{inset:var(--dsh-frame-chrome-top,0px) 0 0;background:var(--dsw-alias-bg-mask-1);backdrop-filter:var(--dsw-mask-blur);position:absolute}.xLlTGq_panel{z-index:1;width:1040px;height:min(800px, calc(100vh - 2 * max(24px, var(--dsh-frame-overlay-top,24px))));border-radius:var(--dsw-radius-panel);background:var(--dsw-alias-bg-layer-2);max-width:calc(100vw - 48px);box-shadow:var(--dsw-elevation-prominent);--dsh-scrollbar-thumb:var(--dsw-alias-scrollbar-bg-l2);--dsh-scrollbar-thumb-hover:var(--dsw-alias-scrollbar-hover-l2);display:flex;position:relative;overflow:hidden}.xLlTGq_panel:focus{outline:none}.xLlTGq_nav{box-sizing:border-box;flex-direction:column;flex:none;gap:18px;width:188px;padding:22px 12px 0;display:flex}.xLlTGq_navTitle{color:var(--dsw-alias-label-primary);padding:0 12px;font-size:16px;font-weight:500;line-height:24px}.xLlTGq_navList{flex-direction:column;gap:4px;display:flex;overflow-y:auto}.xLlTGq_navCell{box-sizing:border-box;border-radius:var(--dsw-radius-md);cursor:pointer;height:40px;color:var(--dsw-alias-label-primary);text-align:left;background:0 0;border:none;align-items:center;gap:8px;padding:9px 16px 9px 12px;font-family:inherit;font-size:14px;font-weight:400;line-height:22px;display:flex}.xLlTGq_navCell:hover{background:var(--dsw-specific-sidebar-nav-item-hover)}.xLlTGq_navCell.xLlTGq_active{background:var(--dsw-specific-sidebar-nav-item-active)}.xLlTGq_navIcon{flex:none}.xLlTGq_navLabel{white-space:nowrap;text-overflow:ellipsis;flex:1;min-width:0;overflow:hidden}.xLlTGq_content{flex-direction:column;flex:1;min-width:0;display:flex}.xLlTGq_header{box-sizing:border-box;flex:none;justify-content:space-between;align-items:flex-start;gap:8px;height:54px;padding:20px 14px 8px 10px;display:flex}.xLlTGq_actions{justify-content:flex-end;align-items:center;gap:8px;min-width:0;margin-left:auto;display:flex}.xLlTGq_close{border-radius:var(--dsw-radius-sm);cursor:pointer;width:28px;height:28px;color:var(--dsw-alias-label-primary);background:0 0;border:none;justify-content:center;align-items:center;padding:0;display:inline-flex}.xLlTGq_close:hover{background:var(--dsw-alias-interactive-bg-hover)}.xLlTGq_options{flex:1;min-height:0;padding:0 24px 24px;overflow-y:auto}@media (width<=600px){.xLlTGq_panel{max-width:calc(100vw - 24px);height:calc(100dvh - 2 * max(12px, env(safe-area-inset-top), env(safe-area-inset-bottom)));flex-direction:column}.xLlTGq_nav{gap:12px;width:100%;padding:16px 12px 8px}.xLlTGq_navTitle{padding:0 44px 0 4px}.xLlTGq_navList{flex-direction:row;overflow-x:auto}.xLlTGq_navCell{flex:none;height:44px}.xLlTGq_content{min-height:0}.xLlTGq_header{height:auto;padding:0 16px}.xLlTGq_close{width:44px;height:44px;position:absolute;top:6px;right:6px}.xLlTGq_options{padding:0 16px 16px}}.xLlTGq_hiddenLabel{clip:rect(0 0 0 0);white-space:nowrap;width:1px;height:1px;position:absolute;overflow:hidden}`,document.head.appendChild(e)}var p={actions:`xLlTGq_actions`,active:`xLlTGq_active`,close:`xLlTGq_close`,content:`xLlTGq_content`,header:`xLlTGq_header`,hiddenLabel:`xLlTGq_hiddenLabel`,mask:`xLlTGq_mask`,nav:`xLlTGq_nav`,navCell:`xLlTGq_navCell`,navIcon:`xLlTGq_navIcon`,navLabel:`xLlTGq_navLabel`,navList:`xLlTGq_navList`,navTitle:`xLlTGq_navTitle`,options:`xLlTGq_options`,overlay:`xLlTGq_overlay`,panel:`xLlTGq_panel`,rail:`xLlTGq_rail`,railRow:`xLlTGq_railRow`,trigger:`xLlTGq_trigger`,triggerLabel:`xLlTGq_triggerLabel`,triggerRow:`xLlTGq_triggerRow`};let m=`@deepseek-ai/dsh-client-ui-settings-general/DesktopUpdateIndicator.module.css`;if(typeof document<`u`&&document.querySelector(`style[data-plugin-css=`+JSON.stringify(m)+`]`)===null){let e=document.createElement(`style`);e.dataset.plugin=`@deepseek-ai/dsh-client-ui-settings-general`,e.dataset.pluginCss=m,e.textContent=`.kZjXEq_indicator{box-sizing:border-box;border:1px solid color-mix(in srgb, var(--dsw-alias-brand-primary-new-colorprimary-new-color) 20%, transparent);border-radius:var(--dsw-radius-sm);height:28px;color:var(--dsw-alias-brand-primary-new-colorprimary-new-color);background:color-mix(in srgb, var(--dsw-alias-brand-primary-new-colorprimary-new-color) 8%, transparent);text-align:left;white-space:nowrap;cursor:pointer;flex:none;grid-template-columns:14px max-content;align-items:center;column-gap:4px;padding:0 8px;font-family:inherit;font-size:12px;font-weight:500;line-height:18px;display:inline-grid}.kZjXEq_icon{place-items:center;width:14px;height:14px;display:grid}.kZjXEq_badge{inset-inline-end:2px;corner-shape:round;background:var(--dsw-alias-brand-primary-new-colorprimary-new-color);border-radius:50%;width:6px;height:6px;position:absolute;top:2px}.kZjXEq_errorDot{corner-shape:round;background:currentColor;border-radius:50%;width:6px;height:6px}.kZjXEq_spinner{animation:1s linear infinite kZjXEq_spin}@keyframes kZjXEq_spin{to{transform:rotate(360deg)}}@media (prefers-reduced-motion:reduce){.kZjXEq_spinner{animation:none}}.kZjXEq_indicator[aria-disabled=true]{cursor:default}`,document.head.appendChild(e)}var h={badge:`kZjXEq_badge`,errorDot:`kZjXEq_errorDot`,icon:`kZjXEq_icon`,indicator:`kZjXEq_indicator`,spin:`kZjXEq_spin`,spinner:`kZjXEq_spinner`};let g=/* @__PURE__ */ new Set([`checking`,`downloading`,`verifying`,`installing`]);function _(e,t){let n={idle:``,checking:t(`desktop.update.checking`),available:t(`desktop.update.available`),downloading:t(`desktop.update.progress`,{percent:e.percent??0}),verifying:t(`desktop.update.verifying`),installing:t(`desktop.update.installing`),ready:t(`desktop.update.ready`),error:t(`desktop.update.retry`)}[e.phase];return e.phase===`checking`||e.phase===`verifying`||e.phase===`installing`?{label:n,detail:e.version??n}:e.phase===`error`?{label:n,detail:{check:t(`desktop.update.checkFailed`),"check-network":t(`desktop.update.checkNetworkFailed`),download:t(`desktop.update.downloadFailed`),"download-network":t(`desktop.update.downloadNetworkFailed`),install:t(`desktop.update.installFailed`),"install-network":t(`desktop.update.installNetworkFailed`),"stop-failed":t(`desktop.update.stopFailed`),"tasks-changed":t(`desktop.update.tasksChanged`),"tasks-unavailable":t(`desktop.update.tasksUnavailable`)}[e.failure??`install`]}:e.phase===`downloading`&&e.version!==void 0?{label:n,detail:t(`desktop.update.downloadDetail`,{percent:e.percent??0,version:e.version})}:{label:n,detail:e.version===void 0?n:t(`desktop.update.versionDetail`,{label:n,version:e.version})}}function v({wide:e,hidden:t,t:n,view:r,onOpen:a}){let{presentation:o,failed:s,opening:l}=r;if(!e||t||!s&&(o===void 0||o.phase===`idle`))return null;let u=n(`desktop.update.retry`),d=o===void 0?{label:u,detail:u}:_(o,n),f=s?u:d.label,p=s||o?.phase===`error`,m=l||o!==void 0&&g.has(o.phase);return/* @__PURE__ */ (0,c.jsx)(i.Tooltip,{label:s?u:d.detail,side:`top`,children:/* @__PURE__ */ (0,c.jsxs)(`button`,{type:`button`,className:h.indicator,"aria-label":f,"aria-disabled":m,onClick:()=>{m||a()},children:[/* @__PURE__ */ (0,c.jsx)(`span`,{className:h.icon,"aria-hidden":`true`,children:p?/* @__PURE__ */ (0,c.jsx)(`span`,{className:h.errorDot}):m?/* @__PURE__ */ (0,c.jsx)(i.IconLoadingOutlineRegular,{className:h.spinner,size:14}):/* @__PURE__ */ (0,c.jsx)(i.IconDownloadOutlineRegular,{size:14})}),/* @__PURE__ */ (0,c.jsx)(`span`,{children:f})]})})}function y({useDesktopUpdate:e,useConnectionState:t,t:n}){let{presentation:r,failed:a}=e(e=>e),o=t(e=>e);if((o===`disconnected`||o===`connecting`)&&r?.phase!==`installing`||!a&&(r===void 0||r.phase===`idle`))return null;let s=n(`desktop.update.retry`),l=r===void 0?{label:s,detail:s}:_(r,n),u=a?s:l.label;return/* @__PURE__ */ (0,c.jsx)(i.Tooltip,{label:a?u:l.detail,side:`right`,children:/* @__PURE__ */ (0,c.jsx)(`span`,{role:`img`,"aria-label":u,className:h.badge})})}function b(e){return e===`account`||e===`codexhost-accounts`?/* @__PURE__ */ (0,c.jsx)(i.IconUserOutlineMedium,{className:p.navIcon,size:16}):e===`models`||e===`codexhost-usage-statistics`?/* @__PURE__ */ (0,c.jsx)(i.IconDataOutlineMedium,{className:p.navIcon,size:16}):e===`agent-presets`?/* @__PURE__ */ (0,c.jsx)(i.IconAgentPresetOutlineMedium,{className:p.navIcon,size:16}):e===`plugins`||e===`codexhost-connections`?/* @__PURE__ */ (0,c.jsx)(i.IconPersonalizationOutlineMedium,{className:p.navIcon,size:16}):e===`archived-sessions`?/* @__PURE__ */ (0,c.jsx)(i.IconArchiveOutlineMedium,{className:p.navIcon,size:16}):/* @__PURE__ */ (0,c.jsx)(i.IconSettingsOutlineMedium,{className:p.navIcon,size:16})}function x({rows:e,renderSlot:t,activeId:n,onSelect:r,onClose:a}){let l=e.find(e=>e.id===n)?.id??e[0]?.id,u=(0,o.useId)(),f=(0,o.useRef)(null);return(0,i.useModalLayer)(f,!0,a),(0,s.createPortal)(/* @__PURE__ */ (0,c.jsxs)(`div`,{className:p.overlay,role:`presentation`,children:[/* @__PURE__ */ (0,c.jsx)(`div`,{className:p.mask,"aria-hidden":`true`,onClick:a}),/* @__PURE__ */ (0,c.jsxs)(`div`,{ref:f,tabIndex:-1,"data-shortcut-modal":`settings`,className:p.panel,role:`dialog`,"aria-modal":`true`,"aria-labelledby":u,children:[/* @__PURE__ */ (0,c.jsxs)(`nav`,{className:p.nav,children:[/* @__PURE__ */ (0,c.jsx)(`div`,{className:p.navTitle,id:u,tabIndex:-1,"data-modal-autofocus":l===void 0?``:void 0,children:t(`settings.header`,{})}),/* @__PURE__ */ (0,c.jsx)(`div`,{className:p.navList,children:e.map(e=>/* @__PURE__ */ (0,c.jsxs)(`button`,{type:`button`,className:d(p.navCell,e.id===l&&p.active),"aria-current":e.id===l?`true`:void 0,"data-modal-autofocus":e.id===l?``:void 0,onClick:()=>{r(e.id)},children:[b(e.id),/* @__PURE__ */ (0,c.jsx)(`span`,{className:p.navLabel,children:e.label})]},e.id))})]}),/* @__PURE__ */ (0,c.jsxs)(`div`,{className:p.content,children:[/* @__PURE__ */ (0,c.jsxs)(`div`,{className:p.header,children:[/* @__PURE__ */ (0,c.jsx)(`div`,{className:p.actions,children:t(`settings.action`,{})}),/* @__PURE__ */ (0,c.jsxs)(`button`,{type:`button`,className:p.close,onClick:a,children:[/* @__PURE__ */ (0,c.jsx)(i.IconCloseOutlineRegular,{size:14}),/* @__PURE__ */ (0,c.jsx)(`span`,{className:p.hiddenLabel,children:t(`settings.close`,{})})]})]}),/* @__PURE__ */ (0,c.jsx)(`div`,{className:p.options,children:l!==void 0&&t(`settings.section`,{close:a},{only:l})})]})]})]}),document.body)}function S(e){let{wide:t,reconnect:n,useConnectionState:r,useSections:a,useOnboardingSteps:s,useSessions:l,renderSlot:u,t:f,useDesktopUpdate:m,openDesktopUpdate:h,useStore:g,actions:_,useShortcuts:y}=e,{open:b,activeId:S}=g(e=>e),C=y(e=>e.find(e=>e.id===`settings.open`)),{close:w,openSection:T}=_;(0,o.useEffect)(()=>{if(window.location.hash!==`#connect-devices`)return;T(`codexhost-connect-devices`);let e=new URL(window.location.href);e.hash=``,window.history.replaceState(window.history.state,``,e.href)},[T]);let[E,D]=(0,o.useState)(),[O,k]=(0,o.useState)(()=>/* @__PURE__ */ new Set),[A,j]=(0,o.useState)(!1),[M,N]=(0,o.useState)(!1),P=(0,o.useRef)(void 0),F=a(e=>e),I=m(e=>e),L=r(e=>e),R=(0,o.useRef)(L),z=s(e=>e),B=l(e=>{let t=Object.values(e.byId).find(e=>(e.retainedBy.mainView??0)>0);return e.phase===`ready`&&(t===void 0||t.blank)}),V=E===void 0?B?z.find(e=>!O.has(e.id)):void 0:z.find(e=>e.id===E);(0,o.useEffect)(()=>{B||k(/* @__PURE__ */ new Set)},[B]);let H=(0,o.useRef)(V);(0,o.useEffect)(()=>{let e=H.current===void 0&&V!==void 0;H.current=V,e&&b&&w()},[V,b,w]),(0,o.useLayoutEffect)(()=>{let e=R.current;R.current=L,L===`connected`?(e===`disconnected`||e===`connecting`)&&j(!0):j(!1)},[L]),(0,o.useLayoutEffect)(()=>{if(!A||M)return;let e=window.setTimeout(()=>{j(!1)},2e3);return()=>{window.clearTimeout(e)}},[A,M]),(0,o.useLayoutEffect)(()=>{if(L===`connecting`){P.current=Date.now();return}let e=P.current;if(e===void 0)return;P.current=void 0;let t=800-(Date.now()-e);if(t<=0)return;N(!0);let n=window.setTimeout(()=>{N(!1)},t);return()=>{window.clearTimeout(n),N(!1)}},[L]);let U=(0,o.useCallback)(e=>{D(void 0),k(t=>t.has(e)?t:/* @__PURE__ */ new Set([...t,e]))},[]),W;return L===`connecting`||M?W=`connecting`:L===`disconnected`?W=`disconnected`:A&&(W=`recovered`),/* @__PURE__ */ (0,c.jsxs)(c.Fragment,{children:[/* @__PURE__ */ (0,c.jsxs)(`div`,{className:d(p.triggerRow,!t&&p.railRow),children:[u(`settings.launcher`,{wide:t,settingsOpen:b,openSettings:_.open,...C?.keys.length?{settingsShortcut:{keys:C.keys,aria:C.aria}}:{},openOnboarding:e=>{w(),D(e)}},{fallback:/* @__PURE__ */ (0,c.jsx)(i.Tooltip,{disabled:b,label:f(`trigger`),shortcutKeys:C?.keys,children:/* @__PURE__ */ (0,c.jsx)(`button`,{type:`button`,className:d(p.trigger,!t&&p.rail),"aria-label":f(`trigger`),"aria-keyshortcuts":C?.aria,"aria-haspopup":`dialog`,"aria-expanded":b,onClick:()=>{_.open()},children:u(`settings.trigger`,{wide:t})})})}),/* @__PURE__ */ (0,c.jsx)(i.ConnectionIndicator,{state:t&&I.presentation?.phase!==`installing`?W:void 0,disconnectedLabel:f(`connection.error`),connectingLabel:f(`connection.connecting`),recoveredLabel:f(`connection.connected`),reconnectActionLabel:f(`connection.reconnect`),restartActionLabel:f(`connection.restart`),onReconnect:n}),/* @__PURE__ */ (0,c.jsx)(v,{wide:t,hidden:W!==void 0&&I.presentation?.phase!==`installing`,t:f,view:I,onOpen:h})]}),b&&/* @__PURE__ */ (0,c.jsx)(x,{rows:F,renderSlot:u,activeId:S,onSelect:_.select,onClose:w}),V!==void 0&&u(`settings.onboarding`,{stepId:V.id,explicit:E!==void 0,complete:()=>{U(V.id)},openSection:T},{only:V.id})]})}var C=class{bridge;store=(0,a.createSnapshotStore)({failed:!1,opening:!1});live=!0;received=!1;unsubscribe;constructor(e){this.bridge=e,this.unsubscribe=e?.subscribe(e=>{this.live&&(this.received=!0,this.store.set({...this.store.getSnapshot(),presentation:e,failed:!1}))}),e?.status().then(e=>{this.live&&!this.received&&this.store.set({...this.store.getSnapshot(),presentation:e})},()=>{this.live&&!this.received&&this.store.set({...this.store.getSnapshot(),failed:!0})})}open(){if(!this.live||this.bridge===void 0)return;let e=this.store.getSnapshot();e.opening||e.presentation!==void 0&&[`checking`,`downloading`,`verifying`,`installing`].includes(e.presentation.phase)||(this.store.set({...e,opening:!0}),this.bridge.open().catch(()=>{this.live&&this.store.set({...this.store.getSnapshot(),failed:!0})}).finally(()=>{this.live&&this.store.set({...this.store.getSnapshot(),opening:!1})}))}dispose(){this.live=!1,this.unsubscribe?.()}};let w=`@deepseek-ai/dsh-client-ui-settings-general/chrome.module.css`;if(typeof document<`u`&&document.querySelector(`style[data-plugin-css=`+JSON.stringify(w)+`]`)===null){let e=document.createElement(`style`);e.dataset.plugin=`@deepseek-ai/dsh-client-ui-settings-general`,e.dataset.pluginCss=w,e.textContent=`.xYdq5q_triggerLabel{white-space:nowrap;overflow:hidden}`,document.head.appendChild(e)}var T={triggerLabel:`xYdq5q_triggerLabel`};function E({wide:e,t}){return/* @__PURE__ */ (0,c.jsxs)(c.Fragment,{children:[/* @__PURE__ */ (0,c.jsx)(i.IconSettingsOutlineMedium,{size:e?16:18}),e&&/* @__PURE__ */ (0,c.jsx)(`span`,{className:T.triggerLabel,children:t(`trigger`)})]})}function D({t:e}){return/* @__PURE__ */ (0,c.jsx)(c.Fragment,{children:e(`title`)})}function O({t:e}){return/* @__PURE__ */ (0,c.jsx)(c.Fragment,{children:e(`close`)})}let k=`@deepseek-ai/dsh-client-ui-settings-general/GeneralSection.module.css`;if(typeof document<`u`&&document.querySelector(`style[data-plugin-css=`+JSON.stringify(k)+`]`)===null){let e=document.createElement(`style`);e.dataset.plugin=`@deepseek-ai/dsh-client-ui-settings-general`,e.dataset.pluginCss=k,e.textContent=`.jNGSqa_section{flex-direction:column;width:100%;display:flex}.jNGSqa_heading{margin-bottom:28px}.jNGSqa_title{color:var(--dsw-alias-label-primary);letter-spacing:-.5px;margin:0;font-size:24px;font-weight:600;line-height:32px}.jNGSqa_description{color:var(--dsw-alias-label-secondary);margin:8px 0 0;font-size:13px;line-height:20px}.jNGSqa_group+.jNGSqa_group{margin-top:28px}.jNGSqa_groupTitle{color:var(--dsw-alias-label-primary);margin:0 0 10px;font-size:13px;font-weight:600;line-height:20px}.jNGSqa_card{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-2);border-radius:12px}.jNGSqa_item{min-width:0;margin:0 20px}.jNGSqa_item+.jNGSqa_item{border-top:1px solid var(--dsw-alias-border-l1)}.jNGSqa_item>[data-slot="settings.general.item"]>*{border-bottom:none}.jNGSqa_footer{margin-top:8px}@media (width<=600px){.jNGSqa_heading{margin-bottom:24px}.jNGSqa_group+.jNGSqa_group{margin-top:24px}.jNGSqa_item{margin:0 12px}}`,document.head.appendChild(e)}var A={card:`jNGSqa_card`,description:`jNGSqa_description`,footer:`jNGSqa_footer`,group:`jNGSqa_group`,groupTitle:`jNGSqa_groupTitle`,heading:`jNGSqa_heading`,item:`jNGSqa_item`,section:`jNGSqa_section`,title:`jNGSqa_title`};let j=[{title:`general.display`,items:[`language`,`appearance`,`font-size`,`workspace.recent-navigation`]},{title:`general.interaction`,items:[`transcript-view`,`developer-tools`,`shortcuts`,`link-opening`,`composer-enter`]},{title:`general.notifications`,items:[`codexhost.notifications`]}],M=new Set(j.flatMap(e=>e.items));function N({renderSlot:e,t,useItems:n}){let r=(0,o.useId)(),i=n(e=>e),a=j.map(e=>({title:e.title,items:i.filter(t=>e.items.includes(t))}));return a.push({title:`general.other`,items:i.filter(e=>e!==`current-version`&&!M.has(e))}),/* @__PURE__ */ (0,c.jsxs)(`div`,{className:A.section,children:[/* @__PURE__ */ (0,c.jsxs)(`header`,{className:A.heading,children:[/* @__PURE__ */ (0,c.jsx)(`h2`,{className:A.title,children:t(`general.nav`)}),/* @__PURE__ */ (0,c.jsx)(`p`,{className:A.description,children:t(`general.description`)})]}),a.filter(e=>e.items.length>0).map(n=>/* @__PURE__ */ (0,c.jsxs)(`section`,{className:A.group,"aria-labelledby":`${r}-${n.title}`,children:[/* @__PURE__ */ (0,c.jsx)(`h3`,{className:A.groupTitle,id:`${r}-${n.title}`,children:t(n.title)}),/* @__PURE__ */ (0,c.jsx)(`div`,{className:A.card,children:n.items.map(t=>/* @__PURE__ */ (0,c.jsx)(`div`,{className:A.item,children:e(`settings.general.item`,{},{only:t})},t))})]},n.title)),i.includes(`current-version`)&&/* @__PURE__ */ (0,c.jsx)(`div`,{className:A.footer,children:e(`settings.general.item`,{},{only:`current-version`})})]})}let P=`@deepseek-ai/dsh-client-ui-settings-general/CurrentVersionRow.module.css`;if(typeof document<`u`&&document.querySelector(`style[data-plugin-css=`+JSON.stringify(P)+`]`)===null){let e=document.createElement(`style`);e.dataset.plugin=`@deepseek-ai/dsh-client-ui-settings-general`,e.dataset.pluginCss=P,e.textContent=`.QE76Ba_row{color:var(--dsw-alias-label-primary);overflow-wrap:anywhere;padding:16px 0;font-size:14px;line-height:22px}`,document.head.appendChild(e)}var F={row:`QE76Ba_row`};function I({t:e}){let t={}.DSH_CLIENT_VERSION;return t===void 0?null:/* @__PURE__ */ (0,c.jsx)(`div`,{className:F.row,children:e(`general.currentVersion`,{version:t})})}let L=`@deepseek-ai/dsh-client-ui-settings-general/DeveloperToolsRow.module.css`;if(typeof document<`u`&&document.querySelector(`style[data-plugin-css=`+JSON.stringify(L)+`]`)===null){let e=document.createElement(`style`);e.dataset.plugin=`@deepseek-ai/dsh-client-ui-settings-general`,e.dataset.pluginCss=L,e.textContent=`.yszu3a_row{border-bottom:.5px solid var(--dsw-alias-border-l2);justify-content:space-between;align-items:center;gap:24px;padding:16px 0;display:flex}.yszu3a_title{font-size:14px;line-height:20px}.yszu3a_description{color:var(--dsw-alias-label-secondary);margin-top:4px;font-size:12px;line-height:18px}`,document.head.appendChild(e)}var R={description:`yszu3a_description`,row:`yszu3a_row`,title:`yszu3a_title`};function z({useDeveloperTools:e,setEnabled:t,t:n}){let r=e(e=>e),[a,s]=(0,o.useState)(!1),[l,u]=(0,o.useState)(!1);return/* @__PURE__ */ (0,c.jsxs)(`div`,{className:R.row,children:[/* @__PURE__ */ (0,c.jsxs)(`div`,{children:[/* @__PURE__ */ (0,c.jsx)(`div`,{className:R.title,children:n(`developerTools.title`)}),/* @__PURE__ */ (0,c.jsx)(`div`,{className:R.description,children:n(`developerTools.description`)}),l&&/* @__PURE__ */ (0,c.jsx)(`div`,{role:`alert`,children:n(`developerTools.error`)})]}),/* @__PURE__ */ (0,c.jsx)(i.Switch,{checked:r,disabled:a,label:n(`developerTools.title`),onChange:e=>{u(!1),s(!0),t(e).catch(()=>{u(!0)}).finally(()=>{s(!1)})}})]})}let B=`@deepseek-ai/dsh-client-ui-settings-general/SettingsDocumentAction.module.css`;if(typeof document<`u`&&document.querySelector(`style[data-plugin-css=`+JSON.stringify(B)+`]`)===null){let e=document.createElement(`style`);e.dataset.plugin=`@deepseek-ai/dsh-client-ui-settings-general`,e.dataset.pluginCss=B,e.textContent=`.P1hEBq_action{align-items:center;gap:8px;min-width:0;display:flex}.P1hEBq_error{max-width:180px;color:var(--dsw-alias-state-error-primary);text-overflow:ellipsis;white-space:nowrap;font-size:12px;line-height:18px;overflow:hidden}`,document.head.appendChild(e)}var V={action:`P1hEBq_action`,error:`P1hEBq_error`};function H({controller:e,useSnapshot:t,t:n}){let r=t(e=>e);return(0,o.useEffect)(()=>{e.load()},[e]),r.status===`ready`?/* @__PURE__ */ (0,c.jsxs)(`div`,{className:V.action,children:[r.error===null?null:/* @__PURE__ */ (0,c.jsx)(`span`,{className:V.error,role:`alert`,children:n(`openDocument.error`)}),/* @__PURE__ */ (0,c.jsx)(i.Button,{variant:`outline`,size:`sm`,disabled:r.opening,onClick:()=>{e.open()},children:n(`openDocument`)})]}):null}var U=class{ctx;describeFace;store=(0,a.createSnapshotStore)({status:`idle`,opening:!1,error:null});following;constructor(e,t){this.ctx=e,this.describeFace=t}async load(){this.following??=this.describeFace.subscribe(()=>{this.derive()}),this.store.update(e=>{e.status=`loading`,e.error=null}),await this.describeFace.ensure(),this.derive()}async open(){let e=this.store.getSnapshot();if(!(e.status!==`ready`||e.opening)){this.store.update(e=>{e.opening=!0,e.error=null});try{let e=await this.ctx.remote.settings.openSettingsDocument();if(!e.ok){let{message:t}=e.error;this.store.update(e=>{e.error=t})}}finally{this.store.update(e=>{e.opening=!1})}}}dispose(){this.following?.(),this.following=void 0}derive(){let e=this.describeFace.getSnapshot();if(e.view===void 0){e.error!==null&&this.store.update(t=>{t.status=`unavailable`,t.error=e.error});return}let{hasDocument:t}=e.view;this.store.update(e=>{e.status=t?`ready`:`unavailable`,e.error=null})}};let W={trigger:`设置`,"shortcut.open":`打开设置`,"desktop.update.available":`新版本`,"desktop.update.checking":`正在检查更新…`,"desktop.update.progress":`{percent}%`,"desktop.update.verifying":`正在校验更新文件…`,"desktop.update.installing":`正在准备重启…`,"desktop.update.ready":`安装并重启`,"desktop.update.retry":`重试更新`,"desktop.update.versionDetail":`{label}:{version}`,"desktop.update.downloadDetail":`正在下载更新:{percent}%
2
- 目标版本:{version}`,"desktop.update.checkFailed":`检查更新失败,请稍后重试。`,"desktop.update.downloadFailed":`下载更新失败,请重试。`,"desktop.update.installFailed":`安装更新失败,请稍后重试。`,"desktop.update.checkNetworkFailed":`检查更新失败,请检查网络连接后重试。`,"desktop.update.downloadNetworkFailed":`下载更新失败,请检查网络连接后重试。`,"desktop.update.installNetworkFailed":`安装更新失败,请检查网络连接后重试。`,"desktop.update.stopFailed":`未能安全停止任务,更新尚未安装,请稍后重试。`,"desktop.update.tasksChanged":`有新任务开始运行,请重新确认是否停止任务并更新。`,"desktop.update.tasksUnavailable":`无法确认任务状态,请在工作区就绪后重试更新。`,title:`设置`,close:`关闭`,openDocument:`打开配置文件`,"openDocument.error":`无法打开配置文件`,"general.nav":`通用设置`,"general.description":`调整界面显示、阅读与交互偏好。`,"general.display":`显示与语言`,"general.interaction":`交互与阅读`,"general.notifications":`通知`,"general.other":`其他设置`,"general.currentVersion":`当前版本:{version}`,"developerTools.title":`显示代码工作视图`,"developerTools.error":`保存失败,请重试`,"developerTools.description":`在对话中显示代码 diff 和工具调用详情`,"connection.error":`连接异常,刷新重试`,"connection.connecting":`重新连接中`,"connection.connected":`连接成功`,"connection.reconnect":`连接异常,点击立即重连`,"connection.restart":`连接中断,正在重试,点击立即重连`},G={trigger:`Settings`,"shortcut.open":`Open settings`,"desktop.update.available":`Update`,"desktop.update.checking":`Checking for updates…`,"desktop.update.progress":`{percent}%`,"desktop.update.verifying":`Verifying update files…`,"desktop.update.installing":`Preparing to restart…`,"desktop.update.ready":`Install and Restart`,"desktop.update.retry":`Retry update`,"desktop.update.versionDetail":`{label}: {version}`,"desktop.update.downloadDetail":`Downloading update: {percent}%
3
- Target version: {version}`,"desktop.update.checkFailed":`Could not check for updates. Please try again later.`,"desktop.update.downloadFailed":`Could not download the update. Please try again.`,"desktop.update.installFailed":`Could not install the update. Please try again later.`,"desktop.update.checkNetworkFailed":`Could not check for updates. Check your connection and try again.`,"desktop.update.downloadNetworkFailed":`Could not download the update. Check your connection and try again.`,"desktop.update.installNetworkFailed":`Could not install the update. Check your connection and try again.`,"desktop.update.stopFailed":`Could not safely stop the tasks. The update has not been installed. Please try again later.`,"desktop.update.tasksChanged":`New tasks have started. Confirm again to stop the tasks and update.`,"desktop.update.tasksUnavailable":`Task status is unavailable. Try updating again when the workspace is ready.`,title:`Settings`,close:`Close`,openDocument:`Open configuration file`,"openDocument.error":`Could not open configuration file`,"general.nav":`General`,"general.description":`Adjust your display, reading, and interaction preferences.`,"general.display":`Display & language`,"general.interaction":`Interaction & reading`,"general.notifications":`Notifications`,"general.other":`Other settings`,"general.currentVersion":`Current version: {version}`,"developerTools.title":`Show coding view`,"developerTools.error":`Could not save. Please try again.`,"developerTools.description":`Shows code diffs and detailed tool output in conversations`,"connection.error":`Disconnected`,"connection.connecting":`Reconnecting`,"connection.connected":`Connected`,"connection.reconnect":`Disconnected, reconnect now`,"connection.restart":`Reconnecting, reconnect now`},K=`settings`,q=[`slots`,`locale`,`connection`,`remote`,`remote.settings`,`configForms`,`shortcuts`];function J(e){e.slots.inject(`settings.general.item`,()=>e.slots.register({name:`settings.general.item`,id:`developer-tools`,order:15,locale:K,inject:()=>({hooks:{developerTools:e.configForms.developerTools.enabled},setEnabled:t=>e.configForms.developerTools.setEnabled(t)})},z)),e.slots.inject(`settings.general.item`,()=>e.slots.register({name:`settings.general.item`,id:`current-version`,order:100,locale:K},I)),e.effect(()=>e.locale.register(K,{zh:W,en:G}),`ui-settings-general: dictionaries`);let t=e.get(`connection`),n=globalThis.dshDesktop,a=new C(n?.protocolVersion===1?n.updates:void 0);e.effect(()=>()=>{a.dispose()},`ui-settings-general: desktop update carrier`),e.slots.inject(`sidebar.toggle.badge`,()=>e.slots.register({name:`sidebar.toggle.badge`,locale:K,inject:()=>({hooks:{desktopUpdate:a.store,connectionState:t.state}})},y));let o=e.locale.bind(K),s=e.remote.$host.isLoopback?new U(e,e.configForms.describe()):void 0,c=s===void 0?void 0:()=>({controller:s,hooks:{snapshot:s.store}});e.effect(()=>()=>{s?.dispose()},`ui-settings-general: document action directory`);let u=-1,d=-1,f=[],p=-1,m=[],h=()=>({openDesktopUpdate:()=>{a.open()},reconnect:()=>{t.reconnect()},hooks:{shortcuts:e.shortcuts.catalog,desktopUpdate:a.store,connectionState:t.state,sections:{getSnapshot:()=>{let t=e.slots.getVersion(`settings.section`),n=e.locale.getSnapshot().revision;return(t!==u||n!==d)&&(u=t,d=n,f=e.slots.entries(`settings.section`).map(e=>({
1
+ window.__ModuleLoader__.load({id:`@deepseek-ai/dsh-client-ui-settings-general`,factory:e=>{var t={exports:{}},n=t.exports;Object.defineProperty(n,Symbol.toStringTag,{value:`Module`});let r=e("@deepseek-ai/dsh-client-ui-slots"),i=e("@deepseek-ai/dsh-client-ui-primitives"),a=e("@deepseek-ai/dsh-client-store"),o=e("react"),s=e("react-dom"),c=e("react/jsx-runtime");function l(){return(0,a.defineStore)({init:()=>({open:!1,activeId:void 0}),actions:{open:e=>{e.open=!0},close:e=>{e.open=!1,e.activeId=void 0},select:(e,t)=>{e.activeId=t},openSection:(e,t)=>{e.activeId=t,e.open=!0}}})}function u(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`){if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=u(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function d(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=u(e))&&(r&&(r+=` `),r+=t);return r}let f=`@deepseek-ai/dsh-client-ui-settings-general/SettingsRoot.module.css`;if(typeof document<`u`&&document.querySelector(`style[data-plugin-css=`+JSON.stringify(f)+`]`)===null){let e=document.createElement(`style`);e.dataset.plugin=`@deepseek-ai/dsh-client-ui-settings-general`,e.dataset.pluginCss=f,e.textContent=`.xLlTGq_triggerRow{flex:none;align-items:center;gap:8px;width:calc(100% + 4px);margin:4px -2px;display:flex;position:relative}.xLlTGq_triggerRow.xLlTGq_railRow{width:36px;margin:8px 0 10px}.xLlTGq_trigger{box-sizing:border-box;border-radius:var(--dsw-radius-md);cursor:pointer;width:auto;min-width:0;height:42px;color:var(--dsw-alias-label-primary);background:0 0;border:none;flex:1;align-items:center;gap:8px;margin:0;padding:0 10px 0 8px;font-family:inherit;font-size:14px;line-height:22px;display:flex;overflow:hidden}.xLlTGq_trigger:hover{background:var(--dsw-alias-interactive-bg-hover)}.xLlTGq_trigger.xLlTGq_rail{flex:none;justify-content:center;gap:0;width:36px;height:36px;margin:0;padding:0}.xLlTGq_triggerLabel{white-space:nowrap;overflow:hidden}.xLlTGq_overlay{z-index:1000;justify-content:center;align-items:center;display:flex;position:fixed;inset:0}.xLlTGq_mask{inset:var(--dsh-frame-chrome-top,0px) 0 0;background:var(--dsw-alias-bg-mask-1);backdrop-filter:var(--dsw-mask-blur);position:absolute}.xLlTGq_panel{z-index:1;width:1040px;height:min(800px, calc(100vh - 2 * max(24px, var(--dsh-frame-overlay-top,24px))));border-radius:var(--dsw-radius-panel);background:var(--dsw-alias-bg-layer-2);max-width:calc(100vw - 48px);box-shadow:var(--dsw-elevation-prominent);--dsh-scrollbar-thumb:var(--dsw-alias-scrollbar-bg-l2);--dsh-scrollbar-thumb-hover:var(--dsw-alias-scrollbar-hover-l2);display:flex;position:relative;overflow:hidden}.xLlTGq_panel:focus{outline:none}.xLlTGq_nav{box-sizing:border-box;flex-direction:column;flex:none;gap:18px;width:188px;padding:22px 12px 0;display:flex}.xLlTGq_navTitle{color:var(--dsw-alias-label-primary);padding:0 12px;font-size:16px;font-weight:500;line-height:24px}.xLlTGq_navList{flex-direction:column;gap:4px;display:flex;overflow-y:auto}.xLlTGq_navCell{box-sizing:border-box;border-radius:var(--dsw-radius-md);cursor:pointer;height:40px;color:var(--dsw-alias-label-primary);text-align:left;background:0 0;border:none;align-items:center;gap:8px;padding:9px 16px 9px 12px;font-family:inherit;font-size:14px;font-weight:400;line-height:22px;display:flex}.xLlTGq_navCell:hover{background:var(--dsw-specific-sidebar-nav-item-hover)}.xLlTGq_navCell.xLlTGq_active{background:var(--dsw-specific-sidebar-nav-item-active)}.xLlTGq_navIcon{flex:none}.xLlTGq_navLabel{white-space:nowrap;text-overflow:ellipsis;flex:1;min-width:0;overflow:hidden}.xLlTGq_content{flex-direction:column;flex:1;min-width:0;display:flex}.xLlTGq_header{box-sizing:border-box;flex:none;justify-content:space-between;align-items:flex-start;gap:8px;height:54px;padding:20px 14px 8px 10px;display:flex}.xLlTGq_actions{justify-content:flex-end;align-items:center;gap:8px;min-width:0;margin-left:auto;display:flex}.xLlTGq_close{border-radius:var(--dsw-radius-sm);cursor:pointer;width:28px;height:28px;color:var(--dsw-alias-label-primary);background:0 0;border:none;justify-content:center;align-items:center;padding:0;display:inline-flex}.xLlTGq_close:hover{background:var(--dsw-alias-interactive-bg-hover)}.xLlTGq_options{flex:1;min-height:0;padding:0 24px 24px;overflow-y:auto}@media (width<=600px){.xLlTGq_panel{max-width:calc(100vw - 24px);height:calc(100dvh - 2 * max(12px, env(safe-area-inset-top), env(safe-area-inset-bottom)));flex-direction:column}.xLlTGq_nav{gap:12px;width:100%;padding:16px 12px 8px}.xLlTGq_navTitle{padding:0 44px 0 4px}.xLlTGq_navList{flex-direction:row;overflow-x:auto}.xLlTGq_navCell{flex:none;height:44px}.xLlTGq_content{min-height:0}.xLlTGq_header{height:auto;padding:0 16px}.xLlTGq_close{width:44px;height:44px;position:absolute;top:6px;right:6px}.xLlTGq_options{padding:0 16px 16px}}.xLlTGq_hiddenLabel{clip:rect(0 0 0 0);white-space:nowrap;width:1px;height:1px;position:absolute;overflow:hidden}`,document.head.appendChild(e)}var p={actions:`xLlTGq_actions`,active:`xLlTGq_active`,close:`xLlTGq_close`,content:`xLlTGq_content`,header:`xLlTGq_header`,hiddenLabel:`xLlTGq_hiddenLabel`,mask:`xLlTGq_mask`,nav:`xLlTGq_nav`,navCell:`xLlTGq_navCell`,navIcon:`xLlTGq_navIcon`,navLabel:`xLlTGq_navLabel`,navList:`xLlTGq_navList`,navTitle:`xLlTGq_navTitle`,options:`xLlTGq_options`,overlay:`xLlTGq_overlay`,panel:`xLlTGq_panel`,rail:`xLlTGq_rail`,railRow:`xLlTGq_railRow`,trigger:`xLlTGq_trigger`,triggerLabel:`xLlTGq_triggerLabel`,triggerRow:`xLlTGq_triggerRow`};let m=`@deepseek-ai/dsh-client-ui-settings-general/DesktopUpdateIndicator.module.css`;if(typeof document<`u`&&document.querySelector(`style[data-plugin-css=`+JSON.stringify(m)+`]`)===null){let e=document.createElement(`style`);e.dataset.plugin=`@deepseek-ai/dsh-client-ui-settings-general`,e.dataset.pluginCss=m,e.textContent=`.kZjXEq_indicator{box-sizing:border-box;border:1px solid color-mix(in srgb, var(--dsw-alias-brand-primary-new-colorprimary-new-color) 20%, transparent);border-radius:var(--dsw-radius-sm);height:28px;color:var(--dsw-alias-brand-primary-new-colorprimary-new-color);background:color-mix(in srgb, var(--dsw-alias-brand-primary-new-colorprimary-new-color) 8%, transparent);text-align:left;white-space:nowrap;cursor:pointer;flex:none;grid-template-columns:14px max-content;align-items:center;column-gap:4px;padding:0 8px;font-family:inherit;font-size:12px;font-weight:500;line-height:18px;display:inline-grid}.kZjXEq_icon{place-items:center;width:14px;height:14px;display:grid}.kZjXEq_badge{inset-inline-end:2px;corner-shape:round;background:var(--dsw-alias-brand-primary-new-colorprimary-new-color);border-radius:50%;width:6px;height:6px;position:absolute;top:2px}.kZjXEq_errorDot{corner-shape:round;background:currentColor;border-radius:50%;width:6px;height:6px}.kZjXEq_spinner{animation:1s linear infinite kZjXEq_spin}@keyframes kZjXEq_spin{to{transform:rotate(360deg)}}@media (prefers-reduced-motion:reduce){.kZjXEq_spinner{animation:none}}.kZjXEq_indicator[aria-disabled=true]{cursor:default}`,document.head.appendChild(e)}var h={badge:`kZjXEq_badge`,errorDot:`kZjXEq_errorDot`,icon:`kZjXEq_icon`,indicator:`kZjXEq_indicator`,spin:`kZjXEq_spin`,spinner:`kZjXEq_spinner`};let g=/* @__PURE__ */ new Set([`checking`,`downloading`,`verifying`,`installing`]);function _(e,t){let n={idle:``,checking:t(`desktop.update.checking`),available:t(`desktop.update.available`),downloading:t(`desktop.update.progress`,{percent:e.percent??0}),verifying:t(`desktop.update.verifying`),installing:t(`desktop.update.installing`),ready:t(`desktop.update.ready`),error:t(`desktop.update.retry`)}[e.phase];return e.phase===`checking`||e.phase===`verifying`||e.phase===`installing`?{label:n,detail:e.version??n}:e.phase===`error`?{label:n,detail:{check:t(`desktop.update.checkFailed`),"check-network":t(`desktop.update.checkNetworkFailed`),download:t(`desktop.update.downloadFailed`),"download-network":t(`desktop.update.downloadNetworkFailed`),install:t(`desktop.update.installFailed`),"install-network":t(`desktop.update.installNetworkFailed`),"stop-failed":t(`desktop.update.stopFailed`),"tasks-changed":t(`desktop.update.tasksChanged`),"tasks-unavailable":t(`desktop.update.tasksUnavailable`)}[e.failure??`install`]}:e.phase===`downloading`&&e.version!==void 0?{label:n,detail:t(`desktop.update.downloadDetail`,{percent:e.percent??0,version:e.version})}:{label:n,detail:e.version===void 0?n:t(`desktop.update.versionDetail`,{label:n,version:e.version})}}function v({wide:e,hidden:t,t:n,view:r,onOpen:a}){let{presentation:o,failed:s,opening:l}=r;if(!e||t||!s&&(o===void 0||o.phase===`idle`))return null;let u=n(`desktop.update.retry`),d=o===void 0?{label:u,detail:u}:_(o,n),f=s?u:d.label,p=s||o?.phase===`error`,m=l||o!==void 0&&g.has(o.phase);return/* @__PURE__ */ (0,c.jsx)(i.Tooltip,{label:s?u:d.detail,side:`top`,children:/* @__PURE__ */ (0,c.jsxs)(`button`,{type:`button`,className:h.indicator,"aria-label":f,"aria-disabled":m,onClick:()=>{m||a()},children:[/* @__PURE__ */ (0,c.jsx)(`span`,{className:h.icon,"aria-hidden":`true`,children:p?/* @__PURE__ */ (0,c.jsx)(`span`,{className:h.errorDot}):m?/* @__PURE__ */ (0,c.jsx)(i.IconLoadingOutlineRegular,{className:h.spinner,size:14}):/* @__PURE__ */ (0,c.jsx)(i.IconDownloadOutlineRegular,{size:14})}),/* @__PURE__ */ (0,c.jsx)(`span`,{children:f})]})})}function y({useDesktopUpdate:e,useConnectionState:t,t:n}){let{presentation:r,failed:a}=e(e=>e),o=t(e=>e);if((o===`disconnected`||o===`connecting`)&&r?.phase!==`installing`||!a&&(r===void 0||r.phase===`idle`))return null;let s=n(`desktop.update.retry`),l=r===void 0?{label:s,detail:s}:_(r,n),u=a?s:l.label;return/* @__PURE__ */ (0,c.jsx)(i.Tooltip,{label:a?u:l.detail,side:`right`,children:/* @__PURE__ */ (0,c.jsx)(`span`,{role:`img`,"aria-label":u,className:h.badge})})}function b(e){return e===`account`||e===`codexhost-accounts`?/* @__PURE__ */ (0,c.jsx)(i.IconUserOutlineMedium,{className:p.navIcon,size:16}):e===`models`||e===`codexhost-usage-statistics`?/* @__PURE__ */ (0,c.jsx)(i.IconDataOutlineMedium,{className:p.navIcon,size:16}):e===`agent-presets`?/* @__PURE__ */ (0,c.jsx)(i.IconAgentPresetOutlineMedium,{className:p.navIcon,size:16}):e===`plugins`||e===`codexhost-connections`?/* @__PURE__ */ (0,c.jsx)(i.IconPersonalizationOutlineMedium,{className:p.navIcon,size:16}):e===`archived-sessions`?/* @__PURE__ */ (0,c.jsx)(i.IconArchiveOutlineMedium,{className:p.navIcon,size:16}):/* @__PURE__ */ (0,c.jsx)(i.IconSettingsOutlineMedium,{className:p.navIcon,size:16})}function x({rows:e,renderSlot:t,activeId:n,onSelect:r,onClose:a}){let l=e.find(e=>e.id===n)?.id??e[0]?.id,u=(0,o.useId)(),f=(0,o.useRef)(null);return(0,i.useModalLayer)(f,!0,a),(0,s.createPortal)(/* @__PURE__ */ (0,c.jsxs)(`div`,{className:p.overlay,role:`presentation`,children:[/* @__PURE__ */ (0,c.jsx)(`div`,{className:p.mask,"aria-hidden":`true`,onClick:a}),/* @__PURE__ */ (0,c.jsxs)(`div`,{ref:f,tabIndex:-1,"data-shortcut-modal":`settings`,className:p.panel,role:`dialog`,"aria-modal":`true`,"aria-labelledby":u,children:[/* @__PURE__ */ (0,c.jsxs)(`nav`,{className:p.nav,children:[/* @__PURE__ */ (0,c.jsx)(`div`,{className:p.navTitle,id:u,tabIndex:-1,"data-modal-autofocus":l===void 0?``:void 0,children:t(`settings.header`,{})}),/* @__PURE__ */ (0,c.jsx)(`div`,{className:p.navList,children:e.map(e=>/* @__PURE__ */ (0,c.jsxs)(`button`,{type:`button`,className:d(p.navCell,e.id===l&&p.active),"aria-current":e.id===l?`true`:void 0,"data-modal-autofocus":e.id===l?``:void 0,onClick:()=>{r(e.id)},children:[b(e.id),/* @__PURE__ */ (0,c.jsx)(`span`,{className:p.navLabel,children:e.label})]},e.id))})]}),/* @__PURE__ */ (0,c.jsxs)(`div`,{className:p.content,children:[/* @__PURE__ */ (0,c.jsxs)(`div`,{className:p.header,children:[/* @__PURE__ */ (0,c.jsx)(`div`,{className:p.actions,children:t(`settings.action`,{})}),/* @__PURE__ */ (0,c.jsxs)(`button`,{type:`button`,className:p.close,onClick:a,children:[/* @__PURE__ */ (0,c.jsx)(i.IconCloseOutlineRegular,{size:14}),/* @__PURE__ */ (0,c.jsx)(`span`,{className:p.hiddenLabel,children:t(`settings.close`,{})})]})]}),/* @__PURE__ */ (0,c.jsx)(`div`,{className:p.options,children:l!==void 0&&t(`settings.section`,{close:a},{only:l})})]})]})]}),document.body)}function S(e){let{wide:t,reconnect:n,useConnectionState:r,useSections:a,useOnboardingSteps:s,useSessions:l,renderSlot:u,t:f,useDesktopUpdate:m,openDesktopUpdate:h,useStore:g,actions:_,useShortcuts:y}=e,{open:b,activeId:S}=g(e=>e),C=y(e=>e.find(e=>e.id===`settings.open`)),{close:w,openSection:T}=_;(0,o.useEffect)(()=>{if(window.location.hash!==`#connect-devices`)return;T(`codexhost-connect-devices`);let e=new URL(window.location.href);e.hash=``,window.history.replaceState(window.history.state,``,e.href)},[T]);let[E,D]=(0,o.useState)(),[O,k]=(0,o.useState)(()=>/* @__PURE__ */ new Set),[A,j]=(0,o.useState)(!1),[M,N]=(0,o.useState)(!1),P=(0,o.useRef)(void 0),F=a(e=>e),I=m(e=>e),L=r(e=>e),R=(0,o.useRef)(L),z=s(e=>e),B=l(e=>{let t=Object.values(e.byId).find(e=>(e.retainedBy.mainView??0)>0);return e.phase===`ready`&&(t===void 0||t.blank)}),V=E===void 0?B?z.find(e=>!O.has(e.id)):void 0:z.find(e=>e.id===E);(0,o.useEffect)(()=>{B||k(/* @__PURE__ */ new Set)},[B]);let H=(0,o.useRef)(V);(0,o.useEffect)(()=>{let e=H.current===void 0&&V!==void 0;H.current=V,e&&b&&w()},[V,b,w]),(0,o.useLayoutEffect)(()=>{let e=R.current;R.current=L,L===`connected`?(e===`disconnected`||e===`connecting`)&&j(!0):j(!1)},[L]),(0,o.useLayoutEffect)(()=>{if(!A||M)return;let e=window.setTimeout(()=>{j(!1)},2e3);return()=>{window.clearTimeout(e)}},[A,M]),(0,o.useLayoutEffect)(()=>{if(L===`connecting`){P.current=Date.now();return}let e=P.current;if(e===void 0)return;P.current=void 0;let t=800-(Date.now()-e);if(t<=0)return;N(!0);let n=window.setTimeout(()=>{N(!1)},t);return()=>{window.clearTimeout(n),N(!1)}},[L]);let U=(0,o.useCallback)(e=>{D(void 0),k(t=>t.has(e)?t:/* @__PURE__ */ new Set([...t,e]))},[]),W;return L===`connecting`||M?W=`connecting`:L===`disconnected`?W=`disconnected`:A&&(W=`recovered`),/* @__PURE__ */ (0,c.jsxs)(c.Fragment,{children:[/* @__PURE__ */ (0,c.jsxs)(`div`,{className:d(p.triggerRow,!t&&p.railRow),children:[u(`settings.launcher`,{wide:t,settingsOpen:b,openSettings:_.open,...C?.keys.length?{settingsShortcut:{keys:C.keys,aria:C.aria}}:{},openOnboarding:e=>{w(),D(e)}},{fallback:/* @__PURE__ */ (0,c.jsx)(i.Tooltip,{disabled:b,label:f(`trigger`),shortcutKeys:C?.keys,children:/* @__PURE__ */ (0,c.jsx)(`button`,{type:`button`,className:d(p.trigger,!t&&p.rail),"aria-label":f(`trigger`),"aria-keyshortcuts":C?.aria,"aria-haspopup":`dialog`,"aria-expanded":b,onClick:()=>{_.open()},children:u(`settings.trigger`,{wide:t})})})}),/* @__PURE__ */ (0,c.jsx)(i.ConnectionIndicator,{state:t&&I.presentation?.phase!==`installing`?W:void 0,disconnectedLabel:f(`connection.error`),connectingLabel:f(`connection.connecting`),recoveredLabel:f(`connection.connected`),reconnectActionLabel:f(`connection.reconnect`),restartActionLabel:f(`connection.restart`),onReconnect:n}),/* @__PURE__ */ (0,c.jsx)(v,{wide:t,hidden:W!==void 0&&I.presentation?.phase!==`installing`,t:f,view:I,onOpen:h})]}),b&&/* @__PURE__ */ (0,c.jsx)(x,{rows:F,renderSlot:u,activeId:S,onSelect:_.select,onClose:w}),V!==void 0&&u(`settings.onboarding`,{stepId:V.id,explicit:E!==void 0,complete:()=>{U(V.id)},openSection:T},{only:V.id})]})}var C=class{bridge;store=(0,a.createSnapshotStore)({failed:!1,opening:!1});live=!0;received=!1;unsubscribe;constructor(e){this.bridge=e,this.unsubscribe=e?.subscribe(e=>{this.live&&(this.received=!0,this.store.set({...this.store.getSnapshot(),presentation:e,failed:!1}))}),e?.status().then(e=>{this.live&&!this.received&&this.store.set({...this.store.getSnapshot(),presentation:e})},()=>{this.live&&!this.received&&this.store.set({...this.store.getSnapshot(),failed:!0})})}open(){if(!this.live||this.bridge===void 0)return;let e=this.store.getSnapshot();e.opening||e.presentation!==void 0&&[`checking`,`downloading`,`verifying`,`installing`].includes(e.presentation.phase)||(this.store.set({...e,opening:!0}),this.bridge.open().catch(()=>{this.live&&this.store.set({...this.store.getSnapshot(),failed:!0})}).finally(()=>{this.live&&this.store.set({...this.store.getSnapshot(),opening:!1})}))}dispose(){this.live=!1,this.unsubscribe?.()}};let w=`@deepseek-ai/dsh-client-ui-settings-general/chrome.module.css`;if(typeof document<`u`&&document.querySelector(`style[data-plugin-css=`+JSON.stringify(w)+`]`)===null){let e=document.createElement(`style`);e.dataset.plugin=`@deepseek-ai/dsh-client-ui-settings-general`,e.dataset.pluginCss=w,e.textContent=`.xYdq5q_triggerLabel{white-space:nowrap;overflow:hidden}`,document.head.appendChild(e)}var T={triggerLabel:`xYdq5q_triggerLabel`};function E({wide:e,t}){return/* @__PURE__ */ (0,c.jsxs)(c.Fragment,{children:[/* @__PURE__ */ (0,c.jsx)(i.IconSettingsOutlineMedium,{size:e?16:18}),e&&/* @__PURE__ */ (0,c.jsx)(`span`,{className:T.triggerLabel,children:t(`trigger`)})]})}function D({t:e}){return/* @__PURE__ */ (0,c.jsx)(c.Fragment,{children:e(`title`)})}function O({t:e}){return/* @__PURE__ */ (0,c.jsx)(c.Fragment,{children:e(`close`)})}let k=`@deepseek-ai/dsh-client-ui-settings-general/GeneralSection.module.css`;if(typeof document<`u`&&document.querySelector(`style[data-plugin-css=`+JSON.stringify(k)+`]`)===null){let e=document.createElement(`style`);e.dataset.plugin=`@deepseek-ai/dsh-client-ui-settings-general`,e.dataset.pluginCss=k,e.textContent=`.jNGSqa_section{flex-direction:column;width:100%;display:flex}.jNGSqa_heading{margin-bottom:28px}.jNGSqa_title{color:var(--dsw-alias-label-primary);letter-spacing:-.5px;margin:0;font-size:24px;font-weight:600;line-height:32px}.jNGSqa_description{color:var(--dsw-alias-label-secondary);margin:8px 0 0;font-size:13px;line-height:20px}.jNGSqa_group+.jNGSqa_group{margin-top:28px}.jNGSqa_groupTitle{color:var(--dsw-alias-label-primary);margin:0 0 10px;font-size:13px;font-weight:600;line-height:20px}.jNGSqa_card{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-2);border-radius:12px}.jNGSqa_item{min-width:0;margin:0 20px}.jNGSqa_item+.jNGSqa_item{border-top:1px solid var(--dsw-alias-border-l1)}.jNGSqa_item>[data-slot="settings.general.item"]>*{border-bottom:none}.jNGSqa_footer{margin-top:8px}@media (width<=600px){.jNGSqa_heading{margin-bottom:20px}.jNGSqa_title{font-size:20px;line-height:28px}.jNGSqa_description{margin-top:4px}.jNGSqa_group+.jNGSqa_group{margin-top:24px}.jNGSqa_item{margin:0 12px}}`,document.head.appendChild(e)}var A={card:`jNGSqa_card`,description:`jNGSqa_description`,footer:`jNGSqa_footer`,group:`jNGSqa_group`,groupTitle:`jNGSqa_groupTitle`,heading:`jNGSqa_heading`,item:`jNGSqa_item`,section:`jNGSqa_section`,title:`jNGSqa_title`};let j=[{title:`general.appAndNotifications`,items:[`codexhost.notifications`,`codexhost.pwa-install`]},{title:`general.display`,items:[`language`,`appearance`,`font-size`,`workspace.recent-navigation`]},{title:`general.interaction`,items:[`transcript-view`,`developer-tools`,`shortcuts`,`link-opening`,`composer-enter`]}],M=new Set(j.flatMap(e=>e.items));function N({renderSlot:e,t,useItems:n}){let r=(0,o.useId)(),i=n(e=>e),a=j.map(e=>({title:e.title,items:i.filter(t=>e.items.includes(t))}));return a.push({title:`general.other`,items:i.filter(e=>e!==`current-version`&&!M.has(e))}),/* @__PURE__ */ (0,c.jsxs)(`div`,{className:A.section,children:[/* @__PURE__ */ (0,c.jsxs)(`header`,{className:A.heading,children:[/* @__PURE__ */ (0,c.jsx)(`h2`,{className:A.title,children:t(`general.nav`)}),/* @__PURE__ */ (0,c.jsx)(`p`,{className:A.description,children:t(`general.description`)})]}),a.filter(e=>e.items.length>0).map(n=>/* @__PURE__ */ (0,c.jsxs)(`section`,{className:A.group,"aria-labelledby":`${r}-${n.title}`,children:[/* @__PURE__ */ (0,c.jsx)(`h3`,{className:A.groupTitle,id:`${r}-${n.title}`,children:t(n.title)}),/* @__PURE__ */ (0,c.jsx)(`div`,{className:A.card,children:n.items.map(t=>/* @__PURE__ */ (0,c.jsx)(`div`,{className:A.item,children:e(`settings.general.item`,{},{only:t})},t))})]},n.title)),i.includes(`current-version`)&&/* @__PURE__ */ (0,c.jsx)(`div`,{className:A.footer,children:e(`settings.general.item`,{},{only:`current-version`})})]})}let P=`@deepseek-ai/dsh-client-ui-settings-general/CurrentVersionRow.module.css`;if(typeof document<`u`&&document.querySelector(`style[data-plugin-css=`+JSON.stringify(P)+`]`)===null){let e=document.createElement(`style`);e.dataset.plugin=`@deepseek-ai/dsh-client-ui-settings-general`,e.dataset.pluginCss=P,e.textContent=`.QE76Ba_row{color:var(--dsw-alias-label-primary);overflow-wrap:anywhere;padding:16px 0;font-size:14px;line-height:22px}`,document.head.appendChild(e)}var F={row:`QE76Ba_row`};function I({t:e}){let t={}.DSH_CLIENT_VERSION;return t===void 0?null:/* @__PURE__ */ (0,c.jsx)(`div`,{className:F.row,children:e(`general.currentVersion`,{version:t})})}let L=`@deepseek-ai/dsh-client-ui-settings-general/DeveloperToolsRow.module.css`;if(typeof document<`u`&&document.querySelector(`style[data-plugin-css=`+JSON.stringify(L)+`]`)===null){let e=document.createElement(`style`);e.dataset.plugin=`@deepseek-ai/dsh-client-ui-settings-general`,e.dataset.pluginCss=L,e.textContent=`.yszu3a_row{border-bottom:.5px solid var(--dsw-alias-border-l2);justify-content:space-between;align-items:center;gap:24px;padding:16px 0;display:flex}.yszu3a_title{font-size:14px;line-height:20px}.yszu3a_description{color:var(--dsw-alias-label-secondary);margin-top:4px;font-size:12px;line-height:18px}`,document.head.appendChild(e)}var R={description:`yszu3a_description`,row:`yszu3a_row`,title:`yszu3a_title`};function z({useDeveloperTools:e,setEnabled:t,t:n}){let r=e(e=>e),[a,s]=(0,o.useState)(!1),[l,u]=(0,o.useState)(!1);return/* @__PURE__ */ (0,c.jsxs)(`div`,{className:R.row,children:[/* @__PURE__ */ (0,c.jsxs)(`div`,{children:[/* @__PURE__ */ (0,c.jsx)(`div`,{className:R.title,children:n(`developerTools.title`)}),/* @__PURE__ */ (0,c.jsx)(`div`,{className:R.description,children:n(`developerTools.description`)}),l&&/* @__PURE__ */ (0,c.jsx)(`div`,{role:`alert`,children:n(`developerTools.error`)})]}),/* @__PURE__ */ (0,c.jsx)(i.Switch,{checked:r,disabled:a,label:n(`developerTools.title`),onChange:e=>{u(!1),s(!0),t(e).catch(()=>{u(!0)}).finally(()=>{s(!1)})}})]})}let B=`@deepseek-ai/dsh-client-ui-settings-general/SettingsDocumentAction.module.css`;if(typeof document<`u`&&document.querySelector(`style[data-plugin-css=`+JSON.stringify(B)+`]`)===null){let e=document.createElement(`style`);e.dataset.plugin=`@deepseek-ai/dsh-client-ui-settings-general`,e.dataset.pluginCss=B,e.textContent=`.P1hEBq_action{align-items:center;gap:8px;min-width:0;display:flex}.P1hEBq_error{max-width:180px;color:var(--dsw-alias-state-error-primary);text-overflow:ellipsis;white-space:nowrap;font-size:12px;line-height:18px;overflow:hidden}`,document.head.appendChild(e)}var V={action:`P1hEBq_action`,error:`P1hEBq_error`};function H({controller:e,useSnapshot:t,t:n}){let r=t(e=>e);return(0,o.useEffect)(()=>{e.load()},[e]),r.status===`ready`?/* @__PURE__ */ (0,c.jsxs)(`div`,{className:V.action,children:[r.error===null?null:/* @__PURE__ */ (0,c.jsx)(`span`,{className:V.error,role:`alert`,children:n(`openDocument.error`)}),/* @__PURE__ */ (0,c.jsx)(i.Button,{variant:`outline`,size:`sm`,disabled:r.opening,onClick:()=>{e.open()},children:n(`openDocument`)})]}):null}var U=class{ctx;describeFace;store=(0,a.createSnapshotStore)({status:`idle`,opening:!1,error:null});following;constructor(e,t){this.ctx=e,this.describeFace=t}async load(){this.following??=this.describeFace.subscribe(()=>{this.derive()}),this.store.update(e=>{e.status=`loading`,e.error=null}),await this.describeFace.ensure(),this.derive()}async open(){let e=this.store.getSnapshot();if(!(e.status!==`ready`||e.opening)){this.store.update(e=>{e.opening=!0,e.error=null});try{let e=await this.ctx.remote.settings.openSettingsDocument();if(!e.ok){let{message:t}=e.error;this.store.update(e=>{e.error=t})}}finally{this.store.update(e=>{e.opening=!1})}}}dispose(){this.following?.(),this.following=void 0}derive(){let e=this.describeFace.getSnapshot();if(e.view===void 0){e.error!==null&&this.store.update(t=>{t.status=`unavailable`,t.error=e.error});return}let{hasDocument:t}=e.view;this.store.update(e=>{e.status=t?`ready`:`unavailable`,e.error=null})}};let W={trigger:`设置`,"shortcut.open":`打开设置`,"desktop.update.available":`新版本`,"desktop.update.checking":`正在检查更新…`,"desktop.update.progress":`{percent}%`,"desktop.update.verifying":`正在校验更新文件…`,"desktop.update.installing":`正在准备重启…`,"desktop.update.ready":`安装并重启`,"desktop.update.retry":`重试更新`,"desktop.update.versionDetail":`{label}:{version}`,"desktop.update.downloadDetail":`正在下载更新:{percent}%
2
+ 目标版本:{version}`,"desktop.update.checkFailed":`检查更新失败,请稍后重试。`,"desktop.update.downloadFailed":`下载更新失败,请重试。`,"desktop.update.installFailed":`安装更新失败,请稍后重试。`,"desktop.update.checkNetworkFailed":`检查更新失败,请检查网络连接后重试。`,"desktop.update.downloadNetworkFailed":`下载更新失败,请检查网络连接后重试。`,"desktop.update.installNetworkFailed":`安装更新失败,请检查网络连接后重试。`,"desktop.update.stopFailed":`未能安全停止任务,更新尚未安装,请稍后重试。`,"desktop.update.tasksChanged":`有新任务开始运行,请重新确认是否停止任务并更新。`,"desktop.update.tasksUnavailable":`无法确认任务状态,请在工作区就绪后重试更新。`,title:`设置`,close:`关闭`,openDocument:`打开配置文件`,"openDocument.error":`无法打开配置文件`,"general.nav":`通用设置`,"general.description":`调整界面显示、阅读与交互偏好。`,"general.display":`显示与语言`,"general.interaction":`交互与阅读`,"general.appAndNotifications":`应用与通知`,"general.other":`其他设置`,"general.currentVersion":`当前版本:{version}`,"developerTools.title":`显示代码工作视图`,"developerTools.error":`保存失败,请重试`,"developerTools.description":`在对话中显示代码 diff 和工具调用详情`,"connection.error":`连接异常,刷新重试`,"connection.connecting":`重新连接中`,"connection.connected":`连接成功`,"connection.reconnect":`连接异常,点击立即重连`,"connection.restart":`连接中断,正在重试,点击立即重连`},G={trigger:`Settings`,"shortcut.open":`Open settings`,"desktop.update.available":`Update`,"desktop.update.checking":`Checking for updates…`,"desktop.update.progress":`{percent}%`,"desktop.update.verifying":`Verifying update files…`,"desktop.update.installing":`Preparing to restart…`,"desktop.update.ready":`Install and Restart`,"desktop.update.retry":`Retry update`,"desktop.update.versionDetail":`{label}: {version}`,"desktop.update.downloadDetail":`Downloading update: {percent}%
3
+ Target version: {version}`,"desktop.update.checkFailed":`Could not check for updates. Please try again later.`,"desktop.update.downloadFailed":`Could not download the update. Please try again.`,"desktop.update.installFailed":`Could not install the update. Please try again later.`,"desktop.update.checkNetworkFailed":`Could not check for updates. Check your connection and try again.`,"desktop.update.downloadNetworkFailed":`Could not download the update. Check your connection and try again.`,"desktop.update.installNetworkFailed":`Could not install the update. Check your connection and try again.`,"desktop.update.stopFailed":`Could not safely stop the tasks. The update has not been installed. Please try again later.`,"desktop.update.tasksChanged":`New tasks have started. Confirm again to stop the tasks and update.`,"desktop.update.tasksUnavailable":`Task status is unavailable. Try updating again when the workspace is ready.`,title:`Settings`,close:`Close`,openDocument:`Open configuration file`,"openDocument.error":`Could not open configuration file`,"general.nav":`General`,"general.description":`Adjust your display, reading, and interaction preferences.`,"general.display":`Display & language`,"general.interaction":`Interaction & reading`,"general.appAndNotifications":`App & notifications`,"general.other":`Other settings`,"general.currentVersion":`Current version: {version}`,"developerTools.title":`Show coding view`,"developerTools.error":`Could not save. Please try again.`,"developerTools.description":`Shows code diffs and detailed tool output in conversations`,"connection.error":`Disconnected`,"connection.connecting":`Reconnecting`,"connection.connected":`Connected`,"connection.reconnect":`Disconnected, reconnect now`,"connection.restart":`Reconnecting, reconnect now`},K=`settings`,q=[`slots`,`locale`,`connection`,`remote`,`remote.settings`,`configForms`,`shortcuts`];function J(e){e.slots.inject(`settings.general.item`,()=>e.slots.register({name:`settings.general.item`,id:`developer-tools`,order:15,locale:K,inject:()=>({hooks:{developerTools:e.configForms.developerTools.enabled},setEnabled:t=>e.configForms.developerTools.setEnabled(t)})},z)),e.slots.inject(`settings.general.item`,()=>e.slots.register({name:`settings.general.item`,id:`current-version`,order:100,locale:K},I)),e.effect(()=>e.locale.register(K,{zh:W,en:G}),`ui-settings-general: dictionaries`);let t=e.get(`connection`),n=globalThis.dshDesktop,a=new C(n?.protocolVersion===1?n.updates:void 0);e.effect(()=>()=>{a.dispose()},`ui-settings-general: desktop update carrier`),e.slots.inject(`sidebar.toggle.badge`,()=>e.slots.register({name:`sidebar.toggle.badge`,locale:K,inject:()=>({hooks:{desktopUpdate:a.store,connectionState:t.state}})},y));let o=e.locale.bind(K),s=e.remote.$host.isLoopback?new U(e,e.configForms.describe()):void 0,c=s===void 0?void 0:()=>({controller:s,hooks:{snapshot:s.store}});e.effect(()=>()=>{s?.dispose()},`ui-settings-general: document action directory`);let u=-1,d=-1,f=[],p=-1,m=[],h=()=>({openDesktopUpdate:()=>{a.open()},reconnect:()=>{t.reconnect()},hooks:{shortcuts:e.shortcuts.catalog,desktopUpdate:a.store,connectionState:t.state,sections:{getSnapshot:()=>{let t=e.slots.getVersion(`settings.section`),n=e.locale.getSnapshot().revision;return(t!==u||n!==d)&&(u=t,d=n,f=e.slots.entries(`settings.section`).map(e=>({
4
4
  /* v8 ignore next -- list-slot registration requires id (SlotCore rejects an entry without one) */
5
5
  id:e.options.id??``,order:e.options.order??0,label:(0,r.resolveSlotLabel)(e.options.label)??``})).sort((e,t)=>e.order-t.order)),f},subscribe:t=>{let n=e.slots.subscribe(`settings.section`,t),r=e.locale.subscribe(t);return()=>{n(),r()}}},onboardingSteps:{getSnapshot:()=>{let t=e.slots.getVersion(`settings.onboarding`);return t!==p&&(p=t,m=e.slots.entries(`settings.onboarding`).map(e=>({
6
6
  /* v8 ignore next -- list-slot registration requires id */