@shawnstack/quickforge 1.5.5 → 1.5.6

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.
Files changed (40) hide show
  1. package/README.md +11 -11
  2. package/dist/assets/AgentProfilesPage-DFUA4KiP.js +1 -0
  3. package/dist/assets/{ChatPanelHost-u0K5IWMF.js → ChatPanelHost-CBoFtBvB.js} +55 -55
  4. package/dist/assets/PluginsPage-CKOP-P02.js +1 -0
  5. package/dist/assets/ScheduledTasksPage-CRPvyfmE.js +2 -0
  6. package/dist/assets/SettingsWorkspacePage-Csr6xu0M.js +1320 -0
  7. package/dist/assets/SharedConversationPage-7I9MiMcj.js +1 -0
  8. package/dist/assets/TerminalDock-DWZAOy7v.js +2 -0
  9. package/dist/assets/WorkspaceInspector-D4k8zQ4s.js +3 -0
  10. package/dist/assets/WorkspaceReaderDialog-Dli8GgAq.js +1 -0
  11. package/dist/assets/{diff-line-counts-N83e7__F.js → diff-line-counts-Dvz3MNk2.js} +1 -1
  12. package/dist/assets/icons-DXrzz0RO.js +1 -0
  13. package/dist/assets/index-BDNDRaPf.css +3 -0
  14. package/dist/assets/index-BIslkXQt.js +69 -0
  15. package/dist/assets/mcp-servers-dialog-DXR3fnZY.js +20 -0
  16. package/dist/assets/{monaco-DtXl4zfe.js → monaco-k8av2MY0.js} +1 -1
  17. package/dist/assets/{pi-web-ui-CBet4bMl.js → pi-web-ui-DFNE2m5b.js} +1 -1
  18. package/dist/assets/{react-vendor-BjDQPVuK.js → react-vendor-xMa3TUTb.js} +1 -1
  19. package/dist/assets/skills-dialog-Dax-_Ze5.js +1 -0
  20. package/dist/assets/{useAppTheme-Bm6HIzLF.js → useAppTheme-BzB8Q6AC.js} +1 -1
  21. package/dist/index.html +7 -5
  22. package/package.json +1 -1
  23. package/server/agent-manager.mjs +15 -0
  24. package/server/approval-store.mjs +34 -2
  25. package/server/index.mjs +3 -0
  26. package/server/public-api.mjs +45 -0
  27. package/server/routes/storage.mjs +29 -9
  28. package/server/storage.mjs +13 -4
  29. package/dist/assets/AgentProfilesPage-nVhgwanY.js +0 -1
  30. package/dist/assets/PluginsPage-BVRTC0rz.js +0 -1
  31. package/dist/assets/ScheduledTasksPage-D37TE2cM.js +0 -2
  32. package/dist/assets/SharedConversationPage-D5hnzsZC.js +0 -1
  33. package/dist/assets/TerminalDock-NvH9esAS.js +0 -2
  34. package/dist/assets/WorkspaceInspector-DbnO1fei.js +0 -3
  35. package/dist/assets/WorkspaceReaderDialog-BcxIbNBq.js +0 -1
  36. package/dist/assets/icons-Uo4Gd-eK.js +0 -1
  37. package/dist/assets/index-DiaCCmXE.js +0 -1482
  38. package/dist/assets/index-KdiXReMI.css +0 -3
  39. /package/dist/assets/{plugin-api-YfYj_Bd7.js → plugin-api-UKg_cgSG.js} +0 -0
  40. /package/dist/assets/{xterm-5XDrJ343.js → xterm-BtSXYfUR.js} +0 -0
package/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # 速构 QuickForge
2
2
 
3
3
  <p align="center">
4
- <img alt="Version" src="https://img.shields.io/badge/version-1.5.5-blue" />
4
+ <img alt="Version" src="https://img.shields.io/badge/version-1.5.6-blue" />
5
5
  <img alt="License" src="https://img.shields.io/badge/license-MIT-green" />
6
6
  <img alt="Node" src="https://img.shields.io/badge/node-%3E%3D20-brightgreen" />
7
7
  <img alt="React" src="https://img.shields.io/badge/react-19-61DAFB?logo=react" />
@@ -73,7 +73,7 @@ QuickForge 的工具能力很直接,因此也需要谨慎使用:
73
73
  #### 从 npm 安装
74
74
 
