@iaforged/context-code 2.0.1 → 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/bridge/bridgeMain.js +1 -1
- package/dist/src/bridge/types.js +1 -1
- package/dist/src/cli/handlers/auth.js +1 -1
- package/dist/src/cli/handlers/mcp.js +1 -1
- package/dist/src/cli/print.js +1 -1
- package/dist/src/commands/copy/copy.js +1 -1
- package/dist/src/commands/heartbeat/heartbeat.js +1 -0
- package/dist/src/commands/heartbeat/index.js +1 -0
- package/dist/src/commands/insights.js +1 -1
- package/dist/src/commands/install-github-app/ExistingWorkflowStep.js +1 -1
- package/dist/src/commands/install-github-app/InstallAppStep.js +1 -1
- package/dist/src/commands/install-github-app/OAuthFlowStep.js +1 -1
- package/dist/src/commands/install-github-app/SuccessStep.js +1 -1
- package/dist/src/commands/install-github-app/setupGitHubActions.js +1 -1
- package/dist/src/commands/login-openai/index.js +1 -1
- package/dist/src/commands/mobile/mobile.js +1 -1
- package/dist/src/commands/remote-setup/remote-setup.js +1 -1
- package/dist/src/commands/swarm-auto/swarmAuto.js +1 -1
- package/dist/src/commands/timeline/timeline.js +1 -1
- package/dist/src/commands/webapp/webapp.js +1 -1
- package/dist/src/commands.js +1 -1
- package/dist/src/components/ApproveApiKey.js +1 -1
- package/dist/src/components/ChannelDowngradeDialog.js +1 -1
- package/dist/src/components/ClaudeCodeHint/PluginHintMenu.js +1 -1
- package/dist/src/components/ConsoleOAuthFlow.js +1 -1
- package/dist/src/components/CostThresholdDialog.js +1 -1
- package/dist/src/components/CtrlOToExpand.js +1 -1
- package/dist/src/components/CustomSelect/select.js +1 -1
- package/dist/src/components/DesktopHandoff.js +1 -1
- package/dist/src/components/DesktopUpsell/DesktopUpsellStartup.js +1 -1
- package/dist/src/components/ExportDialog.js +1 -1
- package/dist/src/components/Feedback.js +1 -1
- package/dist/src/components/FeedbackSurvey/FeedbackSurvey.js +1 -1
- package/dist/src/components/FeedbackSurvey/FeedbackSurveyView.js +1 -1
- package/dist/src/components/IdeAutoConnectDialog.js +1 -1
- package/dist/src/components/IdeOnboardingDialog.js +1 -1
- package/dist/src/components/IdleReturnDialog.js +1 -1
- package/dist/src/components/InterruptedByUser.js +1 -1
- package/dist/src/components/InvalidConfigDialog.js +1 -1
- package/dist/src/components/InvalidSettingsDialog.js +1 -1
- package/dist/src/components/LanguagePicker.js +1 -1
- package/dist/src/components/LogSelector.js +1 -1
- package/dist/src/components/LogoV2/ChannelsNotice.js +1 -1
- package/dist/src/components/LogoV2/LogoV2.js +1 -1
- package/dist/src/components/LogoV2/feedConfigs.js +1 -1
- package/dist/src/components/LspRecommendation/LspRecommendationMenu.js +1 -1
- package/dist/src/components/MCPServerApprovalDialog.js +1 -1
- package/dist/src/components/MCPServerDesktopImportDialog.js +1 -1
- package/dist/src/components/ManagedSettingsSecurityDialog/ManagedSettingsSecurityDialog.js +1 -1
- package/dist/src/components/MessageSelector.js +1 -1
- package/dist/src/components/OutputStylePicker.js +1 -1
- package/dist/src/components/PromptInput/PromptInput.js +1 -1
- package/dist/src/components/RemoteCallout.js +1 -1
- package/dist/src/components/ResumeTask.js +1 -1
- package/dist/src/components/Settings/Config.js +1 -1
- package/dist/src/components/ShowInIDEPrompt.js +1 -1
- package/dist/src/components/Stats.js +1 -1
- package/dist/src/components/TagTabs.js +1 -1
- package/dist/src/components/TeleportError.js +1 -1
- package/dist/src/components/TeleportResumeWrapper.js +1 -1
- package/dist/src/components/TextInput.js +1 -1
- package/dist/src/components/agents/new-agent-creation/wizard-steps/MethodStep.js +1 -1
- package/dist/src/components/design-system/KeyboardShortcutHint.js +1 -1
- package/dist/src/components/diff/DiffDetailView.js +1 -1
- package/dist/src/components/grove/Grove.js +1 -1
- package/dist/src/components/hooks/SelectEventMode.js +1 -1
- package/dist/src/components/hooks/SelectHookMode.js +1 -1
- package/dist/src/components/hooks/SelectMatcherMode.js +1 -1
- package/dist/src/components/hooks/ViewHookMode.js +1 -1
- package/dist/src/components/mcp/MCPAgentServerMenu.js +1 -1
- package/dist/src/components/mcp/utils/reconnectHelpers.js +1 -1
- package/dist/src/components/memory/MemoryFileSelector.js +1 -1
- package/dist/src/components/messages/AssistantTextMessage.js +1 -1
- package/dist/src/components/messages/PlanApprovalMessage.js +1 -1
- package/dist/src/components/messages/ShutdownMessage.js +1 -1
- package/dist/src/components/messages/SystemAPIErrorMessage.js +1 -1
- package/dist/src/components/messages/UserPlanMessage.js +1 -1
- package/dist/src/components/permissions/AskUserQuestionPermissionRequest/PreviewQuestionView.js +1 -1
- package/dist/src/components/permissions/ComputerUseApproval/ComputerUseApproval.js +1 -1
- package/dist/src/components/permissions/FileEditPermissionRequest/FileEditPermissionRequest.js +1 -1
- package/dist/src/components/permissions/FilePermissionDialog/FilePermissionDialog.js +1 -1
- package/dist/src/components/permissions/FilePermissionDialog/permissionOptions.js +1 -1
- package/dist/src/components/permissions/FileWritePermissionRequest/FileWritePermissionRequest.js +1 -1
- package/dist/src/components/permissions/FilesystemPermissionRequest/FilesystemPermissionRequest.js +1 -1
- package/dist/src/components/permissions/PermissionRequest.js +1 -1
- package/dist/src/components/permissions/SedEditPermissionRequest/SedEditPermissionRequest.js +1 -1
- package/dist/src/components/permissions/SkillPermissionRequest/SkillPermissionRequest.js +1 -1
- package/dist/src/components/permissions/WebFetchPermissionRequest/WebFetchPermissionRequest.js +1 -1
- package/dist/src/components/permissions/rules/AddPermissionRules.js +1 -1
- package/dist/src/components/permissions/rules/AddWorkspaceDirectory.js +1 -1
- package/dist/src/components/permissions/rules/PermissionRuleList.js +1 -1
- package/dist/src/components/permissions/rules/RemoveWorkspaceDirectory.js +1 -1
- package/dist/src/components/sandbox/SandboxConfigTab.js +1 -1
- package/dist/src/components/sandbox/SandboxOverridesTab.js +1 -1
- package/dist/src/components/tasks/RemoteSessionDetailDialog.js +1 -1
- package/dist/src/constants/outputStyles.js +1 -1
- package/dist/src/entrypoints/cli.js +1 -1
- package/dist/src/hooks/notifs/useCanSwitchToExistingSubscription.js +1 -1
- package/dist/src/main.js +1 -1
- package/dist/src/projectOnboardingState.js +1 -1
- package/dist/src/screens/REPL.js +1 -1
- package/dist/src/services/api/errors.js +1 -1
- package/dist/src/services/api/filesApi.js +1 -1
- package/dist/src/services/tips/tipRegistry.js +1 -1
- package/dist/src/tasks/RemoteAgentTask/RemoteAgentTask.js +1 -1
- package/dist/src/tools/AgentTool/AgentTool.js +1 -1
- package/dist/src/tools/ConfigTool/supportedSettings.js +1 -1
- package/dist/src/tools/EnterWorktreeTool/EnterWorktreeTool.js +1 -1
- package/dist/src/tools/ExitWorktreeTool/ExitWorktreeTool.js +1 -1
- package/dist/src/tools/WebFetchTool/WebFetchTool.js +1 -1
- package/dist/src/utils/computerUse/cleanup.js +1 -1
- package/dist/src/utils/computerUse/wrapper.js +1 -1
- package/dist/src/utils/fileHistory.js +1 -1
- package/dist/src/utils/heartbeat.js +1 -0
- package/dist/src/utils/model/providers.js +1 -1
- package/dist/src/utils/permissions/filesystem.js +1 -1
- package/dist/src/utils/permissions/permissions.js +1 -1
- package/dist/src/utils/processUserInput/processSlashCommand.js +1 -1
- package/dist/src/utils/releaseNoteTranslations.js +1 -1
- package/dist/src/utils/shell/shellToolUtils.js +1 -1
- package/dist/src/utils/sshMcp/common.js +1 -0
- package/dist/src/utils/sshMcp/setup.js +1 -0
- package/dist/src/utils/sshMcp/sshMcpServer.js +1 -0
- package/dist/src/utils/sshMcp/sshMcpServer.test.js +1 -0
- package/dist/src/utils/teleport.js +1 -1
- package/dist/src/webapp/server.js +1 -1
- package/dist/sshMcpServer.js +1 -0
- package/dist/sshMcpServer.test.js +1 -0
- package/dist/webapp/chunk-AMCDNAIG.js +1 -0
- package/dist/webapp/{chunk-YUEYJPXQ.js → chunk-NFYBHCXF.js} +1 -1
- package/dist/webapp/{chunk-DFKSSBHI.js → chunk-OJZNEHPP.js} +1 -1
- package/dist/webapp/chunk-VAB2VXFI.js +1 -0
- package/dist/webapp/index.html +2 -2
- package/dist/webapp/main-MTQLKGXD.js +1 -0
- package/dist/webapp/ngsw.json +14 -14
- package/dist/webapp/styles-DIKEDJBH.css +1 -0
- package/package.json +2 -1
- package/dist/webapp/chunk-4SRNXNLW.js +0 -1
- package/dist/webapp/chunk-SIHYW6PA.js +0 -1
- package/dist/webapp/main-LBNRQBXX.js +0 -1
- package/dist/webapp/styles-FUPULZDX.css +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{feature as e}from"../recovery/bunBundleShim.js";import{jsx as
|
|
1
|
+
import{feature as e}from"../recovery/bunBundleShim.js";import{jsx as o,jsxs as r}from"react/jsx-runtime";import t from"chalk";import{useMemo as i,useRef as n,useState as s,useEffect as l}from"react";import{useVoiceState as a}from"../context/voice.js";import{useClipboardImageHint as c}from"../hooks/useClipboardImageHint.js";import{useSettings as u}from"../hooks/useSettings.js";import{useTextInput as d}from"../hooks/useTextInput.js";import{Box as m,color as p,useAnimationFrame as h,useTerminalFocus as f,useTheme as g,Text as v}from"../ink.js";import{isEnvTruthy as C}from"../utils/envUtils.js";import{BaseTextInput as x}from"./BaseTextInput.js";import{hueToRgb as b}from"./Spinner/utils.js";import{isWebappRunning as E,broadcastInteractiveInput as I,getWebappUrl as y}from"../webapp/server.js";const S=" ▁▂▃▄▅▆▇█";export default function TextInput(T){const[k,D]=s(!1),[j,M]=s(!1),[O,P]=s(null);l(()=>{if(E()&&!T.multiline){D(!0);const e=Math.random().toString(36).substring(2,9),{title:o,description:r,placeholder:t}=function(e){const o=(e.placeholder||e.value||"").toLowerCase();return e.mask||o.includes("api")||o.includes("key")||o.includes("token")||o.includes("password")||o.includes("contraseña")?{title:"Introducir Clave de API / Token Confidencial",description:"Por seguridad, introduce tu API Key o Token de acceso en este campo seguro y enmascarado.",placeholder:"sk-..."}:o.includes("host")||o.includes("url")||o.includes("puerto")||o.includes("port")?{title:"Configurar Dirección / Servidor",description:"Introduce la dirección URL, host o puerto del servicio que deseas configurar.",placeholder:"http://localhost:..."}:{title:"Entrada de Texto Requerida",description:"Por favor, introduce el valor solicitado para continuar con la operación en curso.",placeholder:"Escribe aquí..."}}(T),i=T.value?String(T.value):void 0;I(e,o,r,T.placeholder||t,T.mask,i).then(e=>{M(!0),T.onSubmit?.(e)}).catch(e=>{P(e.message||String(e)),T.onExit?.()})}},[T.multiline,T.value]);const[w]=g(),A=f();if(k&&!j)return r(m,{flexDirection:"column",padding:1,borderStyle:"round",borderColor:"cyan",children:[o(v,{color:"cyan",bold:!0,children:"✨ Interacción de Entrada Transferida a la WebApp"}),o(v,{color:"white",children:"Por favor, escribe el valor requerido en tu navegador:"}),o(v,{bold:!0,color:"cyan",children:y()}),O?r(v,{color:"red",children:["Error: ",O]}):o(v,{dimColor:!0,children:"Esperando respuesta del usuario..."})]});const L=i(()=>C(process.env.CONTEXT_CODE_ACCESSIBILITY)||C(process.env.CLAUDE_CODE_ACCESSIBILITY),[]),H=u().prefersReducedMotion??!1,U="recording"===(e("VOICE_MODE")?a(e=>e.voiceState):"idle"),_=e("VOICE_MODE")?a(e=>e.voiceAudioLevels):[],F=n(new Array(1).fill(0)),R=U&&!H,[V,q]=e("VOICE_MODE")?h(R?50:null):[()=>{},0];c(A,!!T.onImagePaste);let B;if(A&&!L)if(U&&!H){const e=F.current,o=_.length>0?_[_.length-1]??0:0,r=Math.min(1.8*o,1);e[0]=.7*(e[0]??0)+r*(1-.7);const i=e[0]??0,n=Math.max(1,Math.min(Math.round(8*i),8)),s=o<.15,l=q/1e3*90%360,{r:a,g:c,b:u}=s?{r:128,g:128,b:128}:b(l);B=()=>t.rgb(a,c,u)(S[n])}else B=t.inverse;else B=e=>e;const K=d({value:T.value,onChange:T.onChange,onSubmit:T.onSubmit,onExit:T.onExit,onExitMessage:T.onExitMessage,onHistoryReset:T.onHistoryReset,onHistoryUp:T.onHistoryUp,onHistoryDown:T.onHistoryDown,onClearInput:T.onClearInput,focus:T.focus,mask:T.mask,multiline:T.multiline,cursorChar:T.showCursor?" ":"",highlightPastedText:T.highlightPastedText,invert:B,themeText:p("text",w),columns:T.columns,maxVisibleLines:T.maxVisibleLines,onImagePaste:T.onImagePaste,disableCursorMovementForUpDownKeys:T.disableCursorMovementForUpDownKeys,disableEscapeDoublePress:T.disableEscapeDoublePress,externalOffset:T.cursorOffset,onOffsetChange:T.onChangeCursorOffset,inputFilter:T.inputFilter,inlineGhostText:T.inlineGhostText,dim:t.dim});return o(m,{ref:V,children:o(x,{inputState:K,terminalFocus:A,highlights:T.highlights,invert:B,hidePlaceholderText:U,...T})})}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as o}from"react/jsx-runtime";import{c as t}from"react/compiler-runtime";import{Box as r}from"../../../../ink.js";import{ConfigurableShortcutHint as n}from"../../../ConfigurableShortcutHint.js";import{Select as a}from"../../../CustomSelect/select.js";import{Byline as i}from"../../../design-system/Byline.js";import{KeyboardShortcutHint as c}from"../../../design-system/KeyboardShortcutHint.js";import{useWizard as m}from"../../../wizard/index.js";import{WizardDialogLayout as s}from"../../../wizard/WizardDialogLayout.js";export function MethodStep(){const l=t(11),{goNext:d,goBack:
|
|
1
|
+
import{jsx as e,jsxs as o}from"react/jsx-runtime";import{c as t}from"react/compiler-runtime";import{Box as r}from"../../../../ink.js";import{ConfigurableShortcutHint as n}from"../../../ConfigurableShortcutHint.js";import{Select as a}from"../../../CustomSelect/select.js";import{Byline as i}from"../../../design-system/Byline.js";import{KeyboardShortcutHint as c}from"../../../design-system/KeyboardShortcutHint.js";import{useWizard as m}from"../../../wizard/index.js";import{WizardDialogLayout as s}from"../../../wizard/WizardDialogLayout.js";export function MethodStep(){const l=t(11),{goNext:d,goBack:f,updateWizardData:u,goToStep:p}=m();let g;l[0]===Symbol.for("react.memo_cache_sentinel")?(g=[{label:"Generar con Context (recomendado)",value:"generate"},{label:"Configuracion manual",value:"manual"}],l[0]=g):g=l[0];const h=g;let j,x,b,y;return l[1]===Symbol.for("react.memo_cache_sentinel")?(j=o(i,{children:[e(c,{shortcut:"↑↓",action:"navegar"}),e(c,{shortcut:"Enter",action:"seleccionar"}),e(n,{action:"confirm:no",context:"Confirmation",fallback:"Esc",description:"volver"})]}),l[1]=j):j=l[1],l[2]!==d||l[3]!==p||l[4]!==u?(x=e=>{const o=e;u({method:o,wasGenerated:"generate"===o}),"generate"===o?d():p(3)},l[2]=d,l[3]=p,l[4]=u,l[5]=x):x=l[5],l[6]!==f?(b=()=>f(),l[6]=f,l[7]=b):b=l[7],l[8]!==x||l[9]!==b?(y=e(s,{subtitle:"Metodo de creacion",footerText:j,children:e(r,{children:e(a,{options:h,onChange:x,onCancel:b},"method-select")})}),l[8]=x,l[9]=b,l[10]=y):y=l[10],y}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as e,jsxs as r}from"react/jsx-runtime";import{c as a}from"react/compiler-runtime";import n from"../../ink/components/Text.js";const c={expand:"expandir",cancel:"cancelar",cancelar:"cancelar",toggle:"alternar",navigate:"navegar",navegar:"navegar",seleccionar:"seleccionar",select:"seleccionar",confirm:"confirmar",confirmar:"confirmar",manage:"gestionar","run in background":"ejecutar en segundo plano",copy:"copiar",unset:"quitar",switch:"cambiar",return:"volver",tabs:"pestañas","select message":"seleccionar mensaje","open in editor":"abrir en el editor","disable external includes":"desactivar inclusiones externas",reintentar:"reintentar",cerrar:"cerrar"};export function KeyboardShortcutHint(t){const o=a(9),{shortcut:i,action:s,parens:l,bold:m}=t,d=void 0!==l&&l,p=void 0!==m&&m,u=c[s.toLowerCase()]||s;let g;o[0]!==p||o[1]!==i?(g=p?e(n,{bold:!0,children:i}):i,o[0]=p,o[1]=i,o[2]=g):g=o[2];const f=g;if(d){let e;return o[3]!==u||o[4]!==f?(e=r(n,{children:["(",f," para ",u,")"]}),o[3]=u,o[4]=f,o[5]=e):e=o[5],e}let v;return o[6]!==u||o[7]!==f?(v=r(n,{children:[f," para ",u]}),o[6]=u,o[7]=f,o[8]=v):v=o[8],v}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as i}from"react/jsx-runtime";import{c as
|
|
1
|
+
import{jsx as e,jsxs as i}from"react/jsx-runtime";import{c as n}from"react/compiler-runtime";import{resolve as l}from"path";import{useTerminalSize as r}from"../../hooks/useTerminalSize.js";import{Box as t,Text as o}from"../../ink.js";import{getCwd as c}from"../../utils/cwd.js";import{readFileSafe as d}from"../../utils/file.js";import{Divider as m}from"../design-system/Divider.js";import{StructuredDiff as a}from"../StructuredDiff.js";export function DiffDetailView(f){const s=n(53),{filePath:h,hunks:u,isLargeFile:p,isBinary:_,isTruncated:b,isUntracked:x}=f,{columns:y}=r();let C;e:{if(!h){let e;s[0]===Symbol.for("react.memo_cache_sentinel")?(e={firstLine:null,fileContent:void 0},s[0]=e):e=s[0],C=e;break e}let e,i;if(s[1]!==h){const n=l(c(),h);e=d(n),i=e?.split("\n")[0]??null,s[1]=h,s[2]=e,s[3]=i}else e=s[2],i=s[3];const n=e??void 0;let r;s[4]!==i||s[5]!==n?(r={firstLine:i,fileContent:n},s[4]=i,s[5]=n,s[6]=r):r=s[6],C=r}const{firstLine:D,fileContent:g}=C;if(x){let n,l,r,c,d,a,f;return s[7]!==h?(n=e(o,{bold:!0,children:h}),s[7]=h,s[8]=n):n=s[8],s[9]===Symbol.for("react.memo_cache_sentinel")?(l=e(o,{dimColor:!0,children:" (untracked)"}),s[9]=l):l=s[9],s[10]!==n?(r=i(t,{children:[n,l]}),s[10]=n,s[11]=r):r=s[11],s[12]===Symbol.for("react.memo_cache_sentinel")?(c=e(m,{padding:4}),s[12]=c):c=s[12],s[13]===Symbol.for("react.memo_cache_sentinel")?(d=e(o,{dimColor:!0,italic:!0,children:"Archivo nuevo, aún no añadido al staging."}),s[13]=d):d=s[13],s[14]!==h?(a=i(t,{flexDirection:"column",children:[d,i(o,{dimColor:!0,italic:!0,children:["Run `git add ",h,"` to see line counts."]})]}),s[14]=h,s[15]=a):a=s[15],s[16]!==r||s[17]!==a?(f=i(t,{flexDirection:"column",width:"100%",children:[r,c,a]}),s[16]=r,s[17]=a,s[18]=f):f=s[18],f}if(_){let n,l,r,c;return s[19]!==h?(n=e(t,{children:e(o,{bold:!0,children:h})}),s[19]=h,s[20]=n):n=s[20],s[21]===Symbol.for("react.memo_cache_sentinel")?(l=e(m,{padding:4}),s[21]=l):l=s[21],s[22]===Symbol.for("react.memo_cache_sentinel")?(r=e(t,{flexDirection:"column",children:e(o,{dimColor:!0,italic:!0,children:"Binary file - cannot display diff"})}),s[22]=r):r=s[22],s[23]!==n?(c=i(t,{flexDirection:"column",width:"100%",children:[n,l,r]}),s[23]=n,s[24]=c):c=s[24],c}if(p){let n,l,r,c;return s[25]!==h?(n=e(t,{children:e(o,{bold:!0,children:h})}),s[25]=h,s[26]=n):n=s[26],s[27]===Symbol.for("react.memo_cache_sentinel")?(l=e(m,{padding:4}),s[27]=l):l=s[27],s[28]===Symbol.for("react.memo_cache_sentinel")?(r=e(t,{flexDirection:"column",children:e(o,{dimColor:!0,italic:!0,children:"Large file - diff exceeds 1 MB limit"})}),s[28]=r):r=s[28],s[29]!==n?(c=i(t,{flexDirection:"column",width:"100%",children:[n,l,r]}),s[29]=n,s[30]=c):c=s[30],c}let S,j,w,k,L,v,B,P;return s[31]!==h?(S=e(o,{bold:!0,children:h}),s[31]=h,s[32]=S):S=s[32],s[33]!==b?(j=b&&e(o,{dimColor:!0,children:" (truncated)"}),s[33]=b,s[34]=j):j=s[34],s[35]!==S||s[36]!==j?(w=i(t,{children:[S,j]}),s[35]=S,s[36]=j,s[37]=w):w=s[37],s[38]===Symbol.for("react.memo_cache_sentinel")?(k=e(m,{padding:4}),s[38]=k):k=s[38],s[39]!==y||s[40]!==g||s[41]!==h||s[42]!==D||s[43]!==u?(L=0===u.length?e(o,{dimColor:!0,children:"No diff content"}):u.map((i,n)=>e(a,{patch:i,filePath:h,firstLine:D,fileContent:g,dim:!1,width:y-2-2},n)),s[39]=y,s[40]=g,s[41]=h,s[42]=D,s[43]=u,s[44]=L):L=s[44],s[45]!==L?(v=e(t,{flexDirection:"column",children:L}),s[45]=L,s[46]=v):v=s[46],s[47]!==b?(B=b&&e(o,{dimColor:!0,italic:!0,children:"… diff truncated (exceeded 400 line limit)"}),s[47]=b,s[48]=B):B=s[48],s[49]!==w||s[50]!==v||s[51]!==B?(P=i(t,{flexDirection:"column",width:"100%",children:[w,k,v,B]}),s[49]=w,s[50]=v,s[51]=B,s[52]=P):P=s[52],P}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as o,Fragment as
|
|
1
|
+
import{jsx as e,jsxs as o,Fragment as r}from"react/jsx-runtime";import{c as n}from"react/compiler-runtime";import c,{useEffect as t,useState as i}from"react";import{logEvent as a}from"../../services/analytics/index.js";import{Box as l,Link as s,Text as d,useInput as m}from"../../ink.js";import{calculateShouldShowGrove as _,getGroveNoticeConfig as u,getGroveSettings as h,markGroveNoticeViewed as p,updateGroveSettings as f}from"../../services/api/grove.js";import{Select as y}from"../CustomSelect/index.js";import{Byline as g}from"../design-system/Byline.js";import{Dialog as b}from"../design-system/Dialog.js";import{KeyboardShortcutHint as v}from"../design-system/KeyboardShortcutHint.js";function GracePeriodContentBody(){const c=n(9);let t,i,a,m,_,u,h,p,f;return c[0]===Symbol.for("react.memo_cache_sentinel")?(t=o(d,{children:["Una actualización a nuestros Términos del Consumidor y Política de Privacidad entrará en vigor el"," ",e(d,{bold:!0,children:"8 de octubre de 2025"}),". Puedes aceptar los términos actualizados hoy."]}),c[0]=t):t=c[0],c[1]===Symbol.for("react.memo_cache_sentinel")?(i=e(d,{children:"¿Qué está cambiando?"}),c[1]=i):i=c[1],c[2]===Symbol.for("react.memo_cache_sentinel")?(a=e(d,{children:"· "}),m=e(d,{bold:!0,children:"Puedes ayudar a mejorar Context "}),c[2]=a,c[3]=m):(a=c[2],m=c[3]),c[4]===Symbol.for("react.memo_cache_sentinel")?(_=e(l,{paddingLeft:1,children:o(d,{children:[a,m,o(d,{children:["— Permite el uso de tus chats y sesiones de código para entrenar y mejorar los modelos de IA de Anthropic. Cambia esto en cualquier momento en tu Configuración de Privacidad (",e(s,{url:"https://claude.ai/settings/data-privacy-controls"}),")."]})]})}),c[4]=_):_=c[4],c[5]===Symbol.for("react.memo_cache_sentinel")?(u=o(l,{flexDirection:"column",children:[i,_,e(l,{paddingLeft:1,children:o(d,{children:[e(d,{children:"· "}),e(d,{bold:!0,children:"Actualizaciones a la retención de datos "}),e(d,{children:"— Para ayudarnos a mejorar nuestros modelos de IA y protecciones de seguridad, extenderemos la retención de datos a 5 años."})]})})]}),c[5]=u):u=c[5],c[6]===Symbol.for("react.memo_cache_sentinel")?(h=e(s,{url:"https://www.anthropic.com/news/updates-to-our-consumer-terms"}),c[6]=h):h=c[6],c[7]===Symbol.for("react.memo_cache_sentinel")?(p=e(s,{url:"https://anthropic.com/legal/terms"}),c[7]=p):p=c[7],c[8]===Symbol.for("react.memo_cache_sentinel")?(f=o(r,{children:[t,u,o(d,{children:["Más información (",h,") o lee los Términos del Consumidor actualizados (",p,") y la Política de Privacidad (",e(s,{url:"https://anthropic.com/legal/privacy"}),")"]})]}),c[8]=f):f=c[8],f}function PostGracePeriodContentBody(){const c=n(7);let t,i,a,m,_,u,h;return c[0]===Symbol.for("react.memo_cache_sentinel")?(t=e(d,{children:"Hemos actualizado nuestros Términos del Consumidor y Política de Privacidad."}),c[0]=t):t=c[0],c[1]===Symbol.for("react.memo_cache_sentinel")?(i=e(d,{children:"¿Qué está cambiando?"}),c[1]=i):i=c[1],c[2]===Symbol.for("react.memo_cache_sentinel")?(a=o(l,{flexDirection:"column",children:[e(d,{bold:!0,children:"Ayudar a mejorar Context"}),e(d,{children:"Permite el uso de tus chats y sesiones de código para entrenar y mejorar los modelos de IA de Anthropic. Puedes cambiar esto en cualquier momento en Configuración de Privacidad"}),e(s,{url:"https://claude.ai/settings/data-privacy-controls"})]}),c[2]=a):a=c[2],c[3]===Symbol.for("react.memo_cache_sentinel")?(m=o(l,{flexDirection:"column",gap:1,children:[i,a,o(l,{flexDirection:"column",children:[e(d,{bold:!0,children:"Cómo afecta esto la retención de datos"}),e(d,{children:"Activar el ajuste de mejorar Context extiende la retención de datos de 30 días a 5 años. Desactivarlo mantiene la retención predeterminada de 30 días. Puedes borrar datos en cualquier momento."})]})]}),c[3]=m):m=c[3],c[4]===Symbol.for("react.memo_cache_sentinel")?(_=e(s,{url:"https://www.anthropic.com/news/updates-to-our-consumer-terms"}),c[4]=_):_=c[4],c[5]===Symbol.for("react.memo_cache_sentinel")?(u=e(s,{url:"https://anthropic.com/legal/terms"}),c[5]=u):u=c[5],c[6]===Symbol.for("react.memo_cache_sentinel")?(h=o(r,{children:[t,m,o(d,{children:["Learn more (",_,") or read the updated Consumer Terms (",u,") and Privacy Policy (",e(s,{url:"https://anthropic.com/legal/privacy"}),")"]})]}),c[6]=h):h=c[6],h}export function GroveDialog(r){const c=n(34),{showIfAlreadyViewed:s,location:m,onDone:g}=r,[v,S]=i(null),[x,P]=i(null);let C,w,j;if(c[0]!==m||c[1]!==g||c[2]!==s?(C=()=>{!async function(){const[e,o]=await Promise.all([h(),u()]),r=o.success?o.data:null;P(r);const n=_(e,o,s);S(n),n?(p(),a("tengu_grove_policy_viewed",{location:m,dismissable:r?.notice_is_grace_period})):g("skip_rendering")}()},w=[s,m,g],c[0]=m,c[1]=g,c[2]=s,c[3]=C,c[4]=w):(C=c[3],w=c[4]),t(C,w),null===v)return null;if(!v)return null;c[5]!==x?.notice_is_grace_period||c[6]!==g?(j=async function(e){e:switch(e){case"accept_opt_in":await f(!0),a("tengu_grove_policy_submitted",{state:!0,dismissable:x?.notice_is_grace_period});break e;case"accept_opt_out":await f(!1),a("tengu_grove_policy_submitted",{state:!1,dismissable:x?.notice_is_grace_period});break e;case"defer":a("tengu_grove_policy_dismissed",{state:!0});break e;case"escape":a("tengu_grove_policy_escaped",{})}g(e)},c[5]=x?.notice_is_grace_period,c[6]=g,c[7]=j):j=c[7];const A=j;let D;c[8]!==x?.domain_excluded?(D=x?.domain_excluded?[{label:"Aceptar términos · Ayudar a mejorar Context: NO (para correos con tu dominio)",value:"accept_opt_out"}]:[{label:"Aceptar términos · Ayudar a mejorar Context: SÍ",value:"accept_opt_in"},{label:"Aceptar términos · Ayudar a mejorar Context: NO",value:"accept_opt_out"}],c[8]=x?.domain_excluded,c[9]=D):D=c[9];const E=D;let k;c[10]!==x?.notice_is_grace_period||c[11]!==A?(k=function(){A(x?.notice_is_grace_period?"defer":"escape")},c[10]=x?.notice_is_grace_period,c[11]=A,c[12]=k):k=c[12];const B=k;let G,T,z,N,q,I,H,L,M;return c[13]!==x?.notice_is_grace_period?(G=e(l,{flexDirection:"column",gap:1,flexGrow:1,children:e(x?.notice_is_grace_period?GracePeriodContentBody:PostGracePeriodContentBody,{})}),c[13]=x?.notice_is_grace_period,c[14]=G):G=c[14],c[15]===Symbol.for("react.memo_cache_sentinel")?(T=e(l,{flexShrink:0,children:e(d,{color:"professionalBlue",children:" _____________\n | \\ \\\n | NEW TERMS \\__\\\n | |\n | ---------- |\n | ---------- |\n | ---------- |\n | ---------- |\n | ---------- |\n | |\n |______________|"})}),c[15]=T):T=c[15],c[16]!==G?(z=o(l,{flexDirection:"row",children:[G,T]}),c[16]=G,c[17]=z):z=c[17],c[18]===Symbol.for("react.memo_cache_sentinel")?(N=o(l,{flexDirection:"column",children:[e(d,{bold:!0,children:"Selecciona cómo quieres continuar"}),e(d,{children:"Tu elección tendrá efecto inmediato al confirmar."})]}),c[18]=N):N=c[18],c[19]!==x?.notice_is_grace_period?(q=x?.notice_is_grace_period?[{label:"Ahora no",value:"defer"}]:[],c[19]=x?.notice_is_grace_period,c[20]=q):q=c[20],c[21]!==E||c[22]!==q?(I=[...E,...q],c[21]=E,c[22]=q,c[23]=I):I=c[23],c[24]!==A?(H=e=>A(e),c[24]=A,c[25]=H):H=c[25],c[26]!==B||c[27]!==I||c[28]!==H?(L=o(l,{flexDirection:"column",gap:1,children:[N,e(y,{options:I,onChange:H,onCancel:B})]}),c[26]=B,c[27]=I,c[28]=H,c[29]=L):L=c[29],c[30]!==B||c[31]!==L||c[32]!==z?(M=o(b,{title:"Updates to Consumer Terms and Policies",color:"professionalBlue",onCancel:B,inputGuide:_temp,children:[z,L]}),c[30]=B,c[31]=L,c[32]=z,c[33]=M):M=c[33],M}function _temp(r){return r.pending?o(d,{children:["Presiona ",r.keyName," de nuevo para salir"]}):o(g,{children:[e(v,{shortcut:"Enter",action:"confirmar"}),e(v,{shortcut:"Esc",action:"cancelar"})]})}export function PrivacySettingsDialog(r){const t=n(17),{settings:a,domainExcluded:_,onDone:u}=r,[h,p]=i(a.grove_enabled);let y,S,x;t[0]===Symbol.for("react.memo_cache_sentinel")?(y=[],t[0]=y):y=t[0],c.useEffect(_temp2,y),t[1]!==_||t[2]!==h?(S=async(e,o)=>{if(!_&&(o.tab||o.return||" "===e)){const e=!h;p(e),await f(e)}},t[1]=_,t[2]=h,t[3]=S):S=t[3],m(S),t[4]===Symbol.for("react.memo_cache_sentinel")?(x=e(d,{color:"error",children:"false"}),t[4]=x):x=t[4];let P,C,w,j,A,D=x;if(_){let o;t[5]===Symbol.for("react.memo_cache_sentinel")?(o=e(d,{color:"error",children:"false (for emails with your domain)"}),t[5]=o):o=t[5],D=o}else if(h){let o;t[6]===Symbol.for("react.memo_cache_sentinel")?(o=e(d,{color:"success",children:"true"}),t[6]=o):o=t[6],D=o}return t[7]!==_?(P=r=>r.pending?o(d,{children:["Presiona ",r.keyName," de nuevo para salir"]}):_?e(v,{shortcut:"Esc",action:"cancelar"}):o(g,{children:[e(v,{shortcut:"Enter/Tab/Space",action:"toggle"}),e(v,{shortcut:"Esc",action:"cancelar"})]}),t[7]=_,t[8]=P):P=t[8],t[9]===Symbol.for("react.memo_cache_sentinel")?(C=o(d,{children:["Revisa y gestiona tu configuración de privacidad en"," ",e(s,{url:"https://claude.ai/settings/data-privacy-controls"})]}),t[9]=C):C=t[9],t[10]===Symbol.for("react.memo_cache_sentinel")?(w=e(l,{width:44,children:e(d,{bold:!0,children:"Help improve Claude"})}),t[10]=w):w=t[10],t[11]!==D?(j=o(l,{children:[w,e(l,{children:D})]}),t[11]=D,t[12]=j):j=t[12],t[13]!==u||t[14]!==P||t[15]!==j?(A=o(b,{title:"Data Privacy",color:"professionalBlue",onCancel:u,inputGuide:P,children:[C,j]}),t[13]=u,t[14]=P,t[15]=j,t[16]=A):A=t[16],A}function _temp2(){a("tengu_grove_privacy_settings_viewed",{})}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as o,jsx as e}from"react/jsx-runtime";import{c as t}from"react/compiler-runtime";import n from"figures";import{Box as
|
|
1
|
+
import{jsxs as o,jsx as e}from"react/jsx-runtime";import{c as t}from"react/compiler-runtime";import n from"figures";import{Box as s,Link as i,Text as r}from"../../ink.js";import{plural as c}from"../../utils/stringUtils.js";import{Select as l}from"../CustomSelect/select.js";import{Dialog as a}from"../design-system/Dialog.js";export function SelectEventMode(d){const m=t(23),{hookEventMetadata:u,hooksByEvent:f,totalHooksCount:h,restrictedByPolicy:g,onSelectEvent:p,onCancel:j}=d;let x;m[0]!==h?(x=c(h,"hook"),m[0]=h,m[1]=x):x=m[1];const k=`${h} ${x} configured`;let C,y,b,v,D,E,S,H;return m[2]!==g?(C=g&&o(s,{flexDirection:"column",children:[o(r,{color:"suggestion",children:[n.info," Hooks restringidos por política"]}),e(r,{dimColor:!0,children:"Solo pueden ejecutarse hooks desde configuraciones gestionadas. Los hooks definidos por usuario en ~/.context/settings.json, .context/settings.json y .context/settings.local.json están bloqueados."})]}),m[2]=g,m[3]=C):C=m[3],m[4]===Symbol.for("react.memo_cache_sentinel")?(y=e(s,{flexDirection:"column",children:o(r,{dimColor:!0,children:[n.info," Este menú es de solo lectura. Para agregar o modificar hooks, edita settings.json directamente o pídeselo a Context."," ",e(i,{url:"https://code.claude.com/docs/en/hooks",children:"Más info"})]})}),m[4]=y):y=m[4],m[5]!==p?(b=o=>{p(o)},m[5]=p,m[6]=b):b=m[6],m[7]!==u?(v=Object.entries(u),m[7]=u,m[8]=v):v=m[8],m[9]!==f||m[10]!==v?(D=v.map(e=>{const[t,n]=e,s=f[t]||0;return{label:s>0?o(r,{children:[t," ",o(r,{color:"suggestion",children:["(",s,")"]})]}):t,value:t,description:n.summary}}),m[9]=f,m[10]=v,m[11]=D):D=m[11],m[12]!==j||m[13]!==b||m[14]!==D?(E=e(s,{flexDirection:"column",children:e(l,{onChange:b,onCancel:j,options:D})}),m[12]=j,m[13]=b,m[14]=D,m[15]=E):E=m[15],m[16]!==C||m[17]!==E?(S=o(s,{flexDirection:"column",gap:1,children:[C,y,E]}),m[16]=C,m[17]=E,m[18]=S):S=m[18],m[19]!==j||m[20]!==k||m[21]!==S?(H=e(a,{title:"Hooks",subtitle:k,onCancel:j,children:S}),m[19]=j,m[20]=k,m[21]=S,m[22]=H):H=m[22],H}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as t}from"react/jsx-runtime";import{c as o}from"react/compiler-runtime";import{Box as
|
|
1
|
+
import{jsx as e,jsxs as t}from"react/jsx-runtime";import{c as o}from"react/compiler-runtime";import{Box as n,Text as i}from"../../ink.js";import{getHookDisplayText as r,hookSourceHeaderDisplayString as c}from"../../utils/hooks/hooksSettings.js";import{Select as s}from"../CustomSelect/select.js";import{Dialog as l}from"../design-system/Dialog.js";export function SelectHookMode(r){const c=o(19),{selectedEvent:a,selectedMatcher:m,hooksForSelectedMatcher:p,hookEventMetadata:d,onSelect:u,onCancel:h}=r,f=void 0!==d.matcherMetadata?`${a} - Matcher: ${m||"(all)"}`:a;if(0===p.length){let o,r;return c[0]===Symbol.for("react.memo_cache_sentinel")?(o=t(n,{flexDirection:"column",gap:1,children:[e(i,{dimColor:!0,children:"No hay hooks configurados para este evento."}),e(i,{dimColor:!0,children:"Para agregar hooks, edita settings.json directamente o pídeselo a Context."})]}),c[0]=o):o=c[0],c[1]!==d.description||c[2]!==h||c[3]!==f?(r=e(l,{title:f,subtitle:d.description,onCancel:h,inputGuide:_temp,children:o}),c[1]=d.description,c[2]=h,c[3]=f,c[4]=r):r=c[4],r}const g=d.description;let k,C,j,v;return c[5]!==p?(k=p.map(_temp2),c[5]=p,c[6]=k):k=c[6],c[7]!==p||c[8]!==u?(C=e=>{const t=parseInt(e,10),o=p[t];o&&u(o)},c[7]=p,c[8]=u,c[9]=C):C=c[9],c[10]!==h||c[11]!==k||c[12]!==C?(j=e(n,{flexDirection:"column",children:e(s,{options:k,onChange:C,onCancel:h})}),c[10]=h,c[11]=k,c[12]=C,c[13]=j):j=c[13],c[14]!==d.description||c[15]!==h||c[16]!==j||c[17]!==f?(v=e(l,{title:f,subtitle:g,onCancel:h,children:j}),c[14]=d.description,c[15]=h,c[16]=j,c[17]=f,c[18]=v):v=c[18],v}function _temp2(e,t){return{label:`[${e.config.type}] ${r(e.config)}`,value:t.toString(),description:"pluginHook"===e.source&&e.pluginName?`${c(e.source)} (${e.pluginName})`:c(e.source)}}function _temp(){return e(i,{children:"Esc para volver"})}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as t}from"react/jsx-runtime";import{c as o}from"react/compiler-runtime";import{Box as n,Text as r}from"../../ink.js";import{hookSourceInlineDisplayString as
|
|
1
|
+
import{jsx as e,jsxs as t}from"react/jsx-runtime";import{c as o}from"react/compiler-runtime";import{Box as n,Text as r}from"../../ink.js";import{hookSourceInlineDisplayString as s}from"../../utils/hooks/hooksSettings.js";import{plural as i}from"../../utils/stringUtils.js";import{Select as c}from"../CustomSelect/select.js";import{Dialog as l}from"../design-system/Dialog.js";export function SelectMatcherMode(s){const i=o(25),{selectedEvent:a,matchersForSelectedEvent:m,hooksByEventAndMatcher:h,eventDescription:u,onSelect:p,onCancel:d}=s;let f;if(i[0]!==h||i[1]!==m||i[2]!==a){let e;i[4]!==h||i[5]!==a?(e=e=>{const t=h[a]?.[e]||[];return{matcher:e,sources:Array.from(new Set(t.map(_temp))),hookCount:t.length}},i[4]=h,i[5]=a,i[6]=e):e=i[6],f=m.map(e),i[0]=h,i[1]=m,i[2]=a,i[3]=f}else f=i[3];const g=f;if(0===m.length){const o=`${a} - Matchers`;let s,c;return i[7]===Symbol.for("react.memo_cache_sentinel")?(s=t(n,{flexDirection:"column",gap:1,children:[e(r,{dimColor:!0,children:"No hay hooks configurados para este evento."}),e(r,{dimColor:!0,children:"Para agregar hooks, edita settings.json directamente o pídeselo a Context."})]}),i[7]=s):s=i[7],i[8]!==u||i[9]!==d||i[10]!==o?(c=e(l,{title:o,subtitle:u,onCancel:d,inputGuide:_temp2,children:s}),i[8]=u,i[9]=d,i[10]=o,i[11]=c):c=i[11],c}const C=`${a} - Matchers`;let j,k,v,_;return i[12]!==g?(j=g.map(_temp3),i[12]=g,i[13]=j):j=i[13],i[14]!==p?(k=e=>{p(e)},i[14]=p,i[15]=k):k=i[15],i[16]!==d||i[17]!==j||i[18]!==k?(v=e(n,{flexDirection:"column",children:e(c,{options:j,onChange:k,onCancel:d})}),i[16]=d,i[17]=j,i[18]=k,i[19]=v):v=i[19],i[20]!==u||i[21]!==d||i[22]!==C||i[23]!==v?(_=e(l,{title:C,subtitle:u,onCancel:d,children:v}),i[20]=u,i[21]=d,i[22]=C,i[23]=v,i[24]=_):_=i[24],_}function _temp3(e){return{label:`[${e.sources.map(s).join(", ")}] ${e.matcher||"(all)"}`,value:e.matcher,description:`${e.hookCount} ${i(e.hookCount,"hook")}`}}function _temp2(){return e(r,{children:"Esc para volver"})}function _temp(e){return e.source}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as
|
|
1
|
+
import{jsx as e,jsxs as n}from"react/jsx-runtime";import{c as o}from"react/compiler-runtime";import{Box as r,Text as i}from"../../ink.js";import{hookSourceDescriptionDisplayString as t}from"../../utils/hooks/hooksSettings.js";import{Dialog as c}from"../design-system/Dialog.js";export function ViewHookMode(l){const s=o(40),{selectedHook:a,eventSupportsMatcher:m,onCancel:d}=l;let p,u,h,g,f,C,y,x,j,k,v,b,M,S,D,N;return s[0]!==a.event?(p=n(i,{children:["Event: ",e(i,{bold:!0,children:a.event})]}),s[0]=a.event,s[1]=p):p=s[1],s[2]!==m||s[3]!==a.matcher?(u=m&&n(i,{children:["Matcher: ",e(i,{bold:!0,children:a.matcher||"(all)"})]}),s[2]=m,s[3]=a.matcher,s[4]=u):u=s[4],s[5]!==a.config.type?(h=n(i,{children:["Type: ",e(i,{bold:!0,children:a.config.type})]}),s[5]=a.config.type,s[6]=h):h=s[6],s[7]!==a.source?(g=t(a.source),s[7]=a.source,s[8]=g):g=s[8],s[9]!==g?(f=n(i,{children:["Source:"," ",e(i,{dimColor:!0,children:g})]}),s[9]=g,s[10]=f):f=s[10],s[11]!==a.pluginName?(C=a.pluginName&&n(i,{children:["Plugin: ",e(i,{dimColor:!0,children:a.pluginName})]}),s[11]=a.pluginName,s[12]=C):C=s[12],s[13]!==p||s[14]!==u||s[15]!==h||s[16]!==f||s[17]!==C?(y=n(r,{flexDirection:"column",children:[p,u,h,f,C]}),s[13]=p,s[14]=u,s[15]=h,s[16]=f,s[17]=C,s[18]=y):y=s[18],s[19]!==a.config?(x=function(e){switch(e.type){case"command":return"Command";case"prompt":case"agent":return"Prompt";case"http":return"URL"}}(a.config),s[19]=a.config,s[20]=x):x=s[20],s[21]!==x?(j=n(i,{dimColor:!0,children:[x,":"]}),s[21]=x,s[22]=j):j=s[22],s[23]!==a.config?(k=function(e){switch(e.type){case"command":return e.command;case"prompt":case"agent":return e.prompt;case"http":return e.url}}(a.config),s[23]=a.config,s[24]=k):k=s[24],s[25]!==k?(v=e(r,{borderStyle:"round",borderDimColor:!0,paddingLeft:1,paddingRight:1,children:e(i,{children:k})}),s[25]=k,s[26]=v):v=s[26],s[27]!==v||s[28]!==j?(b=n(r,{flexDirection:"column",children:[j,v]}),s[27]=v,s[28]=j,s[29]=b):b=s[29],s[30]!==a.config?(M="statusMessage"in a.config&&a.config.statusMessage&&n(i,{children:["Status message:"," ",e(i,{dimColor:!0,children:a.config.statusMessage})]}),s[30]=a.config,s[31]=M):M=s[31],s[32]===Symbol.for("react.memo_cache_sentinel")?(S=e(i,{dimColor:!0,children:"Para modificar o eliminar este hook, edita settings.json directamente o pídeselo a Context."}),s[32]=S):S=s[32],s[33]!==b||s[34]!==M||s[35]!==y?(D=n(r,{flexDirection:"column",gap:1,children:[y,b,M,S]}),s[33]=b,s[34]=M,s[35]=y,s[36]=D):D=s[36],s[37]!==d||s[38]!==D?(N=e(c,{title:"Hook details",onCancel:d,inputGuide:_temp,children:D}),s[37]=d,s[38]=D,s[39]=N):N=s[39],N}function _temp(){return e(i,{children:"Esc para volver"})}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as n,jsx as e}from"react/jsx-runtime";import r from"figures";import{useCallback as
|
|
1
|
+
import{jsxs as n,jsx as e}from"react/jsx-runtime";import r from"figures";import{useCallback as t,useEffect as i,useRef as o,useState as c}from"react";import{Box as l,color as a,Link as s,Text as d,useTheme as u}from"../../ink.js";import{useKeybinding as m}from"../../keybindings/useKeybinding.js";import{AuthenticationCancelledError as h,performMCPOAuthFlow as f}from"../../services/mcp/auth.js";import{capitalize as p}from"../../utils/stringUtils.js";import{ConfigurableShortcutHint as g}from"../ConfigurableShortcutHint.js";import{Select as b}from"../CustomSelect/index.js";import{Byline as y}from"../design-system/Byline.js";import{Dialog as C}from"../design-system/Dialog.js";import{KeyboardShortcutHint as v}from"../design-system/KeyboardShortcutHint.js";import{Spinner as j}from"../Spinner.js";export function MCPAgentServerMenu({agentServer:A,onCancel:w,onComplete:x}){const[k]=u(),[S,E]=c(!1),[U,D]=c(null),[R,L]=c(null),M=o(null);i(()=>()=>M.current?.abort(),[]);const P=t(()=>{S&&(M.current?.abort(),M.current=null,E(!1),L(null))},[S]);m("confirm:no",P,{context:"Confirmation",isActive:S});const T=t(async()=>{if(!A.needsAuth||!A.url)return;E(!0),D(null);const n=new AbortController;M.current=n;try{const e={type:A.transport,url:A.url};await f(A.name,e,L,n.signal),x?.(`Authentication successful for ${A.name}. The server will connect when the agent runs.`)}catch(n){n instanceof Error&&!(n instanceof h)&&D(n.message)}finally{E(!1),M.current=null}},[A,x]),B=p(String(A.name));if(S)return n(l,{flexDirection:"column",gap:1,padding:1,children:[n(d,{color:"claude",children:["Autenticando con ",A.name,"…"]}),n(l,{children:[e(j,{}),e(d,{children:" A browser window will open for authentication"})]}),R&&n(l,{flexDirection:"column",children:[e(d,{dimColor:!0,children:"If your browser doesn't open automatically, copy this URL manually:"}),e(s,{url:R})]}),e(l,{marginLeft:3,children:n(d,{dimColor:!0,children:["Return here after authenticating in your browser."," ",e(g,{action:"confirm:no",context:"Confirmation",fallback:"Esc",description:"volver"})]})})]});const H=[];return A.needsAuth&&H.push({label:A.isAuthenticated?"Re-authenticate":"Authenticate",value:"auth"}),H.push({label:"Back",value:"back"}),n(C,{title:`${B} MCP Server`,subtitle:"agent-only",onCancel:w,inputGuide:r=>r.pending?n(d,{children:["Presiona ",r.keyName," de nuevo para salir"]}):n(y,{children:[e(v,{shortcut:"↑↓",action:"navegar"}),e(v,{shortcut:"Enter",action:"confirmar"}),e(g,{action:"confirm:no",context:"Confirmation",fallback:"Esc",description:"volver"})]}),children:[n(l,{flexDirection:"column",gap:0,children:[n(l,{children:[e(d,{bold:!0,children:"Type: "}),e(d,{dimColor:!0,children:A.transport})]}),A.url&&n(l,{children:[e(d,{bold:!0,children:"URL: "}),e(d,{dimColor:!0,children:A.url})]}),A.command&&n(l,{children:[e(d,{bold:!0,children:"Command: "}),e(d,{dimColor:!0,children:A.command})]}),n(l,{children:[e(d,{bold:!0,children:"Used by: "}),e(d,{dimColor:!0,children:A.sourceAgents.join(", ")})]}),n(l,{marginTop:1,children:[e(d,{bold:!0,children:"Status: "}),n(d,{children:[a("inactive",k)(r.radioOff)," not connected (agent-only)"]})]}),A.needsAuth&&n(l,{children:[e(d,{bold:!0,children:"Auth: "}),A.isAuthenticated?n(d,{children:[a("success",k)(r.tick)," authenticated"]}):n(d,{children:[a("warning",k)(r.triangleUpOutline)," may need authentication"]})]})]}),e(l,{children:e(d,{dimColor:!0,children:"Este servidor solo se conecta al ejecutar el agente."})}),U&&e(l,{children:n(d,{color:"error",children:["Error: ",U]})}),e(l,{children:e(b,{options:H,onChange:async n=>{switch(n){case"auth":await T();break;case"back":w()}},onCancel:w})})]})}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export function handleReconnectResult(e,
|
|
1
|
+
export function handleReconnectResult(e,c){switch(e.client.type){case"connected":return{message:`Reconectado con ${c}.`,success:!0};case"needs-auth":return{message:`${c} requiere autenticación. Usa la opción 'Autenticar'.`,success:!1};case"failed":return{message:`Error al reconectar con ${c}.`,success:!1};default:return{message:`Resultado desconocido al reconectar con ${c}.`,success:!1}}}export function handleReconnectError(e,c){return`Error reconnecting to ${c}: ${e instanceof Error?e.message:String(e)}`}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{feature as e}from"../../recovery/bunBundleShim.js";import{jsxs as t,jsx as o}from"react/jsx-runtime";import{createRequire as r}from"module";const n=r(import.meta.url);import{c as
|
|
1
|
+
import{feature as e}from"../../recovery/bunBundleShim.js";import{jsxs as t,jsx as o}from"react/jsx-runtime";import{createRequire as r}from"module";const n=r(import.meta.url);import{c as i}from"react/compiler-runtime";import m from"chalk";import{mkdir as s}from"fs/promises";import{join as a}from"path";import{use as l,useEffect as c,useState as p}from"react";import{getOriginalCwd as u}from"../../bootstrap/state.js";import{useExitOnCtrlCDWithKeybindings as d}from"../../hooks/useExitOnCtrlCDWithKeybindings.js";import{Box as f,Text as h}from"../../ink.js";import{useKeybinding as y}from"../../keybindings/useKeybinding.js";import{getAutoMemPath as _,isAutoMemoryEnabled as g}from"../../memdir/paths.js";import{logEvent as j}from"../../services/analytics/index.js";import{isAutoDreamEnabled as b}from"../../services/autoDream/config.js";import{readLastConsolidatedAt as v}from"../../services/autoDream/consolidationLock.js";import{useAppState as x}from"../../state/AppState.js";import{getAgentMemoryDir as A}from"../../tools/AgentTool/agentMemory.js";import{openPath as C}from"../../utils/browser.js";import{getMemoryFiles as M}from"../../utils/claudemd.js";import{getClaudeConfigHomeDir as S}from"../../utils/envUtils.js";import{getDisplayPath as D}from"../../utils/file.js";import{formatRelativeTimeAgo as $}from"../../utils/format.js";import{projectIsInGitRepo as E}from"../../utils/memory/versions.js";import{updateSettingsForSource as U}from"../../utils/settings/settings.js";import{Select as T}from"../CustomSelect/index.js";import{ListItem as k}from"../design-system/ListItem.js";const L=e("TEAMMEM")?n("../../memdir/teamMemPaths.js"):null;let F;const P="__open_folder__";export function MemoryFileSelector(r){const n=i(58),{onSelect:w,onCancel:N}=r,O=l(M()),B=a(S(),"CLAUDE.md"),I=a(u(),"CLAUDE.md"),K=O.some(e=>e.path===B),W=O.some(e=>e.path===I),q=[...O.filter(_temp).map(_temp2),...K?[]:[{path:B,type:"User",content:"",exists:!1}],...W?[]:[{path:I,type:"Project",content:"",exists:!1}]],V=new Map,z=q.map(e=>{const t=D(e.path),o=e.exists?"":" (new)",r=e.parent?(V.get(e.parent)??0)+1:0;V.set(e.path,r);const n=r>0?" ".repeat(r-1):"";let i,m;i="User"!==e.type||e.isNested||e.path!==B?"Project"!==e.type||e.isNested||e.path!==I?r>0?`${n}L ${t}${o}`:`${t}`:"Project memory":"User memory";const s=E(u());return m="User"!==e.type||e.isNested?"Project"!==e.type||e.isNested||e.path!==I?e.parent?"@-imported":e.isNested?"dynamically loaded":"":(s?"Checked in at":"Saved in")+" ./CLAUDE.md":"Saved in ~/.context/CLAUDE.md",{label:i,value:e.path,description:m}}),G=[],H=x(_temp3);if(g()){let t;if(n[0]===Symbol.for("react.memo_cache_sentinel")?(t={label:"Abrir carpeta de auto-memoria",value:`${P}${_()}`,description:""},n[0]=t):t=n[0],G.push(t),e("TEAMMEM")&&L.isTeamMemoryEnabled()){let e;n[1]===Symbol.for("react.memo_cache_sentinel")?(e={label:"Abrir carpeta de memoria del equipo",value:`${P}${L.getTeamMemPath()}`,description:""},n[1]=e):e=n[1],G.push(e)}for(const e of H.activeAgents)if(e.memory){const t=A(e.agentType,e.memory);G.push({label:`Open ${m.bold(e.agentType)} agent memory`,value:`${P}${t}`,description:`${e.memory} scope`})}}let J;z.push(...G),n[2]!==z?(J=F&&z.some(_temp4)?F:z[0]?.value||"",n[2]=z,n[3]=J):J=n[3];const Q=J,[R,X]=p(g),[Y,Z]=p(b),[ee]=p(g),te=x(_temp6),[oe,re]=p(null);let ne,ie,me;n[4]!==ee?(ne=()=>{ee&&v().then(re)},n[4]=ee,n[5]=ne):ne=n[5],n[6]!==te||n[7]!==ee?(ie=[ee,te],n[6]=te,n[7]=ee,n[8]=ie):ie=n[8],c(ne,ie),n[9]!==te||n[10]!==oe?(me=te?"running":null===oe?"":0===oe?"never":`last ran ${$(new Date(oe))}`,n[9]=te,n[10]=oe,n[11]=me):me=n[11];const se=me,[ae,le]=p(null),ce=null!==ae,pe=ee?1:0;let ue;n[12]!==R?(ue=function(){const e=!R;U("userSettings",{autoMemoryEnabled:e}),X(e),j("tengu_auto_memory_toggled",{enabled:e})},n[12]=R,n[13]=ue):ue=n[13];const de=ue;let fe;n[14]!==Y?(fe=function(){const e=!Y;U("userSettings",{autoDreamEnabled:e}),Z(e),j("tengu_auto_dream_toggled",{enabled:e})},n[14]=Y,n[15]=fe):fe=n[15];const he=fe;let ye,_e,ge,je,be,ve,xe;d(),n[16]===Symbol.for("react.memo_cache_sentinel")?(ye={context:"Confirmation"},n[16]=ye):ye=n[16],y("confirm:no",N,ye),n[17]!==ae||n[18]!==he||n[19]!==de?(_e=()=>{0===ae?de():1===ae&&he()},n[17]=ae,n[18]=he,n[19]=de,n[20]=_e):_e=n[20],n[21]!==ce?(ge={context:"Confirmation",isActive:ce},n[21]=ce,n[22]=ge):ge=n[22],y("confirm:yes",_e,ge),n[23]!==pe?(je=()=>{le(e=>null!==e&&e<pe?e+1:null)},n[23]=pe,n[24]=je):je=n[24],n[25]!==ce?(be={context:"Select",isActive:ce},n[25]=ce,n[26]=be):be=n[26],y("select:next",je,be),n[27]===Symbol.for("react.memo_cache_sentinel")?(ve=()=>{le(_temp7)},n[27]=ve):ve=n[27],n[28]!==ce?(xe={context:"Select",isActive:ce},n[28]=ce,n[29]=xe):xe=n[29],y("select:previous",ve,xe);const Ae=0===ae,Ce=R?"on":"off";let Me,Se,De,$e,Ee,Ue,Te,ke;return n[30]!==Ce?(Me=t(h,{children:["Auto-memory: ",Ce]}),n[30]=Ce,n[31]=Me):Me=n[31],n[32]!==Ae||n[33]!==Me?(Se=o(k,{isFocused:Ae,children:Me}),n[32]=Ae,n[33]=Me,n[34]=Se):Se=n[34],n[35]!==Y||n[36]!==se||n[37]!==ae||n[38]!==te||n[39]!==ee?(De=ee&&o(k,{isFocused:1===ae,styled:!1,children:t(h,{color:1===ae?"suggestion":void 0,children:["Auto-dream: ",Y?"on":"off",se&&t(h,{dimColor:!0,children:[" · ",se]}),!te&&Y&&o(h,{dimColor:!0,children:" · /dream to run"})]})}),n[35]=Y,n[36]=se,n[37]=ae,n[38]=te,n[39]=ee,n[40]=De):De=n[40],n[41]!==Se||n[42]!==De?($e=t(f,{flexDirection:"column",marginBottom:1,children:[Se,De]}),n[41]=Se,n[42]=De,n[43]=$e):$e=n[43],n[44]!==w?(Ee=e=>{if(e.startsWith(P)){const t=e.slice(15);return void s(t,{recursive:!0}).catch(_temp8).then(()=>C(t))}F=e,w(e)},n[44]=w,n[45]=Ee):Ee=n[45],n[46]!==pe?(Ue=()=>le(pe),n[46]=pe,n[47]=Ue):Ue=n[47],n[48]!==Q||n[49]!==z||n[50]!==N||n[51]!==Ee||n[52]!==Ue||n[53]!==ce?(Te=o(T,{defaultFocusValue:Q,options:z,isDisabled:ce,onChange:Ee,onCancel:N,onUpFromFirstItem:Ue}),n[48]=Q,n[49]=z,n[50]=N,n[51]=Ee,n[52]=Ue,n[53]=ce,n[54]=Te):Te=n[54],n[55]!==$e||n[56]!==Te?(ke=t(f,{flexDirection:"column",width:"100%",children:[$e,Te]}),n[55]=$e,n[56]=Te,n[57]=ke):ke=n[57],ke}function _temp8(){}function _temp7(e){return null!==e&&e>0?e-1:e}function _temp6(e){return Object.values(e.tasks).some(_temp5)}function _temp5(e){return"dream"===e.type&&"running"===e.status}function _temp4(e){return e.value===F}function _temp3(e){return e.agentDefinitions}function _temp2(e){return{...e,exists:!0}}function _temp(e){return"AutoMem"!==e.type&&"TeamMem"!==e.type}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as r,Fragment as o}from"react/jsx-runtime";import{c as t}from"react/compiler-runtime";import{useContext as n}from"react";import{ERROR_MESSAGE_USER_ABORT as i}from"../../services/compact/compact.js";import{isRateLimitErrorMessage as c}from"../../services/rateLimitMessages.js";import{BLACK_CIRCLE as l}from"../../constants/figures.js";import{Box as s,NoSelect as m,Text as a}from"../../ink.js";import{API_ERROR_MESSAGE_PREFIX as h,API_TIMEOUT_ERROR_MESSAGE as d,CREDIT_BALANCE_TOO_LOW_ERROR_MESSAGE as f,CUSTOM_OFF_SWITCH_MESSAGE as u,INVALID_API_KEY_ERROR_MESSAGE as p,INVALID_API_KEY_ERROR_MESSAGE_EXTERNAL as g,ORG_DISABLED_ERROR_MESSAGE_ENV_KEY as _,ORG_DISABLED_ERROR_MESSAGE_ENV_KEY_WITH_OAUTH as y,PROMPT_TOO_LONG_ERROR_MESSAGE as j,startsWithApiErrorPrefix as x,TOKEN_REVOKED_ERROR_MESSAGE as S}from"../../services/api/errors.js";import{isEmptyMessageText as b,NO_RESPONSE_REQUESTED as M}from"../../utils/messages.js";import{getUpgradeMessage as w}from"../../utils/model/contextWindowUpgradeCheck.js";import{getDefaultSonnetModel as I,renderModelName as O}from"../../utils/model/model.js";import{isMacOsKeychainLocked as T}from"../../utils/secureStorage/macOsKeychainStorage.js";import{CtrlOToExpand as v}from"../CtrlOToExpand.js";import{InterruptedByUser as A}from"../InterruptedByUser.js";import{Markdown as k}from"../Markdown.js";import{MessageResponse as C}from"../MessageResponse.js";import{MessageActionsSelectedContext as D}from"../messageActions.js";import{RateLimitMessage as E}from"./RateLimitMessage.js";function InvalidApiKeyMessage(){const o=t(2);let n;o[0]===Symbol.for("react.memo_cache_sentinel")?(n=T(),o[0]=n):n=o[0];const i=n;let c;return o[1]===Symbol.for("react.memo_cache_sentinel")?(c=e(C,{children:r(s,{flexDirection:"column",children:[e(a,{color:"error",children:p}),i&&e(a,{dimColor:!0,children:"· Run in another terminal: security unlock-keychain"})]})}),o[1]=c):c=o[1],c}export function AssistantTextMessage(T){const L=t(34),{param:R,addMargin:U,shouldShowDot:P,verbose:K,onOpenRateLimitOptions:
|
|
1
|
+
import{jsx as e,jsxs as r,Fragment as o}from"react/jsx-runtime";import{c as t}from"react/compiler-runtime";import{useContext as n}from"react";import{ERROR_MESSAGE_USER_ABORT as i}from"../../services/compact/compact.js";import{isRateLimitErrorMessage as c}from"../../services/rateLimitMessages.js";import{BLACK_CIRCLE as l}from"../../constants/figures.js";import{Box as s,NoSelect as m,Text as a}from"../../ink.js";import{API_ERROR_MESSAGE_PREFIX as h,API_TIMEOUT_ERROR_MESSAGE as d,CREDIT_BALANCE_TOO_LOW_ERROR_MESSAGE as f,CUSTOM_OFF_SWITCH_MESSAGE as u,INVALID_API_KEY_ERROR_MESSAGE as p,INVALID_API_KEY_ERROR_MESSAGE_EXTERNAL as g,ORG_DISABLED_ERROR_MESSAGE_ENV_KEY as _,ORG_DISABLED_ERROR_MESSAGE_ENV_KEY_WITH_OAUTH as y,PROMPT_TOO_LONG_ERROR_MESSAGE as j,startsWithApiErrorPrefix as x,TOKEN_REVOKED_ERROR_MESSAGE as S}from"../../services/api/errors.js";import{isEmptyMessageText as b,NO_RESPONSE_REQUESTED as M}from"../../utils/messages.js";import{getUpgradeMessage as w}from"../../utils/model/contextWindowUpgradeCheck.js";import{getDefaultSonnetModel as I,renderModelName as O}from"../../utils/model/model.js";import{isMacOsKeychainLocked as T}from"../../utils/secureStorage/macOsKeychainStorage.js";import{CtrlOToExpand as v}from"../CtrlOToExpand.js";import{InterruptedByUser as A}from"../InterruptedByUser.js";import{Markdown as k}from"../Markdown.js";import{MessageResponse as C}from"../MessageResponse.js";import{MessageActionsSelectedContext as D}from"../messageActions.js";import{RateLimitMessage as E}from"./RateLimitMessage.js";function InvalidApiKeyMessage(){const o=t(2);let n;o[0]===Symbol.for("react.memo_cache_sentinel")?(n=T(),o[0]=n):n=o[0];const i=n;let c;return o[1]===Symbol.for("react.memo_cache_sentinel")?(c=e(C,{children:r(s,{flexDirection:"column",children:[e(a,{color:"error",children:p}),i&&e(a,{dimColor:!0,children:"· Run in another terminal: security unlock-keychain"})]})}),o[1]=c):c=o[1],c}export function AssistantTextMessage(T){const L=t(34),{param:R,addMargin:U,shouldShowDot:P,verbose:K,onOpenRateLimitOptions:B}=T,{text:W}=R,$=n(D);if(b(W))return null;if(c(W)){let r;return L[0]!==B||L[1]!==W?(r=e(E,{text:W,onOpenRateLimitOptions:B}),L[0]=B,L[1]=W,L[2]=r):r=L[2],r}switch(W){case M:return null;case j:{let o;L[3]===Symbol.for("react.memo_cache_sentinel")?(o=w("warning"),L[3]=o):o=L[3];const t=o;let n;return L[4]===Symbol.for("react.memo_cache_sentinel")?(n=e(C,{height:1,children:r(a,{color:"error",children:["Context limit reached · /compact or /clear to continue",t?` · ${t}`:""]})}),L[4]=n):n=L[4],n}case f:{let r;return L[5]===Symbol.for("react.memo_cache_sentinel")?(r=e(C,{height:1,children:e(a,{color:"error",children:"Credit balance too low · Add funds: https://platform.claude.com/settings/billing"})}),L[5]=r):r=L[5],r}case p:{let r;return L[6]===Symbol.for("react.memo_cache_sentinel")?(r=e(InvalidApiKeyMessage,{}),L[6]=r):r=L[6],r}case g:{let r;return L[7]===Symbol.for("react.memo_cache_sentinel")?(r=e(C,{height:1,children:e(a,{color:"error",children:g})}),L[7]=r):r=L[7],r}case _:case y:{let r;return L[8]!==W?(r=e(C,{children:e(a,{color:"error",children:W})}),L[8]=W,L[9]=r):r=L[9],r}case S:{let r;return L[10]===Symbol.for("react.memo_cache_sentinel")?(r=e(C,{height:1,children:e(a,{color:"error",children:S})}),L[10]=r):r=L[10],r}case d:{let t;return L[11]===Symbol.for("react.memo_cache_sentinel")?(t=e(C,{height:1,children:r(a,{color:"error",children:[d,process.env.API_TIMEOUT_MS&&r(o,{children:[" ","(API_TIMEOUT_MS=",process.env.API_TIMEOUT_MS,"ms, try increasing it)"]})]})}),L[11]=t):t=L[11],t}case u:{let o,t;return L[12]===Symbol.for("react.memo_cache_sentinel")?(o=e(a,{color:"error",children:"Estamos experimentando alta demanda para Opus 4."}),L[12]=o):o=L[12],L[13]===Symbol.for("react.memo_cache_sentinel")?(t=e(C,{children:r(s,{flexDirection:"column",gap:1,children:[o,r(a,{children:["To continue immediately, use /model to switch to"," ",O(I())," and continue coding."]})]})}),L[13]=t):t=L[13],t}case i:{let r;return L[14]===Symbol.for("react.memo_cache_sentinel")?(r=e(C,{height:1,children:e(A,{})}),L[14]=r):r=L[14],r}default:{if(x(W)){const o=!K&&W.length>1e3,t=W===h?`${h}: Please wait a moment and try again.`:o?W.slice(0,1e3)+"…":W;let n,i,c;return L[15]!==t?(n=e(a,{color:"error",children:t}),L[15]=t,L[16]=n):n=L[16],L[17]!==o?(i=o&&e(v,{}),L[17]=o,L[18]=i):i=L[18],L[19]!==n||L[20]!==i?(c=e(C,{children:r(s,{flexDirection:"column",children:[n,i]})}),L[19]=n,L[20]=i,L[21]=c):c=L[21],c}const o=U?1:0,t=$?"messageActionsBackground":void 0;let n,i,c,d;return L[22]!==$||L[23]!==P?(n=P&&e(m,{fromLeftEdge:!0,minWidth:2,children:e(a,{color:$?"suggestion":"text",children:l})}),L[22]=$,L[23]=P,L[24]=n):n=L[24],L[25]!==W?(i=e(s,{flexDirection:"column",children:e(k,{children:W})}),L[25]=W,L[26]=i):i=L[26],L[27]!==n||L[28]!==i?(c=r(s,{flexDirection:"row",children:[n,i]}),L[27]=n,L[28]=i,L[29]=c):c=L[29],L[30]!==o||L[31]!==t||L[32]!==c?(d=e(s,{alignItems:"flex-start",flexDirection:"row",justifyContent:"space-between",marginTop:o,width:"100%",backgroundColor:t,children:c}),L[30]=o,L[31]=t,L[32]=c,L[33]=d):d=L[33],d}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as e,jsx as r}from"react/jsx-runtime";import{c as o}from"react/compiler-runtime";import{Markdown as n}from"../Markdown.js";import{Box as t,Text as l}from"../../ink.js";import{jsonParse as a}from"../../utils/slowOperations.js";import{isIdleNotification as i,isPlanApprovalRequest as d,isPlanApprovalResponse as s}from"../../utils/teammateMailbox.js";import{getShutdownMessageSummary as c}from"./ShutdownMessage.js";import{getTaskAssignmentSummary as m}from"./TaskAssignmentMessage.js";export function PlanApprovalRequestDisplay(a){const i=o(10),{request:d}=a;let s,c,m,p;return i[0]!==d.from?(s=r(t,{marginBottom:1,children:e(l,{color:"planMode",bold:!0,children:["Plan Approval Request from ",d.from]})}),i[0]=d.from,i[1]=s):s=i[1],i[2]!==d.planContent?(c=r(t,{borderStyle:"dashed",borderColor:"subtle",borderLeft:!1,borderRight:!1,flexDirection:"column",paddingX:1,marginBottom:1,children:r(n,{children:d.planContent})}),i[2]=d.planContent,i[3]=c):c=i[3],i[4]!==d.planFilePath?(m=e(l,{dimColor:!0,children:["Plan file: ",d.planFilePath]}),i[4]=d.planFilePath,i[5]=m):m=i[5],i[6]!==s||i[7]!==c||i[8]!==m?(p=r(t,{flexDirection:"column",marginY:1,children:e(t,{borderStyle:"round",borderColor:"planMode",flexDirection:"column",paddingX:1,children:[s,c,m]})}),i[6]=s,i[7]=c,i[8]=m,i[9]=p):p=i[9],p}export function PlanApprovalResponseDisplay(n){const a=o(13),{response:i,senderName:d}=n;if(i.approved){let o,n,i;return a[0]!==d?(o=r(t,{children:e(l,{color:"success",bold:!0,children:["✓ Plan Approved by ",d]})}),a[0]=d,a[1]=o):o=a[1],a[2]===Symbol.for("react.memo_cache_sentinel")?(n=r(t,{marginTop:1,children:r(l,{children:"
|
|
1
|
+
import{jsxs as e,jsx as r}from"react/jsx-runtime";import{c as o}from"react/compiler-runtime";import{Markdown as n}from"../Markdown.js";import{Box as t,Text as l}from"../../ink.js";import{jsonParse as a}from"../../utils/slowOperations.js";import{isIdleNotification as i,isPlanApprovalRequest as d,isPlanApprovalResponse as s}from"../../utils/teammateMailbox.js";import{getShutdownMessageSummary as c}from"./ShutdownMessage.js";import{getTaskAssignmentSummary as m}from"./TaskAssignmentMessage.js";export function PlanApprovalRequestDisplay(a){const i=o(10),{request:d}=a;let s,c,m,p;return i[0]!==d.from?(s=r(t,{marginBottom:1,children:e(l,{color:"planMode",bold:!0,children:["Plan Approval Request from ",d.from]})}),i[0]=d.from,i[1]=s):s=i[1],i[2]!==d.planContent?(c=r(t,{borderStyle:"dashed",borderColor:"subtle",borderLeft:!1,borderRight:!1,flexDirection:"column",paddingX:1,marginBottom:1,children:r(n,{children:d.planContent})}),i[2]=d.planContent,i[3]=c):c=i[3],i[4]!==d.planFilePath?(m=e(l,{dimColor:!0,children:["Plan file: ",d.planFilePath]}),i[4]=d.planFilePath,i[5]=m):m=i[5],i[6]!==s||i[7]!==c||i[8]!==m?(p=r(t,{flexDirection:"column",marginY:1,children:e(t,{borderStyle:"round",borderColor:"planMode",flexDirection:"column",paddingX:1,children:[s,c,m]})}),i[6]=s,i[7]=c,i[8]=m,i[9]=p):p=i[9],p}export function PlanApprovalResponseDisplay(n){const a=o(13),{response:i,senderName:d}=n;if(i.approved){let o,n,i;return a[0]!==d?(o=r(t,{children:e(l,{color:"success",bold:!0,children:["✓ Plan Approved by ",d]})}),a[0]=d,a[1]=o):o=a[1],a[2]===Symbol.for("react.memo_cache_sentinel")?(n=r(t,{marginTop:1,children:r(l,{children:"Ahora puedes proceder con la implementación. Las restricciones del modo plan han sido removidas."})}),a[2]=n):n=a[2],a[3]!==o?(i=r(t,{flexDirection:"column",marginY:1,children:e(t,{borderStyle:"round",borderColor:"success",flexDirection:"column",paddingX:1,paddingY:1,children:[o,n]})}),a[3]=o,a[4]=i):i=a[4],i}let s,c,m,p;return a[5]!==d?(s=r(t,{children:e(l,{color:"error",bold:!0,children:["✗ Plan Rejected by ",d]})}),a[5]=d,a[6]=s):s=a[6],a[7]!==i.feedback?(c=i.feedback&&r(t,{marginTop:1,borderStyle:"dashed",borderColor:"subtle",borderLeft:!1,borderRight:!1,paddingX:1,children:e(l,{children:["Feedback: ",i.feedback]})}),a[7]=i.feedback,a[8]=c):c=a[8],a[9]===Symbol.for("react.memo_cache_sentinel")?(m=r(t,{marginTop:1,children:r(l,{dimColor:!0,children:"Please revise your plan based on the feedback and call ExitPlanMode again."})}),a[9]=m):m=a[9],a[10]!==s||a[11]!==c?(p=r(t,{flexDirection:"column",marginY:1,children:e(t,{borderStyle:"round",borderColor:"error",flexDirection:"column",paddingX:1,paddingY:1,children:[s,c,m]})}),a[10]=s,a[11]=c,a[12]=p):p=a[12],p}export function tryRenderPlanApprovalMessage(e,o){const n=d(e);if(n)return r(PlanApprovalRequestDisplay,{request:n});const t=s(e);return t?r(PlanApprovalResponseDisplay,{response:t,senderName:o}):null}export function formatTeammateMessageContent(e){const r=function(e){const r=d(e);if(r)return`[Plan Approval Request from ${r.from}]`;const o=s(e);return o?o.approved?"[Plan Approved] You can now proceed with implementation":`[Plan Rejected] ${o.feedback||"Please revise your plan"}`:null}(e);if(r)return r;const o=c(e);if(o)return o;const n=i(e);if(n)return function(e){const r=["Agent idle"];if(e.completedTaskId){const o=e.completedStatus||"completed";r.push(`Task ${e.completedTaskId} ${o}`)}return e.summary&&r.push(`Last DM: ${e.summary}`),r.join(" · ")}(n);const t=m(e);if(t)return t;try{const r=a(e);if("teammate_terminated"===r?.type&&r.message)return r.message}catch{}return e}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as e,jsx as r}from"react/jsx-runtime";import{c as o}from"react/compiler-runtime";import{Box as n,Text as t}from"../../ink.js";import{isShutdownApproved as i,isShutdownRejected as d,isShutdownRequest as s}from"../../utils/teammateMailbox.js";export function ShutdownRequestDisplay(i){const d=o(7),{request:s}=i;let l,
|
|
1
|
+
import{jsxs as e,jsx as r}from"react/jsx-runtime";import{c as o}from"react/compiler-runtime";import{Box as n,Text as t}from"../../ink.js";import{isShutdownApproved as i,isShutdownRejected as d,isShutdownRequest as s}from"../../utils/teammateMailbox.js";export function ShutdownRequestDisplay(i){const d=o(7),{request:s}=i;let l,a,c;return d[0]!==s.from?(l=r(n,{marginBottom:1,children:e(t,{color:"warning",bold:!0,children:["Shutdown request from ",s.from]})}),d[0]=s.from,d[1]=l):l=d[1],d[2]!==s.reason?(a=s.reason&&r(n,{children:e(t,{children:["Reason: ",s.reason]})}),d[2]=s.reason,d[3]=a):a=d[3],d[4]!==l||d[5]!==a?(c=r(n,{flexDirection:"column",marginY:1,children:e(n,{borderStyle:"round",borderColor:"warning",flexDirection:"column",paddingX:1,paddingY:1,children:[l,a]})}),d[4]=l,d[5]=a,d[6]=c):c=d[6],c}export function ShutdownRejectedDisplay(i){const d=o(8),{response:s}=i;let l,a,c,u;return d[0]!==s.from?(l=e(t,{color:"subtle",bold:!0,children:["Shutdown rejected by ",s.from]}),d[0]=s.from,d[1]=l):l=d[1],d[2]!==s.reason?(a=r(n,{marginTop:1,borderStyle:"dashed",borderColor:"subtle",borderLeft:!1,borderRight:!1,paddingX:1,children:e(t,{children:["Reason: ",s.reason]})}),d[2]=s.reason,d[3]=a):a=d[3],d[4]===Symbol.for("react.memo_cache_sentinel")?(c=r(n,{marginTop:1,children:r(t,{dimColor:!0,children:"El compañero sigue trabajando. Puedes solicitar el apagado más tarde."})}),d[4]=c):c=d[4],d[5]!==l||d[6]!==a?(u=r(n,{flexDirection:"column",marginY:1,children:e(n,{borderStyle:"round",borderColor:"subtle",flexDirection:"column",paddingX:1,paddingY:1,children:[l,a,c]})}),d[5]=l,d[6]=a,d[7]=u):u=d[7],u}export function tryRenderShutdownMessage(e){const o=s(e);if(o)return r(ShutdownRequestDisplay,{request:o});if(i(e))return null;const n=d(e);return n?r(ShutdownRejectedDisplay,{response:n}):null}export function getShutdownMessageSummary(e){const r=s(e);if(r)return`[Shutdown Request from ${r.from}]${r.reason?` ${r.reason}`:""}`;const o=i(e);if(o)return`[Shutdown Approved] ${o.from} is now exiting`;const n=d(e);return n?`[Shutdown Rejected] ${n.from}: ${n.reason}`:null}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as r}from"react/jsx-runtime";import{c as
|
|
1
|
+
import{jsx as e,jsxs as r}from"react/jsx-runtime";import{c as o}from"react/compiler-runtime";import{useState as t}from"react";import{Box as s,Text as n}from"../../ink.js";import{formatAPIError as m}from"../../services/api/errorUtils.js";import{useInterval as i}from"usehooks-ts";import{CtrlOToExpand as c}from"../CtrlOToExpand.js";import{MessageResponse as l}from"../MessageResponse.js";export function SystemAPIErrorMessage(a){const p=o(33),{message:u,verbose:f}=a,{retryAttempt:M,error:d,retryInMs:_,maxRetries:h}=u,x=M<4,[I,j]=t(0),T=I>=_;let g,A;if(p[0]===Symbol.for("react.memo_cache_sentinel")?(g=()=>j(_temp),p[0]=g):g=p[0],i(g,x||T?null:1e3),x)return null;p[1]!==I||p[2]!==_?(A=Math.round((_-I)/1e3),p[1]=I,p[2]=_,p[3]=A):A=p[3];const E=Math.max(0,A);let S,v,y,O,P,U,b,R,k;if(p[4]!==d||p[5]!==f){const e=m(d);b=!f&&e.length>1e3,y=l,v=s,U="column",S=n,O="error",P=b?e.slice(0,1e3)+"…":e,p[4]=d,p[5]=f,p[6]=S,p[7]=v,p[8]=y,p[9]=O,p[10]=P,p[11]=U,p[12]=b}else S=p[6],v=p[7],y=p[8],O=p[9],P=p[10],U=p[11],b=p[12];p[13]!==S||p[14]!==O||p[15]!==P?(R=e(S,{color:O,children:P}),p[13]=S,p[14]=O,p[15]=P,p[16]=R):R=p[16],p[17]!==b?(k=b&&e(c,{}),p[17]=b,p[18]=k):k=p[18];const C=1===E?"segundo":"segundos";let D,$,q;return p[19]!==h||p[20]!==M||p[21]!==E||p[22]!==C?(D=r(n,{dimColor:!0,children:["Reintentando en ",E," ",C,"… (intento"," ",M,"/",h,")",process.env.API_TIMEOUT_MS?` · API_TIMEOUT_MS=${process.env.API_TIMEOUT_MS}ms, prueba aumentarlo`:""]}),p[19]=h,p[20]=M,p[21]=E,p[22]=C,p[23]=D):D=p[23],p[24]!==v||p[25]!==D||p[26]!==U||p[27]!==R||p[28]!==k?($=r(v,{flexDirection:U,children:[R,k,D]}),p[24]=v,p[25]=D,p[26]=U,p[27]=R,p[28]=k,p[29]=$):$=p[29],p[30]!==y||p[31]!==$?(q=e(y,{children:$}),p[30]=y,p[31]=$,p[32]=q):q=p[32],q}function _temp(e){return e+1e3}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as r,jsxs as o}from"react/jsx-runtime";import{c as e}from"react/compiler-runtime";import{Box as n,Text as t}from"../../ink.js";import{Markdown as
|
|
1
|
+
import{jsx as r,jsxs as o}from"react/jsx-runtime";import{c as e}from"react/compiler-runtime";import{Box as n,Text as t}from"../../ink.js";import{Markdown as a}from"../Markdown.js";export function UserPlanMessage(i){const l=e(6),{addMargin:m,planContent:c}=i,d=m?1:0;let s,p,f;return l[0]===Symbol.for("react.memo_cache_sentinel")?(s=r(n,{marginBottom:1,children:r(t,{bold:!0,color:"planMode",children:"Plan a implementar"})}),l[0]=s):s=l[0],l[1]!==c?(p=r(a,{children:c}),l[1]=c,l[2]=p):p=l[2],l[3]!==d||l[4]!==p?(f=o(n,{flexDirection:"column",borderStyle:"round",borderColor:"planMode",marginTop:d,paddingX:1,children:[s,p]}),l[3]=d,l[4]=p,l[5]=f):f=l[5],f}
|
package/dist/src/components/permissions/AskUserQuestionPermissionRequest/PreviewQuestionView.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as t,Fragment as n}from"react/jsx-runtime";import
|
|
1
|
+
import{jsx as e,jsxs as t,Fragment as n}from"react/jsx-runtime";import i from"figures";import{useCallback as o,useMemo as r,useRef as l,useState as a}from"react";import{useTerminalSize as s}from"../../../hooks/useTerminalSize.js";import{Box as c,Text as u}from"../../../ink.js";import{useKeybinding as p,useKeybindings as d}from"../../../keybindings/useKeybinding.js";import{useAppState as m}from"../../../state/AppState.js";import{getExternalEditor as f}from"../../../utils/editor.js";import{toIDEDisplayName as h}from"../../../utils/ide.js";import{editPromptInEditor as g}from"../../../utils/promptEditor.js";import{Divider as x}from"../../design-system/Divider.js";import v from"../../TextInput.js";import{PermissionRequestTitle as b}from"../PermissionRequestTitle.js";import{PreviewBox as y}from"./PreviewBox.js";import{QuestionNavigationBar as D}from"./QuestionNavigationBar.js";export function PreviewQuestionView({question:w,questions:k,currentQuestionIndex:T,answers:j,questionStates:C,hideSubmitTab:I=!1,minContentHeight:V,minContentWidth:q,onUpdateQuestionState:S,onAnswer:P,onTextInputFocus:A,onCancel:E,onTabPrev:Q,onTabNext:F,onRespondToClaude:N,onFinishPlanInterview:O}){const W="plan"===m(e=>e.toolPermissionContext.mode),[B,H]=a(!1),[K,R]=a(0),[U,z]=a(!1),[G,L]=a(0),M=f(),J=M?h(M):null,X=w.question,Y=C[X],Z=w.options,[$,_]=a(0),ee=l(X);if(ee.current!==X){ee.current=X;const e=Y?.selectedValue,t=e?Z.findIndex(t=>t.label===e):-1;_(t>=0?t:0)}const te=Z[$],ne=Y?.selectedValue,ie=Y?.textInputValue||"",oe=o(e=>{const t=Z[e];t&&(_(e),S(X,{selectedValue:t.label},!1),P(X,t.label))},[Z,X,S,P]),re=o(e=>{if(U)return;let t;t="number"==typeof e?e:"up"===e?$>0?$-1:$:$<Z.length-1?$+1:$,t>=0&&t<Z.length&&_(t)},[$,Z.length,U]);p("chat:externalEditor",async()=>{const e=Y?.textInputValue||"",t=await g(e);null!==t.content&&t.content!==e&&S(X,{textInputValue:t.content},!1)},{context:"Chat",isActive:U&&!!M}),d({"tabs:previous":()=>Q?.(),"tabs:next":()=>F?.()},{context:"Tabs",isActive:!U&&!B});const le=o(()=>{z(!1),A(!1),ne&&P(X,ne)},[ne,X,P,A]),ae=o(()=>{H(!0)},[]),se=o(()=>{H(!1)},[]),ce=o(e=>{if(B)return"up"===e.key||e.ctrl&&"p"===e.key?(e.preventDefault(),void(0===K?se():R(0))):"down"===e.key||e.ctrl&&"n"===e.key?(e.preventDefault(),void(W&&0===K&&R(1))):"return"===e.key?(e.preventDefault(),void(0===K?N():O())):void("escape"===e.key&&(e.preventDefault(),E()));if(U)"escape"===e.key&&(e.preventDefault(),le());else if("up"===e.key||e.ctrl&&"p"===e.key)e.preventDefault(),$>0&&re("up");else if("down"===e.key||e.ctrl&&"n"===e.key)e.preventDefault(),$===Z.length-1?ae():re("down");else if("return"===e.key)e.preventDefault(),oe($);else if("n"!==e.key||e.ctrl||e.meta){if("escape"===e.key)e.preventDefault(),E();else if(1===e.key.length&&e.key>="1"&&e.key<="9"){e.preventDefault();const t=parseInt(e.key,10)-1;t<Z.length&&re(t)}}else e.preventDefault(),z(!0),A(!0)},[B,K,W,U,$,Z.length,se,ae,re,oe,le,N,O,E,A]),ue=te?.preview||null,{columns:pe}=s(),de=pe-30-4,me=r(()=>V?Math.max(1,V-11):void 0,[V]);return t(c,{flexDirection:"column",marginTop:1,tabIndex:0,autoFocus:!0,onKeyDown:ce,children:[e(x,{color:"inactive"}),t(c,{flexDirection:"column",paddingTop:0,children:[e(D,{questions:k,currentQuestionIndex:T,answers:j,hideSubmitTab:I}),e(b,{title:w.question,color:"text"}),t(c,{flexDirection:"column",minHeight:V,children:[t(c,{marginTop:1,flexDirection:"row",gap:4,children:[e(c,{flexDirection:"column",width:30,children:Z.map((n,o)=>{const r=$===o,l=ne===n.label;return t(c,{flexDirection:"row",children:[e(u,r?{color:"suggestion",children:i.pointer}:{children:" "}),t(u,{dimColor:!0,children:[" ",o+1,"."]}),t(u,{color:l?"success":r?"suggestion":void 0,bold:r,children:[" ",n.label]}),l&&t(u,{color:"success",children:[" ",i.tick]})]},n.label)})}),t(c,{flexDirection:"column",flexGrow:1,children:[e(y,{content:ue||"No hay vista previa disponible",maxLines:me,minWidth:q,maxWidth:de}),t(c,{marginTop:1,flexDirection:"row",gap:1,children:[e(u,{color:"suggestion",children:"Notas:"}),U?e(v,{value:ie,placeholder:"Añadir notas sobre este diseño…",onChange:e=>{S(X,{textInputValue:e},!1)},onSubmit:le,onExit:le,focus:!0,showCursor:!0,columns:60,cursorOffset:G,onChangeCursorOffset:L}):e(u,{dimColor:!0,italic:!0,children:ie||"presiona n para añadir notas"})]})]})]}),t(c,{flexDirection:"column",marginTop:1,children:[e(x,{color:"inactive"}),t(c,{flexDirection:"row",gap:1,children:[e(u,B&&0===K?{color:"suggestion",children:i.pointer}:{children:" "}),e(u,{color:B&&0===K?"suggestion":void 0,children:"Chatear sobre esto"})]}),W&&t(c,{flexDirection:"row",gap:1,children:[e(u,B&&1===K?{color:"suggestion",children:i.pointer}:{children:" "}),e(u,{color:B&&1===K?"suggestion":void 0,children:"Omitir entrevista y planificar inmediatamente"})]})]}),e(c,{marginTop:1,children:t(u,{color:"inactive",dimColor:!0,children:["Enter para seleccionar · ",i.arrowUp,"/",i.arrowDown," para navegar · n para añadir notas",k.length>1&&e(n,{children:" · Tab para cambiar de pregunta"}),U&&J&&t(n,{children:[" · ctrl+g para editar en ",J]})," ","· Esc para cancelar"]})})]})]})]})}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as n}from"react/jsx-runtime";import{c as t}from"react/compiler-runtime";import{getSentinelCategory as
|
|
1
|
+
import{jsx as e,jsxs as n}from"react/jsx-runtime";import{c as t}from"react/compiler-runtime";import{getSentinelCategory as l}from"@ant/computer-use-mcp/sentinelApps";import{DEFAULT_GRANT_FLAGS as r}from"@ant/computer-use-mcp/types";import i from"figures";import{useState as o}from"react";import{Box as s,Text as c}from"../../../ink.js";import{execFileNoThrow as a}from"../../../utils/execFileNoThrow.js";import{plural as d}from"../../../utils/stringUtils.js";import{Select as p}from"../../CustomSelect/select.js";import{Dialog as m}from"../../design-system/Dialog.js";const u={granted:[],denied:[],flags:r};export function ComputerUseApproval(n){const l=t(3),{request:r,onDone:i}=n;let o;return l[0]!==i||l[1]!==r?(o=r.tccState?e(ComputerUseTccPanel,{tccState:r.tccState,onDone:()=>i(u)}):e(ComputerUseAppListPanel,{request:r,onDone:i}),l[0]=i,l[1]=r,l[2]=o):o=l[2],o}function ComputerUseTccPanel(l){const r=t(26),{tccState:o,onDone:d}=l;let u;if(r[0]!==o.accessibility||r[1]!==o.screenRecording){if(u=[],!o.accessibility){let e;r[3]===Symbol.for("react.memo_cache_sentinel")?(e={label:"Open System Settings → Accessibility",value:"open_accessibility"},r[3]=e):e=r[3],u.push(e)}if(!o.screenRecording){let e;r[4]===Symbol.for("react.memo_cache_sentinel")?(e={label:"Open System Settings → Screen Recording",value:"open_screen_recording"},r[4]=e):e=r[4],u.push(e)}let e;r[5]===Symbol.for("react.memo_cache_sentinel")?(e={label:"Reintentar",value:"retry"},r[5]=e):e=r[5],u.push(e),r[0]=o.accessibility,r[1]=o.screenRecording,r[2]=u}else u=r[2];const f=u;let h;r[6]!==d?(h=function(e){switch(e){case"open_accessibility":return void a("open",["x-apple.systempreferences:com.apple.preference.security?Privacy_Accessibility"],{useCwd:!1});case"open_screen_recording":return void a("open",["x-apple.systempreferences:com.apple.preference.security?Privacy_ScreenCapture"],{useCwd:!1});case"retry":return void d()}},r[6]=d,r[7]=h):h=r[7];const g=h,y=o.accessibility?`${i.tick} granted`:`${i.cross} not granted`;let b;r[8]!==y?(b=n(c,{children:["Accessibility:"," ",y]}),r[8]=y,r[9]=b):b=r[9];const _=o.screenRecording?`${i.tick} granted`:`${i.cross} not granted`;let C,v,w,S,x,D;return r[10]!==_?(C=n(c,{children:["Screen Recording:"," ",_]}),r[10]=_,r[11]=C):C=r[11],r[12]!==b||r[13]!==C?(v=n(s,{flexDirection:"column",children:[b,C]}),r[12]=b,r[13]=C,r[14]=v):v=r[14],r[15]===Symbol.for("react.memo_cache_sentinel")?(w=e(c,{dimColor:!0,children:'Otorga los permisos faltantes en Configuración del Sistema y luego selecciona "Reintentar". macOS puede requerir que reinicies Context Code tras otorgar la Grabación de Pantalla.'}),r[15]=w):w=r[15],r[16]!==g||r[17]!==d||r[18]!==f?(S=e(p,{options:f,onChange:g,onCancel:d}),r[16]=g,r[17]=d,r[18]=f,r[19]=S):S=r[19],r[20]!==v||r[21]!==S?(x=n(s,{flexDirection:"column",paddingX:1,paddingY:1,gap:1,children:[v,w,S]}),r[20]=v,r[21]=S,r[22]=x):x=r[22],r[23]!==d||r[24]!==x?(D=e(m,{title:"Computer Use needs macOS permissions",onCancel:d,children:x}),r[23]=d,r[24]=x,r[25]=D):D=r[25],D}const f={shell:"equivalent to shell access",filesystem:"can read/write any file",system_settings:"can change system settings"};function ComputerUseAppListPanel(a){const h=t(48),{request:g,onDone:y}=a;let b;h[0]!==g.apps?(b=()=>new Set(g.apps.flatMap(_temp)),h[0]=g.apps,h[1]=b):b=h[1];const[_]=o(b);let C;h[2]===Symbol.for("react.memo_cache_sentinel")?(C=["clipboardRead","clipboardWrite","systemKeyCombos"],h[2]=C):C=h[2];const v=C;let w;h[3]!==g.requestedFlags?(w=v.filter(e=>g.requestedFlags[e]),h[3]=g.requestedFlags,h[4]=w):w=h[4];const S=w,x=_.size;let D;h[5]!==_.size?(D=d(_.size,"app"),h[5]=_.size,h[6]=D):D=h[6];const q=`Allow for this session (${x} ${D})`;let I,A,j;h[7]!==q?(I={label:q,value:"allow_all"},h[7]=q,h[8]=I):I=h[8],h[9]===Symbol.for("react.memo_cache_sentinel")?(A={label:n(c,{children:["Deny, and tell Claude what to do differently ",e(c,{bold:!0,children:"(esc)"})]}),value:"deny"},h[9]=A):A=h[9],h[10]!==I?(j=[I,A],h[10]=I,h[11]=j):j=h[11];const R=j;let N;h[12]!==_||h[13]!==y||h[14]!==g.apps||h[15]!==S?(N=function(e){if(!e)return void y(u);const n=Date.now(),t=g.apps.flatMap(e=>e.resolved&&_.has(e.resolved.bundleId)?[{bundleId:e.resolved.bundleId,displayName:e.resolved.displayName,grantedAt:n}]:[]),l=g.apps.filter(e=>!e.resolved||!_.has(e.resolved.bundleId)).map(_temp2),i={...r,...Object.fromEntries(S.map(_temp3))};y({granted:t,denied:l,flags:i})},h[12]=_,h[13]=y,h[14]=g.apps,h[15]=S,h[16]=N):N=h[16];const U=N;let P,H,O,$,k,F,z,G,T,L,M;if(h[17]!==U?(P=()=>U(!1),h[17]=U,h[18]=P):P=h[18],h[19]!==g.reason?(H=g.reason?e(c,{dimColor:!0,children:g.reason}):null,h[19]=g.reason,h[20]=H):H=h[20],h[21]!==_||h[22]!==g.apps){let t;h[24]!==_?(t=t=>{const r=t.resolved;if(!r)return n(c,{dimColor:!0,children:[" ",i.circle," ",t.requestedName," ",e(c,{dimColor:!0,children:"(not installed)"})]},t.requestedName);if(t.alreadyGranted)return n(c,{dimColor:!0,children:[" ",i.tick," ",r.displayName," ",e(c,{dimColor:!0,children:"(already granted)"})]},r.bundleId);const o=l(r.bundleId),a=_.has(r.bundleId);return n(s,{flexDirection:"column",children:[n(c,{children:[" ",a?i.circleFilled:i.circle," ",r.displayName]}),o?n(c,{bold:!0,children:[" ",i.warning," ",f[o]]}):null]},r.bundleId)},h[24]=_,h[25]=t):t=h[25],O=g.apps.map(t),h[21]=_,h[22]=g.apps,h[23]=O}else O=h[23];return h[26]!==O?($=e(s,{flexDirection:"column",children:O}),h[26]=O,h[27]=$):$=h[27],h[28]!==S?(k=S.length>0?n(s,{flexDirection:"column",children:[e(c,{dimColor:!0,children:"Also requested:"}),S.map(_temp4)]}):null,h[28]=S,h[29]=k):k=h[29],h[30]!==g.willHide?(F=g.willHide&&g.willHide.length>0?n(c,{dimColor:!0,children:[g.willHide.length," other"," ",d(g.willHide.length,"app")," will be hidden while Claude works."]}):null,h[30]=g.willHide,h[31]=F):F=h[31],h[32]!==U?(z=e=>U("allow_all"===e),G=()=>U(!1),h[32]=U,h[33]=z,h[34]=G):(z=h[33],G=h[34]),h[35]!==R||h[36]!==z||h[37]!==G?(T=e(p,{options:R,onChange:z,onCancel:G}),h[35]=R,h[36]=z,h[37]=G,h[38]=T):T=h[38],h[39]!==H||h[40]!==$||h[41]!==k||h[42]!==F||h[43]!==T?(L=n(s,{flexDirection:"column",paddingX:1,paddingY:1,gap:1,children:[H,$,k,F,T]}),h[39]=H,h[40]=$,h[41]=k,h[42]=F,h[43]=T,h[44]=L):L=h[44],h[45]!==P||h[46]!==L?(M=e(m,{title:"Computer Use wants to control these apps",onCancel:P,children:L}),h[45]=P,h[46]=L,h[47]=M):M=h[47],M}function _temp4(e){return n(c,{dimColor:!0,children:[" ","· ",e]},e)}function _temp3(e){return[e,!0]}function _temp2(e){return{bundleId:e.resolved?.bundleId??e.requestedName,reason:e.resolved?"user_denied":"not_installed"}}function _temp(e){return e.resolved&&!e.alreadyGranted?[e.resolved.bundleId]:[]}
|
package/dist/src/components/permissions/FileEditPermissionRequest/FileEditPermissionRequest.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as e,jsxs as o}from"react/jsx-runtime";import{c as t}from"react/compiler-runtime";import{basename as i,relative as r}from"path";import{FileEditToolDiff as n}from"../../FileEditToolDiff.js";import{getCwd as l}from"../../../utils/cwd.js";import{Text as s}from"../../../ink.js";import{FileEditTool as a}from"../../../tools/FileEditTool/FileEditTool.js";import{FilePermissionDialog as p}from"../FilePermissionDialog/FilePermissionDialog.js";import{createSingleEditDiffConfig as m}from"../FilePermissionDialog/ideDiffConfig.js";const c={getConfig:e=>m(e.file_path,e.old_string,e.new_string,e.replace_all),applyChanges:(e,o)=>{const t=o[0];return t?{...e,old_string:t.old_string,new_string:t.new_string,replace_all:t.replace_all}:e}};export function FileEditPermissionRequest(a){const m=t(51),f=_temp;let d,g,_,u,j,C,D,h,w,U,x,F,k,E,R,B,P,T,b,q;if(m[0]!==a.onDone||m[1]!==a.onReject||m[2]!==a.toolUseConfirm||m[3]!==a.toolUseContext||m[4]!==a.workerBadge){const e=f(a.toolUseConfirm.input);({file_path:u,old_string:C,new_string:j,replace_all:D}=e),_=p,k=a.toolUseConfirm,E=a.toolUseContext,R=a.onDone,B=a.onReject,P=a.workerBadge,T="Editar archivo",U=r(l(),u),g=s,x="¿Deseas realizar esta edición en",F=" ",d=s,h=!0,w=i(u),m[0]=a.onDone,m[1]=a.onReject,m[2]=a.toolUseConfirm,m[3]=a.toolUseContext,m[4]=a.workerBadge,m[5]=d,m[6]=g,m[7]=_,m[8]=u,m[9]=j,m[10]=C,m[11]=D,m[12]=h,m[13]=w,m[14]=U,m[15]=x,m[16]=F,m[17]=k,m[18]=E,m[19]=R,m[20]=B,m[21]=P,m[22]=T}else d=m[5],g=m[6],_=m[7],u=m[8],j=m[9],C=m[10],D=m[11],h=m[12],w=m[13],U=m[14],x=m[15],F=m[16],k=m[17],E=m[18],R=m[19],B=m[20],P=m[21],T=m[22];m[23]!==d||m[24]!==h||m[25]!==w?(b=e(d,{bold:h,children:w}),m[23]=d,m[24]=h,m[25]=w,m[26]=b):b=m[26],m[27]!==g||m[28]!==b||m[29]!==x||m[30]!==F?(q=o(g,{children:[x,F,b,"?"]}),m[27]=g,m[28]=b,m[29]=x,m[30]=F,m[31]=q):q=m[31];const y=D||!1;let S,v,z;return m[32]!==j||m[33]!==C||m[34]!==y?(S=[{old_string:C,new_string:j,replace_all:y}],m[32]=j,m[33]=C,m[34]=y,m[35]=S):S=m[35],m[36]!==u||m[37]!==S?(v=e(n,{file_path:u,edits:S}),m[36]=u,m[37]=S,m[38]=v):v=m[38],m[39]!==_||m[40]!==u||m[41]!==U||m[42]!==q||m[43]!==v||m[44]!==k||m[45]!==E||m[46]!==R||m[47]!==B||m[48]!==P||m[49]!==T?(z=e(_,{toolUseConfirm:k,toolUseContext:E,onDone:R,onReject:B,workerBadge:P,title:T,subtitle:U,question:q,content:v,path:u,completionType:"str_replace_single",parseInput:f,ideDiffSupport:c}),m[39]=_,m[40]=u,m[41]=U,m[42]=q,m[43]=v,m[44]=k,m[45]=E,m[46]=R,m[47]=B,m[48]=P,m[49]=T,m[50]=z):z=m[50],z}function _temp(e){return a.inputSchema.parse(e)}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as o,Fragment as t}from"react/jsx-runtime";import{relative as n}from"path";import{useMemo as i}from"react";import{useDiffInIDE as r}from"../../../hooks/useDiffInIDE.js";import{Box as s,Text as
|
|
1
|
+
import{jsx as e,jsxs as o,Fragment as t}from"react/jsx-runtime";import{relative as n}from"path";import{useMemo as i}from"react";import{useDiffInIDE as r}from"../../../hooks/useDiffInIDE.js";import{Box as s,Text as a}from"../../../ink.js";import{getLanguageName as l}from"../../../utils/cliHighlight.js";import{getCwd as p}from"../../../utils/cwd.js";import{getFsImplementation as c,safeResolvePath as d}from"../../../utils/fsOperations.js";import{expandPath as m}from"../../../utils/path.js";import{Select as u}from"../../CustomSelect/index.js";import{ShowInIDEPrompt as g}from"../../ShowInIDEPrompt.js";import{usePermissionRequestLogging as f}from"../hooks.js";import{PermissionDialog as h}from"../PermissionDialog.js";import{useFilePermissionDialog as j}from"./useFilePermissionDialog.js";export function FilePermissionDialog({toolUseConfirm:I,toolUseContext:C,onDone:D,onReject:y,title:b,subtitle:k,question:P="¿Deseas continuar?",content:T,completionType:F="tool_use_single",path:M,parseInput:_,operationType:w="write",ideDiffSupport:x,workerBadge:v,languageName:E}){const O=i(()=>E??(M?l(M):"none"),[E,M]),U=i(()=>({completion_type:F,language_name:O}),[F,O]);f(I,U);const N=i(()=>{if(!M||"read"===w)return null;const e=m(M),o=c(),{resolvedPath:t,isSymlink:n}=d(o,e);return n?t:null},[M,w]),S=j({filePath:M||"",completionType:F,languageName:O,toolUseConfirm:I,onDone:D,onReject:y,parseInput:_,operationType:w}),{options:X,acceptFeedback:B,rejectFeedback:R,setFocusedOption:$,handleInputModeToggle:q,focusedOption:H,yesInputMode:W,noInputMode:z}=S,A=_(I.input),G=i(()=>x?x.getConfig(_(I.input)):null,[x,I.input]),J=G?{onChange:(e,o)=>{const t=x.applyChanges(A,o.edits);S.onChange(e,t)},toolUseContext:C,filePath:G.filePath,edits:(G.edits||[]).map(e=>({old_string:e.old_string,new_string:e.new_string,replace_all:e.replace_all||!1})),editMode:G.editMode||"single"}:{onChange:()=>{},toolUseContext:C,filePath:"",edits:[],editMode:"single"},{closeTabInIDE:K,showingDiffInIDE:L,ideName:Q}=r(J),onChange=(e,o)=>{K?.(),S.onChange(e,A,o?.trim())};if(L&&G&&M)return e(g,{onChange:(e,o,t)=>onChange(e,t),options:X,filePath:M,input:A,ideName:Q,symlinkTarget:N,rejectFeedback:R,acceptFeedback:B,setFocusedOption:$,onInputModeToggle:q,focusedOption:H,yesInputMode:W,noInputMode:z});const V=null!=N&&n(p(),N).startsWith(".."),Y=N?e(s,{paddingX:1,marginBottom:1,children:e(a,{color:"warning",children:V?`Esto modificará ${N} (fuera del directorio de trabajo) a través de un enlace simbólico`:`Destino del enlace simbólico: ${N}`})}):null;return o(t,{children:[o(h,{title:b,subtitle:k,innerPaddingX:0,workerBadge:v,children:[Y,T,o(s,{flexDirection:"column",paddingX:1,children:["string"==typeof P?e(a,{children:P}):P,e(u,{options:X,inlineDescriptions:!0,onChange:e=>{const o=X.find(o=>o.value===e);if(o){if("reject"===o.option.type){const e=R.trim();return void onChange(o.option,e||void 0)}if("accept-once"===o.option.type){const e=B.trim();return void onChange(o.option,e||void 0)}onChange(o.option)}},onCancel:()=>onChange({type:"reject"}),onFocus:e=>$(e),onInputModeToggle:q})]})]}),e(s,{paddingX:1,marginTop:1,children:o(a,{dimColor:!0,children:["Esc para cancelar",("yes"===H&&!W||"no"===H&&!z)&&" · Tab para modificar"]})})]})}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as e}from"react/jsx-runtime";import{homedir as t}from"os";import{basename as o,join as s,sep as
|
|
1
|
+
import{jsxs as e}from"react/jsx-runtime";import{homedir as t}from"os";import{basename as o,join as s,sep as i}from"path";import{getOriginalCwd as a}from"../../../bootstrap/state.js";import{Text as n}from"../../../ink.js";import{getShortcutDisplay as r}from"../../../keybindings/shortcutFormat.js";import{expandPath as l,getDirectoryForPath as p}from"../../../utils/path.js";import{normalizeCaseForComparison as c,pathInAllowedWorkingPath as d}from"../../../utils/permissions/filesystem.js";export function isInClaudeFolder(e){const t=l(e),o=l(`${a()}/.claude`),s=c(t),n=c(o);return s.startsWith(n+i.toLowerCase())||s.startsWith(n+"/")}export function isInGlobalClaudeFolder(e){const o=l(e),a=s(t(),".claude"),n=c(o),r=c(a);return n.startsWith(r+i.toLowerCase())||n.startsWith(r+"/")}export function getFilePermissionOptions({filePath:t,toolPermissionContext:s,operationType:i="write",onRejectFeedbackChange:a,onAcceptFeedbackChange:l,yesInputMode:c=!1,noInputMode:u=!1}){const h=[],m=r("chat:cycleMode","Chat","shift+tab");c&&l?h.push({type:"input",label:"Sí",value:"yes",placeholder:"y dile a Context qué hacer a continuación",onChange:l,allowEmptySubmitToCancel:!0,option:{type:"accept-once"}}):h.push({label:"Sí",value:"yes",option:{type:"accept-once"}});const f=d(t,s),y=isInClaudeFolder(t),b=isInGlobalClaudeFolder(t);if((y||b)&&"read"!==i)h.push({label:"Sí, y permitir a Context editar su propia configuración en esta sesión",value:"yes-claude-folder",option:{type:"accept-session",scope:b?"global-claude-folder":"claude-folder"}});else{let s;if(f)s="read"===i?"Sí, durante esta sesión":e(n,{children:["Sí, permitir todas las ediciones durante esta sesión"," ",e(n,{bold:!0,children:["(",m,")"]})]});else{const a=p(t),r=o(a)||"este directorio";s=e(n,"read"===i?{children:["Sí, permitir lectura desde ",e(n,{bold:!0,children:[r,"/"]})," durante esta sesión"]}:{children:["Sí, permitir todas las ediciones en ",e(n,{bold:!0,children:[r,"/"]})," durante esta sesión ",e(n,{bold:!0,children:["(",m,")"]})]})}h.push({label:s,value:"yes-session",option:{type:"accept-session"}})}return u&&a?h.push({type:"input",label:"No",value:"no",placeholder:"y dile a Context qué hacer de forma diferente",onChange:a,allowEmptySubmitToCancel:!0,option:{type:"reject"}}):h.push({label:"No",value:"no",option:{type:"reject"}}),h}
|