75
75
  ```bash
76
- npm install -g @shawnstack/quickforge@1.5.5
76
+ npm install -g @shawnstack/quickforge@1.5.6
77
77
  qf
78
78
 
79
79
  # CLI 工具
@@ -104,17 +104,17 @@ console.log(app.url)
104
104
  当前版本的离线包:
105
105
 
106
106
  ```text
107
- package-offline/shawnstack-quickforge-1.5.5.tgz
107
+ package-offline/shawnstack-quickforge-1.5.6.tgz
108
108
  ```
109
109
 
110
110
  在安装了 Node.js 20+ 和 npm 的机器上执行:
111
111
 
112
112
  ```bash
113
- npm install -g ./package-offline/shawnstack-quickforge-1.5.5.tgz
113
+ npm install -g ./package-offline/shawnstack-quickforge-1.5.6.tgz
114
114
  qf
115
115
  ```
116
116
 
117
- 该包由 `v1.5.5` 标签生成,包含 QuickForge 运行时资源,依赖由 npm 安装。
117
+ 该包由 `v1.5.6` 标签生成,包含 QuickForge 运行时资源,依赖由 npm 安装。
118
118
 
119
119
  ### 本地开发
120
120
 
@@ -239,7 +239,7 @@ API Key: 按你的 LiteLLM 配置填写,可为空
239
239
 
240
240
  QuickForge is a local-first AI chat and development workspace. It keeps the familiar chat experience, but connects it to local projects, local storage, configurable model providers, workspace tools, MCP servers, Agent Skills, and scheduled tasks.
241
241
 
242
- The same core runtime now supports three entry points: the `qf` / `quickforge` CLI, an npm-importable SDK entry, and an Electron entry for building Windows/macOS/Linux desktop apps locally.
242
+ The same core runtime now supports three entry points: the `qf` / `quickforge` CLI, an npm-importable SDK entry, and an Electron entry for building Windows/macOS/Linux desktop apps locally. Desktop builds include their own QuickForge runtime and do not require users to install Node.js, npm, or the global `qf` command; an already-running local service is reused only when its version matches the desktop runtime.
243
243
 
244
244
  It is not meant to replace your IDE or promise fully autonomous software development. The practical goal is narrower: give you a controllable place where an AI assistant can understand a project, propose a plan, make focused changes when authorized, and run the checks you ask for.
245
245
 
@@ -285,7 +285,7 @@ QuickForge intentionally exposes powerful local capabilities, so the boundaries
285
285
  #### npm
286
286
 
287
287
  ```bash
288
- npm install -g @shawnstack/quickforge@1.5.5
288
+ npm install -g @shawnstack/quickforge@1.5.6
289
289
  qf
290
290
 
291
291
  # CLI utilities
@@ -313,20 +313,20 @@ This entry is exposed through the `main` field in `package.json` and does not ch
313
313
 
314
314
  #### Offline tarball
315
315
 
316
- The offline release package for `v1.5.5` is:
316
+ The offline release package for `v1.5.6` is:
317
317
 
318
318
  ```text
319
- package-offline/shawnstack-quickforge-1.5.5.tgz
319
+ package-offline/shawnstack-quickforge-1.5.6.tgz
320
320
  ```
321
321
 
322
322
  Install it on a machine with Node.js 20+ and npm:
323
323
 
324
324
  ```bash
325
- npm install -g ./package-offline/shawnstack-quickforge-1.5.5.tgz
325
+ npm install -g ./package-offline/shawnstack-quickforge-1.5.6.tgz
326
326
  qf
327
327
  ```
328
328
 
329
- The package was generated from tag `v1.5.5` and includes QuickForge runtime assets and installs dependencies with npm.
329
+ The package was generated from tag `v1.5.6` and includes QuickForge runtime assets and installs dependencies with npm.
330
330
 
331
331
  ### Local development
332
332
 
@@ -0,0 +1 @@
1
+ import{i as e}from"./rolldown-runtime-DWdDZTNf.js";import{At as t,T as n,Tt as r,a as i,c as a,rt as o}from"./icons-DXrzz0RO.js";import{n as s}from"./react-vendor-xMa3TUTb.js";import{$ as c,G as l,H as u,K as d,M as f,Q as p,U as m,W as h,et as g,it as _}from"./index-BIslkXQt.js";var v=e(t(),1),y=s();function b(){return{name:``,label:``,description:``,systemPrompt:``,allowedTools:[`read_file`,`grep_files`],maxRuntimeMs:`1800000`,maxToolCalls:`300`,enabledAsSubagent:!0}}function x(e){return{name:e.name,label:e.label,description:e.description??``,systemPrompt:e.systemPrompt??``,allowedTools:e.allowedTools??[],maxRuntimeMs:String(e.maxRuntimeMs??18e5),maxToolCalls:String(e.maxToolCalls??300),enabledAsSubagent:e.enabledAsSubagent}}function S(e){return{name:e.name.trim().toLowerCase(),label:e.label.trim(),description:e.description.trim(),systemPrompt:e.systemPrompt.trim(),allowedTools:e.allowedTools,maxRuntimeMs:Number(e.maxRuntimeMs||18e5),maxToolCalls:Number(e.maxToolCalls||300),enabledAsSubagent:e.enabledAsSubagent}}function C(e){return!!(e.name.trim()&&e.label.trim()&&e.allowedTools.length>0)}async function w(e,t){let n=await fetch(e,{...t,headers:{"content-type":`application/json`,...t?.headers}}),r=await n.json().catch(()=>null);if(!n.ok)throw Error(r?.error||`请求失败`);return r}function T(){let[e,t]=(0,v.useState)([]),[s,T]=(0,v.useState)([]),[E,D]=(0,v.useState)(!1),[O,k]=(0,v.useState)(null),[A,j]=(0,v.useState)(()=>b()),[M,N]=(0,v.useState)(!1),[P,F]=(0,v.useState)(``),[I,L]=(0,v.useState)(!1),[R,z]=(0,v.useState)(),[B,V]=(0,v.useState)(`off`),[H,U]=(0,v.useState)(``),[W,G]=(0,v.useState)(null);async function K(){let[e,n]=await Promise.all([w(`/api/agent-profiles`),w(`/api/agent-profiles/available-tools`)]);t(e.agents),T(n.tools)}(0,v.useEffect)(()=>{let e=!1;async function n(){try{let[n,r]=await Promise.all([w(`/api/agent-profiles`),w(`/api/agent-profiles/available-tools`)]);if(e)return;t(n.agents),T(r.tools)}catch(t){e||U(t instanceof Error?t.message:_(`requestFailed`))}}return n(),()=>{e=!0}},[]),(0,v.useEffect)(()=>{let e=!1;async function t(){try{let t=await h(),n=await m(t),r=await l(t),i=r.model??await d(t)??n[0];if(e)return;z(i),V(r.thinkingLevel??u(i))}catch{}}return t(),()=>{e=!0}},[]),(0,v.useEffect)(()=>{if(!W)return;let e=()=>G(null);return window.addEventListener(`click`,e),window.addEventListener(`blur`,e),()=>{window.removeEventListener(`click`,e),window.removeEventListener(`blur`,e)}},[W]);let q=(0,v.useMemo)(()=>e.find(e=>e.id===O)??null,[e,O]);function J(e,t){j(n=>({...n,[e]:t}))}function Y(e){j(t=>({...t,allowedTools:t.allowedTools.includes(e)?t.allowedTools.filter(t=>t!==e):[...t.allowedTools,e]}))}function X(){k(null),j(b()),F(``),U(``),D(!0)}function Z(e){k(e.id),j(x(e)),F(``),U(``),D(!0)}function Q(){M||I||(D(!1),k(null),j(b()),F(``))}async function $(){let e=P.trim();if(!e){U(_(`aiFillAgentInputRequired`));return}if(!R){U(_(`aiFillAgentNoModel`));return}L(!0),U(``);try{let t=await w(`/api/agent-profiles/ai-fill`,{method:`POST`,body:JSON.stringify({instruction:e,model:R,thinkingLevel:B})});j(e=>({...e,name:t.agent.name,label:t.agent.label,description:t.agent.description,systemPrompt:t.agent.systemPrompt}))}catch(e){U(e instanceof Error?e.message:_(`aiFillAgentFailed`))}finally{L(!1)}}async function ee(){if(C(A)){N(!0),U(``);try{let e=S(A);O?await w(`/api/agent-profiles/${encodeURIComponent(O)}`,{method:`PATCH`,body:JSON.stringify(e)}):await w(`/api/agent-profiles`,{method:`POST`,body:JSON.stringify(e)}),Q(),await K()}catch(e){U(e instanceof Error?e.message:_(`requestFailed`))}finally{N(!1)}}}async function te(e){if(e.builtin||e.readonly)return;let n=!e.enabledAsSubagent,r=e.enabledAsSubagent;t(t=>t.map(t=>t.id===e.id?{...t,enabledAsSubagent:n}:t)),G(null);try{await w(`/api/agent-profiles/${encodeURIComponent(e.id)}`,{method:`PATCH`,body:JSON.stringify({enabledAsSubagent:n})})}catch(n){t(t=>t.map(t=>t.id===e.id?{...t,enabledAsSubagent:r}:t)),U(n instanceof Error?n.message:_(`requestFailed`))}}async function ne(e){if(!(e.builtin||e.readonly)&&await f({description:_(`confirmDeleteAgent`),confirmLabel:_(`confirmDelete`),cancelLabel:_(`cancel`),variant:`destructive`})){U(``);try{await w(`/api/agent-profiles/${encodeURIComponent(e.id)}`,{method:`DELETE`}),await K()}catch(e){U(e instanceof Error?e.message:_(`requestFailed`))}}}return(0,y.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col overflow-hidden bg-background`,children:[(0,y.jsx)(`div`,{className:`border-b border-border px-6 py-5`,children:(0,y.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3`,children:[(0,y.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,y.jsx)(`div`,{className:`flex size-10 items-center justify-center rounded-2xl bg-primary/10 text-primary`,children:(0,y.jsx)(r,{className:`size-5`})}),(0,y.jsx)(`div`,{children:(0,y.jsxs)(`h1`,{className:`inline-flex items-center gap-1.5 text-lg font-semibold text-foreground`,children:[_(`agentsTab`),(0,y.jsx)(p,{label:_(`agentsDescription`)})]})})]}),(0,y.jsx)(c,{onClick:X,children:_(`createAgent`)})]})}),(0,y.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto p-6`,children:(0,y.jsxs)(`div`,{className:`mx-auto max-w-5xl space-y-5`,children:[H&&!E?(0,y.jsx)(`div`,{className:`rounded-md border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive`,children:H}):null,(0,y.jsx)(`div`,{className:`grid gap-4 md:grid-cols-2`,children:e.map(e=>(0,y.jsxs)(`div`,{className:`rounded-xl border border-border bg-card p-4`,children:[(0,y.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[(0,y.jsxs)(`div`,{className:`min-w-0`,children:[(0,y.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,y.jsx)(`h3`,{className:g(`truncate text-sm font-medium`,e.enabledAsSubagent?`text-foreground/90`:`text-muted-foreground`),children:e.label}),e.builtin?(0,y.jsx)(`span`,{className:`rounded-full bg-primary/10 px-2 py-0.5 text-xs text-primary`,children:_(`builtinAgent`)}):null]}),(0,y.jsx)(`p`,{className:`mt-1 font-mono text-xs text-muted-foreground`,children:e.name}),e.source&&!e.builtin?(0,y.jsxs)(`p`,{className:`mt-1 text-xs text-muted-foreground`,children:[e.source,e.relativePath?` · ${e.relativePath}`:``]}):null,(0,y.jsx)(`p`,{className:`mt-2 text-sm text-muted-foreground`,children:e.description||_(`noDescription`)})]}),(0,y.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2`,onClick:e=>e.stopPropagation(),children:[(0,y.jsx)(`button`,{type:`button`,role:`switch`,"aria-checked":e.enabledAsSubagent,disabled:e.builtin||e.readonly,className:g(`relative h-6 w-11 rounded-full transition-colors disabled:cursor-not-allowed disabled:opacity-60`,e.enabledAsSubagent?`bg-emerald-500`:`bg-muted-foreground/30`),onClick:()=>void te(e),title:e.enabledAsSubagent?_(`disableAsSubagent`):_(`enableAsSubagent`),children:(0,y.jsx)(`span`,{className:g(`absolute left-0.5 top-0.5 size-5 rounded-full bg-white shadow transition-transform`,e.enabledAsSubagent?`translate-x-5`:`translate-x-0`)})}),(0,y.jsxs)(`div`,{className:`relative`,children:[(0,y.jsx)(c,{variant:`ghost`,size:`icon`,onClick:()=>G(W===e.id?null:e.id),title:_(`moreActions`),children:(0,y.jsx)(o,{className:`size-4`})}),W===e.id?(0,y.jsxs)(`div`,{className:`absolute right-0 z-20 mt-1 w-36 overflow-hidden rounded-xl border border-border bg-popover py-1 text-sm shadow-quickforge`,children:[(0,y.jsxs)(`button`,{className:`flex w-full items-center gap-2 px-3 py-2 text-left hover:bg-muted disabled:cursor-not-allowed disabled:opacity-50`,disabled:e.builtin||e.readonly,onClick:()=>{G(null),Z(e)},children:[(0,y.jsx)(n,{className:`size-3.5`}),_(`editTask`)]}),(0,y.jsxs)(`button`,{className:`flex w-full items-center gap-2 px-3 py-2 text-left text-destructive hover:bg-muted disabled:cursor-not-allowed disabled:opacity-50`,disabled:e.builtin||e.readonly,onClick:()=>{G(null),ne(e)},children:[(0,y.jsx)(i,{className:`size-3.5`}),_(`delete`)]})]}):null]})]})]}),(0,y.jsx)(`div`,{className:`mt-3 flex flex-wrap gap-1`,children:e.allowedTools.map(e=>(0,y.jsx)(`span`,{className:`rounded-full bg-muted px-2 py-0.5 font-mono text-xs text-muted-foreground`,children:e},e))}),(0,y.jsxs)(`div`,{className:`mt-3 grid gap-2 border-t border-border pt-3 text-xs text-muted-foreground sm:grid-cols-2`,children:[(0,y.jsxs)(`span`,{children:[_(`maxRuntimeMs`),e.maxRuntimeMs??`-`]}),(0,y.jsxs)(`span`,{children:[_(`maxToolCalls`),e.maxToolCalls??`-`]})]})]},e.id))})]})}),E?(0,y.jsx)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4`,onMouseDown:e=>{e.target===e.currentTarget&&Q()},children:(0,y.jsxs)(`div`,{className:`flex max-h-[90vh] w-full max-w-3xl flex-col overflow-hidden rounded-2xl border border-border bg-background shadow-quickforge`,onMouseDown:e=>e.stopPropagation(),children:[(0,y.jsxs)(`div`,{className:`shrink-0 border-b border-border px-5 py-4`,children:[(0,y.jsx)(`h2`,{className:`text-base font-medium text-foreground`,children:_(q?`editAgent`:`createAgent`)}),q?.readonly?(0,y.jsx)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:_(`builtinAgentReadonly`)}):null]}),(0,y.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto px-5 py-4`,children:(0,y.jsxs)(`div`,{className:`space-y-4`,children:[(0,y.jsxs)(`div`,{className:`rounded-2xl border border-border bg-muted/20 p-3`,children:[(0,y.jsxs)(`div`,{className:`mb-2 flex items-center gap-2 text-sm font-medium text-foreground`,children:[(0,y.jsx)(a,{className:`size-4 text-primary`}),_(`aiFillAgent`),(0,y.jsx)(p,{label:_(`aiFillAgentDescription`)})]}),(0,y.jsx)(`textarea`,{className:`min-h-20 w-full resize-y rounded-xl border border-input bg-background px-3 py-2 text-sm outline-none transition-colors placeholder:text-muted-foreground/65 focus:border-ring disabled:opacity-60`,value:P,disabled:!!q?.readonly||I,onChange:e=>F(e.target.value),placeholder:_(`aiFillAgentPlaceholder`)}),(0,y.jsx)(`div`,{className:`mt-2 flex justify-end`,children:(0,y.jsxs)(c,{variant:`outline`,size:`sm`,onClick:()=>void $(),disabled:!!q?.readonly||I||!P.trim(),children:[(0,y.jsx)(a,{className:`mr-1 size-3.5`}),_(I?`aiFillAgentLoading`:`aiFillAgent`)]})})]}),(0,y.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[(0,y.jsxs)(`label`,{className:`block text-sm font-medium text-foreground`,children:[_(`agentName`),(0,y.jsx)(`input`,{className:`mt-1 h-10 w-full rounded-md border border-input bg-background px-3 text-sm outline-none focus:border-ring disabled:opacity-60`,value:A.name,disabled:!!q?.readonly,onChange:e=>J(`name`,e.target.value),placeholder:`reviewer`})]}),(0,y.jsxs)(`label`,{className:`block text-sm font-medium text-foreground`,children:[_(`agentLabel`),(0,y.jsx)(`input`,{className:`mt-1 h-10 w-full rounded-md border border-input bg-background px-3 text-sm outline-none focus:border-ring disabled:opacity-60`,value:A.label,disabled:!!q?.readonly,onChange:e=>J(`label`,e.target.value),placeholder:_(`agentLabelPlaceholder`)})]})]}),(0,y.jsxs)(`label`,{className:`block text-sm font-medium text-foreground`,children:[_(`agentDescription`),(0,y.jsx)(`input`,{className:`mt-1 h-10 w-full rounded-md border border-input bg-background px-3 text-sm outline-none focus:border-ring disabled:opacity-60`,value:A.description,disabled:!!q?.readonly,onChange:e=>J(`description`,e.target.value)})]}),(0,y.jsxs)(`label`,{className:`block text-sm font-medium text-foreground`,children:[_(`agentSystemPrompt`),(0,y.jsx)(`textarea`,{className:`mt-1 min-h-36 w-full resize-y rounded-xl border border-input bg-background px-3 py-2 text-sm outline-none focus:border-ring disabled:opacity-60`,value:A.systemPrompt,disabled:!!q?.readonly,onChange:e=>J(`systemPrompt`,e.target.value)})]}),(0,y.jsxs)(`div`,{children:[(0,y.jsx)(`div`,{className:`mb-2 text-sm font-medium text-foreground`,children:_(`allowedTools`)}),(0,y.jsx)(`div`,{className:`grid gap-2 sm:grid-cols-2`,children:s.map(e=>(0,y.jsxs)(`label`,{className:`flex items-start gap-2 rounded-xl border border-border bg-muted/20 p-3 text-sm disabled:opacity-60`,children:[(0,y.jsx)(`input`,{type:`checkbox`,className:`mt-1`,disabled:!!q?.readonly,checked:A.allowedTools.includes(e.name),onChange:()=>Y(e.name)}),(0,y.jsxs)(`span`,{children:[(0,y.jsx)(`span`,{className:`font-medium text-foreground`,children:e.label}),(0,y.jsx)(`span`,{className:`ml-2 font-mono text-xs text-muted-foreground`,children:e.name}),e.riskLevel===`dangerous`?(0,y.jsx)(`span`,{className:`ml-2 rounded-full bg-amber-500/10 px-2 py-0.5 text-xs text-amber-700`,children:_(`highRiskTool`)}):null,(0,y.jsx)(`span`,{className:`mt-1 block text-xs text-muted-foreground`,children:e.description})]})]},e.name))})]}),(0,y.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[(0,y.jsxs)(`label`,{className:`block text-sm font-medium text-foreground`,children:[_(`maxRuntimeMs`),(0,y.jsx)(`input`,{type:`number`,className:`mt-1 h-10 w-full rounded-md border border-input bg-background px-3 text-sm outline-none focus:border-ring disabled:opacity-60`,value:A.maxRuntimeMs,disabled:!!q?.readonly,onChange:e=>J(`maxRuntimeMs`,e.target.value)})]}),(0,y.jsxs)(`label`,{className:`block text-sm font-medium text-foreground`,children:[_(`maxToolCalls`),(0,y.jsx)(`input`,{type:`number`,className:`mt-1 h-10 w-full rounded-md border border-input bg-background px-3 text-sm outline-none focus:border-ring disabled:opacity-60`,value:A.maxToolCalls,disabled:!!q?.readonly,onChange:e=>J(`maxToolCalls`,e.target.value)})]})]}),(0,y.jsxs)(`label`,{className:`flex items-center gap-2 text-sm text-foreground`,children:[(0,y.jsx)(`input`,{type:`checkbox`,checked:A.enabledAsSubagent,disabled:!!q?.readonly,onChange:e=>J(`enabledAsSubagent`,e.target.checked)}),_(`enabledAsSubagent`)]}),H?(0,y.jsx)(`div`,{className:`rounded-md border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive`,children:H}):null]})}),(0,y.jsx)(`div`,{className:`shrink-0 border-t border-border px-5 py-4`,children:(0,y.jsxs)(`div`,{className:`flex justify-end gap-2`,children:[(0,y.jsx)(c,{variant:`outline`,onClick:Q,disabled:M||I,children:_(`cancel`)}),(0,y.jsx)(c,{onClick:ee,disabled:M||I||!!q?.readonly||!C(A),children:_(`save`)})]})})]})}):null]})}export{T as AgentProfilesPage};