@getpaseo/server 0.2.0-beta.4 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1103,7 +1103,7 @@ __d(function(g,r,_i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?
1103
1103
  __d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return N}}),Object.defineProperty(_e,"AppOwnership",{enumerable:!0,get:function(){return l.AppOwnership}}),Object.defineProperty(_e,"ExecutionEnvironment",{enumerable:!0,get:function(){return l.ExecutionEnvironment}}),Object.defineProperty(_e,"UserInterfaceIdiom",{enumerable:!0,get:function(){return l.UserInterfaceIdiom}});var n=e(r(d[0])),t=r(d[1]);r(d[2]);var u=e(r(d[3])),l=r(d[4]),o=e(r(d[5]));o.default||console.warn("No native ExponentConstants module found, are you sure the expo-constants's module is linked properly?");const s=(0,t.requireOptionalNativeModule)('ExpoUpdates');let f=null;if(s){let e;s.manifest?e=s.manifest:s.manifestString&&(e=JSON.parse(s.manifestString)),e&&Object.keys(e).length>0&&(f=e)}let c=null;if(u.default.EXDevLauncher){let e;u.default.EXDevLauncher.manifestString&&(e=JSON.parse(u.default.EXDevLauncher.manifestString)),e&&Object.keys(e).length>0&&(c=e)}let p=null;if(o.default&&o.default.manifest){const e=o.default.manifest;p='string'==typeof e?JSON.parse(e):e}let b=f??c??p;const E=o.default||{},{appOwnership:O}=E,x=(0,n.default)(E,["name","appOwnership"]),v=Object.assign({},x,{appOwnership:O??null});function _(e){return!h(e)}function h(e){return'metadata'in e}function S(e=!1){if(!b){const e=null===b?'null':'undefined';if(x.executionEnvironment,l.ExecutionEnvironment.Bare,x.executionEnvironment===l.ExecutionEnvironment.StoreClient||x.executionEnvironment===l.ExecutionEnvironment.Standalone)throw new t.CodedError('ERR_CONSTANTS_MANIFEST_UNAVAILABLE',`Constants.manifest is ${e}, must be an object.`)}return b}Object.defineProperties(v,{__unsafeNoWarnManifest:{get(){const e=S(!0);return e&&_(e)?e:null},enumerable:!1},__unsafeNoWarnManifest2:{get(){const e=S(!0);return e&&h(e)?e:null},enumerable:!1},manifest:{get(){const e=S();return e&&_(e)?e:null},enumerable:!0},manifest2:{get(){const e=S();return e&&h(e)?e:null},enumerable:!0},expoConfig:{get(){const e=S(!0);return e?s&&s.isEmbeddedLaunch?p:h(e)?e.extra?.expoClient??null:_(e)?e:null:null},enumerable:!0},expoGoConfig:{get(){const e=S(!0);return e?h(e)?e.extra?.expoGo??null:_(e)?e:null:null},enumerable:!0},easConfig:{get(){const e=S(!0);return e?h(e)?e.extra?.eas??null:_(e)?e:null:null},enumerable:!0},__rawManifest_TEST:{get:()=>b,set(e){b=e},enumerable:!1}});var N=v},1006,[35,4,25,1007,1008,1009]);
1104
1104
  __d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return u}});var e,t=r(d[0]),u={UIManager:((e=t)&&e.__esModule?e:{default:e}).default}},1007,[159]);
1105
1105
  __d(function(g,r,i,a,m,e,d){"use strict";var t,n,o;Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"AppOwnership",{enumerable:!0,get:function(){return t}}),Object.defineProperty(e,"ExecutionEnvironment",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"UserInterfaceIdiom",{enumerable:!0,get:function(){return o}}),(function(t){t.Expo="expo"})(t||(t={})),(function(t){t.Bare="bare",t.Standalone="standalone",t.StoreClient="storeClient"})(n||(n={})),(function(t){t.Handset="handset",t.Tablet="tablet",t.Desktop="desktop",t.TV="tv",t.Unsupported="unsupported"})(o||(o={}))},1008,[]);
1106
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return s}});var n=r(d[0]);const t=(Date.now()+'-'+Math.floor(1e9*Math.random())).toString();function o(){if('undefined'!=typeof navigator&&'string'==typeof navigator.userAgent){const n=navigator.userAgent.toLowerCase();if(n.includes('edge'))return'Edge';if(n.includes('edg'))return'Chromium Edge';if(n.includes('opr')&&'opr'in window&&window.opr)return'Opera';if(n.includes('chrome')&&'chrome'in window&&window.chrome)return'Chrome';if(n.includes('trident'))return'IE';if(n.includes('firefox'))return'Firefox';if(n.includes('safari'))return'Safari'}}var s={get appOwnership(){return null},get executionEnvironment(){return n.ExecutionEnvironment.Bare},get sessionId(){return t},get isHeadless(){return'undefined'==typeof navigator||/\bHeadlessChrome\//.test(navigator.userAgent)},get expoVersion(){return this.manifest.sdkVersion||null},get linkingUri(){return'undefined'!=typeof location?location.origin:''},get expoRuntimeVersion(){return this.expoVersion},get deviceName(){return o()},get systemFonts(){return[]},get statusBarHeight(){return 0},get deviceYearClass(){return null},get manifest(){return"{\"name\":\"Paseo\",\"slug\":\"voice-mobile\",\"version\":\"0.2.0-beta.3\",\"orientation\":\"portrait\",\"icon\":\"./assets/images/icon.png\",\"scheme\":\"paseo\",\"userInterfaceStyle\":\"automatic\",\"newArchEnabled\":true,\"runtimeVersion\":{\"policy\":\"appVersion\"},\"updates\":{\"url\":\"https://u.expo.dev/0e7f65ce-0367-46c8-a238-2b65963d235a\"},\"web\":{\"output\":\"single\",\"favicon\":\"./assets/images/favicon.png\",\"shortName\":\"Paseo\",\"orientation\":\"portrait\",\"name\":\"Paseo\"},\"autolinking\":{\"searchPaths\":[\"../../node_modules\",\"./node_modules\"]},\"experiments\":{\"typedRoutes\":true,\"reactCompiler\":true,\"autolinkingModuleResolution\":true},\"extra\":{\"fdroidBuild\":false,\"router\":{},\"eas\":{\"projectId\":\"0e7f65ce-0367-46c8-a238-2b65963d235a\"}},\"owner\":\"getpaseo\",\"sdkVersion\":\"54.0.0\",\"platforms\":[\"ios\",\"android\",\"web\"]}"},get manifest2(){return null},get experienceUrl(){return'undefined'!=typeof location?location.origin:''},get debugMode(){return!1},getWebViewUserAgentAsync:async()=>'undefined'!=typeof navigator?navigator.userAgent:null}},1009,[1008]);
1106
+ __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return s}});var n=r(d[0]);const t=(Date.now()+'-'+Math.floor(1e9*Math.random())).toString();function o(){if('undefined'!=typeof navigator&&'string'==typeof navigator.userAgent){const n=navigator.userAgent.toLowerCase();if(n.includes('edge'))return'Edge';if(n.includes('edg'))return'Chromium Edge';if(n.includes('opr')&&'opr'in window&&window.opr)return'Opera';if(n.includes('chrome')&&'chrome'in window&&window.chrome)return'Chrome';if(n.includes('trident'))return'IE';if(n.includes('firefox'))return'Firefox';if(n.includes('safari'))return'Safari'}}var s={get appOwnership(){return null},get executionEnvironment(){return n.ExecutionEnvironment.Bare},get sessionId(){return t},get isHeadless(){return'undefined'==typeof navigator||/\bHeadlessChrome\//.test(navigator.userAgent)},get expoVersion(){return this.manifest.sdkVersion||null},get linkingUri(){return'undefined'!=typeof location?location.origin:''},get expoRuntimeVersion(){return this.expoVersion},get deviceName(){return o()},get systemFonts(){return[]},get statusBarHeight(){return 0},get deviceYearClass(){return null},get manifest(){return"{\"name\":\"Paseo\",\"slug\":\"voice-mobile\",\"version\":\"0.2.0-beta.4\",\"orientation\":\"portrait\",\"icon\":\"./assets/images/icon.png\",\"scheme\":\"paseo\",\"userInterfaceStyle\":\"automatic\",\"newArchEnabled\":true,\"runtimeVersion\":{\"policy\":\"appVersion\"},\"updates\":{\"url\":\"https://u.expo.dev/0e7f65ce-0367-46c8-a238-2b65963d235a\"},\"web\":{\"output\":\"single\",\"favicon\":\"./assets/images/favicon.png\",\"shortName\":\"Paseo\",\"orientation\":\"portrait\",\"name\":\"Paseo\"},\"autolinking\":{\"searchPaths\":[\"../../node_modules\",\"./node_modules\"]},\"experiments\":{\"typedRoutes\":true,\"reactCompiler\":true,\"autolinkingModuleResolution\":true},\"extra\":{\"fdroidBuild\":false,\"router\":{},\"eas\":{\"projectId\":\"0e7f65ce-0367-46c8-a238-2b65963d235a\"}},\"owner\":\"getpaseo\",\"sdkVersion\":\"54.0.0\",\"platforms\":[\"ios\",\"android\",\"web\"]}"},get manifest2(){return null},get experienceUrl(){return'undefined'!=typeof location?location.origin:''},get debugMode(){return!1},getWebViewUserAgentAsync:async()=>'undefined'!=typeof navigator?navigator.userAgent:null}},1009,[1008]);
1107
1107
  __d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return u}});var e,t=r(d[0]),n=r(d[1]),o=(e=n)&&e.__esModule?e:{default:e};async function u(){if(!o.default.unregisterForNotificationsAsync)throw new t.UnavailabilityError('ExpoNotifications','unregisterForNotificationsAsync');return o.default.unregisterForNotificationsAsync()}},1010,[4,1011]);
1108
1108
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return n}}),r(d[0]);let t=!1;var n={addListener:()=>(t||(console.warn("[expo-notifications] Listening to push token changes is not yet fully supported on web. Adding a listener will have no effect."),t=!0),{remove:()=>{}}),removeListener:()=>{},removeAllListeners:()=>{},emit:()=>{},listenerCount:()=>0}},1011,[4]);
1109
1109
  __d(function(g,r,i,a,m,_e,_d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return u}});var t=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(o){var n=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,n.get?n:{enumerable:!0,get:function(){return e[o]}})}),t.default=e,t})(r(_d[0])),o=e(r(_d[1])),n=r(_d[2]),c=r(_d[3]),s=e(r(_d[4])),d=e(r(_d[5]));const p='https://exp.host/--/api/v2/';async function u(e={}){const s=e.devicePushToken||await(0,d.default)(),u=e.deviceId||await h(),R=e.projectId||o.default.easConfig?.projectId||o.default.expoConfig?.extra?.eas?.projectId;if(!R)throw new n.CodedError('ERR_NOTIFICATIONS_NO_EXPERIENCE_ID',"No \"projectId\" found. If \"projectId\" can't be inferred from the manifest (for instance, in bare workflow), you have to pass it in yourself.");const w=e.applicationId||t.applicationId;if(!w)throw new n.CodedError('ERR_NOTIFICATIONS_NO_APPLICATION_ID',"No \"applicationId\" found. If it can't be inferred from native configuration by expo-application, you have to pass it in yourself.");const O=e.type||y(s),_=e.development||await I(),v=e.baseUrl??p,N=e.url??`${v}push/getExpoPushToken`,x={type:O,deviceId:u.toLowerCase(),development:_,appId:w,deviceToken:E(s),projectId:R},T=await fetch(N,{method:'POST',headers:{'content-type':'application/json'},body:JSON.stringify(x)}).catch(e=>{throw new n.CodedError('ERR_NOTIFICATIONS_NETWORK_ERROR',`Error encountered while fetching Expo token: ${e}.`)});if(!T.ok){const e=T.statusText||T.status;let t;try{t=await T.text()}catch{}throw new n.CodedError('ERR_NOTIFICATIONS_SERVER_ERROR',`Error encountered while fetching Expo token, expected an OK response, received: ${e} (body: "${t}").`)}const b=l(await f(T));try{e.url||e.baseUrl?console.debug("[expo-notifications] Since the URL endpoint to register in has been customized in the options, expo-notifications won't try to auto-update the device push token on the server."):await(0,c.setAutoServerRegistrationEnabledAsync)(!0)}catch(e){console.warn('[expo-notifications] Could not enable automatically registering new device tokens with the Expo notification service',e)}return{type:'expo',data:b}}async function f(e){try{return await e.json()}catch{try{throw new n.CodedError('ERR_NOTIFICATIONS_SERVER_ERROR',`Expected a JSON response from server when fetching Expo token, received body: ${JSON.stringify(await e.text())}.`)}catch{throw new n.CodedError('ERR_NOTIFICATIONS_SERVER_ERROR',`Expected a JSON response from server when fetching Expo token, received response: ${JSON.stringify(e)}.`)}}}function l(e){if(!e||'object'!=typeof e||!e.data||'object'!=typeof e.data||!e.data.expoPushToken||'string'!=typeof e.data.expoPushToken)throw new n.CodedError('ERR_NOTIFICATIONS_SERVER_ERROR',`Malformed response from server, expected "{ data: { expoPushToken: string } }", received: ${JSON.stringify(e,null,2)}.`);return e.data.expoPushToken}async function h(){try{if(!s.default.getInstallationIdAsync)throw new n.UnavailabilityError('ExpoServerRegistrationModule','getInstallationIdAsync');return await s.default.getInstallationIdAsync()}catch(e){throw new n.CodedError('ERR_NOTIF_DEVICE_ID',`Could not have fetched installation ID of the application: ${e}.`)}}function E(e){return'string'==typeof e.data?e.data:JSON.stringify(e.data)}async function I(){return!1}function y(e){switch(e.type){case'ios':return'apns';case'android':return'fcm';default:return e.type}}},1012,[1013,1006,4,1016,1020,1005]);
@@ -15059,7 +15059,7 @@ __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{v
15059
15059
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"decodeOfferFragmentPayload",{enumerable:!0,get:function(){return n.decodeOfferFragmentPayload}}),Object.defineProperty(e,"buildDaemonWebSocketUrl",{enumerable:!0,get:function(){return t.buildDaemonWebSocketUrl}}),Object.defineProperty(e,"deriveLabelFromEndpoint",{enumerable:!0,get:function(){return t.deriveLabelFromEndpoint}}),Object.defineProperty(e,"extractHostPortFromWebSocketUrl",{enumerable:!0,get:function(){return t.extractHostPortFromWebSocketUrl}}),Object.defineProperty(e,"normalizeHostPort",{enumerable:!0,get:function(){return t.normalizeHostPort}}),Object.defineProperty(e,"parseConnectionUri",{enumerable:!0,get:function(){return t.parseConnectionUri}}),Object.defineProperty(e,"parseHostPort",{enumerable:!0,get:function(){return t.parseHostPort}}),Object.defineProperty(e,"serializeConnectionUri",{enumerable:!0,get:function(){return t.serializeConnectionUri}}),Object.defineProperty(e,"serializeConnectionUriForStorage",{enumerable:!0,get:function(){return t.serializeConnectionUriForStorage}}),Object.defineProperty(e,"shouldUseTlsForDefaultHostedRelay",{enumerable:!0,get:function(){return t.shouldUseTlsForDefaultHostedRelay}}),e.buildRelayWebSocketUrl=function(n){return(0,t.buildRelayWebSocketUrl)(Object.assign({},n,{role:"client"}))};var t=r(d[0]),n=r(d[1])},3414,[3393,3415]);
15060
15060
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"ConnectionOfferV2Schema",{enumerable:!0,get:function(){return t}}),Object.defineProperty(e,"ConnectionOfferSchema",{enumerable:!0,get:function(){return o}}),e.decodeOfferFragmentPayload=l,e.parseConnectionOfferFromUrl=function(n){const t=f(n);if(!t)return null;const c=l(t);return o.parse(c)};var n=r(d[0]);const t=n.z.object({v:n.z.literal(2),serverId:n.z.string().min(1),daemonPublicKeyB64:n.z.string().min(1),relay:n.z.object({endpoint:n.z.string().min(1),useTls:n.z.boolean().optional()})}),o=t;function c(n){const t=n.replace(/-/g,"+").replace(/_/g,"/"),o=t.padEnd(t.length+(4-t.length%4)%4,"="),c=globalThis.atob(o),l=Uint8Array.from(c,n=>n.charCodeAt(0));return new TextDecoder("utf-8",{fatal:!0}).decode(l)}function l(n){const t=c(n);return JSON.parse(t)}const u="#offer=";function f(n){const t=n.trim();if(!t)return null;const o=t.indexOf(u);if(-1===o)return null;const c=t.slice(o+u.length).trim();return c.length>0?c:null}},3415,[3279]);
15061
15061
  __d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.resolveAppVersion=function(){const e=u(t.default?.version);if(e)return e;const o=u(n.default.expoConfig?.version);if(o)return o;const f=u(n.default.manifest?.version);if(f)return f;return null};var n=e(r(d[0])),t=e(r(d[1]));function u(e){if("string"!=typeof e)return null;const n=e.trim();return 0===n.length?null:n}},3416,[1006,3417]);
15062
- __d(function(e,t,r,a,o,i,n){o.exports={name:"@getpaseo/app",version:"0.2.0-beta.4",private:!0,main:"index.ts",scripts:{start:"npm run start:expo","start:expo":"cross-env APP_VARIANT=development expo start","reset-project":"node ./scripts/reset-project.js","eas-build-post-install":"npm --prefix ../.. run build:app-deps && npm run build:terminal-webview",android:"npm run android:development","android:development":"npm --prefix ../.. run build:client && cross-env APP_VARIANT=development expo prebuild --platform android --non-interactive && cross-env APP_VARIANT=development expo run:android --variant=debug","android:production":"npm --prefix ../.. run build:client && cross-env APP_VARIANT=production expo prebuild --platform android --non-interactive && cross-env APP_VARIANT=production expo run:android --variant=release","android:release":"npm run android:production","android:clear":"node -e \"require('node:fs').rmSync('android', { recursive: true, force: true })\"",ios:"npm --prefix ../.. run build:client && expo run:ios","ios:release":"npm --prefix ../.. run build:client && expo run:ios --configuration Release",web:"npm --prefix ../.. run build:client && concurrently --kill-others --names protocol,client,expo --prefix-colors yellow,blue,magenta \"npm --prefix ../.. run watch:protocol\" \"npm --prefix ../.. run watch:client\" \"npm run web:expo\"","web:expo":"expo start --web",lint:"expo lint",typecheck:"tsgo --noEmit",test:"vitest run","test:browser":"vitest run --project browser","test:e2e":"playwright test --project='Desktop Chrome'","test:e2e:desktop":"cross-env E2E_DESKTOP_RUNTIME=1 playwright test --project='Desktop Chrome' e2e/project-picker-desktop.spec.ts","test:e2e:real":"cross-env E2E_FORK_PASEO_HOME_FROM=../../.dev/paseo-home playwright test --project=real-provider","test:e2e:ui":"playwright test --ui",build:"npm run build:web","build:web":"npm --prefix ../.. run build:app-deps && expo export --platform web","profile:workspace-tabs":"node ./scripts/profile-workspace-tabs.mjs","deploy:web":"npm run build:web && wrangler pages deploy dist --project-name paseo-app --branch main","build:terminal-webview":"node ./scripts/build-terminal-webview-html.mjs"},dependencies:{"@codemirror/commands":"6.10.4","@codemirror/language":"6.12.4","@codemirror/search":"6.7.1","@codemirror/state":"6.7.1","@codemirror/view":"6.43.6","@dnd-kit/core":"^6.3.1","@dnd-kit/sortable":"^10.0.0","@dnd-kit/utilities":"^3.2.2","@floating-ui/react-native":"^0.10.7","@getpaseo/client":"*","@getpaseo/expo-two-way-audio":"*","@getpaseo/highlight":"*","@getpaseo/protocol":"*","@gorhom/bottom-sheet":"^5.2.14","@gorhom/portal":"^1.0.14","@react-native-async-storage/async-storage":"2.2.0","@react-native-masked-view/masked-view":"^0.3.2","@react-native/normalize-colors":"^0.81.5","@react-navigation/native":"^7.1.8","@replit/codemirror-vim":"6.3.0","@tanstack/react-query":"^5.90.11","@tanstack/react-virtual":"^3.13.21","@xterm/addon-clipboard":"^0.3.0-beta.213","@xterm/addon-fit":"^0.12.0-beta.213","@xterm/addon-image":"^0.10.0-beta.213","@xterm/addon-ligatures":"^0.11.0-beta.213","@xterm/addon-search":"^0.17.0-beta.213","@xterm/addon-unicode11":"^0.10.0-beta.213","@xterm/addon-web-links":"^0.13.0-beta.213","@xterm/addon-webgl":"^0.20.0-beta.212","@xterm/xterm":"^6.1.0-beta.213",buffer:"^6.0.3",expo:"^54.0.18","expo-asset":"~12.0.12","expo-audio":"~1.0.13","expo-build-properties":"^1.0.9","expo-camera":"~17.0.10","expo-clipboard":"~8.0.7","expo-constants":"~18.0.9","expo-crypto":"^15.0.8","expo-dev-client":"^6.0.15","expo-document-picker":"~14.0.8","expo-file-system":"~19.0.17","expo-haptics":"~15.0.7","expo-image":"~3.0.10","expo-image-manipulator":"~14.0.8","expo-image-picker":"^17.0.8","expo-keep-awake":"^15.0.7","expo-linking":"~8.0.8","expo-localization":"~17.0.9","expo-notifications":"^0.32.16","expo-router":"~6.0.13","expo-sharing":"^14.0.8","expo-splash-screen":"~31.0.10","expo-system-ui":"~6.0.7","expo-updates":"~29.0.12","fast-deep-equal":"^3.1.3",htmlparser2:"^12.0.0",i18next:"^26.3.0","lucide-react-native":"^0.546.0","markdown-it":"^10.0.0","mnemonic-id":"^3.2.7",qrcode:"^1.5.4",react:"19.1.0","react-dom":"19.1.0","react-i18next":"^17.0.8","react-native":"0.81.5","react-native-draggable-flatlist":"^4.0.3","react-native-edge-to-edge":"^1.7.0","react-native-gesture-handler":"~2.28.0","react-native-keyboard-controller":"^1.19.2","react-native-markdown-display":"^7.0.2","react-native-nitro-modules":"0.35.5","react-native-reanimated":"~4.3.1","react-native-safe-area-context":"~5.6.0","react-native-screens":"~4.16.0","react-native-svg":"^15.14.0","react-native-uitextview":"^2.2.0","react-native-unistyles":"^3.2.4","react-native-web":"~0.21.0","react-native-webview":"^13.16.0","react-native-worklets":"~0.8.3","tiny-invariant":"^1.3.3","use-sync-external-store":"^1.6.0",zod:"^4.4.3",zustand:"^5.0.9"},devDependencies:{"@playwright/test":"^1.56.1","@testing-library/dom":"^10.4.1","@testing-library/react":"^16.3.2","@types/markdown-it":"^14.1.2","@types/qrcode":"^1.5.6","@types/react":"~19.2.0","@types/ws":"^8.18.1","@vitest/browser":"^4.1.7","@vitest/browser-playwright":"^4.1.7","@xterm/headless":"^6.1.0-beta.213",dotenv:"^17.2.3","eas-cli":"^16.24.1",eslint:"^9.25.0","eslint-config-expo":"~10.0.0","expo-gradle-jvmargs":"^1.1.2",jsdom:"^20.0.3","material-icon-theme":"^5.32.0",playwright:"^1.56.1","serve-sim":"^0.1.40",typescript:"~5.9.2",vitest:"^4.1.6",wrangler:"^4.105.0",ws:"^8.20.0"}}},3417,[]);
15062
+ __d(function(e,t,r,a,o,i,n){o.exports={name:"@getpaseo/app",version:"0.2.0",private:!0,main:"index.ts",scripts:{start:"npm run start:expo","start:expo":"cross-env APP_VARIANT=development expo start","reset-project":"node ./scripts/reset-project.js","eas-build-post-install":"npm --prefix ../.. run build:app-deps && npm run build:terminal-webview",android:"npm run android:development","android:development":"npm --prefix ../.. run build:client && cross-env APP_VARIANT=development expo prebuild --platform android --non-interactive && cross-env APP_VARIANT=development expo run:android --variant=debug","android:production":"npm --prefix ../.. run build:client && cross-env APP_VARIANT=production expo prebuild --platform android --non-interactive && cross-env APP_VARIANT=production expo run:android --variant=release","android:release":"npm run android:production","android:clear":"node -e \"require('node:fs').rmSync('android', { recursive: true, force: true })\"",ios:"npm --prefix ../.. run build:client && expo run:ios","ios:release":"npm --prefix ../.. run build:client && expo run:ios --configuration Release",web:"npm --prefix ../.. run build:client && concurrently --kill-others --names protocol,client,expo --prefix-colors yellow,blue,magenta \"npm --prefix ../.. run watch:protocol\" \"npm --prefix ../.. run watch:client\" \"npm run web:expo\"","web:expo":"expo start --web",lint:"expo lint",typecheck:"tsgo --noEmit",test:"vitest run","test:browser":"vitest run --project browser","test:e2e":"playwright test --project='Desktop Chrome'","test:e2e:desktop":"cross-env E2E_DESKTOP_RUNTIME=1 playwright test --project='Desktop Chrome' e2e/project-picker-desktop.spec.ts","test:e2e:real":"cross-env E2E_FORK_PASEO_HOME_FROM=../../.dev/paseo-home playwright test --project=real-provider","test:e2e:ui":"playwright test --ui",build:"npm run build:web","build:web":"npm --prefix ../.. run build:app-deps && expo export --platform web","profile:workspace-tabs":"node ./scripts/profile-workspace-tabs.mjs","deploy:web":"npm run build:web && wrangler pages deploy dist --project-name paseo-app --branch main","build:terminal-webview":"node ./scripts/build-terminal-webview-html.mjs"},dependencies:{"@codemirror/commands":"6.10.4","@codemirror/language":"6.12.4","@codemirror/search":"6.7.1","@codemirror/state":"6.7.1","@codemirror/view":"6.43.6","@dnd-kit/core":"^6.3.1","@dnd-kit/sortable":"^10.0.0","@dnd-kit/utilities":"^3.2.2","@floating-ui/react-native":"^0.10.7","@getpaseo/client":"*","@getpaseo/expo-two-way-audio":"*","@getpaseo/highlight":"*","@getpaseo/protocol":"*","@gorhom/bottom-sheet":"^5.2.14","@gorhom/portal":"^1.0.14","@react-native-async-storage/async-storage":"2.2.0","@react-native-masked-view/masked-view":"^0.3.2","@react-native/normalize-colors":"^0.81.5","@react-navigation/native":"^7.1.8","@replit/codemirror-vim":"6.3.0","@tanstack/react-query":"^5.90.11","@tanstack/react-virtual":"^3.13.21","@xterm/addon-clipboard":"^0.3.0-beta.213","@xterm/addon-fit":"^0.12.0-beta.213","@xterm/addon-image":"^0.10.0-beta.213","@xterm/addon-ligatures":"^0.11.0-beta.213","@xterm/addon-search":"^0.17.0-beta.213","@xterm/addon-unicode11":"^0.10.0-beta.213","@xterm/addon-web-links":"^0.13.0-beta.213","@xterm/addon-webgl":"^0.20.0-beta.212","@xterm/xterm":"^6.1.0-beta.213",buffer:"^6.0.3",expo:"^54.0.18","expo-asset":"~12.0.12","expo-audio":"~1.0.13","expo-build-properties":"^1.0.9","expo-camera":"~17.0.10","expo-clipboard":"~8.0.7","expo-constants":"~18.0.9","expo-crypto":"^15.0.8","expo-dev-client":"^6.0.15","expo-document-picker":"~14.0.8","expo-file-system":"~19.0.17","expo-haptics":"~15.0.7","expo-image":"~3.0.10","expo-image-manipulator":"~14.0.8","expo-image-picker":"^17.0.8","expo-keep-awake":"^15.0.7","expo-linking":"~8.0.8","expo-localization":"~17.0.9","expo-notifications":"^0.32.16","expo-router":"~6.0.13","expo-sharing":"^14.0.8","expo-splash-screen":"~31.0.10","expo-system-ui":"~6.0.7","expo-updates":"~29.0.12","fast-deep-equal":"^3.1.3",htmlparser2:"^12.0.0",i18next:"^26.3.0","lucide-react-native":"^0.546.0","markdown-it":"^10.0.0","mnemonic-id":"^3.2.7",qrcode:"^1.5.4",react:"19.1.0","react-dom":"19.1.0","react-i18next":"^17.0.8","react-native":"0.81.5","react-native-draggable-flatlist":"^4.0.3","react-native-edge-to-edge":"^1.7.0","react-native-gesture-handler":"~2.28.0","react-native-keyboard-controller":"^1.19.2","react-native-markdown-display":"^7.0.2","react-native-nitro-modules":"0.35.5","react-native-reanimated":"~4.3.1","react-native-safe-area-context":"~5.6.0","react-native-screens":"~4.16.0","react-native-svg":"^15.14.0","react-native-uitextview":"^2.2.0","react-native-unistyles":"^3.2.4","react-native-web":"~0.21.0","react-native-webview":"^13.16.0","react-native-worklets":"~0.8.3","tiny-invariant":"^1.3.3","use-sync-external-store":"^1.6.0",zod:"^4.4.3",zustand:"^5.0.9"},devDependencies:{"@playwright/test":"^1.56.1","@testing-library/dom":"^10.4.1","@testing-library/react":"^16.3.2","@types/markdown-it":"^14.1.2","@types/qrcode":"^1.5.6","@types/react":"~19.2.0","@types/ws":"^8.18.1","@vitest/browser":"^4.1.7","@vitest/browser-playwright":"^4.1.7","@xterm/headless":"^6.1.0-beta.213",dotenv:"^17.2.3","eas-cli":"^16.24.1",eslint:"^9.25.0","eslint-config-expo":"~10.0.0","expo-gradle-jvmargs":"^1.1.2",jsdom:"^20.0.3","material-icon-theme":"^5.32.0",playwright:"^1.56.1","serve-sim":"^0.1.40",typescript:"~5.9.2",vitest:"^4.1.6",wrangler:"^4.105.0",ws:"^8.20.0"}}},3417,[]);
15063
15063
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.shouldUseDesktopDaemon=function(){return(0,n.isElectronRuntime)()},e.getDesktopDaemonStatus=async function(){return p(await(0,t.invokeDesktopCommand)("desktop_daemon_status"))},e.startDesktopDaemon=async function(){return p(await(0,t.invokeDesktopCommand)("start_desktop_daemon"))},e.stopDesktopDaemon=async function(n="manual_ipc"){return p(await(0,t.invokeDesktopCommand)("stop_desktop_daemon",{reason:n}))},e.restartDesktopDaemon=async function(){return p(await(0,t.invokeDesktopCommand)("restart_desktop_daemon"))},e.getDesktopDaemonLogs=async function(){return u(await(0,t.invokeDesktopCommand)("desktop_daemon_logs"))},e.getDesktopAppLogs=async function(){const n=await(0,t.invokeDesktopCommand)("desktop_app_logs");if(!o(n))throw new Error("Unexpected desktop app logs response.");return{logPath:s(n.logPath)??"",contents:"string"==typeof n.contents?n.contents:""}},e.getDesktopDaemonPairing=async function(){return k(await(0,t.invokeDesktopCommand)("desktop_daemon_pairing"))},e.getCliDaemonStatus=async function(){const n=await(0,t.invokeDesktopCommand)("cli_daemon_status");if("string"!=typeof n)throw new Error("Unexpected CLI daemon status response.");return n},e.listenToLocalTransportEvents=async function(t){const l=(0,n.getDesktopHost)()?.events?.on;if("function"!=typeof l)throw new Error("Desktop events API is unavailable.");const p=await l("local-daemon-transport-event",n=>{o(n)&&t({sessionId:s(n.sessionId)??"",kind:s(n.kind)??"error",text:s(n.text),binaryBase64:s(n.binaryBase64),code:c(n.code),reason:s(n.reason),error:s(n.error)})});return"function"==typeof p?p:()=>{}},e.openLocalTransportSession=async function(n){const o=await(0,t.invokeDesktopCommand)("open_local_daemon_transport",n);if("string"!=typeof o||0===o.trim().length)throw new Error("Unexpected local transport session response.");return o},e.sendLocalTransportMessage=async function(n){await(0,t.invokeDesktopCommand)("send_local_daemon_transport_message",Object.assign({sessionId:n.sessionId},n.text?{text:n.text}:{},n.binaryBase64?{binaryBase64:n.binaryBase64}:{}))},e.closeLocalTransportSession=async function(n){await(0,t.invokeDesktopCommand)("close_local_daemon_transport",{sessionId:n})},e.getCliInstallStatus=async function(){return f(await(0,t.invokeDesktopCommand)("get_cli_install_status"))},e.installCli=async function(){return f(await(0,t.invokeDesktopCommand)("install_cli"))},e.getSkillsStatus=async function(){return y(await(0,t.invokeDesktopCommand)("get_skills_status"))},e.installSkills=async function(){return y(await(0,t.invokeDesktopCommand)("install_skills"))},e.updateSkills=async function(){return y(await(0,t.invokeDesktopCommand)("update_skills"))},e.uninstallSkills=async function(){return y(await(0,t.invokeDesktopCommand)("uninstall_skills"))};var n=r(d[0]),t=r(d[1]);function o(n){return"object"==typeof n&&null!==n}function s(n){return"string"==typeof n&&n.trim().length>0?n:null}function c(n){return"number"==typeof n&&Number.isFinite(n)?n:null}function l(n){const t=s(n)?.toLowerCase();switch(t){case"starting":return"starting";case"running":return"running";case"errored":case"error":return"errored";default:return"stopped"}}function p(n){if(!o(n))throw new Error("Unexpected desktop daemon status response.");return{serverId:s(n.serverId)??"",status:l(n.status),listen:s(n.listen),hostname:s(n.hostname),pid:c(n.pid),home:s(n.home)??"",version:s(n.version),desktopManaged:!0===n.desktopManaged,error:s(n.error)}}function u(n){if(!o(n))throw new Error("Unexpected desktop daemon logs response.");return{logPath:s(n.logPath)??"",contents:"string"==typeof n.contents?n.contents:""}}function k(n){if(!o(n))throw new Error("Unexpected desktop daemon pairing response.");return{relayEnabled:!0===n.relayEnabled,url:s(n.url),qr:s(n.qr)}}function f(n){if(!o(n))throw new Error("Unexpected install status response.");return{installed:!0===n.installed}}function w(n){switch(n){case"not-installed":case"up-to-date":case"drift":return n;default:throw new Error(`Unexpected skills status state: ${String(n)}`)}}function _(n){if(!o(n))throw new Error("Unexpected skill op response.");const t=s(n.name);if(!t)throw new Error("Skill op missing name.");switch(n.kind){case"add":return{kind:"add",name:t};case"update":return{kind:"update",name:t};case"delete":return{kind:"delete",name:t};default:throw new Error(`Unexpected skill op kind: ${String(n.kind)}`)}}function y(n){if(!o(n))throw new Error("Unexpected skills status response.");const t=Array.isArray(n.ops)?n.ops.map(_):[];return{state:w(n.state),ops:t}}},3418,[3264,3419]);
15064
15064
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.invokeDesktopCommand=async function(t,o){const s=(0,n.getDesktopHost)()?.invoke;if("function"!=typeof s)throw new Error("Desktop invoke() is unavailable in this environment.");return await s(t,o)};var n=r(d[0])},3419,[3264]);
15065
15065
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"DaemonConnectionTestError",{enumerable:!0,get:function(){return f}}),e.buildClientConfig=y,e.connectAndProbe=w,e.connectToDaemon=async function(t,o,n=l){return w(await y(t,o?.serverId,o,n),T(t,o),n)};var t=r(d[0]),o=r(d[1]),n=r(d[2]),s=r(d[3]),c=r(d[4]);const l={getClientId:o.getOrCreateClientId,resolveAppVersion:n.resolveAppVersion,createLocalTransportFactory:c.createDesktopLocalDaemonTransportFactory,buildLocalTransportUrl:c.buildLocalDaemonTransportUrl,createClient:o=>new t.DaemonClient(o)};function u(t){if("string"!=typeof t)return null;const o=t.trim();return o.length>0?o:null}function p(t,o){const n=t&&("transport error"===t.toLowerCase()||"transport closed"===t.toLowerCase()),s=o&&("transport error"===o.toLowerCase()||"transport closed"===o.toLowerCase()||"unable to connect"===o.toLowerCase());return n&&o&&!s?o:t||(o||"Unable to connect")}function b(t){if(!t.config.password)return!1;const o=[t.reason,t.lastError].filter(Boolean).join("\n").toLowerCase();return o.includes("401")||o.includes("4001")||o.includes("unauthorized")||o.includes("code 1006")}class f extends Error{constructor(t,o){super(t),this.name="DaemonConnectionTestError",this.reason=o.reason,this.lastError=o.lastError}}async function y(t,o,n,c=l){const u=await c.getClientId(),p=c.createLocalTransportFactory(),b=Object.assign({clientId:u,clientType:"mobile",appVersion:c.resolveAppVersion()??void 0,suppressSendErrors:!0,reconnect:{enabled:!1}},n?.capabilities?{capabilities:n.capabilities}:{},"directSocket"!==t.type&&"directPipe"!==t.type||!p?{}:{transportFactory:p});if("directSocket"===t.type||"directPipe"===t.type)return Object.assign({},b,{url:c.buildLocalTransportUrl({transportType:"directSocket"===t.type?"socket":"pipe",transportPath:t.path})});if("directTcp"===t.type)return Object.assign({},b,{url:(0,s.buildDaemonWebSocketUrl)(t.endpoint,{useTls:t.useTls??!1})},t.password?{password:t.password}:{});if(!o)throw new Error("serverId is required to probe a relay connection");return Object.assign({},b,{url:(0,s.buildRelayWebSocketUrl)({endpoint:t.relayEndpoint,useTls:t.useTls??(0,s.shouldUseTlsForDefaultHostedRelay)(t.relayEndpoint),serverId:o}),e2ee:{enabled:!0,daemonPublicKeyB64:t.daemonPublicKeyB64}})}function w(t,o,n=l){const s=n.createClient(t);return new Promise((n,c)=>{const l=setTimeout(()=>{s.close().catch(()=>{}),c(new f("Connection timed out",{reason:"Connection timed out",lastError:s.lastError??null}))},o);s.connect().then(()=>{clearTimeout(l);const t=s.getLastServerInfoMessage();if(!t)return s.close().catch(()=>{}),void c(new f("Missing server info message",{reason:"Missing server info message",lastError:s.lastError??null}));n({client:s,serverId:t.serverId,hostname:t.hostname})}).catch(o=>{clearTimeout(l);const n=u(o instanceof Error?o.message:String(o)),y=u(s.lastError),w=b({config:t,reason:n,lastError:y})?"Incorrect password":p(n,y);s.close().catch(()=>{}),c(new f(w,{reason:n,lastError:y}))})})}function T(t,o){return o?.timeoutMs?o.timeoutMs:"relay"===t.type?1e4:6e3}},3420,[3375,3421,3416,3414,3422]);
@@ -15091,7 +15091,7 @@ __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{v
15091
15091
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.isAbsolutePath=function(t){return t.startsWith("/")||t.startsWith("\\\\")||/^[A-Za-z]:[\\/]/.test(t)}},3446,[]);
15092
15092
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"schedulesQueryBaseKey",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"ALL_SCHEDULE_HOSTS_FAILED_MESSAGE",{enumerable:!0,get:function(){return s}}),e.fetchAggregatedSchedules=async function(n){const c=n.hosts.some(t=>o(n.runtime.getSnapshot(t.serverId)));if(!n.hosts.some(t=>{const s=n.runtime.getSnapshot(t.serverId);return"online"===s?.connectionStatus&&n.runtime.getClient(t.serverId)})&&c)return{status:"connecting"};const u=[],l=[];let h=0;if(await Promise.all(n.hosts.map(async s=>{const o=n.runtime.getSnapshot(s.serverId),c="online"===o?.connectionStatus,f=n.runtime.getClient(s.serverId);if(f&&c){h+=1;try{const t=await f.scheduleList();if(t.error)throw new Error(t.error);for(const n of t.schedules)u.push(Object.assign({},n,{serverId:s.serverId,serverName:s.serverName}))}catch(n){l.push({serverId:s.serverId,serverName:s.serverName,message:(0,t.toErrorMessage)(n)})}}})),h>0&&0===u.length&&l.length===h)throw new Error(s);if(0===u.length&&c)return{status:"connecting"};return{status:"loaded",data:u,hostErrors:l}};var t=r(d[0]);const n=["schedules"],s="No connected hosts could load schedules";function o(t){return!t||("connecting"===t.connectionStatus||"idle"===t.connectionStatus)}},3447,[3448]);
15093
15093
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.toErrorMessage=function(t){if(t instanceof Error)return t.message;return String(t)}},3448,[]);
15094
- __d(function(g,r,_i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.pickAndPersistImages=async function(t){const n=await t.pickImages();return n?.length?await Promise.all(n.map(async n=>{const i=n.fileName??null,s=n.mimeType||"image/jpeg";return"blob"===n.source.kind?await t.persister.persistFromBlob({blob:n.source.blob,mimeType:s,fileName:i}):await t.persister.persistFromFileUri({uri:n.source.uri,mimeType:s,fileName:i})})):[]},e.uploadFileAttachments=async function(t){const n=[];for(const i of t.files){const s=await t.client.uploadFile(i);if(s.error||!s.file)throw new Error(s.error??"Upload failed.");n.push({kind:"file",attachment:s.file})}return n},e.removeComposerAttachmentAtIndex=function(t){const n=t.attachments[t.index];"image"===n?.kind&&t.deleteAttachments([n.metadata]);return t.attachments.filter((n,i)=>i!==t.index)},e.cancelComposerAgent=function(t){if(!t.isAgentRunning||t.isCancellingAgent)return!1;if(!t.isConnected||!t.client)return!1;try{Promise.resolve(t.client.cancelAgent(t.agentId)).catch(t.onCancelFailed)}catch(n){return t.onCancelFailed(n),!1}return!0},e.dispatchComposerAgentMessage=async function(t){const s=(0,n.splitComposerAttachmentsForSubmit)(t.attachments,{format:t.attachmentSubmitFormat}),o=(0,i.generateMessageId)(),u=(0,i.buildOptimisticUserMessage)({id:o,text:t.text,timestamp:new Date,images:s.images,attachments:s.attachments});c(t.agentId,u,t.stream);const l=await t.encodeImages(s.images);await t.client.sendAgentMessage(t.agentId,t.text,{messageId:o,images:l??[],attachments:s.attachments})},e.queueComposerMessage=function(t){const n=t.text.trim();if(!n&&0===t.attachments.length)return{queued:null};const s={id:(0,i.generateMessageId)(),text:n,attachments:t.attachments};return t.queue.write(n=>{const i=new Map(n);return i.set(t.agentId,[...n.get(t.agentId)??[],s]),i}),{queued:s}},e.editQueuedComposerMessage=function(n){const i=n.queue.read(n.agentId).find(t=>t.id===n.messageId);return i?(n.queue.write(t=>{const i=new Map(t);return i.set(n.agentId,(t.get(n.agentId)??[]).filter(t=>t.id!==n.messageId)),i}),{text:i.text,attachments:(0,t.userAttachmentsOnly)(i.attachments)}):null},e.sendQueuedComposerMessageNow=async function(t){const n=t.queue.read(t.agentId).find(n=>n.id===t.messageId);if(!n)return{status:"missing"};t.queue.write(n=>{const i=new Map(n);return i.set(t.agentId,(n.get(t.agentId)??[]).filter(n=>n.id!==t.messageId)),i});try{return await t.submitMessage({text:n.text,attachments:n.attachments}),{status:"submitted"}}catch(i){return t.queue.write(i=>{const s=new Map(i);return s.set(t.agentId,[n,...i.get(t.agentId)??[]]),s}),{status:"failed",errorMessage:i instanceof Error?i.message:t.failedToSendMessage??s.i18n.t("composer.errors.failedToSend")}}},e.openComposerAttachment=function(n){if("image"===n.attachment.kind)return void n.setLightboxMetadata(n.attachment.metadata);if("file"===n.attachment.kind||"workspace_file"===n.attachment.kind)return;if((0,t.isWorkspaceAttachment)(n.attachment))return void n.openWorkspaceAttachment({attachment:n.attachment});n.openExternalUrl(n.attachment.item.url)},e.buildForgeAttachment=o,e.toggleForgeAttachment=l,e.toggleGithubAttachmentFromPicker=function({current:t,item:n,markGithubAttachmentRemoved:i}){const s=t.find(t=>u(t)&&t.item.kind===n.kind&&t.item.number===n.number);s&&i(s);return l(t,n)},e.findGithubItemByOption=function(t,n){return t.find(t=>`${t.kind}:${t.number}`===n)},e.isAttachmentSelectedForGithubItem=function(n,i){return(0,t.userAttachmentsOnly)(n).some(t=>u(t)&&t.item.kind===i.kind&&t.item.number===i.number)},Object.defineProperty(e,"toggleGithubAttachment",{enumerable:!0,get:function(){return h}});var t=r(d[0]),n=r(d[1]),i=r(d[2]),s=r(d[3]);function c(t,n,s){const c=(0,i.appendOptimisticUserMessageToStream)({tail:s.getTail(t)??[],head:s.getHead(t)??[],message:n,placement:"active-head"});c.changedHead&&s.setHead(n=>{const i=new Map(n);return i.set(t,c.head),i}),c.changedTail&&s.setTail(n=>{const i=new Map(n);return i.set(t,c.tail),i})}function o(t){return"change_request"===t.kind?{kind:"forge_change_request",item:t}:{kind:"forge_issue",item:t}}function u(t){return"forge_issue"===t.kind||"forge_change_request"===t.kind||"github_issue"===t.kind||"github_pr"===t.kind}function l(t,n){const i=t=>u(t)&&t.item.kind===n.kind&&t.item.number===n.number;return t.some(i)?t.filter(t=>!i(t)):[...t,o(n)]}const h=l},3449,[3450,3451,3277,3454]);
15094
+ __d(function(g,r,_i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.pickAndPersistImages=async function(t){const n=await t.pickImages();return n?.length?await Promise.all(n.map(async n=>{const i=n.fileName??null,s=n.mimeType||"image/jpeg";return"blob"===n.source.kind?await t.persister.persistFromBlob({blob:n.source.blob,mimeType:s,fileName:i}):await t.persister.persistFromFileUri({uri:n.source.uri,mimeType:s,fileName:i})})):[]},e.uploadFileAttachments=async function(t){const n=[];for(const i of t.files){const s=await t.client.uploadFile(i);if(s.error||!s.file)throw new Error(s.error??"Upload failed.");n.push({kind:"file",attachment:s.file})}return n},e.removeComposerAttachmentAtIndex=function(t){const n=t.attachments[t.index];"image"===n?.kind&&t.deleteAttachments([n.metadata]);return t.attachments.filter((n,i)=>i!==t.index)},e.cancelComposerAgent=function(t){if(!t.isAgentRunning||t.isCancellingAgent)return!1;if(!t.isConnected||!t.client)return!1;try{Promise.resolve(t.client.cancelAgent(t.agentId)).catch(t.onCancelFailed)}catch(n){return t.onCancelFailed(n),!1}return!0},e.dispatchComposerAgentMessage=async function(t){const s=(0,n.splitComposerAttachmentsForSubmit)(t.attachments,{format:t.attachmentSubmitFormat}),o=(0,i.generateMessageId)(),u=(0,i.buildOptimisticUserMessage)({id:o,text:t.text,timestamp:new Date,images:s.images,attachments:s.attachments}),l=c(t.agentId,u,t.stream);try{const n=await t.encodeImages(s.images);await t.client.sendAgentMessage(t.agentId,t.text,{messageId:o,images:n??[],attachments:s.attachments})}catch(t){throw l(),t}},e.queueComposerMessage=function(t){const n=t.text.trim();if(!n&&0===t.attachments.length)return{queued:null};const s={id:(0,i.generateMessageId)(),text:n,attachments:t.attachments};return t.queue.write(n=>{const i=new Map(n);return i.set(t.agentId,[...n.get(t.agentId)??[],s]),i}),{queued:s}},e.editQueuedComposerMessage=function(n){const i=n.queue.read(n.agentId).find(t=>t.id===n.messageId);return i?(n.queue.write(t=>{const i=new Map(t);return i.set(n.agentId,(t.get(n.agentId)??[]).filter(t=>t.id!==n.messageId)),i}),{text:i.text,attachments:(0,t.userAttachmentsOnly)(i.attachments)}):null},e.sendQueuedComposerMessageNow=async function(t){const n=t.queue.read(t.agentId).find(n=>n.id===t.messageId);if(!n)return{status:"missing"};t.queue.write(n=>{const i=new Map(n);return i.set(t.agentId,(n.get(t.agentId)??[]).filter(n=>n.id!==t.messageId)),i});try{return await t.submitMessage({text:n.text,attachments:n.attachments}),{status:"submitted"}}catch(i){return t.queue.write(i=>{const s=new Map(i);return s.set(t.agentId,[n,...i.get(t.agentId)??[]]),s}),{status:"failed",errorMessage:i instanceof Error?i.message:t.failedToSendMessage??s.i18n.t("composer.errors.failedToSend")}}},e.openComposerAttachment=function(n){if("image"===n.attachment.kind)return void n.setLightboxMetadata(n.attachment.metadata);if("file"===n.attachment.kind||"workspace_file"===n.attachment.kind)return;if((0,t.isWorkspaceAttachment)(n.attachment))return void n.openWorkspaceAttachment({attachment:n.attachment});n.openExternalUrl(n.attachment.item.url)},e.buildForgeAttachment=o,e.toggleForgeAttachment=l,e.toggleGithubAttachmentFromPicker=function({current:t,item:n,markGithubAttachmentRemoved:i}){const s=t.find(t=>u(t)&&t.item.kind===n.kind&&t.item.number===n.number);s&&i(s);return l(t,n)},e.findGithubItemByOption=function(t,n){return t.find(t=>`${t.kind}:${t.number}`===n)},e.isAttachmentSelectedForGithubItem=function(n,i){return(0,t.userAttachmentsOnly)(n).some(t=>u(t)&&t.item.kind===i.kind&&t.item.number===i.number)},Object.defineProperty(e,"toggleGithubAttachment",{enumerable:!0,get:function(){return h}});var t=r(d[0]),n=r(d[1]),i=r(d[2]),s=r(d[3]);function c(t,n,s){const c=(0,i.appendOptimisticUserMessageToStream)({tail:s.getTail(t)??[],head:s.getHead(t)??[],message:n,placement:"active-head"}),o=c.changedHead?s.setHead:s.setTail,u=c.changedHead?c.head:c.tail;return o(n=>new Map(n).set(t,u)),()=>{o(i=>{const s=i.get(t);if(!s)return i;const c=s.filter(t=>t.id!==n.id||"user_message"!==t.kind||!t.optimistic);return c.length===s.length?i:new Map(i).set(t,c)})}}function o(t){return"change_request"===t.kind?{kind:"forge_change_request",item:t}:{kind:"forge_issue",item:t}}function u(t){return"forge_issue"===t.kind||"forge_change_request"===t.kind||"github_issue"===t.kind||"github_pr"===t.kind}function l(t,n){const i=t=>u(t)&&t.item.kind===n.kind&&t.item.number===n.number;return t.some(i)?t.filter(t=>!i(t)):[...t,o(n)]}const h=l},3449,[3450,3451,3277,3454]);
15095
15095
  __d(function(g,r,i,a,m,e,d){"use strict";function t(t){return"forge.change_request_comment"===t?.kind||"forge.change_request_review"===t?.kind||"forge.change_request_check"===t?.kind||"github.pull_request_comment"===t?.kind||"github.pull_request_review"===t?.kind||"github.pull_request_check"===t?.kind}Object.defineProperty(e,'__esModule',{value:!0}),e.isPullRequestContextAttachment=t,e.isWorkspaceAttachment=function(n){return"review"===n?.kind||"browser_element"===n?.kind||"chat_history"===n?.kind||t(n)},e.userAttachmentsOnly=function(n){return n.filter(n=>"review"!==n.kind&&"browser_element"!==n.kind&&"chat_history"!==n.kind&&!t(n))},e.workspaceAttachmentToSubmitAttachment=function(n){if("browser_element"===n.kind)return{type:"text",mimeType:"text/plain",title:`Browser element \xb7 ${n.attachment.tag}`,text:n.attachment.formatted};if(t(n))return{type:"text",mimeType:"text/plain",title:n.title,text:n.text};if("chat_history"===n.kind)return n.attachment;return"review"===n.kind?n.attachment:null}},3450,[]);
15096
15096
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.resolveComposerAttachmentSubmitFormat=function(t){return!1===t.supportsForgeAttachments?"legacy-github":"forge"},e.splitComposerAttachmentsForSubmit=function(o,s={}){const u=[],h=[],p="legacy-github"===s.format?n.buildLegacyGitHubAttachmentFromSearchItem:n.buildForgeAttachmentFromSearchItem;for(const n of o){if("image"===n.kind){u.push(n.metadata);continue}if("file"===n.kind){h.push(n.attachment);continue}if("workspace_file"===n.kind){h.push((0,c.workspaceFileAttachmentToAgentAttachment)(n));continue}if((0,t.isWorkspaceAttachment)(n)){"browser_element"===n.kind&&n.attachment.screenshot&&u.push(n.attachment.screenshot);const c=(0,t.workspaceAttachmentToSubmitAttachment)(n);c&&h.push(c);continue}const o=p(n.item);o&&h.push(o)}return{images:u,attachments:h}};var t=r(d[0]),n=r(d[1]),c=r(d[2])},3451,[3450,3452,3453]);
15097
15097
  __d(function(g,r,i,a,m,e,d){"use strict";function t(t){return t?"change_request"===t.kind?Object.assign({type:"forge_change_request",mimeType:"application/paseo-forge-change-request",forge:t.forge??"github",number:t.number,title:t.title,url:t.url},t.body?{body:t.body}:{},t.projectPath?{projectPath:t.projectPath}:{},t.baseRefName?{baseRefName:t.baseRefName}:{},t.headRefName?{headRefName:t.headRefName}:{}):Object.assign({type:"forge_issue",mimeType:"application/paseo-forge-issue",forge:t.forge??"github",number:t.number,title:t.title,url:t.url},t.body?{body:t.body}:{},t.projectPath?{projectPath:t.projectPath}:{}):null}Object.defineProperty(e,'__esModule',{value:!0}),e.buildForgeAttachmentFromSearchItem=t,Object.defineProperty(e,"buildGitHubAttachmentFromSearchItem",{enumerable:!0,get:function(){return u}}),e.buildLegacyGitHubAttachmentFromSearchItem=function(t){if(!t)return null;if("change_request"===t.kind)return Object.assign({type:"github_pr",mimeType:"application/github-pr",number:t.number,title:t.title,url:t.url},t.body?{body:t.body}:{},t.baseRefName?{baseRefName:t.baseRefName}:{},t.headRefName?{headRefName:t.headRefName}:{});return Object.assign({type:"github_issue",mimeType:"application/github-issue",number:t.number,title:t.title,url:t.url},t.body?{body:t.body}:{})};const u=t},3452,[]);
@@ -15615,7 +15615,7 @@ __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{v
15615
15615
  __d(function(g,r,i,_a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.FileExplorerPane=function(n){const o=(0,l.c)(129),{serverId:s,workspaceId:p,workspaceRoot:u,onOpenFile:f,onAddToChat:x}=n,{t:y}=(0,d.useTranslation)();let w;o[0]!==u?(w=u.trim(),o[0]=u,o[1]=w):w=o[1];const _=w;let E;o[2]!==_||o[3]!==p?(E=(0,k.buildWorkspaceExplorerStateKey)({workspaceId:p,workspaceRoot:_}),o[2]=_,o[3]=p,o[4]=E):E=o[4];const I=E,j=Boolean(I&&_);let R;o[5]!==s||o[6]!==I?(R=e=>I&&e.sessions[s]?e.sessions[s]?.fileExplorer.get(I):void 0,o[5]=s,o[6]=I,o[7]=R):R=o[7];const L=(0,S.useSessionStore)(R);let H;o[8]!==_||o[9]!==s||o[10]!==p?(H={serverId:s,workspaceId:p,workspaceRoot:_},o[8]=_,o[9]=s,o[10]=p,o[11]=H):H=o[11];const{requestDirectoryListing:O,selectExplorerEntry:q}=(0,k.useFileExplorerActions)(H);let K;o[12]!==_||o[13]!==s||o[14]!==p?(K={serverId:s,workspaceId:p,workspaceRoot:_},o[12]=_,o[13]=s,o[14]=p,o[15]=K):K=o[15];const ne=(0,b.useFileDownload)(K),re=(0,P.usePanelStore)(W),oe=(0,P.usePanelStore)(M),ie=(0,P.usePanelStore)(A),se=(0,P.usePanelStore)(B);let le;o[16]!==I?(le=e=>I?e.expandedPathsByWorkspace[I]:void 0,o[16]=I,o[17]=le):le=o[17];const ce=(0,P.usePanelStore)(le),ae=(0,P.usePanelStore)(F);let de,pe;o[18]!==ce?(de=ce&&ce.length>0?ce:["."],o[18]=ce,o[19]=de):de=o[19];o[20]!==de?(pe=new Set(de),o[20]=de,o[21]=pe):pe=o[21];const ue=pe;let he;o[22]!==L?(fe=L,he={directories:fe?.directories??new Map,pendingRequest:fe?.pendingRequest??null,isExplorerLoading:fe?.isLoading??!1,error:fe?.lastError??null,selectedEntryPath:fe?.selectedEntryPath??null},o[22]=L,o[23]=he):he=o[23];var fe;const ge=he,{directories:xe,pendingRequest:ye,isExplorerLoading:me,error:we,selectedEntryPath:Se}=ge;let be;o[24]!==me||o[25]!==ye?(be=e=>N({isExplorerLoading:me,pendingRequest:ye,path:e}),o[24]=me,o[25]=ye,o[26]=be):be=o[26];const ke=be,Pe=(0,c.useRef)(null),Ee=(0,c.useRef)(!1);let ze,Ie,je,Te,Ce;o[27]===Symbol.for("react.memo_cache_sentinel")?(ze=()=>{Ee.current=!1},o[27]=ze):ze=o[27];o[28]!==I?(Ie=[I],o[28]=I,o[29]=Ie):Ie=o[29];(0,c.useEffect)(ze,Ie),o[30]!==j||o[31]!==O||o[32]!==I?(je=()=>{J({hasWorkspaceScope:j,hasInitializedRef:Ee,workspaceStateKey:I,requestDirectoryListing:O})},Te=[j,O,I],o[30]=j,o[31]=O,o[32]=I,o[33]=je,o[34]=Te):(je=o[33],Te=o[34]);(0,c.useEffect)(je,Te),o[35]!==xe||o[36]!==ue||o[37]!==O||o[38]!==ae||o[39]!==I?(Ce=e=>U({entry:e,workspaceStateKey:I,expandedPaths:ue,directories:xe,requestDirectoryListing:O,setExpandedPathsForWorkspace:ae}),o[35]=xe,o[36]=ue,o[37]=O,o[38]=ae,o[39]=I,o[40]=Ce):Ce=o[40];const Re=Ce;let ve;o[41]!==j||o[42]!==f||o[43]!==q?(ve=e=>{j&&(q(e.path),f?.(e.path))},o[41]=j,o[42]=f,o[43]=q,o[44]=ve):ve=o[44];const De=ve;let Le;o[45]!==De||o[46]!==Re?(Le=e=>{"directory"!==e.kind?De(e):Re(e)},o[45]=De,o[46]=Re,o[47]=Le):Le=o[47];const He=Le;let Fe;o[48]!==_?(Fe=async e=>{await h.setStringAsync((0,z.buildAbsoluteExplorerPath)({workspaceRoot:_,entryPath:e}))},o[48]=_,o[49]=Fe):Fe=o[49];const Be=Fe;let Ae;o[50]!==ne?(Ae=e=>{"file"===e.kind&&ne({fileName:e.name,path:e.path})},o[50]=ne,o[51]=Ae):Ae=o[51];const Me=Ae;let We;o[52]!==ie||o[53]!==re?(We=()=>{const e=(C.findIndex(e=>e.value===re)+1)%C.length;ie(C[e].value)},o[52]=ie,o[53]=re,o[54]=We):We=o[54];const Ve=We;let Oe;o[55]!==O||o[56]!==se||o[57]!==I?(Oe=()=>{const e=!P.usePanelStore.getState().explorerShowHiddenFiles;se(),e&&X({workspaceStateKey:I,requestDirectoryListing:O})},o[55]=O,o[56]=se,o[57]=I,o[58]=Oe):Oe=o[58];const qe=Oe;let Ke;o[59]!==ue||o[60]!==j||o[61]!==O?(Ke=()=>Z({hasWorkspaceScope:j,expandedPaths:ue,requestDirectoryListing:O}),o[59]=ue,o[60]=j,o[61]=O,o[62]=Ke):Ke=o[62];const Ne=Ke;let Ge,$e;o[63]!==s||o[64]!==I?(Ge=["fileExplorerRefresh",s,I],o[63]=s,o[64]=I,o[65]=Ge):Ge=o[65];o[66]!==Ne||o[67]!==Ge?($e={queryKey:Ge,queryFn:Ne,enabled:!1},o[66]=Ne,o[67]=Ge,o[68]=$e):$e=o[68];const{refetch:Qe,isFetching:Ue}=(0,a.useQuery)($e);let Ye;o[69]!==Qe?(Ye=()=>{Qe()},o[69]=Qe,o[70]=Ye):Ye=o[70];const Je=Ye;let Xe,Ze,et,tt;o[71]!==y?(Xe=y("workspace.fileExplorer.sort.name"),o[71]=y,o[72]=Xe):Xe=o[72];o[73]!==y?(Ze=y("workspace.fileExplorer.sort.modified"),o[73]=y,o[74]=Ze):Ze=o[74];o[75]!==y?(et=y("workspace.fileExplorer.sort.size"),o[75]=y,o[76]=et):et=o[76];o[77]!==Xe||o[78]!==Ze||o[79]!==et?(tt={name:Xe,modified:Ze,size:et},o[77]=Xe,o[78]=Ze,o[79]=et,o[80]=tt):tt=o[80];const nt=tt;let rt;o[81]!==nt||o[82]!==re?(rt=$(re,nt),o[81]=nt,o[82]=re,o[83]=rt):rt=o[83];const ot=rt;let it;o[84]!==xe||o[85]!==ue||o[86]!==oe||o[87]!==re?(it=Q({directories:xe,expandedPaths:ue,sortOption:re,showHiddenFiles:oe}),o[84]=xe,o[85]=ue,o[86]=oe,o[87]=re,o[88]=it):it=o[88];const st=it;let lt;o[89]!==xe||o[90]!==me||o[91]!==ye?(lt=G({directories:xe,isExplorerLoading:me,pendingRequest:ye}),o[89]=xe,o[90]=me,o[91]=ye,o[92]=lt):lt=o[92];const ct=lt,at=Boolean(we&&Se);let dt;o[93]!==L?(dt=ee(L),o[93]=L,o[94]=dt):dt=o[94];const pt=dt;let ut;o[95]!==ue||o[96]!==Be||o[97]!==Me||o[98]!==He||o[99]!==ke||o[100]!==x||o[101]!==Se||o[102]!==s||o[103]!==p?(ut=e=>(0,T.jsx)(Y,{serverId:s,workspaceId:p,info:e,expandedPaths:ue,selectedEntryPath:Se,isDirectoryLoading:ke,onEntryPress:He,onCopyPath:Be,onDownloadEntry:Me,onAddToChat:x}),o[95]=ue,o[96]=Be,o[97]=Me,o[98]=He,o[99]=ke,o[100]=x,o[101]=Se,o[102]=s,o[103]=p,o[104]=ut):ut=o[104];const ht=ut;let ft;o[105]!==pt||o[106]!==j||o[107]!==O||o[108]!==q?(ft=()=>{j&&(q(null),O(pt,{recordHistory:!1,setCurrentPath:!0}))},o[105]=pt,o[106]=j,o[107]=O,o[108]=q,o[109]=ft):ft=o[109];const gt=ft;let xt;o[110]!==O?(xt=()=>{O(".",{recordHistory:!1,setCurrentPath:!1})},o[110]=O,o[111]=xt):xt=o[111];const yt=xt;if(!j){let n,s;return o[112]!==y?(n=y("workspace.fileExplorer.states.unavailable"),o[112]=y,o[113]=n):n=o[113],o[114]!==n?(s=(0,T.jsx)(e.View,{style:te.centerState,children:(0,T.jsx)(t.Text,{style:te.errorText,children:n})}),o[114]=n,o[115]=s):s=o[115],s}let mt;o[116]!==ot||o[117]!==we||o[118]!==gt||o[119]!==Je||o[120]!==yt||o[121]!==Ve||o[122]!==qe||o[123]!==Ue||o[124]!==ht||o[125]!==at||o[126]!==ct||o[127]!==st?(mt=(0,T.jsx)(e.View,{style:te.container,children:(0,T.jsx)(V,{error:we,showInitialLoading:ct,showBackFromError:at,treeRows:st,currentSortLabel:ot,isRefreshFetching:Ue,treeListRef:Pe,renderTreeRow:ht,handleSortCycle:Ve,handleToggleHiddenFiles:qe,handleRefresh:Je,handleBackFromError:gt,handleRetry:yt,sortTriggerStyle:v,iconButtonStyle:D})}),o[116]=ot,o[117]=we,o[118]=gt,o[119]=Je,o[120]=yt,o[121]=Ve,o[122]=qe,o[123]=Ue,o[124]=ht,o[125]=at,o[126]=ct,o[127]=st,o[128]=mt):mt=o[128];return mt};var e=r(_d[0]),t=r(_d[1]),n=r(_d[2]),o=r(_d[3]),s=r(_d[4]),l=r(_d[5]),c=r(_d[6]),a=r(_d[7]),d=r(_d[8]);r(_d[9]),r(_d[10]),r(_d[11]),r(_d[12]),r(_d[13]);var p=r(_d[14]),u=r(_d[15]),h=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[16])),f=r(_d[17]),x=r(_d[18]),y=r(_d[19]),w=r(_d[20]),S=r(_d[21]),_=r(_d[22]),b=r(_d[23]),k=r(_d[24]),P=r(_d[25]),E=r(_d[26]),z=r(_d[27]),I=r(_d[28]),j=r(_d[29]),T=r(_d[30]);const C=[{value:"name"},{value:"modified"},{value:"size"}];function R({size:e}){return e<1024?`${e} B`:e<1048576?`${(e/1024).toFixed(1)} KB`:`${(e/1048576).toFixed(1)} MB`}function v({hovered:e,pressed:t}){return[te.sortTrigger,(Boolean(e)||t)&&te.sortTriggerHovered]}function D({hovered:e,pressed:t}){return[te.iconButton,(Boolean(e)||t)&&te.iconButtonHovered]}function L(e){return e.entry.path}function H(o){const c=(0,l.c)(77),{serverId:a,workspaceId:p,entry:u,depth:h,isExpanded:f,isSelected:w,loading:S,onEntryPress:b,onCopyPath:k,onDownloadEntry:P,onAddToChat:z,testID:I}=o,{t:C}=(0,d.useTranslation)(),v="directory"===u.kind,D=!v;let L;c[0]!==u.path||c[1]!==a||c[2]!==D||c[3]!==p?(L={enabled:D,serverId:a,workspaceId:p,path:u.path},c[0]=u.path,c[1]=a,c[2]=D,c[3]=p,c[4]=L):L=c[4];const H=(0,j.useWorkspaceFileDragSource)(L);let F;c[5]!==u||c[6]!==b?(F=()=>{b(u)},c[5]=u,c[6]=b,c[7]=F):F=c[7];const B=F;let A;c[8]!==h||c[9]!==w?(A=e=>{const{hovered:t,pressed:n}=e;return[te.entryRow,{paddingLeft:(0,y.treeRowPaddingLeft)(h)},(Boolean(t)||n||w)&&te.entryRowActive]},c[8]=h,c[9]=w,c[10]=A):A=c[10];const M=A;let W;c[11]!==u.path||c[12]!==k?(W=()=>{k(u.path)},c[11]=u.path,c[12]=k,c[13]=W):W=c[13];const V=W;let O;c[14]!==u||c[15]!==P?(O=()=>{P(u)},c[14]=u,c[15]=P,c[16]=O):O=c[16];const q=O;let K;c[17]!==u.path||c[18]!==z?(K=()=>{z?.(u.path)},c[17]=u.path,c[18]=z,c[19]=K):K=c[19];const N=K;let G,$,Q,U,Y,J,X,Z,ee,ne,re;c[20]!==C?(G=C("workspace.fileExplorer.context.size"),c[20]=C,c[21]=G):G=c[21],c[22]!==G?($=(0,T.jsx)(t.Text,{style:te.contextMetaLabel,numberOfLines:1,children:G}),c[22]=G,c[23]=$):$=c[23],c[24]!==u.size?(Q=R({size:u.size}),c[24]=u.size,c[25]=Q):Q=c[25],c[26]!==Q?(U=(0,T.jsx)(t.Text,{style:te.contextMetaValue,numberOfLines:1,ellipsizeMode:"tail",children:Q}),c[26]=Q,c[27]=U):U=c[27],c[28]!==U||c[29]!==$?(Y=(0,T.jsxs)(e.View,{style:te.contextMetaRow,children:[$,U]}),c[28]=U,c[29]=$,c[30]=Y):Y=c[30],c[31]!==C?(J=C("workspace.fileExplorer.context.modified"),c[31]=C,c[32]=J):J=c[32],c[33]!==J?(X=(0,T.jsx)(t.Text,{style:te.contextMetaLabel,numberOfLines:1,children:J}),c[33]=J,c[34]=X):X=c[34],c[35]!==u.modifiedAt?(Z=(0,E.formatTimeAgo)(new Date(u.modifiedAt)),c[35]=u.modifiedAt,c[36]=Z):Z=c[36],c[37]!==Z?(ee=(0,T.jsx)(t.Text,{style:te.contextMetaValue,numberOfLines:1,ellipsizeMode:"tail",children:Z}),c[37]=Z,c[38]=ee):ee=c[38],c[39]!==X||c[40]!==ee?(ne=(0,T.jsxs)(e.View,{style:te.contextMetaRow,children:[X,ee]}),c[39]=X,c[40]=ee,c[41]=ne):ne=c[41],c[42]!==Y||c[43]!==ne?(re=(0,T.jsxs)(e.View,{style:te.contextMetaBlock,children:[Y,ne]}),c[42]=Y,c[43]=ne,c[44]=re):re=c[44];const oe=re;let ie,se,le,ce,ae;c[45]!==h?(ie=(0,T.jsx)(y.TreeIndentGuides,{depth:h}),c[45]=h,c[46]=ie):ie=c[46];e:{if(!v){let e;c[47]!==u.name?(e=(0,T.jsx)(x.MaterialFileIcon,{fileName:u.name,size:16}),c[47]=u.name,c[48]=e):e=c[48],se=e;break e}if(S){let e;c[49]===Symbol.for("react.memo_cache_sentinel")?(e=(0,T.jsx)(s.ActivityIndicator,{size:"small"}),c[49]=e):e=c[49],se=e;break e}let e;c[50]!==f?(e=(0,T.jsx)(y.TreeChevron,{expanded:f}),c[50]=f,c[51]=e):e=c[51],se=e}c[52]!==se?(le=(0,T.jsx)(e.View,{style:te.entryIcon,children:se}),c[52]=se,c[53]=le):le=c[53],c[54]!==u.name?(ce=(0,T.jsx)(t.Text,{style:te.entryName,numberOfLines:1,children:u.name}),c[54]=u.name,c[55]=ce):ce=c[55],c[56]!==H||c[57]!==le||c[58]!==ce?(ae=(0,T.jsxs)(e.View,{ref:H,style:te.entryInfo,children:[le,ce]}),c[56]=H,c[57]=le,c[58]=ce,c[59]=ae):ae=c[59];const de=u.kind,pe=z?N:void 0;let ue,he,fe;return c[60]!==C?(ue=C("workspace.fileActions.moreActions"),c[60]=C,c[61]=ue):ue=c[61],c[62]!==u.kind||c[63]!==V||c[64]!==q||c[65]!==oe||c[66]!==pe||c[67]!==ue||c[68]!==I?(he=(0,T.jsx)(_.FileActionsMenu,{fileKind:de,onCopyPath:V,onDownload:q,onAddToChat:pe,header:oe,accessibilityLabel:ue,testIDPrefix:I}),c[62]=u.kind,c[63]=V,c[64]=q,c[65]=oe,c[66]=pe,c[67]=ue,c[68]=I,c[69]=he):he=c[69],c[70]!==B||c[71]!==M||c[72]!==ie||c[73]!==ae||c[74]!==he||c[75]!==I?(fe=(0,T.jsxs)(n.Pressable,{onPress:B,style:M,testID:I,children:[ie,ae,he]}),c[70]=B,c[71]=M,c[72]=ie,c[73]=ae,c[74]=he,c[75]=I,c[76]=fe):fe=c[76],fe}function F(e){return e.setExpandedPathsForWorkspace}function B(e){return e.toggleExplorerShowHiddenFiles}function A(e){return e.setExplorerSortOption}function M(e){return e.explorerShowHiddenFiles}function W(e){return e.explorerSortOption}function V(c){const a=(0,l.c)(82),{theme:u}=(0,p.useUnistyles)(),{t:h}=(0,d.useTranslation)(),{error:x,showInitialLoading:y,showBackFromError:S,treeRows:_,currentSortLabel:b,isRefreshFetching:k,treeListRef:E,renderTreeRow:z,handleSortCycle:I,handleToggleHiddenFiles:j,handleRefresh:C,handleBackFromError:R,handleRetry:v,sortTriggerStyle:D,iconButtonStyle:H}=c,F=(0,P.usePanelStore)(O);let B;a[0]!==F||a[1]!==h?(B=h(F?"workspace.fileExplorer.actions.hideHiddenFiles":"workspace.fileExplorer.actions.showHiddenFiles"),a[0]=F,a[1]=h,a[2]=B):B=a[2];const A=B;let M;a[3]!==F||a[4]!==h?(M=h(F?"workspace.fileExplorer.empty.noFiles":"workspace.fileExplorer.empty.noVisibleFiles"),a[3]=F,a[4]=h,a[5]=M):M=a[5];const W=M;let V;a[6]!==H||a[7]!==F?(V=e=>[H(e),!F&&te.iconButtonActive],a[6]=H,a[7]=F,a[8]=V):V=a[8];const q=V,K=!F;let N;a[9]!==K?(N={selected:K},a[9]=K,a[10]=N):N=a[10];const G=N;if(x){let o,s,l,c,d,p,u;return a[11]!==x?(o=(0,T.jsx)(t.Text,{style:te.errorText,children:x}),a[11]=x,a[12]=o):o=a[12],a[13]!==R||a[14]!==S||a[15]!==h?(s=S?(0,T.jsx)(n.Pressable,{style:te.retryButton,onPress:R,children:(0,T.jsx)(t.Text,{style:te.retryButtonText,children:h("workspace.fileExplorer.actions.back")})}):null,a[13]=R,a[14]=S,a[15]=h,a[16]=s):s=a[16],a[17]!==h?(l=h("workspace.fileExplorer.actions.retry"),a[17]=h,a[18]=l):l=a[18],a[19]!==l?(c=(0,T.jsx)(t.Text,{style:te.retryButtonText,children:l}),a[19]=l,a[20]=c):c=a[20],a[21]!==v||a[22]!==c?(d=(0,T.jsx)(n.Pressable,{style:te.retryButton,onPress:v,children:c}),a[21]=v,a[22]=c,a[23]=d):d=a[23],a[24]!==s||a[25]!==d?(p=(0,T.jsxs)(e.View,{style:te.errorActions,children:[s,d]}),a[24]=s,a[25]=d,a[26]=p):p=a[26],a[27]!==p||a[28]!==o?(u=(0,T.jsxs)(e.View,{style:te.centerState,children:[o,p]}),a[27]=p,a[28]=o,a[29]=u):u=a[29],u}if(y){let n,o,l;return a[30]===Symbol.for("react.memo_cache_sentinel")?(n=(0,T.jsx)(s.ActivityIndicator,{size:"small"}),a[30]=n):n=a[30],a[31]!==h?(o=h("workspace.fileExplorer.states.loading"),a[31]=h,a[32]=o):o=a[32],a[33]!==o?(l=(0,T.jsxs)(e.View,{style:te.centerState,children:[n,(0,T.jsx)(t.Text,{style:te.loadingText,children:o})]}),a[33]=o,a[34]=l):l=a[34],l}let $,Q,U,Y,J,X,Z,ee,ne,re,oe,ie,se;return a[35]===Symbol.for("react.memo_cache_sentinel")?($=[te.treePane,te.treePaneFill],a[35]=$):$=a[35],a[36]!==b?(Q=(0,T.jsx)(t.Text,{style:te.sortTriggerText,testID:"files-sort-label",children:b}),a[36]=b,a[37]=Q):Q=a[37],a[38]!==u.colors.foregroundMuted?(U=(0,T.jsx)(f.ChevronDown,{size:12,color:u.colors.foregroundMuted}),a[38]=u.colors.foregroundMuted,a[39]=U):U=a[39],a[40]!==I||a[41]!==D||a[42]!==Q||a[43]!==U?(Y=(0,T.jsxs)(n.Pressable,{onPress:I,style:D,testID:"files-sort-trigger",children:[Q,U]}),a[40]=I,a[41]=D,a[42]=Q,a[43]=U,a[44]=Y):Y=a[44],a[45]!==F||a[46]!==u.colors.foregroundMuted||a[47]!==u.iconSize.sm?(J=F?(0,T.jsx)(f.Eye,{size:u.iconSize.sm,color:u.colors.foregroundMuted}):(0,T.jsx)(f.EyeOff,{size:u.iconSize.sm,color:u.colors.foregroundMuted}),a[45]=F,a[46]=u.colors.foregroundMuted,a[47]=u.iconSize.sm,a[48]=J):J=a[48],a[49]!==j||a[50]!==A||a[51]!==G||a[52]!==q||a[53]!==J?(X=(0,T.jsx)(n.Pressable,{onPress:j,hitSlop:8,style:q,accessibilityRole:"button",accessibilityLabel:A,accessibilityState:G,testID:"files-hidden-toggle",children:J}),a[49]=j,a[50]=A,a[51]=G,a[52]=q,a[53]=J,a[54]=X):X=a[54],a[55]!==k||a[56]!==h?(Z=h(k?"workspace.fileExplorer.actions.refreshing":"workspace.fileExplorer.actions.refresh"),a[55]=k,a[56]=h,a[57]=Z):Z=a[57],a[58]!==k||a[59]!==u.colors.foregroundMuted||a[60]!==u.iconSize.sm?(ee=(0,T.jsx)(e.View,{style:te.refreshIcon,children:k?(0,T.jsx)(w.LoadingSpinner,{size:u.iconSize.sm,color:u.colors.foregroundMuted}):(0,T.jsx)(f.RotateCw,{size:u.iconSize.sm,color:u.colors.foregroundMuted})}),a[58]=k,a[59]=u.colors.foregroundMuted,a[60]=u.iconSize.sm,a[61]=ee):ee=a[61],a[62]!==C||a[63]!==H||a[64]!==k||a[65]!==Z||a[66]!==ee?(ne=(0,T.jsx)(n.Pressable,{onPress:C,disabled:k,hitSlop:8,style:H,accessibilityRole:"button",accessibilityLabel:Z,testID:"files-refresh",children:ee}),a[62]=C,a[63]=H,a[64]=k,a[65]=Z,a[66]=ee,a[67]=ne):ne=a[67],a[68]!==X||a[69]!==ne?(re=(0,T.jsxs)(e.View,{style:te.headerActions,children:[X,ne]}),a[68]=X,a[69]=ne,a[70]=re):re=a[70],a[71]!==re||a[72]!==Y?(oe=(0,T.jsxs)(e.View,{style:te.paneHeader,testID:"files-pane-header",children:[Y,re]}),a[71]=re,a[72]=Y,a[73]=oe):oe=a[73],a[74]!==W||a[75]!==z||a[76]!==E||a[77]!==_?(ie=0===_.length?(0,T.jsx)(e.View,{style:te.centerState,children:(0,T.jsx)(t.Text,{style:te.emptyText,children:W})}):(0,T.jsx)(o.FlatList,{ref:E,style:te.treeList,data:_,renderItem:z,keyExtractor:L,testID:"file-explorer-tree-scroll",contentContainerStyle:te.entriesContent,showsVerticalScrollIndicator:!0,initialNumToRender:24,maxToRenderPerBatch:40,windowSize:12}),a[74]=W,a[75]=z,a[76]=E,a[77]=_,a[78]=ie):ie=a[78],a[79]!==oe||a[80]!==ie?(se=(0,T.jsxs)(e.View,{style:$,children:[oe,ie]}),a[79]=oe,a[80]=ie,a[81]=se):se=a[81],se}function O(e){return e.explorerShowHiddenFiles}function q(e,t){const n=[...e];return n.sort((e,n)=>{if(e.kind!==n.kind)return"directory"===e.kind?-1:1;switch(t){case"name":return e.name.localeCompare(n.name);case"modified":return new Date(n.modifiedAt).getTime()-new Date(e.modifiedAt).getTime();case"size":return n.size-e.size;default:return 0}}),n}function K({directories:e,expandedPaths:t,sortOption:n,showHiddenFiles:o,path:s,depth:l}){const c=e.get(s);if(!c)return[];const a=[],d=q((0,I.filterVisibleExplorerEntries)(c.entries,o),n);for(const s of d)a.push({entry:s,depth:l}),"directory"===s.kind&&t.has(s.path)&&a.push(...K({directories:e,expandedPaths:t,sortOption:n,showHiddenFiles:o,path:s.path,depth:l+1}));return a}function N({isExplorerLoading:e,pendingRequest:t,path:n}){return Boolean(e&&"list"===t?.mode&&t?.path===n)}function G({directories:e,isExplorerLoading:t,pendingRequest:n}){return!e.has(".")&&Boolean(t&&"list"===n?.mode&&"."===n?.path)}function $(e,t){return t[e]??t.name}function Q({directories:e,expandedPaths:t,sortOption:n,showHiddenFiles:o}){return e.get(".")?K({directories:e,expandedPaths:t,sortOption:n,showHiddenFiles:o,path:".",depth:0}):[]}function U({entry:e,workspaceStateKey:t,expandedPaths:n,directories:o,requestDirectoryListing:s,setExpandedPathsForWorkspace:l}){if(!t)return;n.has(e.path)?l(t,Array.from(n).filter(t=>t!==e.path)):(l(t,[...Array.from(n),e.path]),o.has(e.path)||s(e.path,{recordHistory:!1,setCurrentPath:!1}))}function Y(e){const t=(0,l.c)(21),{serverId:n,workspaceId:o,info:s,expandedPaths:c,selectedEntryPath:a,isDirectoryLoading:d,onEntryPress:p,onCopyPath:u,onDownloadEntry:h,onAddToChat:f}=e,x=s.item.entry,y=s.item.depth,w="directory"===x.kind;let S;t[0]!==x.path||t[1]!==c||t[2]!==w?(S=w&&c.has(x.path),t[0]=x.path,t[1]=c,t[2]=w,t[3]=S):S=t[3];const _=S,b=a===x.path;let k;t[4]!==x.path||t[5]!==w||t[6]!==d?(k=w&&d(x.path),t[4]=x.path,t[5]=w,t[6]=d,t[7]=k):k=t[7];const P=k,E=`file-explorer-row-${s.index}`;let z;return t[8]!==y||t[9]!==x||t[10]!==_||t[11]!==b||t[12]!==P||t[13]!==f||t[14]!==u||t[15]!==h||t[16]!==p||t[17]!==n||t[18]!==E||t[19]!==o?(z=(0,T.jsx)(H,{serverId:n,workspaceId:o,entry:x,depth:y,isExpanded:_,isSelected:b,loading:P,onEntryPress:p,onCopyPath:u,onDownloadEntry:h,onAddToChat:f,testID:E}),t[8]=y,t[9]=x,t[10]=_,t[11]=b,t[12]=P,t[13]=f,t[14]=u,t[15]=h,t[16]=p,t[17]=n,t[18]=E,t[19]=o,t[20]=z):z=t[20],z}async function J({hasWorkspaceScope:e,hasInitializedRef:t,workspaceStateKey:n,requestDirectoryListing:o}){if(!e||t.current)return;t.current=!0;await o(".",{recordHistory:!1,setCurrentPath:!1})?X({workspaceStateKey:n,requestDirectoryListing:o}):t.current=!1}function X({workspaceStateKey:e,requestDirectoryListing:t}){const n=P.usePanelStore.getState().explorerShowHiddenFiles,o=P.usePanelStore.getState().expandedPathsByWorkspace[e??""];if(o)for(const e of o)"."===e||!n&&(0,I.isHiddenExplorerPath)(e)||t(e,{recordHistory:!1,setCurrentPath:!1})}async function Z({hasWorkspaceScope:e,expandedPaths:t,requestDirectoryListing:n}){if(!e)return null;const o=P.usePanelStore.getState().explorerShowHiddenFiles,s=Array.from(t).filter(e=>o||!(0,I.isHiddenExplorerPath)(e));return s.includes(".")||s.unshift("."),await Promise.all(s.map(e=>n(e,{recordHistory:!1,setCurrentPath:!1}))),null}function ee(e){if(!e)return".";const t=(e.history.length>0?e.history[e.history.length-1]:null)??e.lastVisitedPath??e.currentPath;return t&&0!==t.length?t:"."}const te=p.StyleSheet.create(e=>({container:{flex:1,backgroundColor:e.colors.surfaceSidebar,uni__dependencies:[0]},desktopSplit:{flex:1,flexDirection:"row",minHeight:0},treePane:{minWidth:0,position:"relative"},treePaneFill:{flex:1},treePaneWithPreview:{flex:0,flexGrow:0,flexShrink:0,borderLeftWidth:1,borderLeftColor:e.colors.border,uni__dependencies:[0]},splitResizeHandle:{position:"absolute",left:-5,top:0,bottom:0,width:10,zIndex:20},previewPane:{flex:1,minWidth:0},paneHeader:{height:u.WORKSPACE_SECONDARY_HEADER_HEIGHT,flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingRight:e.spacing[3],borderBottomWidth:1,borderBottomColor:e.colors.border,uni__dependencies:[0]},sortTrigger:{flexDirection:"row",alignItems:"center",justifyContent:"center",gap:e.spacing[1],marginLeft:e.spacing[3]-e.spacing[1],paddingHorizontal:e.spacing[1],height:24,borderRadius:e.borderRadius.base,uni__dependencies:[0]},sortTriggerHovered:{backgroundColor:e.colors.surface2,uni__dependencies:[0]},sortTriggerText:{fontSize:e.fontSize.xs,color:e.colors.foregroundMuted,uni__dependencies:[0]},headerActions:{flexDirection:"row",alignItems:"center",gap:e.spacing[1],uni__dependencies:[0]},treeList:{flex:1,minHeight:0},entriesContent:{paddingTop:e.spacing[2],paddingBottom:e.spacing[4],uni__dependencies:[0]},centerState:{flex:1,alignItems:"center",justifyContent:"center",gap:e.spacing[2],padding:e.spacing[4],uni__dependencies:[0]},loadingText:{color:e.colors.foregroundMuted,fontSize:e.fontSize.sm,uni__dependencies:[0]},errorText:{color:e.colors.destructive,fontSize:e.fontSize.base,textAlign:"center",uni__dependencies:[0]},retryButton:{borderRadius:e.borderRadius.full,borderWidth:e.borderWidth[1],borderColor:e.colors.border,paddingHorizontal:e.spacing[3],paddingVertical:e.spacing[1],uni__dependencies:[0]},retryButtonText:{color:e.colors.foregroundMuted,fontSize:e.fontSize.sm,fontWeight:e.fontWeight.semibold,uni__dependencies:[0]},errorActions:{flexDirection:"row",alignItems:"center",gap:e.spacing[2],uni__dependencies:[0]},emptyText:{color:e.colors.foregroundMuted,fontSize:e.fontSize.base,textAlign:"center",uni__dependencies:[0]},binaryMetaText:{color:e.colors.foregroundMuted,fontSize:e.fontSize.sm,uni__dependencies:[0]},entryRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingVertical:y.WORKSPACE_FILE_ROW_VERTICAL_PADDING,paddingRight:e.spacing[3],uni__dependencies:[0]},entryRowActive:{backgroundColor:e.colors.surfaceSidebarHover,uni__dependencies:[0]},entryInfo:{flex:1,flexDirection:"row",alignItems:"center",gap:e.spacing[2],minWidth:0,uni__dependencies:[0]},entryIcon:{flexShrink:0},entryName:{flex:1,color:e.colors.foreground,fontSize:e.fontSize.sm,uni__dependencies:[0]},contextMetaBlock:{paddingVertical:e.spacing[1],uni__dependencies:[0]},contextMetaRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",minHeight:32,paddingHorizontal:e.spacing[3],uni__dependencies:[0]},contextMetaLabel:{fontSize:e.fontSize.sm,color:e.colors.foregroundMuted,flexShrink:0,uni__dependencies:[0]},contextMetaValue:{fontSize:e.fontSize.sm,color:e.colors.foreground,fontWeight:e.fontWeight.medium,flex:1,minWidth:0,textAlign:"right",uni__dependencies:[0]},previewHeaderText:{flex:1,color:e.colors.foreground,fontSize:e.fontSize.sm,fontWeight:e.fontWeight.normal,uni__dependencies:[0]},iconButton:{width:22,height:22,borderRadius:e.borderRadius.md,alignItems:"center",justifyContent:"center",uni__dependencies:[0]},iconButtonHovered:{backgroundColor:e.colors.surface2,uni__dependencies:[0]},iconButtonActive:{backgroundColor:e.colors.surface2,uni__dependencies:[0]},refreshIcon:{width:16,height:16,alignItems:"center",justifyContent:"center"},previewContent:{flex:1},previewScrollContainer:{flex:1,minHeight:0,position:"relative"},previewCodeScrollContent:{paddingTop:e.spacing[3],paddingHorizontal:e.spacing[3],paddingBottom:e.spacing[3]+e.spacing[2],uni__dependencies:[0]},codeText:{color:e.colors.foreground,fontFamily:e.fontFamily.mono,fontSize:e.fontSize.code,flexShrink:0,uni__dependencies:[0]},previewImageScrollContent:{flex:1,alignItems:"center",justifyContent:"center",padding:e.spacing[3],uni__dependencies:[0]},previewImage:{width:"100%",aspectRatio:1},sheetBackground:{backgroundColor:e.colors.surface2,uni__dependencies:[0]},handleIndicator:{backgroundColor:e.colors.palette.zinc[600],uni__dependencies:[0]},sheetHeader:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingHorizontal:e.spacing[4],paddingVertical:e.spacing[3],borderBottomWidth:e.borderWidth[1],borderBottomColor:e.colors.border,uni__dependencies:[0]},sheetTitle:{fontSize:e.fontSize.lg,fontWeight:e.fontWeight.semibold,color:e.colors.foreground,flex:1,uni__dependencies:[0]},sheetCloseButton:{padding:e.spacing[2],uni__dependencies:[0]},sheetCenterState:{flex:1,alignItems:"center",justifyContent:"center",gap:e.spacing[2],padding:e.spacing[4],uni__dependencies:[0]}}))},3960,[348,711,1562,530,3553,349,36,916,1563,1401,144,1308,234,146,56,3262,3582,1590,3961,3923,3573,3272,3922,3936,3937,3604,3523,3939,3962,3953,279]);
15616
15616
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.MaterialFileIcon=o,e.createMaterialFileIcon=function(n){return function(c){const s=(0,t.c)(2),{size:u}=c;let f;return s[0]!==u?(f=(0,l.jsx)(o,{fileName:n,size:u}),s[0]=u,s[1]=f):f=s[1],f}};var t=r(d[0]),n=r(d[1]),c=r(d[2]),l=r(d[3]);function o(o){const s=(0,t.c)(5),{fileName:u,size:f}=o;let v,_;return s[0]!==u?(v=(0,c.getFileIconSvg)(u),s[0]=u,s[1]=v):v=s[1],s[2]!==f||s[3]!==v?(_=(0,l.jsx)(n.SvgXml,{xml:v,width:f,height:f}),s[2]=f,s[3]=v,s[4]=_):_=s[4],_}},3961,[349,1594,3924,279]);
15617
15617
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.isHiddenExplorerPath=function(t){return t.split("/").some(t=>"."!==t&&".."!==t&&t.startsWith("."))},e.filterVisibleExplorerEntries=function(t,n){if(n)return t;return t.filter(t=>!t.name.startsWith("."))}},3962,[]);
15618
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.KeyboardShiftProvider=function(I){const f=(0,t.c)(10),{children:h}=I,c=(0,s.useSafeAreaInsets)(),{height:y,progress:S}=(0,n.useReanimatedKeyboardAnimation)(),v=(0,_.useSharedValue)(c.bottom);let E,H;f[0]!==v||f[1]!==c.bottom?(E=()=>{v.value=c.bottom},H=[v,c.bottom],f[0]=v,f[1]=c.bottom,f[2]=E,f[3]=H):(E=f[2],H=f[3]);(0,o.useEffect)(E,H);const K=(0,_.useDerivedValue)((function({_worklet_1242994143640_init_data:t,resolveKeyboardShift:o,keyboardHeight:s,keyboardProgress:n,bottomInset:_,isIos:b,DEFAULT_IOS_KEYBOARD_INSET_MIN_HEIGHT:u}){const l=function(){return o({rawKeyboardHeight:Math.abs(s.value),keyboardProgress:n.value,bottomInset:_.value,isIos:b,iosMinHeight:u})};return l.__closure={resolveKeyboardShift:o,keyboardHeight:s,keyboardProgress:n,bottomInset:_,isIos:b,DEFAULT_IOS_KEYBOARD_INSET_MIN_HEIGHT:u},l.__workletHash=1242994143640,l.__initData=t,l})({_worklet_1242994143640_init_data:l,resolveKeyboardShift:b.resolveKeyboardShift,keyboardHeight:y,keyboardProgress:S,bottomInset:v,isIos:!1,DEFAULT_IOS_KEYBOARD_INSET_MIN_HEIGHT:b.DEFAULT_IOS_KEYBOARD_INSET_MIN_HEIGHT}));let T;f[4]!==v||f[5]!==K?(T={shift:K,bottomInset:v},f[4]=v,f[5]=K,f[6]=T):T=f[6];const k=T;let A;f[7]!==h||f[8]!==k?(A=(0,o.createElement)(u.Provider,{value:k},h),f[7]=h,f[8]=k,f[9]=A):A=f[9];return A},e.useKeyboardShift=I,e.useKeyboardShiftStyle=function(o){const s=(0,t.c)(3),{shift:n,bottomInset:b}=I(),u=o.mode,l=o.enabled??!0,h=(0,_.useAnimatedStyle)((function({_worklet_17397082852180_init_data:t,mode:o,enabled:s,bottomInset:n,shift:_}){const b=function(){return"padding"===o?s?{paddingBottom:n.value+_.value}:{paddingBottom:0}:{transform:[{translateY:s?-_.value:0}]}};return b.__closure={mode:o,enabled:s,bottomInset:n,shift:_},b.__workletHash=0xfd292f18b54,b.__initData=t,b})({_worklet_17397082852180_init_data:f,mode:u,enabled:l,bottomInset:b,shift:n}),[l,u]);let c;s[0]!==n||s[1]!==h?(c={shift:n,style:h},s[0]=n,s[1]=h,s[2]=c):c=s[2];return c};var t=r(d[0]),o=r(d[1]);r(d[2]);var s=r(d[3]),n=r(d[4]),_=r(d[5]),b=r(d[6]);const u=(0,o.createContext)(null),l={code:"function useKeyboardShiftStyleTs1(){const{resolveKeyboardShift,keyboardHeight,keyboardProgress,bottomInset,isIos,DEFAULT_IOS_KEYBOARD_INSET_MIN_HEIGHT}=this.__closure;return resolveKeyboardShift({rawKeyboardHeight:Math.abs(keyboardHeight.value),keyboardProgress:keyboardProgress.value,bottomInset:bottomInset.value,isIos:isIos,iosMinHeight:DEFAULT_IOS_KEYBOARD_INSET_MIN_HEIGHT});}"};function I(){const t=(0,o.useContext)(u);if(!t)throw new Error("useKeyboardShift must be used inside KeyboardShiftProvider");return t}const f={code:"function useKeyboardShiftStyleTs2(){const{mode,enabled,bottomInset,shift}=this.__closure;if(mode===\"padding\"){if(!enabled){return{paddingBottom:0};}return{paddingBottom:bottomInset.value+shift.value};}return{transform:[{translateY:enabled?-shift.value:0}]};}"}},3963,[349,36,25,1320,1519,444,3964]);
15618
+ __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.KeyboardShiftProvider=function({children:t}){const I=(0,s.useSafeAreaInsets)(),{height:f,progress:y}=(0,n.useReanimatedKeyboardAnimation)(),c=(0,_.useSharedValue)(I.bottom),v=!1;(0,o.useEffect)(()=>{c.value=I.bottom},[c,I.bottom]),(0,n.useGenericKeyboardHandler)({onEnd:(function({_worklet_5342533244378_init_data:t,isIos:o,keyboardHeight:s,keyboardProgress:n}){const _=function(t){o&&(s.value=-t.height,n.value=t.progress)};return _.__closure={isIos:o,keyboardHeight:s,keyboardProgress:n},_.__workletHash=5342533244378,_.__initData=t,_})({_worklet_5342533244378_init_data:l,isIos:v,keyboardHeight:f,keyboardProgress:y})},[v,f,y]);const S=(0,_.useDerivedValue)((function({_worklet_11197485389339_init_data:t,resolveKeyboardShift:o,keyboardHeight:s,keyboardProgress:n,bottomInset:_,isIos:u,DEFAULT_IOS_KEYBOARD_INSET_MIN_HEIGHT:b}){const l=function(){return o({rawKeyboardHeight:Math.abs(s.value),keyboardProgress:n.value,bottomInset:_.value,isIos:u,iosMinHeight:b})};return l.__closure={resolveKeyboardShift:o,keyboardHeight:s,keyboardProgress:n,bottomInset:_,isIos:u,DEFAULT_IOS_KEYBOARD_INSET_MIN_HEIGHT:b},l.__workletHash=0xa2f1e23961b,l.__initData=t,l})({_worklet_11197485389339_init_data:h,resolveKeyboardShift:u.resolveKeyboardShift,keyboardHeight:f,keyboardProgress:y,bottomInset:c,isIos:v,DEFAULT_IOS_KEYBOARD_INSET_MIN_HEIGHT:u.DEFAULT_IOS_KEYBOARD_INSET_MIN_HEIGHT})),k=(0,o.useMemo)(()=>({shift:S,bottomInset:c}),[c,S]);return(0,o.createElement)(b.Provider,{value:k},t)},e.useKeyboardShift=I,e.useKeyboardShiftStyle=function(o){const s=(0,t.c)(3),{shift:n,bottomInset:u}=I(),b=o.mode,l=o.enabled??!0,h=(0,_.useAnimatedStyle)((function({_worklet_5417575424981_init_data:t,mode:o,enabled:s,bottomInset:n,shift:_}){const u=function(){return"padding"===o?s?{paddingBottom:n.value+_.value}:{paddingBottom:0}:{transform:[{translateY:s?-_.value:0}]}};return u.__closure={mode:o,enabled:s,bottomInset:n,shift:_},u.__workletHash=5417575424981,u.__initData=t,u})({_worklet_5417575424981_init_data:f,mode:b,enabled:l,bottomInset:u,shift:n}),[l,b]);let y;s[0]!==n||s[1]!==h?(y={shift:n,style:h},s[0]=n,s[1]=h,s[2]=y):y=s[2];return y};var t=r(d[0]),o=r(d[1]);r(d[2]);var s=r(d[3]),n=r(d[4]),_=r(d[5]),u=r(d[6]);const b=(0,o.createContext)(null),l={code:"function useKeyboardShiftStyleTs1(event){const{isIos,keyboardHeight,keyboardProgress}=this.__closure;if(isIos){keyboardHeight.value=-event.height;keyboardProgress.value=event.progress;}}"},h={code:"function useKeyboardShiftStyleTs2(){const{resolveKeyboardShift,keyboardHeight,keyboardProgress,bottomInset,isIos,DEFAULT_IOS_KEYBOARD_INSET_MIN_HEIGHT}=this.__closure;return resolveKeyboardShift({rawKeyboardHeight:Math.abs(keyboardHeight.value),keyboardProgress:keyboardProgress.value,bottomInset:bottomInset.value,isIos:isIos,iosMinHeight:DEFAULT_IOS_KEYBOARD_INSET_MIN_HEIGHT});}"};function I(){const t=(0,o.useContext)(b);if(!t)throw new Error("useKeyboardShift must be used inside KeyboardShiftProvider");return t}const f={code:"function useKeyboardShiftStyleTs3(){const{mode,enabled,bottomInset,shift}=this.__closure;if(mode===\"padding\"){if(!enabled){return{paddingBottom:0};}return{paddingBottom:bottomInset.value+shift.value};}return{transform:[{translateY:enabled?-shift.value:0}]};}"}},3963,[349,36,25,1320,1519,444,3964]);
15619
15619
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"DEFAULT_IOS_KEYBOARD_INSET_MIN_HEIGHT",{enumerable:!0,get:function(){return t}}),Object.defineProperty(e,"resolveKeyboardShift",{enumerable:!0,get:function(){return n}});const t=120,n=(function({_worklet_16410338512261_init_data:t}){const n=function(t){return t.keyboardProgress>0&&t.rawKeyboardHeight>0?t.isIos&&t.rawKeyboardHeight<t.iosMinHeight?0:Math.max(0,t.rawKeyboardHeight-t.bottomInset):0};return n.__closure={},n.__workletHash=0xeecd465cd85,n.__initData=t,n})({_worklet_16410338512261_init_data:{code:"function resolveKeyboardShift_keyboardShiftPolicyTs1(input){if(!(input.keyboardProgress>0)||!(input.rawKeyboardHeight>0)){return 0;}if(input.isIos&&input.rawKeyboardHeight<input.iosMinHeight){return 0;}return Math.max(0,input.rawKeyboardHeight-input.bottomInset);}"}})},3964,[]);
15620
15620
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.resolveFocusedChatTarget=function(u){if(!u.layout)return null;const l=(0,n.findPaneById)(u.layout.root,u.layout.focusedPaneId),o=l?.focusedTabId;if(!o)return null;const f=(0,n.collectAllTabs)(u.layout.root).find(t=>t.tabId===o);if(!f)return null;if("agent"===f.target.kind)return{tabId:f.tabId,draftKey:(0,t.buildDraftStoreKey)({serverId:u.serverId,agentId:f.target.agentId})};if("draft"===f.target.kind)return{tabId:f.tabId,draftKey:(0,t.buildDraftStoreKey)({serverId:u.serverId,agentId:f.tabId,draftId:f.target.draftId})};return null};var t=r(d[0]),n=r(d[1])},3965,[3480,3439]);
15621
15621
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.useWorkspaceCheckoutStatus=function(l){const k=(0,t.c)(20),{t:y}=(0,o.useTranslation)();let w;k[0]!==l.client||k[1]!==l.isConnected||k[2]!==l.isRouteFocused||k[3]!==l.workspaceDirectory?(w=(0,u.canCreateWorkspaceTerminal)({isRouteFocused:l.isRouteFocused,client:l.client,isConnected:l.isConnected,workspaceDirectory:l.workspaceDirectory}),k[0]=l.client,k[1]=l.isConnected,k[2]=l.isRouteFocused,k[3]=l.workspaceDirectory,k[4]=w):w=k[4];const p=w,h=l.workspaceDirectory??`missing-workspace-directory:${l.normalizedWorkspaceId}`;let v,D,S;k[5]!==l.normalizedServerId||k[6]!==h?(v=(0,n.checkoutStatusQueryKey)(l.normalizedServerId,h),k[5]=l.normalizedServerId,k[6]=h,k[7]=v):v=k[7];k[8]!==l.client||k[9]!==l.normalizedServerId||k[10]!==l.workspaceDirectory||k[11]!==y?(D=async()=>{if(!l.client||!l.workspaceDirectory)throw new Error(y("workspace.terminal.hostDisconnected"));return await(0,s.fetchCheckoutStatus)({client:l.client,serverId:l.normalizedServerId,cwd:l.workspaceDirectory})},k[8]=l.client,k[9]=l.normalizedServerId,k[10]=l.workspaceDirectory,k[11]=y,k[12]=D):D=k[12];k[13]!==p||k[14]!==v||k[15]!==D?(S={queryKey:v,enabled:p,queryFn:D,staleTime:1/0,refetchOnMount:!0,refetchOnReconnect:!1,refetchOnWindowFocus:!1},k[13]=p,k[14]=v,k[15]=D,k[16]=S):S=k[16];const f=(0,c.useQuery)(S),C=p&&void 0===f.data&&!f.isError;let I;k[17]!==f||k[18]!==C?(I={checkoutQuery:f,isCheckoutStatusLoading:C},k[17]=f,k[18]=C,k[19]=I):I=k[19];return I};var t=r(d[0]);r(d[1]);var c=r(d[2]),o=r(d[3]),n=r(d[4]),s=r(d[5]),u=r(d[6])},3966,[349,36,916,1563,3427,3947,3967]);
@@ -15643,7 +15643,7 @@ __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{v
15643
15643
  __d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.FileDropBackdrop=function(){const e=(0,t.c)(11),{t:o}=(0,p.useTranslation)(),l=(0,h.useFileDropContext)(),_=l?.isDragging,b=l?.suppressed,w=l?.hasSink,j=(0,c.useAnimatedStyle)((function({_worklet_2693010592129_init_data:e,isDragging:n,hasSink:s,suppressed:t,withTiming:o}){const l=function(){return{opacity:o(n?.value&&s?.value&&!t?.value?1:0,{duration:150})}};return l.__closure={isDragging:n,hasSink:s,suppressed:t,withTiming:o},l.__workletHash=2693010592129,l.__initData=e,l})({_worklet_2693010592129_init_data:k,isDragging:_,hasSink:w,suppressed:b,withTiming:c.withTiming}));let x;e[0]!==j?(x=[y.overlay,j],e[0]=j,e[1]=x):x=e[1];const T=x;if(!l)return null;let F,O,z,C,I;e[2]===Symbol.for("react.memo_cache_sentinel")?(F=(0,f.jsx)(s.View,{style:D.backdrop}),e[2]=F):F=e[2];e[3]===Symbol.for("react.memo_cache_sentinel")?(O=(0,f.jsx)(v,{size:32,uniProps:S}),e[3]=O):O=e[3];e[4]!==o?(z=o("composer.attachments.dropFilesHere"),e[4]=o,e[5]=z):z=e[5];e[6]!==z?(C=(0,f.jsxs)(s.View,{style:D.content,children:[O,(0,f.jsx)(n.Text,{style:D.text,children:z})]}),e[6]=z,e[7]=C):C=e[7];e[8]!==T||e[9]!==C?(I=(0,f.jsxs)(u.default.View,{style:T,pointerEvents:"none",children:[F,C]}),e[8]=T,e[9]=C,e[10]=I):I=e[10];return I};var n=r(d[0]),s=r(d[1]),t=r(d[2]);r(d[3]),r(d[4]);var o=e(r(d[5])),l=r(d[6]),c=r(d[7]),u=e(c),_=r(d[8]);r(d[9]);var p=r(d[10]),h=r(d[11]),f=r(d[12]);const v=(0,l.withUnistyles)(_.Upload),S=e=>({color:e.colors.primary}),k={code:"function fileDropBackdropTsx1(){const{isDragging,hasSink,suppressed,withTiming}=this.__closure;var _isDragging,_hasSink,_suppressed;const active=((_isDragging=isDragging)===null||_isDragging===void 0?void 0:_isDragging.value)&&((_hasSink=hasSink)===null||_hasSink===void 0?void 0:_hasSink.value)&&!((_suppressed=suppressed)!==null&&_suppressed!==void 0&&_suppressed.value);return{opacity:withTiming(active?1:0,{duration:150})};}"};const y=o.default.create({overlay:Object.assign({},o.default.absoluteFillObject,{alignItems:"center",justifyContent:"center",zIndex:1e3})}),D=l.StyleSheet.create(e=>({backdrop:Object.assign({},l.StyleSheet.absoluteFillObject,{backgroundColor:e.colors.surface0,opacity:.7,uni__dependencies:[0]}),content:{alignItems:"center",gap:e.spacing[2],uni__dependencies:[0]},text:{fontSize:e.fontSize.base,fontWeight:e.fontWeight.medium,color:e.colors.foreground,uni__dependencies:[0]}}))},3988,[711,348,349,146,234,59,56,444,1590,36,1563,3987,279]);
15644
15644
  __d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.useDropListeners=function({isDragging:n,suppressed:p,hasSink:f,getSink:v,disabled:F}){const h=(0,e.useRef)(null),y=(0,e.useRef)(0),E=(0,e.useRef)(F);return E.current=F,(0,e.useEffect)(()=>{F&&(n.value=!1,y.current=0)},[F,n]),(0,e.useEffect)(()=>{if(!s.isWeb)return;let e,F=!1,D=!1;function L(t){if(D)return;const n=t??e;if(n){D=!0;try{Promise.resolve(n()).catch(e=>{console.warn("[useDropListeners] Failed to remove desktop drag-drop listener:",e)})}catch(e){console.warn("[useDropListeners] Failed to remove desktop drag-drop listener:",e)}}}async function k(){const s=(0,t.getDesktopHost)();if(null===s)return!1;const c=s.window?.getCurrentWindow?.();if(!c||"function"!=typeof c.onDragDropEvent)return!1;try{const t=await c.onDragDropEvent(e=>{const t=e.payload;if("leave"===t.type)return void(n.value=!1);if("enter"===t.type||"over"===t.type)return void(E.current||(n.value=!0));if(n.value=!1,E.current||p.value)return;const s=v();if(!s)return;const c=t.paths.map(e=>({kind:"desktop-path",path:e}));s.onGenericFiles&&c.length>0&&s.onGenericFiles(c);const u=t.paths.filter(o.isRasterImagePath);0!==u.length&&Promise.all(u.map(l)).then(e=>{0!==e.length&&s.onFiles(e)}).catch(e=>{console.error("[useDropListeners] Failed to persist dropped files:",e)})});return F?(L(t),!0):(e=t,!0)}catch(e){return console.warn("[useDropListeners] Failed to listen for desktop drag-drop:",e),!1}}function w(){const t=h.current;function s(e){if(e.preventDefault(),e.stopPropagation(),E.current)return;if(y.current++,p.value||!f.value)return;const t=new Set(e.dataTransfer?.types??[]),o=t.has(c.WORKSPACE_FILE_DRAG_MIME)&&Boolean(v()?.onWorkspaceFile);(t.has("Files")||o)&&(n.value=!0)}function l(e){if(e.preventDefault(),e.stopPropagation(),!e.dataTransfer)return;const t=new Set(e.dataTransfer.types),n=t.has(c.WORKSPACE_FILE_DRAG_MIME)&&Boolean(v()?.onWorkspaceFile),o=(t.has("Files")||n)&&!E.current&&!p.value&&f.value;e.dataTransfer.dropEffect=o?"copy":"none"}function F(e){e.preventDefault(),e.stopPropagation(),E.current||(y.current--,0===y.current&&(n.value=!1))}async function D(e){if(e.preventDefault(),e.stopPropagation(),n.value=!1,y.current=0,E.current||p.value)return;const t=v();if(!t)return;const s=e.dataTransfer?.getData(c.WORKSPACE_FILE_DRAG_MIME);if(s&&t.onWorkspaceFile){const e=(0,c.parseWorkspaceFileDragPayload)(s);e&&t.onWorkspaceFile(e)}const l=Array.from(e.dataTransfer?.files??[]),f=l.map(e=>({kind:"web-file",file:e}));t.onGenericFiles&&f.length>0&&t.onGenericFiles(f);const F=l.filter(o.isRasterImageFile);if(0!==F.length)try{const e=await Promise.all(F.map(u));t.onFiles(e)}catch(e){console.error("[useDropListeners] Failed to process dropped files:",e)}}t&&(t.addEventListener("dragenter",s),t.addEventListener("dragover",l),t.addEventListener("dragleave",F),t.addEventListener("drop",D),e=()=>{t.removeEventListener("dragenter",s),t.removeEventListener("dragover",l),t.removeEventListener("dragleave",F),t.removeEventListener("drop",D)})}return(async()=>{const e=await k();F||e||w()})(),()=>{F=!0,L()}},[n,p,f,v]),h};var e=r(d[0]),t=r(d[1]),n=r(d[2]),o=r(d[3]),s=r(d[4]),c=r(d[5]);async function l(e){const t=(0,o.getRasterImageMimeTypeFromPath)(e)??"image/jpeg";return await(0,n.persistAttachmentFromFileUri)({uri:e,mimeType:t})}async function u(e){return await(0,n.persistAttachmentFromBlob)({blob:e,mimeType:e.type||"image/jpeg",fileName:e.name})}},3989,[36,3264,3465,3990,3263,3954]);
15645
15645
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"RASTER_IMAGE_FILE_EXTENSIONS",{enumerable:!0,get:function(){return o}}),e.getFileExtension=f,e.getFileTypeLabel=function(t){const n=f(t).slice(1);return n?n.toUpperCase():null},e.getMimeTypeFromPath=function(t){return p(t)??s},e.getRasterImageMimeTypeFromPath=p,e.isRasterImagePath=u,e.isRasterImageMimeType=c,e.isRasterImageFile=function(t){if(c(t.type))return!0;return 0===t.type.trim().length&&u(t.name)};const t={".png":"image/png",".jpg":"image/jpeg",".jpeg":"image/jpeg",".gif":"image/gif",".webp":"image/webp",".bmp":"image/bmp",".heic":"image/heic",".heif":"image/heif",".avif":"image/avif",".tif":"image/tiff",".tiff":"image/tiff"},n=new Set(Object.values(t)),s="application/octet-stream",o=Object.keys(t).map(t=>t.slice(1));function f(t){const n=t.split("#",1)[0]?.split("?",1)[0]??t,s=n.lastIndexOf(".");return s<0?"":n.slice(s).toLowerCase()}function p(n){return t[f(n)]??null}function u(t){return null!==p(t)}function c(t){const s=t?.split(";",1)[0]?.trim().toLowerCase();return Boolean(s&&n.has(s))}},3990,[]);
15646
- __d(function(g,r,i,a,m,_e,d){"use strict";const e=["isAgentRunning","hasSendableContent","isProcessing"],t=["isVoiceModeForAgent","hasAgent","isAgentRunning","hasSendableContent","isProcessing","isCompact","cancelButton"];function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.Composer=function({agentId:e,serverId:t,workspaceId:n,isPaneFocused:o,onSubmitMessage:s,onClientSlashCommand:l,hasExternalContent:p=!1,allowEmptySubmit:h=!1,submitButtonAccessibilityLabel:C,submitButtonTestID:A,submitIcon:y="arrow",isSubmitLoading:I=!1,waitForGithubAutoAttachOnSubmit:j=!1,submitBehavior:O="clear",blurOnSubmit:D=!1,value:z,onChangeText:ee,attachments:ne,attachmentScopeKeys:Ce=be,onOpenWorkspaceAttachment:Pe,onChangeAttachments:Be,onGithubPrDetected:We,onGithubPrAutoAttach:Ne,cwd:qe,clearDraft:Ve,autoFocus:ze=!1,autoFocusKey:Qe,onFocusInput:Je,commandDraftConfig:tt,onMessageSent:nt,onComposerHeightChange:ot,onAttentionInputFocus:st,onAttentionPromptSend:it,agentControls:ct,inputWrapperStyle:lt,externalKeyboardShift:dt,isCompactLayout:mt}){const{t:gt}=(0,f.useTranslation)(),pt=Q.isWeb?T.ICON_SIZE.md:T.ICON_SIZE.lg,ht=(0,q.useHostRuntimeClient)(t),bt=(0,q.useHostRuntimeIsConnected)(t),ft=(0,q.useHostRuntimeAgentDirectoryStatus)(t),Ct=(0,E.useToast)(),xt=(0,b.useRef)(Ct.error);xt.current=Ct.error;const St=(0,L.useVoiceOptional)(),At=(0,B.useShortcutKeys)("voice-toggle"),vt=(0,B.useShortcutKeys)("agent-interrupt"),yt=(0,ie.useIsDictationReady)({serverId:t,isConnected:bt,agentDirectoryStatus:ft}),{settings:It}=(0,G.useAppSettings)(),kt=(0,w.useSessionStore)((0,S.useShallow)(Re(t,e))),wt=(0,w.useSessionStore)(n=>n.sessions[t]?.queuedMessages?.get(e))??$e,Rt=(0,w.useSessionStore)(e=>e.setQueuedMessages),Ft=(0,w.useSessionStore)(e=>e.setAgentStreamTail),jt=(0,w.useSessionStore)(e=>e.setAgentStreamHead),Tt=(0,x.useIsCompactFormFactor)(),_t=(An=mt,vn=Tt,An??vn),Mt=ve(Tt),Pt=ye(ve(_t),gt),Lt=z,Et=ee,Ot=(0,J.useWorkspaceAttachmentsForScopes)(Ce),{selectedAttachments:Dt,buildOutgoingAttachments:Bt,removeAttachment:Wt,openAttachment:Nt,clearSentAttachments:qt,completeSubmit:Vt,resetSuppression:zt}=X.composerWorkspaceAttachment.useBinding({normalAttachments:ne,workspaceAttachments:Ot,onOpenWorkspaceAttachment:Pe}),Ut=Be,Kt=(0,re.useCheckoutStatusQuery)({serverId:t,cwd:qe}),$t=(0,w.useSessionStore)(e=>!0===e.sessions[t]?.serverInfo?.features?.forgeSearch),Ht=(0,de.useComposerGithubAutoAttach)({text:Lt,remoteUrl:(Sn=Kt.status,Sn?.remoteUrl??null),attachments:ne,client:ht,isConnected:bt,serverId:t,cwd:qe,supportsForgeSearch:$t,setAttachments:Ut,onPullRequestDetected:We,onPullRequestAdded:Ne}),[Gt,Qt]=(0,b.useState)(0),[Zt,Xt]=(0,b.useState)(!1),[Jt,Yt]=(0,b.useState)(!1),[en,tn]=(0,b.useState)(!1),[nn,on]=(0,b.useState)(null),[sn,an]=(0,b.useState)(!1),[rn,cn]=(0,b.useState)(!1),[ln,un]=(0,b.useState)(""),[dn,mn]=(0,b.useState)(null),gn=(0,b.useRef)(null),pn=(0,b.useRef)(null),hn=xe(O,I),bn=(0,b.useRef)(`message-input:${t}:${e}:${Math.random().toString(36).slice(2)}`),fn=(0,b.useCallback)(e=>!("immediate"!==e.execution||!l)&&(D&&pn.current?.blur(),Ve("sent"),Et(""),Ut([]),zt(),on(null),Xt(!0),l(e).catch(e=>{console.error("[Composer] Failed to run client slash command:",e),on(e instanceof Error?e.message:String(e))}).finally(()=>{Xt(!1)}),!0),[D,Ve,l,zt,Ut,Et]),Cn=(0,N.useAgentAutocomplete)({userInput:Lt,cursorIndex:Gt,setUserInput:Et,serverId:t,agentId:e,draftConfig:tt,canExecuteClientSlashCommand:0===Bt(ne).length,onClientSlashCommand:fn,onAutocompleteApplied:()=>{pn.current?.focus()}}),xn=(0,b.useRef)(Cn.onKeyPress);var Sn;var An,vn;xn.current=Cn.onKeyPress,(0,b.useEffect)(()=>{nn&&Lt&&on(null)},[Lt,nn]),(0,b.useEffect)(()=>{Qt(e=>Math.min(e,Lt.length))},[Lt.length]);const{pickImages:yn}=(0,k.useImageAttachmentPicker)(),{pickFiles:In}=(0,R.useFilePicker)(),kn=(0,b.useRef)(e),wn=(0,b.useRef)(null),Rn=(0,b.useRef)(s),Fn=(0,b.useCallback)(e=>{Ut(t=>[...t,...e.map(e=>({kind:"image",metadata:e}))])},[Ut]),jn=(0,b.useCallback)(e=>{Ut(t=>[...t,...e])},[Ut]),Tn=(0,b.useCallback)(()=>{Q.isNative||(0,M.focusWithRetries)({focus:()=>pn.current?.focus(),isFocused:()=>{const e=pn.current?.getNativeElement?.()??null;return null!=e&&document.activeElement===e}})},[]),_n=(0,b.useCallback)(e=>{if(!n)return;const o=(0,pe.resolveWorkspaceFileDrop)({payload:e,serverId:t,workspaceId:n});o&&(Ut(e=>(0,ge.appendWorkspaceFileAttachment)(e,o)),Tn())},[Tn,t,Ut,n]);(0,b.useEffect)(()=>{Je?.(Tn)},[Tn,Je]);const Mn=(0,b.useCallback)(async(e,t)=>{if(nt?.(),Rn.current)await Rn.current({text:e,attachments:t,cwd:qe});else{if(!wn.current)throw new Error(gt("workspace.terminal.hostDisconnected"));await wn.current(kn.current,e,t)}},[qe,nt,gt]);(0,b.useEffect)(()=>{kn.current=e},[e]),(0,b.useEffect)(()=>{wn.current=async(e,n,o)=>{if(!ht)throw new Error(gt("workspace.terminal.hostDisconnected"));const s={getTail:e=>w.useSessionStore.getState().sessions[t]?.agentStreamTail?.get(e),getHead:e=>w.useSessionStore.getState().sessions[t]?.agentStreamHead?.get(e),setHead:e=>jt(t,e),setTail:e=>Ft(t,e)};await(0,P.dispatchComposerAgentMessage)({client:ht,agentId:e,text:n,attachments:o,attachmentSubmitFormat:(0,Z.resolveComposerAttachmentSubmitFormat)({supportsForgeAttachments:$t}),encodeImages:_.encodeImages,stream:s}),it?.()}},[ht,it,t,Ft,jt,$t,gt]),(0,b.useEffect)(()=>{Rn.current=s},[s]);const Pn="running"===kt.status,Ln=null!==kt.status,En=(0,b.useMemo)(()=>({read:e=>w.useSessionStore.getState().sessions[t]?.queuedMessages?.get(e)??[],write:e=>Rt(t,e)}),[t,Rt]),On=(0,b.useCallback)((t,n)=>{(0,P.queueComposerMessage)({agentId:e,text:t,attachments:n,queue:En}).queued&&(Et(""),Ut([]),zt(),qt(n))},[e,qt,En,zt,Ut,Et]),Dn=(0,b.useCallback)(async(e,t,n)=>{const o=await(0,$.submitAgentInput)({message:e,attachments:t,hasExternalContent:p,allowEmptySubmit:h,forceSend:n,submitBehavior:O,isAgentRunning:Pn,canSubmit:Boolean(wn.current||Rn.current),queueMessage:({message:e,attachments:t})=>{On(e,t)},submitMessage:async({message:e,attachments:t})=>{await Mn(e,t)},clearDraft:Ve,setUserInput:Et,setAttachments:e=>{Ut(X.composerWorkspaceAttachment.userAttachmentsOnly(e))},setSendError:on,setIsProcessing:Xt,onSubmitError:e=>{console.error("[AgentInput] Failed to send message:",e)},failedToSendMessage:gt("composer.errors.failedToSend")});Vt({result:o,outgoingAttachments:t})},[h,Ve,Vt,p,Pn,On,Ut,Et,O,Mn,gt]),Bn=(0,b.useCallback)(e=>{const t=Bt(ne),n=(0,me.resolveClientSlashCommand)({text:e.text,hasAttachments:t.length>0});n&&fn(n)||(D&&pn.current?.blur(),Dn(e.text,t,e.forceSend))},[ne,D,Bt,fn,Dn]),Wn=(0,b.useCallback)(async()=>{const e=await(0,P.pickAndPersistImages)({pickImages:yn,persister:{persistFromBlob:({blob:e,mimeType:t,fileName:n})=>(0,V.persistAttachmentFromBlob)({blob:e,mimeType:t,fileName:n}),persistFromFileUri:({uri:e,mimeType:t,fileName:n})=>(0,V.persistAttachmentFromFileUri)({uri:e,mimeType:t,fileName:n})}});0!==e.length&&Fn(e)},[Fn,yn]),Nn=(0,b.useCallback)(async e=>{if(0===e.length)return;if(!ht)return void xt.current(gt("composer.errors.daemonClientDisconnected"));const t=e.find(e=>e.bytes.byteLength>Ke);if(t)xt.current(gt("composer.errors.fileTooLarge",{size:"50MB",fileName:t.fileName}));else{Yt(!0);try{const t=await(0,P.uploadFileAttachments)({client:ht,files:e});jn(t)}catch(e){console.error("[Composer] Failed to upload file:",e),xt.current(e instanceof Error?e.message:gt("composer.errors.uploadFailed"))}finally{Yt(!1)}}},[jn,ht,gt]),qn=(0,b.useCallback)(async()=>{if(ht)try{const e=await In();if(!e)return;await Nn(e)}catch(e){console.error("[Composer] Failed to upload file:",e),xt.current(e instanceof Error?e.message:gt("composer.errors.uploadFailed"))}else xt.current(gt("composer.errors.daemonClientDisconnected"))},[ht,In,gt,Nn]),Vn=(0,b.useCallback)(async e=>{try{const t=await(0,Y.droppedItemsToPickedFiles)(e);if(0===t.length)return;if(!ht||!bt)return void xt.current(gt("composer.errors.daemonClientDisconnected"));await Nn(t)}catch(e){console.error("[Composer] Failed to upload dropped files:",e),xt.current(e instanceof Error?e.message:gt("composer.errors.uploadFailed"))}},[ht,bt,gt,Nn]),zn=(0,b.useCallback)(e=>{Ht.markGithubAttachmentRemoved(Dt[e]);Wt({selectedAttachments:Dt,index:e})||Ut(t=>(0,P.removeComposerAttachmentAtIndex)({attachments:t,index:e,deleteAttachments:V.deleteAttachments}))},[Ht,Wt,Dt,Ut]),Un=(0,b.useCallback)(e=>{(0,P.openComposerAttachment)({attachment:e,setLightboxMetadata:mn,openWorkspaceAttachment:Nt,openExternalUrl:e=>{(0,se.openExternalUrl)(e)}})},[Nt]);(0,b.useEffect)(()=>{Pn&&bt||tn(!1)},[Pn,bt]);const Kn=(0,b.useCallback)(()=>{(0,P.cancelComposerAgent)({client:ht,agentId:kn.current,isAgentRunning:Pn,isCancellingAgent:en,isConnected:bt,onCancelFailed:e=>{tn(!1);const t=Le(e);t&&t.trim().length>0&&xt.current(t)}})&&(tn(!0),pn.current?.focus())},[ht,Pn,en,bt]),$n=(0,b.useCallback)(()=>{Oe(pn)},[]),Hn=(0,b.useCallback)(e=>De({action:e,isPaneFocused:o,messageInputRef:pn,isAgentRunning:Pn,isCancellingAgent:en,isConnected:bt,handleCancelAgent:Kn,focusMessageInputForKeyboardAction:$n}),[$n,Kn,Pn,en,bt,o]);(0,K.useKeyboardActionHandler)({handlerId:bn.current,actions:["agent.interrupt","message-input.focus","message-input.send","message-input.dictation-toggle","message-input.dictation-cancel","message-input.dictation-confirm","message-input.voice-toggle","message-input.voice-mute-toggle"],enabled:o,priority:Ae(sn),isActive:()=>o,handle:Hn});const{style:Gn}=(0,U.useKeyboardShiftStyle)({mode:"translate",enabled:!dt}),Qn=Se(St,t,e),Zn=(0,b.useCallback)(()=>{Ee({voice:St,isConnected:bt,hasAgent:Ln,serverId:t,agentId:e,toastErrorRef:xt})},[e,Ln,bt,t,St]),Xn=(0,b.useCallback)(t=>{const n=(0,P.editQueuedComposerMessage)({agentId:e,messageId:t,queue:En});n&&(Et(n.text),Ut(n.attachments))},[e,En,Ut,Et]),Jn=(0,b.useCallback)(async t=>{if(!wn.current&&!Rn.current)return;const n=await(0,P.sendQueuedComposerMessageNow)({agentId:e,messageId:t,queue:En,submitMessage:({text:e,attachments:t})=>Mn(e,t),failedToSendMessage:gt("composer.errors.failedToSend")});"failed"===n.status&&on(n.errorMessage)},[e,En,Mn,gt]),Yn=(0,b.useCallback)(e=>{const t=Bt(ne),n=(0,me.resolveClientSlashCommand)({text:e.text,hasAttachments:t.length>0});n&&fn(n)||On(e.text,t)},[ne,Bt,On,fn]),eo=Lt.trim().length>0||Dt.length>0,to=(0,b.useCallback)(e=>xn.current(e),[]),no=(0,b.useMemo)(()=>ke(bt,en),[bt,en]),oo=St?.isVoiceSwitching??!1,so=!bt||oo,io=(0,b.useCallback)(e=>we(e.hovered,so,_t),[_t,so]),ao=(0,b.useMemo)(()=>(0,he.jsx)(Ze,{isAgentRunning:Pn,hasSendableContent:eo,isProcessing:Zt,buttonIconSize:pt,cancelButtonStyle:no,handleCancelAgent:Kn,isConnected:bt,isCancellingAgent:en,agentInterruptKeys:vt,t:gt}),[vt,pt,no,Kn,eo,Pn,en,bt,Zt,gt]),ro=(0,b.useMemo)(()=>(0,he.jsx)(Xe,{isVoiceModeForAgent:Qn,hasAgent:Ln,isAgentRunning:Pn,hasSendableContent:eo,isProcessing:Zt,isCompact:_t,buttonIconSize:pt,handleToggleRealtimeVoice:Zn,isConnected:bt,isVoiceSwitching:oo,realtimeVoiceButtonStyle:io,voiceToggleKeys:At,t:gt,cancelButton:ao}),[pt,ao,Zn,Ln,eo,Pn,bt,_t,Zt,Qn,oo,io,gt,At]),{contextWindowMaxTokens:co,contextWindowUsedTokens:lo}=Ge(kt.contextWindowMaxTokens,kt.contextWindowUsedTokens),uo="initializing"===kt.status||"running"===kt.status,mo=_t?T.ICON_SIZE.md:pt,go=(0,b.useMemo)(()=>Fe(co,lo,kt.totalCostUsd,!1,t,kt.provider,uo,mo),[co,lo,kt.totalCostUsd,t,kt.provider,uo,mo]),po=(0,b.useMemo)(()=>{return e=go,Ln?(0,he.jsx)(u.View,{style:et.contextWindowMeterSlot,children:e}):null;var e},[go,Ln]),ho=(0,b.useMemo)(()=>Dt.some(e=>"forge_change_request"===e.kind||"forge_issue"===e.kind||"github_pr"===e.kind||"github_issue"===e.kind),[Dt]),{forge:bo}=(0,ce.useCheckoutPrStatusQuery)({serverId:t,cwd:qe,enabled:bt&&qe.trim().length>0&&(rn||ho)}),fo=(0,b.useMemo)(()=>(0,le.getForgePresentation)(bo),[bo]),Co=ln.trim(),xo=(0,ae.useForgeSearchQuery)({client:ht,serverId:t,cwd:qe,query:Co,supportsForgeSearch:$t,enabled:Ie(rn,bt,qe)}),So=xo.data?.items,Ao=(0,b.useMemo)(()=>So??[],[So]),vo=(0,b.useMemo)(()=>Ao.map(e=>{const t=(0,le.getForgePresentation)(e.forge??"github"),n="change_request"===e.kind?t.numberPrefix:t.issueNumberPrefix;return{id:`${e.kind}:${e.number}`,label:`${n}${e.number} ${e.title}`,description:Co}}),[Ao,Co]),yo=(0,b.useMemo)(()=>{return[{id:"image",label:gt("composer.attachments.addImage"),icon:(0,he.jsx)(rt,{size:T.ICON_SIZE.md,uniProps:ut}),onSelect:()=>{Wn()}},{id:"github",label:gt("composer.attachments.addIssueOrPr",{context:fo.changeRequestContext}),icon:(e=fo.icon,(0,he.jsx)(ue.ForgeBrandIcon,{iconKind:e,size:T.ICON_SIZE.md,uniProps:ut})),onSelect:()=>{cn(!0)}},{id:"file",label:gt("composer.attachments.addFile"),icon:(0,he.jsx)(at,{size:T.ICON_SIZE.md,uniProps:ut}),onSelect:()=>{qn()}}];var e},[Wn,qn,gt,fo]),Io=(0,b.useCallback)(e=>{const t=(0,P.toggleGithubAttachmentFromPicker)({current:ne,item:e,markGithubAttachmentRemoved:Ht.markGithubAttachmentRemoved});Ut(t),cn(!1),un("")},[ne,Ht,Ut,un,cn]),ko=(0,b.useMemo)(()=>je({agentControls:ct,agentId:e,serverId:t,focusInput:Tn,isCompactLayout:_t,isPaneFocused:o}),[ct,e,Tn,_t,o,t]),wo=(0,b.useCallback)(e=>{gn.current=e},[]),Ro=(0,b.useCallback)(e=>{Qt(e.start)},[]),Fo=(0,b.useCallback)(e=>{an(e),e&&st?.()},[st]),jo=(0,b.useCallback)(()=>{mn(null)},[]),To=(0,b.useCallback)(e=>{cn(e),e||un("")},[un]),_o=(0,b.useCallback)(({option:e,active:t})=>{const n=(0,P.findGithubItemByOption)(Ao,e.id);if(!n)return(0,he.jsx)(u.View,{},e.id);const o=(0,P.isAttachmentSelectedForGithubItem)(Dt,n);return(0,he.jsx)(Ue,{testID:`composer-github-option-${e.id}`,label:e.label,selected:o,active:t,item:n,onToggle:Io},e.id)},[Ao,Dt,Io]),Mo=(0,b.useMemo)(()=>[Ye.container,Gn],[Gn]),Po=(0,b.useMemo)(()=>[et.inputAreaContainer,hn&&et.inputAreaLocked],[hn]),Lo=(0,b.useMemo)(()=>Te({selectedAttachments:Dt,isComposerLocked:hn,handleOpenAttachment:Un,handleRemoveAttachment:zn,labels:{openImage:gt("composer.attachments.openImage"),removeImage:gt("composer.attachments.removeImage"),removeFile:gt("composer.attachments.removeFile"),openGithub:(e,t)=>gt("composer.attachments.openGithub",{kind:e,number:t}),removeGithub:(e,t)=>gt("composer.attachments.removeGithub",{kind:e,number:t})}}),[Un,zn,hn,Dt,gt]),Eo=(0,b.useMemo)(()=>Me({queuedMessages:wt,handleEditQueuedMessage:Xn,handleSendQueuedNow:Jn,editLabel:gt("composer.attachments.editQueuedMessage"),sendNowLabel:gt("composer.attachments.sendQueuedMessageNow")}),[Xn,Jn,wt,gt]),Oo=(0,b.useRef)(null),Do=Zt||I||Jt||j&&Ht.isResolving;(0,F.useFileDrop)({onFiles:Fn,onGenericFiles:Vn,onWorkspaceFile:_n},{disabled:Do});const Bo=ze&&Mt,Wo=Pn?Kn:void 0,No=(0,b.useMemo)(()=>nn?(0,he.jsx)(c.Text,{style:et.sendErrorText,children:nn}):null,[nn]),qo=xo.isFetching?gt("composer.github.searching"):gt("composer.github.noResults"),Vo=Cn.isVisible&&o;return(0,he.jsx)(H.ComposerKeyboardScopeProvider,{isActiveComposer:o,children:(0,he.jsxs)(v.default.View,{style:Mo,children:[(0,he.jsx)(oe.AttachmentLightbox,{metadata:dn,onClose:jo}),(0,he.jsx)(u.View,{style:Po,children:(0,he.jsxs)(u.View,{style:et.inputAreaContent,children:[Eo,No,(0,he.jsxs)(u.View,{ref:Oo,style:et.messageInputContainer,children:[(0,he.jsx)(W.AutocompletePopover,{visible:Vo,anchorRef:Oo,options:Cn.options,selectedIndex:Cn.selectedIndex,onSelect:Cn.onSelectOption,isLoading:Cn.isLoading,errorMessage:Cn.errorMessage,loadingText:Cn.loadingText,emptyText:Cn.emptyText}),(0,he.jsx)(He,{ref:pn,value:Lt,onChangeText:Et,onSubmit:Bn,hasExternalContent:p,allowEmptySubmit:h,submitButtonAccessibilityLabel:C,submitButtonTestID:A,submitIcon:y,isSubmitDisabled:Do,isSubmitLoading:Do,preserveHeightOnSubmit:"preserve-and-lock"===O,attachments:Dt,cwd:qe,attachmentMenuItems:yo,onAttachButtonRef:wo,onAddImages:Fn,client:ht,isReadyForDictation:yt,placeholder:Pt,autoFocus:Bo,autoFocusKey:`${t}:${e}:${Qe??""}`,disabled:I,isPaneFocused:o,leftContent:ko,beforeVoiceContent:po,rightContent:ro,voiceServerId:t,voiceAgentId:e,isAgentRunning:Pn,defaultSendBehavior:It.sendBehavior,onQueue:Yn,onSubmitLoadingPress:Wo,onKeyPress:to,onSelectionChange:Ro,onFocusChange:Fo,onHeightChange:ot,inputWrapperStyle:lt,attachmentSlot:Lo}),(0,he.jsx)(te.Combobox,{options:vo,value:"",onSelect:fe,keepOpenOnSelect:!0,searchable:!0,searchPlaceholder:gt("composer.github.searchPlaceholder",{context:fo.changeRequestContext}),title:gt("composer.github.title",{context:fo.changeRequestContext}),open:rn,onOpenChange:To,onSearchQueryChange:un,desktopPlacement:"top-start",anchorRef:gn,emptyText:qo,renderOption:_o})]})]})})]})})};var o=n(r(d[0])),s=r(d[1]),c=r(d[2]),l=r(d[3]),u=r(d[4]),p=r(d[5]);r(d[6]),r(d[7]),r(d[8]),r(d[9]);var h=n(r(d[10])),b=r(d[11]),f=r(d[12]),C=r(d[13]),x=r(d[14]),S=r(d[15]),A=r(d[16]),v=n(r(d[17])),y=r(d[18]),I=r(d[19]),k=r(d[20]),w=r(d[21]),R=r(d[22]),F=r(d[23]),j=r(d[24]),T=r(d[25]),_=r(d[26]),M=r(d[27]),P=r(d[28]),L=r(d[29]),E=r(d[30]),O=r(d[31]),D=r(d[32]),B=r(d[33]),W=r(d[34]),N=r(d[35]),q=r(d[36]),V=r(d[37]),z=r(d[38]),U=r(d[39]),K=r(d[40]),$=r(d[41]),H=r(d[42]),G=r(d[43]),Q=r(d[44]),Z=r(d[45]),X=r(d[46]),J=r(d[47]),Y=r(d[48]),ee=r(d[49]),te=r(d[50]),ne=r(d[51]),oe=r(d[52]),se=r(d[53]),ie=r(d[54]),ae=r(d[55]),re=r(d[56]),ce=r(d[57]),le=r(d[58]),ue=r(d[59]),de=r(d[60]),me=r(d[61]),ge=r(d[62]),pe=r(d[63]),he=r(d[64]);const be=[];function fe(){}const Ce=()=>{};function xe(e,t){return"preserve-and-lock"===e&&t}function Se(e,t,n){return e?.isVoiceModeForAgent(t,n)??!1}function Ae(e){return e?200:100}function ve(e){return Q.isWeb&&!e}function ye(e,t){return t(e?"composer.placeholders.desktop":"composer.placeholders.mobile")}function Ie(e,t,n){return e&&t&&n.trim().length>0}function ke(e,t){const n=!e||t?et.buttonDisabled:void 0;return[et.cancelButton,n].filter(e=>Boolean(e))}function we(e,t,n){const o=e?et.iconButtonHovered:void 0,s=t?et.buttonDisabled:void 0,c=n?et.realtimeVoiceButtonCompactReserve:void 0;return[et.realtimeVoiceButton,c,o,s].filter(e=>Boolean(e))}function Re(e,t){return n=>{const o=n.sessions[e]?.agents?.get(t)??null;return{status:o?.status??null,contextWindowMaxTokens:o?.lastUsage?.contextWindowMaxTokens??null,contextWindowUsedTokens:o?.lastUsage?.contextWindowUsedTokens??null,totalCostUsd:o?.lastUsage?.totalCostUsd??null,model:o?.model??null,provider:o?.provider??null}}}function Fe(e,t,n,o,s,c,l,u){return null!==e&&null!==t||l?(0,he.jsx)(I.ContextWindowMeter,{maxTokens:e,usedTokens:t,totalCostUsd:n,showPercentage:o,serverId:s,provider:c,pending:l,glyphSize:u}):null}function je(e){const{agentControls:t,agentId:n,serverId:o,focusInput:s,isCompactLayout:c,isPaneFocused:l}=e;return"draft"===(0,z.resolveAgentControlsMode)(t)&&t?(0,he.jsx)(y.DraftAgentControls,Object.assign({},t,{isCompactLayout:c})):(0,he.jsx)(y.AgentControls,{agentId:n,serverId:o,isPaneFocused:l,onDropdownClose:s,isCompactLayout:c})}function Te(e){const{selectedAttachments:t,isComposerLocked:n,handleOpenAttachment:o,handleRemoveAttachment:s,labels:c}=e;return 0===t.length?null:(0,he.jsx)(u.View,{style:et.attachmentTray,testID:"composer-attachment-tray",children:t.map((e,t)=>Pe({attachment:e,index:t,disabled:n,onOpen:o,onRemove:s,labels:c}))})}function Me(e){const{queuedMessages:t,handleEditQueuedMessage:n,handleSendQueuedNow:o,editLabel:s,sendNowLabel:c}=e;return 0===t.length?null:(0,he.jsx)(u.View,{style:et.queueTrack,children:t.map(e=>(0,he.jsx)(We,{item:e,onEdit:n,onSendNow:o,editLabel:s,sendNowLabel:c},e.id))})}function Pe(e){const{attachment:t,index:n,disabled:o,onOpen:s,onRemove:c,labels:l}=e;return"image"===t.kind?(0,he.jsx)(Ne,{attachment:t,index:n,disabled:o,onOpen:s,onRemove:c,openLabel:l.openImage,removeLabel:l.removeImage},t.metadata.id):"file"===t.kind?(0,he.jsx)(Ve,{attachment:t,index:n,disabled:o,onRemove:c,removeLabel:l.removeFile},t.attachment.id):"workspace_file"===t.kind?(0,he.jsx)(ze,{attachment:t,index:n,disabled:o,onRemove:c,removeLabel:l.removeFile},`workspace-file:${(0,ge.getWorkspaceFileAttachmentKey)(t)}`):X.composerWorkspaceAttachment.is(t)?X.composerWorkspaceAttachment.renderPill({attachment:t,index:n,disabled:o,onOpen:s,onRemove:c}):(0,he.jsx)(qe,{attachment:t,index:n,disabled:o,onOpen:s,onRemove:c,openLabel:l.openGithub,removeLabel:l.removeGithub},`${t.item.kind}:${t.item.number}`)}function Le(e){return e instanceof Error?e.message:"string"==typeof e?e:null}function Ee(e){const{voice:t,isConnected:n,hasAgent:o,serverId:s,agentId:c,toastErrorRef:l}=e;t&&n&&o&&(t.isVoiceSwitching||t.isVoiceModeForAgent(s,c)||t.startVoice(s,c).catch(e=>{console.error("[Composer] Failed to start voice mode",e);const t=Le(e);t&&t.trim().length>0&&l.current(t)}))}function Oe(e){Q.isNative?e.current?.focus():(0,M.focusWithRetries)({focus:()=>e.current?.focus(),isFocused:()=>{const t=e.current?.getNativeElement?.()??null,n="undefined"!=typeof document?document.activeElement:null;return Boolean(t)&&n===t}})}function De(e){const{action:t,isPaneFocused:n,messageInputRef:o,isAgentRunning:s,isCancellingAgent:c,isConnected:l,handleCancelAgent:u,focusMessageInputForKeyboardAction:p}=e;if(!n)return!1;if("agent.interrupt"===t.id)return!!o.current?.runKeyboardAction("dictation-cancel")||!(!s||c||!l)&&(u(),!0);if("message-input.focus"===t.id)return p(),!0;const h=Be(t.id);if(!h)return!1;const b=o.current?.runKeyboardAction(h);return"send"!==h&&"dictation-confirm"!==h||(b??!1)}function Be(e){switch(e){case"message-input.send":return"send";case"message-input.dictation-confirm":return"dictation-confirm";case"message-input.dictation-toggle":return"dictation-toggle";case"message-input.dictation-cancel":return"dictation-cancel";case"message-input.voice-toggle":return"voice-toggle";case"message-input.voice-mute-toggle":return"voice-mute-toggle";default:return null}}function We(e){const t=(0,p.c)(23),{item:n,onEdit:o,onSendNow:s,editLabel:h,sendNowLabel:b}=e;let f;t[0]!==n.id||t[1]!==o?(f=()=>{o(n.id)},t[0]=n.id,t[1]=o,t[2]=f):f=t[2];const C=f;let x;t[3]!==n.id||t[4]!==s?(x=()=>{s(n.id)},t[3]=n.id,t[4]=s,t[5]=x):x=t[5];const S=x;let A,v,y,I,k,w,R,F;return t[6]!==n.text?(A=(0,he.jsx)(c.Text,{style:et.queueText,numberOfLines:2,ellipsizeMode:"tail",children:n.text}),t[6]=n.text,t[7]=A):A=t[7],t[8]===Symbol.for("react.memo_cache_sentinel")?(v=(0,he.jsx)(tt,{size:T.ICON_SIZE.sm,uniProps:lt}),t[8]=v):v=t[8],t[9]!==h||t[10]!==C?(y=(0,he.jsx)(l.Pressable,{onPress:C,style:et.queueActionButton,accessibilityLabel:h,accessibilityRole:"button",children:v}),t[9]=h,t[10]=C,t[11]=y):y=t[11],t[12]===Symbol.for("react.memo_cache_sentinel")?(I=[et.queueActionButton,et.queueSendButton],t[12]=I):I=t[12],t[13]===Symbol.for("react.memo_cache_sentinel")?(k=(0,he.jsx)(nt,{size:T.ICON_SIZE.sm,uniProps:dt}),t[13]=k):k=t[13],t[14]!==S||t[15]!==b?(w=(0,he.jsx)(l.Pressable,{onPress:S,style:I,accessibilityLabel:b,accessibilityRole:"button",children:k}),t[14]=S,t[15]=b,t[16]=w):w=t[16],t[17]!==y||t[18]!==w?(R=(0,he.jsxs)(u.View,{style:et.queueActions,children:[y,w]}),t[17]=y,t[18]=w,t[19]=R):R=t[19],t[20]!==A||t[21]!==R?(F=(0,he.jsxs)(u.View,{style:et.queueItem,children:[A,R]}),t[20]=A,t[21]=R,t[22]=F):F=t[22],F}function Ne(e){const t=(0,p.c)(15),{attachment:n,index:o,disabled:s,onOpen:c,onRemove:l,openLabel:u,removeLabel:h}=e;let b;t[0]!==n||t[1]!==c?(b=()=>{c(n)},t[0]=n,t[1]=c,t[2]=b):b=t[2];const f=b;let C;t[3]!==o||t[4]!==l?(C=()=>{l(o)},t[3]=o,t[4]=l,t[5]=C):C=t[5];const x=C;let S,A;return t[6]!==n.metadata?(S=(0,he.jsx)(ne.AttachmentThumbnail,{metadata:n.metadata}),t[6]=n.metadata,t[7]=S):S=t[7],t[8]!==s||t[9]!==f||t[10]!==x||t[11]!==u||t[12]!==h||t[13]!==S?(A=(0,he.jsx)(ne.AttachmentPill,{testID:"composer-image-attachment-pill",onOpen:f,onRemove:x,openAccessibilityLabel:u,removeAccessibilityLabel:h,disabled:s,children:S}),t[8]=s,t[9]=f,t[10]=x,t[11]=u,t[12]=h,t[13]=S,t[14]=A):A=t[14],A}function qe(e){const t=(0,p.c)(37),{attachment:n,index:o,disabled:s,onOpen:c,onRemove:l,openLabel:u,removeLabel:h}=e,b=n.item;let f,C,x,S,A,v,y,I,k;if(t[0]!==n||t[1]!==o||t[2]!==b.forge||t[3]!==b.kind||t[4]!==b.number||t[5]!==c||t[6]!==l||t[7]!==u||t[8]!==h){const e=(0,le.getForgePresentation)(b.forge??"github");C="change_request"===b.kind;const s=C?e.changeRequestAbbrev:"issue";let p;S=C?e.changeRequestAbbrev:"Issue",x=C?e.numberPrefix:e.issueNumberPrefix,t[18]!==n||t[19]!==c?(p=()=>{c(n)},t[18]=n,t[19]=c,t[20]=p):p=t[20];const w=p;let R;t[21]!==o||t[22]!==l?(R=()=>{l(o)},t[21]=o,t[22]=l,t[23]=R):R=t[23];const F=R;f=ne.AttachmentPill,A="composer-github-attachment-pill",v=w,y=F,I=u(s,`${x}${b.number}`),k=h(s,`${x}${b.number}`),t[0]=n,t[1]=o,t[2]=b.forge,t[3]=b.kind,t[4]=b.number,t[5]=c,t[6]=l,t[7]=u,t[8]=h,t[9]=f,t[10]=C,t[11]=x,t[12]=S,t[13]=A,t[14]=v,t[15]=y,t[16]=I,t[17]=k}else f=t[9],C=t[10],x=t[11],S=t[12],A=t[13],v=t[14],y=t[15],I=t[16],k=t[17];const w=C?mt:gt,R=`${S} ${x}${b.number}`;let F,j;return t[24]!==b.title||t[25]!==w||t[26]!==R?(F=(0,he.jsx)(ne.AttachmentLabel,{icon:w,title:b.title,subtitle:R}),t[24]=b.title,t[25]=w,t[26]=R,t[27]=F):F=t[27],t[28]!==f||t[29]!==s||t[30]!==A||t[31]!==v||t[32]!==y||t[33]!==I||t[34]!==k||t[35]!==F?(j=(0,he.jsx)(f,{testID:A,onOpen:v,onRemove:y,openAccessibilityLabel:I,removeAccessibilityLabel:k,disabled:s,children:F}),t[28]=f,t[29]=s,t[30]=A,t[31]=v,t[32]=y,t[33]=I,t[34]=k,t[35]=F,t[36]=j):j=t[36],j}function Ve(e){const t=(0,p.c)(15),{attachment:n,index:o,disabled:s,onRemove:c,removeLabel:l}=e,{t:u}=(0,f.useTranslation)();let h;t[0]!==o||t[1]!==c?(h=()=>{c(o)},t[0]=o,t[1]=c,t[2]=h):h=t[2];const b=h,C=n.attachment.fileName;let x,S,A;return t[3]!==C||t[4]!==u?(x=(0,ee.getFileTypeLabel)(C)??u("message.attachments.file"),t[3]=C,t[4]=u,t[5]=x):x=t[5],t[6]!==C||t[7]!==x?(S=(0,he.jsx)(ne.AttachmentLabel,{icon:pt,title:C,subtitle:x}),t[6]=C,t[7]=x,t[8]=S):S=t[8],t[9]!==s||t[10]!==C||t[11]!==b||t[12]!==l||t[13]!==S?(A=(0,he.jsx)(ne.AttachmentPill,{testID:"composer-file-attachment-pill",onOpen:Ce,onRemove:b,openAccessibilityLabel:C,removeAccessibilityLabel:l,disabled:s,children:S}),t[9]=s,t[10]=C,t[11]=b,t[12]=l,t[13]=S,t[14]=A):A=t[14],A}function ze(e){const t=(0,p.c)(16),{attachment:n,index:o,disabled:s,onRemove:c,removeLabel:l}=e;let u;t[0]!==o||t[1]!==c?(u=()=>{c(o)},t[0]=o,t[1]=c,t[2]=u):u=t[2];const h=u;let b;t[3]!==n.path?(b=n.path.split("/").pop()??n.path,t[3]=n.path,t[4]=b):b=t[4];const f=b;let C,x,S;return t[5]!==n?(C=(0,ge.getWorkspaceFileAttachmentSubtitle)(n),t[5]=n,t[6]=C):C=t[6],t[7]!==f||t[8]!==C?(x=(0,he.jsx)(ne.AttachmentLabel,{icon:pt,title:f,subtitle:C}),t[7]=f,t[8]=C,t[9]=x):x=t[9],t[10]!==s||t[11]!==f||t[12]!==h||t[13]!==l||t[14]!==x?(S=(0,he.jsx)(ne.AttachmentPill,{testID:"composer-workspace-file-attachment-pill",onOpen:Ce,onRemove:h,openAccessibilityLabel:f,removeAccessibilityLabel:l,disabled:s,children:x}),t[10]=s,t[11]=f,t[12]=h,t[13]=l,t[14]=x,t[15]=S):S=t[15],S}function Ue(e){const t=(0,p.c)(12),{label:n,testID:o,active:s,selected:c,item:l,onToggle:u}=e;let h;t[0]!==l||t[1]!==u?(h=()=>{u(l)},t[0]=l,t[1]=u,t[2]=h):h=t[2];const b=h;let f;t[3]!==l.kind?(f="change_request"===l.kind?(0,he.jsx)(ot,{size:T.ICON_SIZE.sm,uniProps:ut}):(0,he.jsx)(st,{size:T.ICON_SIZE.sm,uniProps:ut}),t[3]=l.kind,t[4]=f):f=t[4];const C=f;let x;return t[5]!==s||t[6]!==b||t[7]!==n||t[8]!==C||t[9]!==c||t[10]!==o?(x=(0,he.jsx)(te.ComboboxItem,{testID:o,label:n,selected:c,active:s,onPress:b,leadingSlot:C}),t[5]=s,t[6]=b,t[7]=n,t[8]=C,t[9]=c,t[10]=o,t[11]=x):x=t[11],x}const Ke=52428800,$e=[],He=(0,b.memo)(j.MessageInput);function Ge(e,t){return"number"==typeof e&&"number"==typeof t?{contextWindowMaxTokens:e,contextWindowUsedTokens:t}:{contextWindowMaxTokens:null,contextWindowUsedTokens:null}}function Qe(e){const t=(0,p.c)(24),{buttonIconSize:n,cancelButtonStyle:o,handleCancelAgent:l,isConnected:h,isCancellingAgent:b,agentInterruptKeys:f,t:C}=e;let x;t[0]!==b||t[1]!==C?(x=C(b?"composer.cancel.cancelingAgent":"composer.cancel.stopAgent"),t[0]=b,t[1]=C,t[2]=x):x=t[2];const S=x;let v;t[3]!==n||t[4]!==b?(v=b?(0,he.jsx)(s.ActivityIndicator,{size:"small",color:"white"}):(0,he.jsx)(A.Square,{size:n,color:"white",fill:"white"}),t[3]=n,t[4]=b,t[5]=v):v=t[5];const y=v;let I;t[6]!==f?(I=f?(0,he.jsx)(D.Shortcut,{chord:f}):null,t[6]=f,t[7]=I):I=t[7];const k=I,w=!h||b;let R,F,j,T,_;return t[8]!==S||t[9]!==o||t[10]!==l||t[11]!==y||t[12]!==w?(R=(0,he.jsx)(O.TooltipTrigger,{onPress:l,disabled:w,accessibilityLabel:S,accessibilityRole:"button",style:o,children:y}),t[8]=S,t[9]=o,t[10]=l,t[11]=y,t[12]=w,t[13]=R):R=t[13],t[14]!==C?(F=C("composer.cancel.interrupt"),t[14]=C,t[15]=F):F=t[15],t[16]!==F?(j=(0,he.jsx)(c.Text,{style:et.tooltipText,children:F}),t[16]=F,t[17]=j):j=t[17],t[18]!==k||t[19]!==j?(T=(0,he.jsx)(O.TooltipContent,{side:"top",align:"center",offset:8,children:(0,he.jsxs)(u.View,{style:et.tooltipRow,children:[j,k]})}),t[18]=k,t[19]=j,t[20]=T):T=t[20],t[21]!==R||t[22]!==T?(_=(0,he.jsxs)(O.Tooltip,{delayDuration:0,enabledOnDesktop:!0,enabledOnMobile:!1,children:[R,T]}),t[21]=R,t[22]=T,t[23]=_):_=t[23],_}function Ze(t){const n=(0,p.c)(7);let s,c,l,u,h;if(n[0]!==t){var b=t;({isAgentRunning:c,hasSendableContent:s,isProcessing:l}=b),u=(0,o.default)(b,e),n[0]=t,n[1]=s,n[2]=c,n[3]=l,n[4]=u}else s=n[1],c=n[2],l=n[3],u=n[4];return!c||s||l?null:(n[5]!==u?(h=(0,he.jsx)(Qe,Object.assign({},u)),n[5]=u,n[6]=h):h=n[6],h)}function Xe(e){const n=(0,p.c)(15);let s,c,l,h,b,f,C,x;if(n[0]!==e){var S=e;({isVoiceModeForAgent:C,hasAgent:c,isAgentRunning:h,hasSendableContent:l,isProcessing:f,isCompact:b,cancelButton:s}=S),x=(0,o.default)(S,t),n[0]=e,n[1]=s,n[2]=c,n[3]=l,n[4]=h,n[5]=b,n[6]=f,n[7]=C,n[8]=x}else s=n[1],c=n[2],l=n[3],h=n[4],b=n[5],f=n[6],C=n[7],x=n[8];const A=!C&&c&&!h&&!(b&&l);if(!A&&!(h&&!l&&!f))return null;let v,y;return n[9]!==A||n[10]!==x?(v=A?(0,he.jsx)(Je,Object.assign({},x)):null,n[9]=A,n[10]=x,n[11]=v):v=n[11],n[12]!==s||n[13]!==v?(y=(0,he.jsxs)(u.View,{style:et.rightControls,children:[v,s]}),n[12]=s,n[13]=v,n[14]=y):y=n[14],y}function Je(e){const t=(0,p.c)(23),{buttonIconSize:n,handleToggleRealtimeVoice:o,isConnected:l,isVoiceSwitching:h,realtimeVoiceButtonStyle:b,voiceToggleKeys:f,t:C}=e;let x;t[0]!==f?(x=f?(0,he.jsx)(D.Shortcut,{chord:f}):null,t[0]=f,t[1]=x):x=t[1];const S=x;let A;t[2]!==n||t[3]!==h?(A=e=>{const{hovered:t}=e;if(h)return(0,he.jsx)(s.ActivityIndicator,{size:"small",color:"white"});const o=t?lt:ut;return(0,he.jsx)(it,{size:n,uniProps:o})},t[2]=n,t[3]=h,t[4]=A):A=t[4];const v=A,y=!l||h;let I,k,w,R,F,j;return t[5]!==C?(I=C("composer.voice.enableVoiceMode"),t[5]=C,t[6]=I):I=t[6],t[7]!==o||t[8]!==b||t[9]!==v||t[10]!==y||t[11]!==I?(k=(0,he.jsx)(O.TooltipTrigger,{onPress:o,disabled:y,accessibilityLabel:I,accessibilityRole:"button",style:b,children:v}),t[7]=o,t[8]=b,t[9]=v,t[10]=y,t[11]=I,t[12]=k):k=t[12],t[13]!==C?(w=C("composer.voice.voiceMode"),t[13]=C,t[14]=w):w=t[14],t[15]!==w?(R=(0,he.jsx)(c.Text,{style:et.tooltipText,children:w}),t[15]=w,t[16]=R):R=t[16],t[17]!==S||t[18]!==R?(F=(0,he.jsx)(O.TooltipContent,{side:"top",align:"center",offset:8,children:(0,he.jsxs)(u.View,{style:et.tooltipRow,children:[R,S]})}),t[17]=S,t[18]=R,t[19]=F):F=t[19],t[20]!==k||t[21]!==F?(j=(0,he.jsxs)(O.Tooltip,{delayDuration:0,enabledOnDesktop:!0,enabledOnMobile:!1,children:[k,F]}),t[20]=k,t[21]=F,t[22]=j):j=t[22],j}const Ye=h.default.create({container:{flexDirection:"column",position:"relative"}}),et=C.StyleSheet.create(e=>({borderSeparator:{height:e.borderWidth[1],backgroundColor:e.colors.border,uni__dependencies:[0]},inputAreaContainer:{position:"relative",minHeight:x.FOOTER_HEIGHT,marginHorizontal:"auto",alignItems:"center",width:"100%",overflow:"visible",paddingHorizontal:e.spacing[4],paddingBottom:e.spacing[4],uni__dependencies:[0]},inputAreaLocked:{opacity:.6},inputAreaContent:{width:"100%",maxWidth:x.MAX_CONTENT_WIDTH,gap:e.spacing[3],uni__dependencies:[0]},messageInputContainer:{position:"relative",width:"100%",gap:e.spacing[3],uni__dependencies:[0]},cancelButton:{width:28,height:28,borderRadius:e.borderRadius.full,backgroundColor:e.colors.palette.red[600],alignItems:"center",justifyContent:"center",marginLeft:e.spacing[1],uni__dependencies:[0]},rightControls:{flexDirection:"row",alignItems:"center",gap:e.spacing[1],uni__dependencies:[0]},contextWindowMeterSlot:{width:28,height:28,flexShrink:0,alignItems:"center",justifyContent:"center"},realtimeVoiceButton:{width:28,height:28,borderRadius:e.borderRadius.full,alignItems:"center",justifyContent:"center",uni__dependencies:[0]},realtimeVoiceButtonCompactReserve:{marginLeft:e.spacing[1],uni__dependencies:[0]},realtimeVoiceButtonActive:{backgroundColor:e.colors.palette.green[600],borderColor:e.colors.palette.green[800],uni__dependencies:[0]},iconButtonHovered:{backgroundColor:e.colors.surface2,uni__dependencies:[0]},attachmentTray:{flexDirection:"row",gap:e.spacing[2],flexWrap:"wrap",uni__dependencies:[0]},tooltipRow:{flexDirection:"row",alignItems:"center",gap:e.spacing[2],uni__dependencies:[0]},tooltipText:{fontSize:e.fontSize.sm,color:e.colors.popoverForeground,uni__dependencies:[0]},buttonDisabled:{opacity:.5},queueTrack:{flexDirection:"column",gap:e.spacing[2],uni__dependencies:[0]},queueItem:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingHorizontal:e.spacing[3],paddingVertical:e.spacing[2],backgroundColor:e.colors.surface1,borderRadius:e.borderRadius.lg,borderWidth:e.borderWidth[1],borderColor:e.colors.border,gap:e.spacing[2],uni__dependencies:[0]},queueText:{flex:1,color:e.colors.foreground,fontSize:e.fontSize.base,uni__dependencies:[0]},queueActions:{flexDirection:"row",alignItems:"center",gap:e.spacing[2],uni__dependencies:[0]},queueActionButton:{width:32,height:32,borderRadius:e.borderRadius.full,alignItems:"center",justifyContent:"center",backgroundColor:e.colors.surface2,uni__dependencies:[0]},queueSendButton:{backgroundColor:e.colors.accent,uni__dependencies:[0]},sendErrorText:{color:e.colors.palette.red[500],fontSize:e.fontSize.sm,uni__dependencies:[0]}})),tt=(0,C.withUnistyles)(A.Pencil),nt=(0,C.withUnistyles)(A.ArrowUp),ot=(0,C.withUnistyles)(A.GitPullRequest),st=(0,C.withUnistyles)(A.CircleDot),it=(0,C.withUnistyles)(A.AudioLines),at=(0,C.withUnistyles)(A.Paperclip),rt=(0,C.withUnistyles)(A.Image),ct=(0,C.withUnistyles)(A.FileText),lt=e=>({color:e.colors.foreground}),ut=e=>({color:e.colors.foregroundMuted}),dt=e=>({color:e.colors.accentForeground});const mt=(0,he.jsx)(ot,{size:T.ICON_SIZE.sm,uniProps:ut}),gt=(0,he.jsx)(st,{size:T.ICON_SIZE.sm,uniProps:ut}),pt=(0,he.jsx)(ct,{size:T.ICON_SIZE.sm,uniProps:ut})},3991,[35,3553,711,1562,348,349,146,1308,234,1401,59,36,1563,56,3262,3269,1590,444,3992,4026,4036,3272,4042,4050,4051,305,3464,3520,3449,4061,3594,3622,3259,3634,4077,4081,3367,3465,4017,3963,3725,4087,4018,3623,3263,3451,4088,3483,4093,3990,3609,4090,4094,3571,4122,4123,3946,3916,3641,3729,4124,4084,3453,3954,279]);
15646
+ __d(function(g,r,i,a,m,_e,d){"use strict";const e=["isAgentRunning","hasSendableContent","isProcessing"],t=["isVoiceModeForAgent","hasAgent","isAgentRunning","hasSendableContent","isProcessing","isCompact","cancelButton"];function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.Composer=function({agentId:e,serverId:t,workspaceId:n,isPaneFocused:o,onSubmitMessage:s,onClientSlashCommand:l,hasExternalContent:p=!1,allowEmptySubmit:h=!1,submitButtonAccessibilityLabel:C,submitButtonTestID:A,submitIcon:y="arrow",isSubmitLoading:I=!1,waitForGithubAutoAttachOnSubmit:j=!1,submitBehavior:O="clear",blurOnSubmit:D=!1,value:z,onChangeText:ee,attachments:ne,attachmentScopeKeys:Ce=be,onOpenWorkspaceAttachment:Pe,onChangeAttachments:Be,onGithubPrDetected:We,onGithubPrAutoAttach:Ne,cwd:qe,clearDraft:Ve,autoFocus:ze=!1,autoFocusKey:Qe,onFocusInput:Je,commandDraftConfig:tt,onMessageSent:nt,onComposerHeightChange:ot,onAttentionInputFocus:st,onAttentionPromptSend:it,agentControls:ct,inputWrapperStyle:lt,externalKeyboardShift:dt,isCompactLayout:mt}){const{t:gt}=(0,f.useTranslation)(),pt=Q.isWeb?T.ICON_SIZE.md:T.ICON_SIZE.lg,ht=(0,q.useHostRuntimeClient)(t),bt=(0,q.useHostRuntimeIsConnected)(t),ft=(0,q.useHostRuntimeAgentDirectoryStatus)(t),Ct=(0,E.useToast)(),xt=(0,b.useRef)(Ct.error);xt.current=Ct.error;const St=(0,L.useVoiceOptional)(),At=(0,B.useShortcutKeys)("voice-toggle"),vt=(0,B.useShortcutKeys)("agent-interrupt"),yt=(0,ie.useIsDictationReady)({serverId:t,isConnected:bt,agentDirectoryStatus:ft}),{settings:It}=(0,G.useAppSettings)(),kt=(0,w.useSessionStore)((0,S.useShallow)(Re(t,e))),wt=(0,w.useSessionStore)(n=>n.sessions[t]?.queuedMessages?.get(e))??$e,Rt=(0,w.useSessionStore)(e=>e.setQueuedMessages),Ft=(0,w.useSessionStore)(e=>e.setAgentStreamTail),jt=(0,w.useSessionStore)(e=>e.setAgentStreamHead),Tt=(0,x.useIsCompactFormFactor)(),_t=(vn=mt,yn=Tt,vn??yn),Mt=ve(Tt),Pt=ye(ve(_t),gt),Lt=z,Et=ee,Ot=(0,J.useWorkspaceAttachmentsForScopes)(Ce),{selectedAttachments:Dt,buildOutgoingAttachments:Bt,removeAttachment:Wt,openAttachment:Nt,beginSubmit:qt,clearSentAttachments:Vt,completeSubmit:zt,resetSuppression:Ut}=X.composerWorkspaceAttachment.useBinding({normalAttachments:ne,workspaceAttachments:Ot,onOpenWorkspaceAttachment:Pe}),Kt=Be,$t=(0,re.useCheckoutStatusQuery)({serverId:t,cwd:qe}),Ht=(0,w.useSessionStore)(e=>!0===e.sessions[t]?.serverInfo?.features?.forgeSearch),Gt=(0,de.useComposerGithubAutoAttach)({text:Lt,remoteUrl:(An=$t.status,An?.remoteUrl??null),attachments:ne,client:ht,isConnected:bt,serverId:t,cwd:qe,supportsForgeSearch:Ht,setAttachments:Kt,onPullRequestDetected:We,onPullRequestAdded:Ne}),[Qt,Zt]=(0,b.useState)(0),[Xt,Jt]=(0,b.useState)(!1),[Yt,en]=(0,b.useState)(!1),[tn,nn]=(0,b.useState)(!1),[on,sn]=(0,b.useState)(null),[an,rn]=(0,b.useState)(!1),[cn,ln]=(0,b.useState)(!1),[un,dn]=(0,b.useState)(""),[mn,gn]=(0,b.useState)(null),pn=(0,b.useRef)(null),hn=(0,b.useRef)(null),bn=xe(O,I),fn=(0,b.useRef)(`message-input:${t}:${e}:${Math.random().toString(36).slice(2)}`),Cn=(0,b.useCallback)(e=>!("immediate"!==e.execution||!l)&&(D&&hn.current?.blur(),Ve("sent"),Et(""),Kt([]),Ut(),sn(null),Jt(!0),l(e).catch(e=>{console.error("[Composer] Failed to run client slash command:",e),sn(e instanceof Error?e.message:String(e))}).finally(()=>{Jt(!1)}),!0),[D,Ve,l,Ut,Kt,Et]),xn=(0,N.useAgentAutocomplete)({userInput:Lt,cursorIndex:Qt,setUserInput:Et,serverId:t,agentId:e,draftConfig:tt,canExecuteClientSlashCommand:0===Bt(ne).length,onClientSlashCommand:Cn,onAutocompleteApplied:()=>{hn.current?.focus()}}),Sn=(0,b.useRef)(xn.onKeyPress);var An;var vn,yn;Sn.current=xn.onKeyPress,(0,b.useEffect)(()=>{on&&Lt&&sn(null)},[Lt,on]),(0,b.useEffect)(()=>{Zt(e=>Math.min(e,Lt.length))},[Lt.length]);const{pickImages:In}=(0,k.useImageAttachmentPicker)(),{pickFiles:kn}=(0,R.useFilePicker)(),wn=(0,b.useRef)(e),Rn=(0,b.useRef)(null),Fn=(0,b.useRef)(s),jn=(0,b.useCallback)(e=>{Kt(t=>[...t,...e.map(e=>({kind:"image",metadata:e}))])},[Kt]),Tn=(0,b.useCallback)(e=>{Kt(t=>[...t,...e])},[Kt]),_n=(0,b.useCallback)(()=>{Q.isNative||(0,M.focusWithRetries)({focus:()=>hn.current?.focus(),isFocused:()=>{const e=hn.current?.getNativeElement?.()??null;return null!=e&&document.activeElement===e}})},[]),Mn=(0,b.useCallback)(e=>{if(!n)return;const o=(0,pe.resolveWorkspaceFileDrop)({payload:e,serverId:t,workspaceId:n});o&&(Kt(e=>(0,ge.appendWorkspaceFileAttachment)(e,o)),_n())},[_n,t,Kt,n]);(0,b.useEffect)(()=>{Je?.(_n)},[_n,Je]);const Pn=(0,b.useCallback)(async(e,t)=>{if(nt?.(),Fn.current)await Fn.current({text:e,attachments:t,cwd:qe});else{if(!Rn.current)throw new Error(gt("workspace.terminal.hostDisconnected"));await Rn.current(wn.current,e,t)}},[qe,nt,gt]);(0,b.useEffect)(()=>{wn.current=e},[e]),(0,b.useEffect)(()=>{Rn.current=async(e,n,o)=>{if(!ht)throw new Error(gt("workspace.terminal.hostDisconnected"));const s={getTail:e=>w.useSessionStore.getState().sessions[t]?.agentStreamTail?.get(e),getHead:e=>w.useSessionStore.getState().sessions[t]?.agentStreamHead?.get(e),setHead:e=>jt(t,e),setTail:e=>Ft(t,e)};await(0,P.dispatchComposerAgentMessage)({client:ht,agentId:e,text:n,attachments:o,attachmentSubmitFormat:(0,Z.resolveComposerAttachmentSubmitFormat)({supportsForgeAttachments:Ht}),encodeImages:_.encodeImages,stream:s}),it?.()}},[ht,it,t,Ft,jt,Ht,gt]),(0,b.useEffect)(()=>{Fn.current=s},[s]);const Ln="running"===kt.status,En=null!==kt.status,On=(0,b.useMemo)(()=>({read:e=>w.useSessionStore.getState().sessions[t]?.queuedMessages?.get(e)??[],write:e=>Rt(t,e)}),[t,Rt]),Dn=(0,b.useCallback)((t,n)=>{(0,P.queueComposerMessage)({agentId:e,text:t,attachments:n,queue:On}).queued&&(Et(""),Kt([]),Ut(),Vt(n))},[e,Vt,On,Ut,Kt,Et]),Bn=(0,b.useCallback)(async(e,t,n)=>{const o=await(0,$.submitAgentInput)({message:e,attachments:t,hasExternalContent:p,allowEmptySubmit:h,forceSend:n,submitBehavior:O,isAgentRunning:Ln,canSubmit:Boolean(Rn.current||Fn.current),queueMessage:({message:e,attachments:t})=>{Dn(e,t)},submitMessage:async({message:e,attachments:t})=>{"preserve-and-lock"!==O&&qt(t),await Pn(e,t)},clearDraft:Ve,setUserInput:Et,setAttachments:e=>{Kt(X.composerWorkspaceAttachment.userAttachmentsOnly(e))},setSendError:sn,setIsProcessing:Jt,onSubmitError:e=>{console.error("[AgentInput] Failed to send message:",e)},failedToSendMessage:gt("composer.errors.failedToSend")});zt({result:o,outgoingAttachments:t})},[h,qt,Ve,zt,p,Ln,Dn,Kt,Et,O,Pn,gt]),Wn=(0,b.useCallback)(e=>{const t=Bt(ne),n=(0,me.resolveClientSlashCommand)({text:e.text,hasAttachments:t.length>0});n&&Cn(n)||(D&&hn.current?.blur(),Bn(e.text,t,e.forceSend))},[ne,D,Bt,Cn,Bn]),Nn=(0,b.useCallback)(async()=>{const e=await(0,P.pickAndPersistImages)({pickImages:In,persister:{persistFromBlob:({blob:e,mimeType:t,fileName:n})=>(0,V.persistAttachmentFromBlob)({blob:e,mimeType:t,fileName:n}),persistFromFileUri:({uri:e,mimeType:t,fileName:n})=>(0,V.persistAttachmentFromFileUri)({uri:e,mimeType:t,fileName:n})}});0!==e.length&&jn(e)},[jn,In]),qn=(0,b.useCallback)(async e=>{if(0===e.length)return;if(!ht)return void xt.current(gt("composer.errors.daemonClientDisconnected"));const t=e.find(e=>e.bytes.byteLength>Ke);if(t)xt.current(gt("composer.errors.fileTooLarge",{size:"50MB",fileName:t.fileName}));else{en(!0);try{const t=await(0,P.uploadFileAttachments)({client:ht,files:e});Tn(t)}catch(e){console.error("[Composer] Failed to upload file:",e),xt.current(e instanceof Error?e.message:gt("composer.errors.uploadFailed"))}finally{en(!1)}}},[Tn,ht,gt]),Vn=(0,b.useCallback)(async()=>{if(ht)try{const e=await kn();if(!e)return;await qn(e)}catch(e){console.error("[Composer] Failed to upload file:",e),xt.current(e instanceof Error?e.message:gt("composer.errors.uploadFailed"))}else xt.current(gt("composer.errors.daemonClientDisconnected"))},[ht,kn,gt,qn]),zn=(0,b.useCallback)(async e=>{try{const t=await(0,Y.droppedItemsToPickedFiles)(e);if(0===t.length)return;if(!ht||!bt)return void xt.current(gt("composer.errors.daemonClientDisconnected"));await qn(t)}catch(e){console.error("[Composer] Failed to upload dropped files:",e),xt.current(e instanceof Error?e.message:gt("composer.errors.uploadFailed"))}},[ht,bt,gt,qn]),Un=(0,b.useCallback)(e=>{Gt.markGithubAttachmentRemoved(Dt[e]);Wt({selectedAttachments:Dt,index:e})||Kt(t=>(0,P.removeComposerAttachmentAtIndex)({attachments:t,index:e,deleteAttachments:V.deleteAttachments}))},[Gt,Wt,Dt,Kt]),Kn=(0,b.useCallback)(e=>{(0,P.openComposerAttachment)({attachment:e,setLightboxMetadata:gn,openWorkspaceAttachment:Nt,openExternalUrl:e=>{(0,se.openExternalUrl)(e)}})},[Nt]);(0,b.useEffect)(()=>{Ln&&bt||nn(!1)},[Ln,bt]);const $n=(0,b.useCallback)(()=>{(0,P.cancelComposerAgent)({client:ht,agentId:wn.current,isAgentRunning:Ln,isCancellingAgent:tn,isConnected:bt,onCancelFailed:e=>{nn(!1);const t=Le(e);t&&t.trim().length>0&&xt.current(t)}})&&(nn(!0),hn.current?.focus())},[ht,Ln,tn,bt]),Hn=(0,b.useCallback)(()=>{Oe(hn)},[]),Gn=(0,b.useCallback)(e=>De({action:e,isPaneFocused:o,messageInputRef:hn,isAgentRunning:Ln,isCancellingAgent:tn,isConnected:bt,handleCancelAgent:$n,focusMessageInputForKeyboardAction:Hn}),[Hn,$n,Ln,tn,bt,o]);(0,K.useKeyboardActionHandler)({handlerId:fn.current,actions:["agent.interrupt","message-input.focus","message-input.send","message-input.dictation-toggle","message-input.dictation-cancel","message-input.dictation-confirm","message-input.voice-toggle","message-input.voice-mute-toggle"],enabled:o,priority:Ae(an),isActive:()=>o,handle:Gn});const{style:Qn}=(0,U.useKeyboardShiftStyle)({mode:"translate",enabled:!dt}),Zn=Se(St,t,e),Xn=(0,b.useCallback)(()=>{Ee({voice:St,isConnected:bt,hasAgent:En,serverId:t,agentId:e,toastErrorRef:xt})},[e,En,bt,t,St]),Jn=(0,b.useCallback)(t=>{const n=(0,P.editQueuedComposerMessage)({agentId:e,messageId:t,queue:On});n&&(Et(n.text),Kt(n.attachments))},[e,On,Kt,Et]),Yn=(0,b.useCallback)(async t=>{if(!Rn.current&&!Fn.current)return;const n=await(0,P.sendQueuedComposerMessageNow)({agentId:e,messageId:t,queue:On,submitMessage:({text:e,attachments:t})=>Pn(e,t),failedToSendMessage:gt("composer.errors.failedToSend")});"failed"===n.status&&sn(n.errorMessage)},[e,On,Pn,gt]),eo=(0,b.useCallback)(e=>{const t=Bt(ne),n=(0,me.resolveClientSlashCommand)({text:e.text,hasAttachments:t.length>0});n&&Cn(n)||Dn(e.text,t)},[ne,Bt,Dn,Cn]),to=Lt.trim().length>0||Dt.length>0,no=(0,b.useCallback)(e=>Sn.current(e),[]),oo=(0,b.useMemo)(()=>ke(bt,tn),[bt,tn]),so=St?.isVoiceSwitching??!1,io=!bt||so,ao=(0,b.useCallback)(e=>we(e.hovered,io,_t),[_t,io]),ro=(0,b.useMemo)(()=>(0,he.jsx)(Ze,{isAgentRunning:Ln,hasSendableContent:to,isProcessing:Xt,buttonIconSize:pt,cancelButtonStyle:oo,handleCancelAgent:$n,isConnected:bt,isCancellingAgent:tn,agentInterruptKeys:vt,t:gt}),[vt,pt,oo,$n,to,Ln,tn,bt,Xt,gt]),co=(0,b.useMemo)(()=>(0,he.jsx)(Xe,{isVoiceModeForAgent:Zn,hasAgent:En,isAgentRunning:Ln,hasSendableContent:to,isProcessing:Xt,isCompact:_t,buttonIconSize:pt,handleToggleRealtimeVoice:Xn,isConnected:bt,isVoiceSwitching:so,realtimeVoiceButtonStyle:ao,voiceToggleKeys:At,t:gt,cancelButton:ro}),[pt,ro,Xn,En,to,Ln,bt,_t,Xt,Zn,so,ao,gt,At]),{contextWindowMaxTokens:lo,contextWindowUsedTokens:uo}=Ge(kt.contextWindowMaxTokens,kt.contextWindowUsedTokens),mo="initializing"===kt.status||"running"===kt.status,go=_t?T.ICON_SIZE.md:pt,po=(0,b.useMemo)(()=>Fe(lo,uo,kt.totalCostUsd,!1,t,kt.provider,mo,go),[lo,uo,kt.totalCostUsd,t,kt.provider,mo,go]),ho=(0,b.useMemo)(()=>{return e=po,En?(0,he.jsx)(u.View,{style:et.contextWindowMeterSlot,children:e}):null;var e},[po,En]),bo=(0,b.useMemo)(()=>Dt.some(e=>"forge_change_request"===e.kind||"forge_issue"===e.kind||"github_pr"===e.kind||"github_issue"===e.kind),[Dt]),{forge:fo}=(0,ce.useCheckoutPrStatusQuery)({serverId:t,cwd:qe,enabled:bt&&qe.trim().length>0&&(cn||bo)}),Co=(0,b.useMemo)(()=>(0,le.getForgePresentation)(fo),[fo]),xo=un.trim(),So=(0,ae.useForgeSearchQuery)({client:ht,serverId:t,cwd:qe,query:xo,supportsForgeSearch:Ht,enabled:Ie(cn,bt,qe)}),Ao=So.data?.items,vo=(0,b.useMemo)(()=>Ao??[],[Ao]),yo=(0,b.useMemo)(()=>vo.map(e=>{const t=(0,le.getForgePresentation)(e.forge??"github"),n="change_request"===e.kind?t.numberPrefix:t.issueNumberPrefix;return{id:`${e.kind}:${e.number}`,label:`${n}${e.number} ${e.title}`,description:xo}}),[vo,xo]),Io=(0,b.useMemo)(()=>{return[{id:"image",label:gt("composer.attachments.addImage"),icon:(0,he.jsx)(rt,{size:T.ICON_SIZE.md,uniProps:ut}),onSelect:()=>{Nn()}},{id:"github",label:gt("composer.attachments.addIssueOrPr",{context:Co.changeRequestContext}),icon:(e=Co.icon,(0,he.jsx)(ue.ForgeBrandIcon,{iconKind:e,size:T.ICON_SIZE.md,uniProps:ut})),onSelect:()=>{ln(!0)}},{id:"file",label:gt("composer.attachments.addFile"),icon:(0,he.jsx)(at,{size:T.ICON_SIZE.md,uniProps:ut}),onSelect:()=>{Vn()}}];var e},[Nn,Vn,gt,Co]),ko=(0,b.useCallback)(e=>{const t=(0,P.toggleGithubAttachmentFromPicker)({current:ne,item:e,markGithubAttachmentRemoved:Gt.markGithubAttachmentRemoved});Kt(t),ln(!1),dn("")},[ne,Gt,Kt,dn,ln]),wo=(0,b.useMemo)(()=>je({agentControls:ct,agentId:e,serverId:t,focusInput:_n,isCompactLayout:_t,isPaneFocused:o}),[ct,e,_n,_t,o,t]),Ro=(0,b.useCallback)(e=>{pn.current=e},[]),Fo=(0,b.useCallback)(e=>{Zt(e.start)},[]),jo=(0,b.useCallback)(e=>{rn(e),e&&st?.()},[st]),To=(0,b.useCallback)(()=>{gn(null)},[]),_o=(0,b.useCallback)(e=>{ln(e),e||dn("")},[dn]),Mo=(0,b.useCallback)(({option:e,active:t})=>{const n=(0,P.findGithubItemByOption)(vo,e.id);if(!n)return(0,he.jsx)(u.View,{},e.id);const o=(0,P.isAttachmentSelectedForGithubItem)(Dt,n);return(0,he.jsx)(Ue,{testID:`composer-github-option-${e.id}`,label:e.label,selected:o,active:t,item:n,onToggle:ko},e.id)},[vo,Dt,ko]),Po=(0,b.useMemo)(()=>[Ye.container,Qn],[Qn]),Lo=(0,b.useMemo)(()=>[et.inputAreaContainer,bn&&et.inputAreaLocked],[bn]),Eo=(0,b.useMemo)(()=>Te({selectedAttachments:Dt,isComposerLocked:bn,handleOpenAttachment:Kn,handleRemoveAttachment:Un,labels:{openImage:gt("composer.attachments.openImage"),removeImage:gt("composer.attachments.removeImage"),removeFile:gt("composer.attachments.removeFile"),openGithub:(e,t)=>gt("composer.attachments.openGithub",{kind:e,number:t}),removeGithub:(e,t)=>gt("composer.attachments.removeGithub",{kind:e,number:t})}}),[Kn,Un,bn,Dt,gt]),Oo=(0,b.useMemo)(()=>Me({queuedMessages:wt,handleEditQueuedMessage:Jn,handleSendQueuedNow:Yn,editLabel:gt("composer.attachments.editQueuedMessage"),sendNowLabel:gt("composer.attachments.sendQueuedMessageNow")}),[Jn,Yn,wt,gt]),Do=(0,b.useRef)(null),Bo=Xt||I||Yt||j&&Gt.isResolving;(0,F.useFileDrop)({onFiles:jn,onGenericFiles:zn,onWorkspaceFile:Mn},{disabled:Bo});const Wo=ze&&Mt,No=Ln?$n:void 0,qo=(0,b.useMemo)(()=>on?(0,he.jsx)(c.Text,{style:et.sendErrorText,children:on}):null,[on]),Vo=So.isFetching?gt("composer.github.searching"):gt("composer.github.noResults"),zo=xn.isVisible&&o;return(0,he.jsx)(H.ComposerKeyboardScopeProvider,{isActiveComposer:o,children:(0,he.jsxs)(v.default.View,{style:Po,children:[(0,he.jsx)(oe.AttachmentLightbox,{metadata:mn,onClose:To}),(0,he.jsx)(u.View,{style:Lo,children:(0,he.jsxs)(u.View,{style:et.inputAreaContent,children:[Oo,qo,(0,he.jsxs)(u.View,{ref:Do,style:et.messageInputContainer,children:[(0,he.jsx)(W.AutocompletePopover,{visible:zo,anchorRef:Do,options:xn.options,selectedIndex:xn.selectedIndex,onSelect:xn.onSelectOption,isLoading:xn.isLoading,errorMessage:xn.errorMessage,loadingText:xn.loadingText,emptyText:xn.emptyText}),(0,he.jsx)(He,{ref:hn,value:Lt,onChangeText:Et,onSubmit:Wn,hasExternalContent:p,allowEmptySubmit:h,submitButtonAccessibilityLabel:C,submitButtonTestID:A,submitIcon:y,isSubmitDisabled:Bo,isSubmitLoading:Bo,preserveHeightOnSubmit:"preserve-and-lock"===O,attachments:Dt,cwd:qe,attachmentMenuItems:Io,onAttachButtonRef:Ro,onAddImages:jn,client:ht,isReadyForDictation:yt,placeholder:Pt,autoFocus:Wo,autoFocusKey:`${t}:${e}:${Qe??""}`,disabled:I,isPaneFocused:o,leftContent:wo,beforeVoiceContent:ho,rightContent:co,voiceServerId:t,voiceAgentId:e,isAgentRunning:Ln,defaultSendBehavior:It.sendBehavior,onQueue:eo,onSubmitLoadingPress:No,onKeyPress:no,onSelectionChange:Fo,onFocusChange:jo,onHeightChange:ot,inputWrapperStyle:lt,attachmentSlot:Eo}),(0,he.jsx)(te.Combobox,{options:yo,value:"",onSelect:fe,keepOpenOnSelect:!0,searchable:!0,searchPlaceholder:gt("composer.github.searchPlaceholder",{context:Co.changeRequestContext}),title:gt("composer.github.title",{context:Co.changeRequestContext}),open:cn,onOpenChange:_o,onSearchQueryChange:dn,desktopPlacement:"top-start",anchorRef:pn,emptyText:Vo,renderOption:Mo})]})]})})]})})};var o=n(r(d[0])),s=r(d[1]),c=r(d[2]),l=r(d[3]),u=r(d[4]),p=r(d[5]);r(d[6]),r(d[7]),r(d[8]),r(d[9]);var h=n(r(d[10])),b=r(d[11]),f=r(d[12]),C=r(d[13]),x=r(d[14]),S=r(d[15]),A=r(d[16]),v=n(r(d[17])),y=r(d[18]),I=r(d[19]),k=r(d[20]),w=r(d[21]),R=r(d[22]),F=r(d[23]),j=r(d[24]),T=r(d[25]),_=r(d[26]),M=r(d[27]),P=r(d[28]),L=r(d[29]),E=r(d[30]),O=r(d[31]),D=r(d[32]),B=r(d[33]),W=r(d[34]),N=r(d[35]),q=r(d[36]),V=r(d[37]),z=r(d[38]),U=r(d[39]),K=r(d[40]),$=r(d[41]),H=r(d[42]),G=r(d[43]),Q=r(d[44]),Z=r(d[45]),X=r(d[46]),J=r(d[47]),Y=r(d[48]),ee=r(d[49]),te=r(d[50]),ne=r(d[51]),oe=r(d[52]),se=r(d[53]),ie=r(d[54]),ae=r(d[55]),re=r(d[56]),ce=r(d[57]),le=r(d[58]),ue=r(d[59]),de=r(d[60]),me=r(d[61]),ge=r(d[62]),pe=r(d[63]),he=r(d[64]);const be=[];function fe(){}const Ce=()=>{};function xe(e,t){return"preserve-and-lock"===e&&t}function Se(e,t,n){return e?.isVoiceModeForAgent(t,n)??!1}function Ae(e){return e?200:100}function ve(e){return Q.isWeb&&!e}function ye(e,t){return t(e?"composer.placeholders.desktop":"composer.placeholders.mobile")}function Ie(e,t,n){return e&&t&&n.trim().length>0}function ke(e,t){const n=!e||t?et.buttonDisabled:void 0;return[et.cancelButton,n].filter(e=>Boolean(e))}function we(e,t,n){const o=e?et.iconButtonHovered:void 0,s=t?et.buttonDisabled:void 0,c=n?et.realtimeVoiceButtonCompactReserve:void 0;return[et.realtimeVoiceButton,c,o,s].filter(e=>Boolean(e))}function Re(e,t){return n=>{const o=n.sessions[e]?.agents?.get(t)??null;return{status:o?.status??null,contextWindowMaxTokens:o?.lastUsage?.contextWindowMaxTokens??null,contextWindowUsedTokens:o?.lastUsage?.contextWindowUsedTokens??null,totalCostUsd:o?.lastUsage?.totalCostUsd??null,model:o?.model??null,provider:o?.provider??null}}}function Fe(e,t,n,o,s,c,l,u){return null!==e&&null!==t||l?(0,he.jsx)(I.ContextWindowMeter,{maxTokens:e,usedTokens:t,totalCostUsd:n,showPercentage:o,serverId:s,provider:c,pending:l,glyphSize:u}):null}function je(e){const{agentControls:t,agentId:n,serverId:o,focusInput:s,isCompactLayout:c,isPaneFocused:l}=e;return"draft"===(0,z.resolveAgentControlsMode)(t)&&t?(0,he.jsx)(y.DraftAgentControls,Object.assign({},t,{isCompactLayout:c})):(0,he.jsx)(y.AgentControls,{agentId:n,serverId:o,isPaneFocused:l,onDropdownClose:s,isCompactLayout:c})}function Te(e){const{selectedAttachments:t,isComposerLocked:n,handleOpenAttachment:o,handleRemoveAttachment:s,labels:c}=e;return 0===t.length?null:(0,he.jsx)(u.View,{style:et.attachmentTray,testID:"composer-attachment-tray",children:t.map((e,t)=>Pe({attachment:e,index:t,disabled:n,onOpen:o,onRemove:s,labels:c}))})}function Me(e){const{queuedMessages:t,handleEditQueuedMessage:n,handleSendQueuedNow:o,editLabel:s,sendNowLabel:c}=e;return 0===t.length?null:(0,he.jsx)(u.View,{style:et.queueTrack,children:t.map(e=>(0,he.jsx)(We,{item:e,onEdit:n,onSendNow:o,editLabel:s,sendNowLabel:c},e.id))})}function Pe(e){const{attachment:t,index:n,disabled:o,onOpen:s,onRemove:c,labels:l}=e;return"image"===t.kind?(0,he.jsx)(Ne,{attachment:t,index:n,disabled:o,onOpen:s,onRemove:c,openLabel:l.openImage,removeLabel:l.removeImage},t.metadata.id):"file"===t.kind?(0,he.jsx)(Ve,{attachment:t,index:n,disabled:o,onRemove:c,removeLabel:l.removeFile},t.attachment.id):"workspace_file"===t.kind?(0,he.jsx)(ze,{attachment:t,index:n,disabled:o,onRemove:c,removeLabel:l.removeFile},`workspace-file:${(0,ge.getWorkspaceFileAttachmentKey)(t)}`):X.composerWorkspaceAttachment.is(t)?X.composerWorkspaceAttachment.renderPill({attachment:t,index:n,disabled:o,onOpen:s,onRemove:c}):(0,he.jsx)(qe,{attachment:t,index:n,disabled:o,onOpen:s,onRemove:c,openLabel:l.openGithub,removeLabel:l.removeGithub},`${t.item.kind}:${t.item.number}`)}function Le(e){return e instanceof Error?e.message:"string"==typeof e?e:null}function Ee(e){const{voice:t,isConnected:n,hasAgent:o,serverId:s,agentId:c,toastErrorRef:l}=e;t&&n&&o&&(t.isVoiceSwitching||t.isVoiceModeForAgent(s,c)||t.startVoice(s,c).catch(e=>{console.error("[Composer] Failed to start voice mode",e);const t=Le(e);t&&t.trim().length>0&&l.current(t)}))}function Oe(e){Q.isNative?e.current?.focus():(0,M.focusWithRetries)({focus:()=>e.current?.focus(),isFocused:()=>{const t=e.current?.getNativeElement?.()??null,n="undefined"!=typeof document?document.activeElement:null;return Boolean(t)&&n===t}})}function De(e){const{action:t,isPaneFocused:n,messageInputRef:o,isAgentRunning:s,isCancellingAgent:c,isConnected:l,handleCancelAgent:u,focusMessageInputForKeyboardAction:p}=e;if(!n)return!1;if("agent.interrupt"===t.id)return!!o.current?.runKeyboardAction("dictation-cancel")||!(!s||c||!l)&&(u(),!0);if("message-input.focus"===t.id)return p(),!0;const h=Be(t.id);if(!h)return!1;const b=o.current?.runKeyboardAction(h);return"send"!==h&&"dictation-confirm"!==h||(b??!1)}function Be(e){switch(e){case"message-input.send":return"send";case"message-input.dictation-confirm":return"dictation-confirm";case"message-input.dictation-toggle":return"dictation-toggle";case"message-input.dictation-cancel":return"dictation-cancel";case"message-input.voice-toggle":return"voice-toggle";case"message-input.voice-mute-toggle":return"voice-mute-toggle";default:return null}}function We(e){const t=(0,p.c)(23),{item:n,onEdit:o,onSendNow:s,editLabel:h,sendNowLabel:b}=e;let f;t[0]!==n.id||t[1]!==o?(f=()=>{o(n.id)},t[0]=n.id,t[1]=o,t[2]=f):f=t[2];const C=f;let x;t[3]!==n.id||t[4]!==s?(x=()=>{s(n.id)},t[3]=n.id,t[4]=s,t[5]=x):x=t[5];const S=x;let A,v,y,I,k,w,R,F;return t[6]!==n.text?(A=(0,he.jsx)(c.Text,{style:et.queueText,numberOfLines:2,ellipsizeMode:"tail",children:n.text}),t[6]=n.text,t[7]=A):A=t[7],t[8]===Symbol.for("react.memo_cache_sentinel")?(v=(0,he.jsx)(tt,{size:T.ICON_SIZE.sm,uniProps:lt}),t[8]=v):v=t[8],t[9]!==h||t[10]!==C?(y=(0,he.jsx)(l.Pressable,{onPress:C,style:et.queueActionButton,accessibilityLabel:h,accessibilityRole:"button",children:v}),t[9]=h,t[10]=C,t[11]=y):y=t[11],t[12]===Symbol.for("react.memo_cache_sentinel")?(I=[et.queueActionButton,et.queueSendButton],t[12]=I):I=t[12],t[13]===Symbol.for("react.memo_cache_sentinel")?(k=(0,he.jsx)(nt,{size:T.ICON_SIZE.sm,uniProps:dt}),t[13]=k):k=t[13],t[14]!==S||t[15]!==b?(w=(0,he.jsx)(l.Pressable,{onPress:S,style:I,accessibilityLabel:b,accessibilityRole:"button",children:k}),t[14]=S,t[15]=b,t[16]=w):w=t[16],t[17]!==y||t[18]!==w?(R=(0,he.jsxs)(u.View,{style:et.queueActions,children:[y,w]}),t[17]=y,t[18]=w,t[19]=R):R=t[19],t[20]!==A||t[21]!==R?(F=(0,he.jsxs)(u.View,{style:et.queueItem,children:[A,R]}),t[20]=A,t[21]=R,t[22]=F):F=t[22],F}function Ne(e){const t=(0,p.c)(15),{attachment:n,index:o,disabled:s,onOpen:c,onRemove:l,openLabel:u,removeLabel:h}=e;let b;t[0]!==n||t[1]!==c?(b=()=>{c(n)},t[0]=n,t[1]=c,t[2]=b):b=t[2];const f=b;let C;t[3]!==o||t[4]!==l?(C=()=>{l(o)},t[3]=o,t[4]=l,t[5]=C):C=t[5];const x=C;let S,A;return t[6]!==n.metadata?(S=(0,he.jsx)(ne.AttachmentThumbnail,{metadata:n.metadata}),t[6]=n.metadata,t[7]=S):S=t[7],t[8]!==s||t[9]!==f||t[10]!==x||t[11]!==u||t[12]!==h||t[13]!==S?(A=(0,he.jsx)(ne.AttachmentPill,{testID:"composer-image-attachment-pill",onOpen:f,onRemove:x,openAccessibilityLabel:u,removeAccessibilityLabel:h,disabled:s,children:S}),t[8]=s,t[9]=f,t[10]=x,t[11]=u,t[12]=h,t[13]=S,t[14]=A):A=t[14],A}function qe(e){const t=(0,p.c)(37),{attachment:n,index:o,disabled:s,onOpen:c,onRemove:l,openLabel:u,removeLabel:h}=e,b=n.item;let f,C,x,S,A,v,y,I,k;if(t[0]!==n||t[1]!==o||t[2]!==b.forge||t[3]!==b.kind||t[4]!==b.number||t[5]!==c||t[6]!==l||t[7]!==u||t[8]!==h){const e=(0,le.getForgePresentation)(b.forge??"github");C="change_request"===b.kind;const s=C?e.changeRequestAbbrev:"issue";let p;S=C?e.changeRequestAbbrev:"Issue",x=C?e.numberPrefix:e.issueNumberPrefix,t[18]!==n||t[19]!==c?(p=()=>{c(n)},t[18]=n,t[19]=c,t[20]=p):p=t[20];const w=p;let R;t[21]!==o||t[22]!==l?(R=()=>{l(o)},t[21]=o,t[22]=l,t[23]=R):R=t[23];const F=R;f=ne.AttachmentPill,A="composer-github-attachment-pill",v=w,y=F,I=u(s,`${x}${b.number}`),k=h(s,`${x}${b.number}`),t[0]=n,t[1]=o,t[2]=b.forge,t[3]=b.kind,t[4]=b.number,t[5]=c,t[6]=l,t[7]=u,t[8]=h,t[9]=f,t[10]=C,t[11]=x,t[12]=S,t[13]=A,t[14]=v,t[15]=y,t[16]=I,t[17]=k}else f=t[9],C=t[10],x=t[11],S=t[12],A=t[13],v=t[14],y=t[15],I=t[16],k=t[17];const w=C?mt:gt,R=`${S} ${x}${b.number}`;let F,j;return t[24]!==b.title||t[25]!==w||t[26]!==R?(F=(0,he.jsx)(ne.AttachmentLabel,{icon:w,title:b.title,subtitle:R}),t[24]=b.title,t[25]=w,t[26]=R,t[27]=F):F=t[27],t[28]!==f||t[29]!==s||t[30]!==A||t[31]!==v||t[32]!==y||t[33]!==I||t[34]!==k||t[35]!==F?(j=(0,he.jsx)(f,{testID:A,onOpen:v,onRemove:y,openAccessibilityLabel:I,removeAccessibilityLabel:k,disabled:s,children:F}),t[28]=f,t[29]=s,t[30]=A,t[31]=v,t[32]=y,t[33]=I,t[34]=k,t[35]=F,t[36]=j):j=t[36],j}function Ve(e){const t=(0,p.c)(15),{attachment:n,index:o,disabled:s,onRemove:c,removeLabel:l}=e,{t:u}=(0,f.useTranslation)();let h;t[0]!==o||t[1]!==c?(h=()=>{c(o)},t[0]=o,t[1]=c,t[2]=h):h=t[2];const b=h,C=n.attachment.fileName;let x,S,A;return t[3]!==C||t[4]!==u?(x=(0,ee.getFileTypeLabel)(C)??u("message.attachments.file"),t[3]=C,t[4]=u,t[5]=x):x=t[5],t[6]!==C||t[7]!==x?(S=(0,he.jsx)(ne.AttachmentLabel,{icon:pt,title:C,subtitle:x}),t[6]=C,t[7]=x,t[8]=S):S=t[8],t[9]!==s||t[10]!==C||t[11]!==b||t[12]!==l||t[13]!==S?(A=(0,he.jsx)(ne.AttachmentPill,{testID:"composer-file-attachment-pill",onOpen:Ce,onRemove:b,openAccessibilityLabel:C,removeAccessibilityLabel:l,disabled:s,children:S}),t[9]=s,t[10]=C,t[11]=b,t[12]=l,t[13]=S,t[14]=A):A=t[14],A}function ze(e){const t=(0,p.c)(16),{attachment:n,index:o,disabled:s,onRemove:c,removeLabel:l}=e;let u;t[0]!==o||t[1]!==c?(u=()=>{c(o)},t[0]=o,t[1]=c,t[2]=u):u=t[2];const h=u;let b;t[3]!==n.path?(b=n.path.split("/").pop()??n.path,t[3]=n.path,t[4]=b):b=t[4];const f=b;let C,x,S;return t[5]!==n?(C=(0,ge.getWorkspaceFileAttachmentSubtitle)(n),t[5]=n,t[6]=C):C=t[6],t[7]!==f||t[8]!==C?(x=(0,he.jsx)(ne.AttachmentLabel,{icon:pt,title:f,subtitle:C}),t[7]=f,t[8]=C,t[9]=x):x=t[9],t[10]!==s||t[11]!==f||t[12]!==h||t[13]!==l||t[14]!==x?(S=(0,he.jsx)(ne.AttachmentPill,{testID:"composer-workspace-file-attachment-pill",onOpen:Ce,onRemove:h,openAccessibilityLabel:f,removeAccessibilityLabel:l,disabled:s,children:x}),t[10]=s,t[11]=f,t[12]=h,t[13]=l,t[14]=x,t[15]=S):S=t[15],S}function Ue(e){const t=(0,p.c)(12),{label:n,testID:o,active:s,selected:c,item:l,onToggle:u}=e;let h;t[0]!==l||t[1]!==u?(h=()=>{u(l)},t[0]=l,t[1]=u,t[2]=h):h=t[2];const b=h;let f;t[3]!==l.kind?(f="change_request"===l.kind?(0,he.jsx)(ot,{size:T.ICON_SIZE.sm,uniProps:ut}):(0,he.jsx)(st,{size:T.ICON_SIZE.sm,uniProps:ut}),t[3]=l.kind,t[4]=f):f=t[4];const C=f;let x;return t[5]!==s||t[6]!==b||t[7]!==n||t[8]!==C||t[9]!==c||t[10]!==o?(x=(0,he.jsx)(te.ComboboxItem,{testID:o,label:n,selected:c,active:s,onPress:b,leadingSlot:C}),t[5]=s,t[6]=b,t[7]=n,t[8]=C,t[9]=c,t[10]=o,t[11]=x):x=t[11],x}const Ke=52428800,$e=[],He=(0,b.memo)(j.MessageInput);function Ge(e,t){return"number"==typeof e&&"number"==typeof t?{contextWindowMaxTokens:e,contextWindowUsedTokens:t}:{contextWindowMaxTokens:null,contextWindowUsedTokens:null}}function Qe(e){const t=(0,p.c)(24),{buttonIconSize:n,cancelButtonStyle:o,handleCancelAgent:l,isConnected:h,isCancellingAgent:b,agentInterruptKeys:f,t:C}=e;let x;t[0]!==b||t[1]!==C?(x=C(b?"composer.cancel.cancelingAgent":"composer.cancel.stopAgent"),t[0]=b,t[1]=C,t[2]=x):x=t[2];const S=x;let v;t[3]!==n||t[4]!==b?(v=b?(0,he.jsx)(s.ActivityIndicator,{size:"small",color:"white"}):(0,he.jsx)(A.Square,{size:n,color:"white",fill:"white"}),t[3]=n,t[4]=b,t[5]=v):v=t[5];const y=v;let I;t[6]!==f?(I=f?(0,he.jsx)(D.Shortcut,{chord:f}):null,t[6]=f,t[7]=I):I=t[7];const k=I,w=!h||b;let R,F,j,T,_;return t[8]!==S||t[9]!==o||t[10]!==l||t[11]!==y||t[12]!==w?(R=(0,he.jsx)(O.TooltipTrigger,{onPress:l,disabled:w,accessibilityLabel:S,accessibilityRole:"button",style:o,children:y}),t[8]=S,t[9]=o,t[10]=l,t[11]=y,t[12]=w,t[13]=R):R=t[13],t[14]!==C?(F=C("composer.cancel.interrupt"),t[14]=C,t[15]=F):F=t[15],t[16]!==F?(j=(0,he.jsx)(c.Text,{style:et.tooltipText,children:F}),t[16]=F,t[17]=j):j=t[17],t[18]!==k||t[19]!==j?(T=(0,he.jsx)(O.TooltipContent,{side:"top",align:"center",offset:8,children:(0,he.jsxs)(u.View,{style:et.tooltipRow,children:[j,k]})}),t[18]=k,t[19]=j,t[20]=T):T=t[20],t[21]!==R||t[22]!==T?(_=(0,he.jsxs)(O.Tooltip,{delayDuration:0,enabledOnDesktop:!0,enabledOnMobile:!1,children:[R,T]}),t[21]=R,t[22]=T,t[23]=_):_=t[23],_}function Ze(t){const n=(0,p.c)(7);let s,c,l,u,h;if(n[0]!==t){var b=t;({isAgentRunning:c,hasSendableContent:s,isProcessing:l}=b),u=(0,o.default)(b,e),n[0]=t,n[1]=s,n[2]=c,n[3]=l,n[4]=u}else s=n[1],c=n[2],l=n[3],u=n[4];return!c||s||l?null:(n[5]!==u?(h=(0,he.jsx)(Qe,Object.assign({},u)),n[5]=u,n[6]=h):h=n[6],h)}function Xe(e){const n=(0,p.c)(15);let s,c,l,h,b,f,C,x;if(n[0]!==e){var S=e;({isVoiceModeForAgent:C,hasAgent:c,isAgentRunning:h,hasSendableContent:l,isProcessing:f,isCompact:b,cancelButton:s}=S),x=(0,o.default)(S,t),n[0]=e,n[1]=s,n[2]=c,n[3]=l,n[4]=h,n[5]=b,n[6]=f,n[7]=C,n[8]=x}else s=n[1],c=n[2],l=n[3],h=n[4],b=n[5],f=n[6],C=n[7],x=n[8];const A=!C&&c&&!h&&!(b&&l);if(!A&&!(h&&!l&&!f))return null;let v,y;return n[9]!==A||n[10]!==x?(v=A?(0,he.jsx)(Je,Object.assign({},x)):null,n[9]=A,n[10]=x,n[11]=v):v=n[11],n[12]!==s||n[13]!==v?(y=(0,he.jsxs)(u.View,{style:et.rightControls,children:[v,s]}),n[12]=s,n[13]=v,n[14]=y):y=n[14],y}function Je(e){const t=(0,p.c)(23),{buttonIconSize:n,handleToggleRealtimeVoice:o,isConnected:l,isVoiceSwitching:h,realtimeVoiceButtonStyle:b,voiceToggleKeys:f,t:C}=e;let x;t[0]!==f?(x=f?(0,he.jsx)(D.Shortcut,{chord:f}):null,t[0]=f,t[1]=x):x=t[1];const S=x;let A;t[2]!==n||t[3]!==h?(A=e=>{const{hovered:t}=e;if(h)return(0,he.jsx)(s.ActivityIndicator,{size:"small",color:"white"});const o=t?lt:ut;return(0,he.jsx)(it,{size:n,uniProps:o})},t[2]=n,t[3]=h,t[4]=A):A=t[4];const v=A,y=!l||h;let I,k,w,R,F,j;return t[5]!==C?(I=C("composer.voice.enableVoiceMode"),t[5]=C,t[6]=I):I=t[6],t[7]!==o||t[8]!==b||t[9]!==v||t[10]!==y||t[11]!==I?(k=(0,he.jsx)(O.TooltipTrigger,{onPress:o,disabled:y,accessibilityLabel:I,accessibilityRole:"button",style:b,children:v}),t[7]=o,t[8]=b,t[9]=v,t[10]=y,t[11]=I,t[12]=k):k=t[12],t[13]!==C?(w=C("composer.voice.voiceMode"),t[13]=C,t[14]=w):w=t[14],t[15]!==w?(R=(0,he.jsx)(c.Text,{style:et.tooltipText,children:w}),t[15]=w,t[16]=R):R=t[16],t[17]!==S||t[18]!==R?(F=(0,he.jsx)(O.TooltipContent,{side:"top",align:"center",offset:8,children:(0,he.jsxs)(u.View,{style:et.tooltipRow,children:[R,S]})}),t[17]=S,t[18]=R,t[19]=F):F=t[19],t[20]!==k||t[21]!==F?(j=(0,he.jsxs)(O.Tooltip,{delayDuration:0,enabledOnDesktop:!0,enabledOnMobile:!1,children:[k,F]}),t[20]=k,t[21]=F,t[22]=j):j=t[22],j}const Ye=h.default.create({container:{flexDirection:"column",position:"relative"}}),et=C.StyleSheet.create(e=>({borderSeparator:{height:e.borderWidth[1],backgroundColor:e.colors.border,uni__dependencies:[0]},inputAreaContainer:{position:"relative",minHeight:x.FOOTER_HEIGHT,marginHorizontal:"auto",alignItems:"center",width:"100%",overflow:"visible",paddingHorizontal:e.spacing[4],paddingBottom:e.spacing[4],uni__dependencies:[0]},inputAreaLocked:{opacity:.6},inputAreaContent:{width:"100%",maxWidth:x.MAX_CONTENT_WIDTH,gap:e.spacing[3],uni__dependencies:[0]},messageInputContainer:{position:"relative",width:"100%",gap:e.spacing[3],uni__dependencies:[0]},cancelButton:{width:28,height:28,borderRadius:e.borderRadius.full,backgroundColor:e.colors.palette.red[600],alignItems:"center",justifyContent:"center",marginLeft:e.spacing[1],uni__dependencies:[0]},rightControls:{flexDirection:"row",alignItems:"center",gap:e.spacing[1],uni__dependencies:[0]},contextWindowMeterSlot:{width:28,height:28,flexShrink:0,alignItems:"center",justifyContent:"center"},realtimeVoiceButton:{width:28,height:28,borderRadius:e.borderRadius.full,alignItems:"center",justifyContent:"center",uni__dependencies:[0]},realtimeVoiceButtonCompactReserve:{marginLeft:e.spacing[1],uni__dependencies:[0]},realtimeVoiceButtonActive:{backgroundColor:e.colors.palette.green[600],borderColor:e.colors.palette.green[800],uni__dependencies:[0]},iconButtonHovered:{backgroundColor:e.colors.surface2,uni__dependencies:[0]},attachmentTray:{flexDirection:"row",gap:e.spacing[2],flexWrap:"wrap",uni__dependencies:[0]},tooltipRow:{flexDirection:"row",alignItems:"center",gap:e.spacing[2],uni__dependencies:[0]},tooltipText:{fontSize:e.fontSize.sm,color:e.colors.popoverForeground,uni__dependencies:[0]},buttonDisabled:{opacity:.5},queueTrack:{flexDirection:"column",gap:e.spacing[2],uni__dependencies:[0]},queueItem:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingHorizontal:e.spacing[3],paddingVertical:e.spacing[2],backgroundColor:e.colors.surface1,borderRadius:e.borderRadius.lg,borderWidth:e.borderWidth[1],borderColor:e.colors.border,gap:e.spacing[2],uni__dependencies:[0]},queueText:{flex:1,color:e.colors.foreground,fontSize:e.fontSize.base,uni__dependencies:[0]},queueActions:{flexDirection:"row",alignItems:"center",gap:e.spacing[2],uni__dependencies:[0]},queueActionButton:{width:32,height:32,borderRadius:e.borderRadius.full,alignItems:"center",justifyContent:"center",backgroundColor:e.colors.surface2,uni__dependencies:[0]},queueSendButton:{backgroundColor:e.colors.accent,uni__dependencies:[0]},sendErrorText:{color:e.colors.palette.red[500],fontSize:e.fontSize.sm,uni__dependencies:[0]}})),tt=(0,C.withUnistyles)(A.Pencil),nt=(0,C.withUnistyles)(A.ArrowUp),ot=(0,C.withUnistyles)(A.GitPullRequest),st=(0,C.withUnistyles)(A.CircleDot),it=(0,C.withUnistyles)(A.AudioLines),at=(0,C.withUnistyles)(A.Paperclip),rt=(0,C.withUnistyles)(A.Image),ct=(0,C.withUnistyles)(A.FileText),lt=e=>({color:e.colors.foreground}),ut=e=>({color:e.colors.foregroundMuted}),dt=e=>({color:e.colors.accentForeground});const mt=(0,he.jsx)(ot,{size:T.ICON_SIZE.sm,uniProps:ut}),gt=(0,he.jsx)(st,{size:T.ICON_SIZE.sm,uniProps:ut}),pt=(0,he.jsx)(ct,{size:T.ICON_SIZE.sm,uniProps:ut})},3991,[35,3553,711,1562,348,349,146,1308,234,1401,59,36,1563,56,3262,3269,1590,444,3992,4026,4036,3272,4042,4050,4051,305,3464,3520,3449,4061,3594,3622,3259,3634,4077,4081,3367,3465,4017,3963,3725,4087,4018,3623,3263,3451,4088,3483,4093,3990,3609,4090,4094,3571,4122,4123,3946,3916,3641,3729,4124,4084,3453,3954,279]);
15647
15647
  __d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"AgentControls",{enumerable:!0,get:function(){return ve}}),_e.DraftAgentControls=function(e){const o=(0,l.c)(38),{providerDefinitions:n,selectedProvider:t,modeOptions:s,selectedMode:c,onSelectMode:u,models:p,selectedModel:h,onSelectModel:v,modelSelectorProviders:f,isAllModelsLoading:b,onSelectProviderAndModel:S,thinkingOptions:C,selectedThinkingOptionId:M,onSelectThinkingOption:y,features:k,onSetFeature:T,onDropdownClose:O,onModelSelectorOpen:x,onRetryModelProvider:I,isRetryingModelProvider:j,disabled:w,modelSelectorServerId:F,isCompactLayout:R}=e,A=void 0!==j&&j,D=void 0!==w&&w,L=void 0===F?null:F,{preferences:B,updatePreferences:_}=(0,P.useFormPreferences)();let z;o[0]!==C?(z=J(C),o[0]=C,o[1]=z):z=o[1];const K=z;let $;o[2]!==B.favoriteModels?($=new Set((B.favoriteModels??[]).map(me)),o[2]=B.favoriteModels,o[3]=$):$=o[3];const W=$,H=M||K[0]?.id||void 0;let V;o[4]!==p?(V=p.map(be),o[4]=p,o[5]=V):V=o[5];const E=V;let G;o[6]!==_?(G=(e,o)=>{_(n=>(0,P.toggleFavoriteModel)({preferences:n,provider:e,modelId:o})).catch(fe)},o[6]=_,o[7]=G):G=o[7];const N=G;let Z;o[8]!==D||o[9]!==s||o[10]!==u||o[11]!==n||o[12]!==c||o[13]!==t?(Z=t&&s.length>0?{provider:t,providerDefinitions:n,modeOptions:s,selectedModeId:c,onSelectMode:u,disabled:D}:null,o[8]=D,o[9]=s,o[10]=u,o[11]=n,o[12]=c,o[13]=t,o[14]=Z):Z=o[14];const q=Z,Q=t??"",X=K.length>0?K:void 0;let Y;o[15]!==D||o[16]!==H||o[17]!==W||o[18]!==k||o[19]!==N||o[20]!==b||o[21]!==R||o[22]!==A||o[23]!==q||o[24]!==E||o[25]!==f||o[26]!==L||o[27]!==O||o[28]!==x||o[29]!==I||o[30]!==v||o[31]!==S||o[32]!==y||o[33]!==T||o[34]!==h||o[35]!==X||o[36]!==Q?(Y=(0,U.jsx)(ie,{provider:Q,modelSelectorProviders:f,modelOptions:E,selectedModelId:h,onSelectModel:v,onSelectProviderAndModel:S,isModelLoading:b,favoriteKeys:W,onToggleFavoriteModel:N,thinkingOptions:X,selectedThinkingOptionId:H,onSelectThinkingOption:y,features:k,onSetFeature:T,onDropdownClose:O,onModelSelectorOpen:x,onRetryModelProvider:I,isRetryingModelProvider:A,disabled:D,modeControl:q,modelSelectorServerId:L,isCompactLayout:R}),o[15]=D,o[16]=H,o[17]=W,o[18]=k,o[19]=N,o[20]=b,o[21]=R,o[22]=A,o[23]=q,o[24]=E,o[25]=f,o[26]=L,o[27]=O,o[28]=x,o[29]=I,o[30]=v,o[31]=S,o[32]=y,o[33]=T,o[34]=h,o[35]=X,o[36]=Q,o[37]=Y):Y=o[37];return Y};var o=r(d[0]),n=r(d[1]),t=r(d[2]),l=r(d[3]),s=r(d[4]),c=r(d[5]);r(d[6]),r(d[7]),r(d[8]);var u=e(r(d[9])),p=e(r(d[10])),h=r(d[11]),v=r(d[12]),f=r(d[13]),b=r(d[14]),S=r(d[15]),C=r(d[16]),M=r(d[17]),y=r(d[18]),k=r(d[19]),P=r(d[20]),T=r(d[21]),O=r(d[22]),x=r(d[23]),I=r(d[24]),j=r(d[25]),w=r(d[26]),F=r(d[27]),R=r(d[28]),A=r(d[29]),D=r(d[30]),L=r(d[31]),B=r(d[32]),_=r(d[33]),z=r(d[34]),K=r(d[35]),$=r(d[36]),W=r(d[37]),H=r(d[38]),U=r(d[39]);function V(e,o,n){if(!e||0===e.length)return n;const t=e.find(e=>e.id===o);return t?.label??n}const E={"list-todo":f.ListTodo,"shield-check":f.ShieldCheck,zap:f.Zap};function G(e){return e&&E[e]||f.Settings2}function N(e,o,n,t){if(!o)return t;switch((0,j.getFeatureHighlightColor)(e)){case"blue":return n.blue[400];case"green":return n.green[400];case"yellow":return n.yellow[400];default:return t}}function Z({providerOptions:e,canSelectModel:o,thinkingOptions:n,features:t,hasMode:l}){return Boolean(e?.length)||o||Boolean(n?.length)||Boolean(t?.length)||l}function q(e){return(e??[]).map(e=>({id:e.id,label:e.label}))}function J(e){return(e??[]).map(e=>({id:e.id,label:(0,j.formatThinkingOptionLabel)(e)}))}function Q(e,o){return o&&0!==o.length?[{id:e,label:e,modelSelection:{kind:"models",rows:o.map(o=>({favoriteKey:(0,P.buildFavoriteModelKey)({provider:e,modelId:o.id}),provider:e,providerLabel:e,modelId:o.id,modelLabel:o.label}))}}]:[]}function X(e,o,n,t){return({pressed:l,hovered:s})=>[e,s&&Se.modeBadgeHovered,(l||t)&&Se.modeBadgePressed,n&&o]}function Y({nextProviderId:e,modelId:o,currentProvider:n,onSelectProviderAndModel:t,onSelectProvider:l,onSelectModel:s}){t?t(e,o):(e!==n&&l?.(e),s?.(o))}function ee({nextProviderId:e,modelId:o,currentProvider:n,onSelectModel:t,onSelectProviderAndModel:l}){l?l(e,o):e===n&&t?.(o)}function oe(e,o,n){const t=e.sessions[o]?.agents?.get(n)??null;return t?{provider:t.provider,cwd:t.cwd,runtimeModelId:t.runtimeInfo?.model??null,model:t.model,features:t.features,thinkingOptionId:t.thinkingOptionId,lastUsage:t.lastUsage}:null}function ne(e,o){return e&&o?e.find(e=>e.provider===o)??null:null}function te(e,o){const n=e?(0,k.resolveProviderDefinition)(e,o):void 0;return n?[n]:[]}function le(e,o){const n=new Map;return e&&o&&n.set(e,o),n}function re(e,o,n){return t=>{o(t?e:null),t||n?.()}}function ie({provider:e,providerOptions:o,selectedProviderId:n,onSelectProvider:l,modelOptions:v,selectedModelId:f,onSelectModel:b,onSelectProviderAndModel:S,thinkingOptions:C,selectedThinkingOptionId:M,onSelectThinkingOption:y,disabled:k=!1,isModelLoading:P=!1,modelSelectorProviders:T,favoriteKeys:O=new Set,onToggleFavoriteModel:x,features:I,onSetFeature:j,onDropdownClose:F,onModelSelectorOpen:R,onRetryModelProvider:A,isRetryingModelProvider:D=!1,modeControl:L,modelSelectorServerId:B=null,isCompactLayout:$}){const{theme:W}=(0,h.useUnistyles)(),{t:H}=(0,c.useTranslation)(),E=(0,w.useIsCompactFormFactor)(),G=$??E,{fontScale:N}=(0,p.default)(),[oe,ne]=(0,s.useState)(null),[te,le]=(0,s.useState)(null),ie=G?"tight":"full",[se,ce]=(0,s.useState)(ie),ue=(0,s.useRef)(ie),ge=(0,s.useRef)(0),pe=(0,s.useRef)(null),ve=((0,s.useRef)(null),(0,s.useRef)(null)),fe=Boolean(l&&o&&o.length>0),be=Boolean(b),me=Boolean(y&&C&&C.length>0),Ce=V(o,n,H("agentControls.provider.fallback")),Me=(0,s.useMemo)(()=>J(C),[C]),ye=V(Me,M,Me[0]?.label??H("agentControls.thinking.unknown")),ke=Z({providerOptions:o,canSelectModel:be,thinkingOptions:C,features:I,hasMode:null!=L}),Pe=(0,s.useMemo)(()=>(I??[]).map(e=>{if("toggle"===e.type)return{type:"toggle"};const o=e.options.find(o=>o.id===e.value);return{type:"select",label:o?.label??e.label}}),[I]),Te=(0,s.useMemo)(()=>({hasModel:be,hasThinking:me,hasMode:null!=L,features:Pe,fontScale:N}),[be,me,Pe,N,L]),Oe=(0,s.useMemo)(()=>(0,z.resolveComposerControlPresentation)(se),[se]),xe=(0,s.useMemo)(()=>({glyphSize:(0,z.resolveComposerToolbarGlyphSize)(_.isNative?"native":"web"),presentation:Oe}),[Oe]),Ie=(0,s.useCallback)(e=>{const o=(0,z.resolveComposerControlDensity)({availableWidth:e,currentDensity:ue.current,controls:Te});o!==ue.current&&(ue.current=o,ce(o))},[Te]),je=(0,s.useCallback)(e=>{const o=e.nativeEvent.layout.width;ge.current=o,Ie(o)},[Ie]);(0,s.useEffect)(()=>{ge.current>0&&Ie(ge.current)},[Ie]);const we=k,Fe=(0,s.useMemo)(()=>q(o),[o]),Re=(0,s.useMemo)(()=>Q(e,v),[v,e]),Ae=T??Re,De=(0,s.useMemo)(()=>q(Me),[Me]),Le=(0,s.useCallback)(e=>(0,U.jsx)(he,{option:e.option,selected:e.selected,active:e.active,onPress:e.onPress,iconColor:W.colors.foreground}),[W.colors.foreground]),Be=(0,s.useCallback)(e=>re(e,le,F),[F]),ze=(0,s.useCallback)(e=>o=>{le(o?e:null)},[]),Ke=(0,s.useCallback)(()=>{Be("provider")("provider"!==te)},[Be,te]),$e=(0,s.useCallback)(()=>{Be("thinking")("thinking"!==te)},[Be,te]),We=(0,s.useMemo)(()=>Be("provider"),[Be]),He=(0,s.useMemo)(()=>Be("thinking"),[Be]),Ue=(0,s.useCallback)(e=>l?.(e),[l]),Ve=(0,s.useCallback)(e=>y?.(e),[y]),Ee=(0,s.useCallback)((o,n)=>{ee({nextProviderId:o,modelId:n,currentProvider:e,onSelectModel:b,onSelectProviderAndModel:S})},[b,S,e]),Ge=(0,s.useMemo)(()=>X(Se.modeBadge,Se.disabledBadge,k||!fe,"provider"===te),[fe,k,te]),Ne=(0,s.useCallback)(e=>{u.default.dismiss(),ne(e)},[]),Ze=(0,s.useCallback)(()=>{ne(null),G||F?.()},[G,F]),qe=(0,s.useCallback)(e=>{y?.(e),ne(null)},[y]),Je=(0,s.useCallback)((o,n)=>{Y({nextProviderId:o,modelId:n,currentProvider:e,onSelectProviderAndModel:S,onSelectProvider:l,onSelectModel:b})},[b,l,S,e]);return ke?(0,U.jsx)(K.ComposerControlLayoutProvider,{value:xe,children:(0,U.jsx)(t.View,{style:Se.container,onLayout:je,children:G?(0,U.jsx)(ae,{provider:e,selectedModelId:f,selectedThinkingOptionId:M,features:I,onSetFeature:j,onToggleFavoriteModel:x,onDropdownClose:F,onModelSelectorOpen:R,onRetryModelProvider:A,isRetryingModelProvider:D,favoriteKeys:O,disabled:k,isModelLoading:P,canSelectModel:be,canSelectThinking:me,modelSelectorProviders:Ae,modelDisabled:we,comboboxThinkingOptions:De,openSelector:te,displayThinking:ye,activeSheet:oe,handleOpenSheet:Ne,handleCloseSheet:Ze,handleSheetModelSelect:Je,handleSelectThinkingAndClose:qe,handleOpenChange:ze,renderThinkingOption:Le,modeControl:L,glyphSize:xe.glyphSize,modelSelectorServerId:B}):(0,U.jsx)(de,{provider:e,providerOptions:o,selectedProviderId:n,modelOptions:v,selectedModelId:f,thinkingOptions:Me,selectedThinkingOptionId:M,features:I,onSetFeature:j,onToggleFavoriteModel:x,onDropdownClose:F,onModelSelectorOpen:R,onRetryModelProvider:A,isRetryingModelProvider:D,favoriteKeys:O,disabled:k,isModelLoading:P,canSelectProvider:fe,canSelectModel:be,canSelectThinking:me,modelSelectorProviders:Ae,modelDisabled:we,comboboxProviderOptions:Fe,comboboxThinkingOptions:De,displayProvider:Ce,displayThinking:ye,openSelector:te,providerAnchorRef:pe,thinkingAnchorRef:ve,providerPressableStyle:Ge,handleProviderPress:Ke,handleThinkingPress:$e,handleProviderSelect:Ue,handleThinkingSelect:Ve,handleDesktopModelSelect:Ee,handleProviderOpenChange:We,handleThinkingOpenChange:He,handleOpenChange:Be,handleNestedOpenChange:ze,renderThinkingOption:Le,modeControl:L,presentation:Oe,glyphSize:xe.glyphSize,activeSheet:oe,handleOpenSheet:Ne,handleCloseSheet:Ze,modelSelectorServerId:B})})}):null}const se=6;function de(e){const s=(0,l.c)(81),{theme:u}=(0,h.useUnistyles)(),{t:p}=(0,c.useTranslation)(),{provider:v,providerOptions:C,selectedProviderId:M,selectedModelId:y,thinkingOptions:k,selectedThinkingOptionId:P,features:w,onSetFeature:F,onToggleFavoriteModel:R,onDropdownClose:A,onModelSelectorOpen:D,onRetryModelProvider:L,isRetryingModelProvider:B,favoriteKeys:_,disabled:z,isModelLoading:K,canSelectProvider:H,canSelectModel:V,canSelectThinking:E,modelSelectorProviders:G,modelDisabled:N,comboboxProviderOptions:Z,comboboxThinkingOptions:q,displayProvider:J,displayThinking:Q,openSelector:X,providerAnchorRef:Y,thinkingAnchorRef:ee,providerPressableStyle:oe,handleProviderPress:ne,handleThinkingPress:te,handleProviderSelect:le,handleThinkingSelect:re,handleDesktopModelSelect:ie,handleProviderOpenChange:de,handleThinkingOpenChange:ae,handleOpenChange:ue,handleNestedOpenChange:pe,renderThinkingOption:he,modeControl:ve,presentation:fe,glyphSize:be,activeSheet:me,handleOpenSheet:Ce,handleCloseSheet:Me,modelSelectorServerId:ye}=e;let ke;s[0]!==be||s[1]!==fe.showCarets?(ke={glyphSize:be,showCaret:fe.showCarets},s[0]=be,s[1]=fe.showCarets,s[2]=ke):ke=s[2];const Pe=ke;let Te,Oe;s[3]!==p?(Te=p("agentControls.features.title"),s[3]=p,s[4]=Te):Te=s[4],s[5]!==Te?(Oe={title:Te},s[5]=Te,s[6]=Oe):Oe=s[6];const xe=Oe;let Ie;s[7]!==Ce?(Ie=()=>Ce("features"),s[7]=Ce,s[8]=Ie):Ie=s[8];const je=Ie;let we,Fe,Re,Ae,De,Le;return s[9]!==H||s[10]!==Z||s[11]!==z||s[12]!==J||s[13]!==de||s[14]!==ne||s[15]!==le||s[16]!==X||s[17]!==Y||s[18]!==C||s[19]!==oe||s[20]!==M||s[21]!==p?(we=C&&C.length>0?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(b.ComboboxTrigger,{ref:Y,collapsable:!1,disabled:z||!H,onPress:ne,style:oe,accessibilityRole:"button",accessibilityLabel:p("agentControls.provider.select"),testID:"agent-provider-selector",children:(0,U.jsx)(n.Text,{style:Se.modeBadgeText,children:J})}),(0,U.jsx)(T.Combobox,{options:Z,value:M??"",onSelect:le,searchable:Z.length>se,open:"provider"===X,onOpenChange:de,anchorRef:Y,desktopPlacement:"top-start"})]}):null,s[9]=H,s[10]=Z,s[11]=z,s[12]=J,s[13]=de,s[14]=ne,s[15]=le,s[16]=X,s[17]=Y,s[18]=C,s[19]=oe,s[20]=M,s[21]=p,s[22]=we):we=s[22],s[23]!==V||s[24]!==_||s[25]!==ie||s[26]!==K||s[27]!==B||s[28]!==N||s[29]!==G||s[30]!==ye||s[31]!==Pe||s[32]!==A||s[33]!==D||s[34]!==L||s[35]!==R||s[36]!==v||s[37]!==y||s[38]!==p?(Fe=V?(0,U.jsxs)(I.Tooltip,{delayDuration:0,enabledOnDesktop:!0,enabledOnMobile:!1,children:[(0,U.jsx)(I.TooltipTrigger,{asChild:!0,triggerRefProp:"ref",children:(0,U.jsx)(t.View,{style:Se.modelControl,children:(0,U.jsx)(S.CombinedModelSelector,{providers:G,selectedProvider:v,selectedModel:y??"",onSelect:ie,favoriteKeys:_,onToggleFavorite:R,isLoading:K,disabled:N,onOpen:D,onClose:A,onRetryProvider:L,isRetryingProvider:B,serverId:ye,desktopPlacement:"top-start",desktopMinWidth:360,toolbar:Pe})})}),(0,U.jsx)(I.TooltipContent,{side:"top",align:"center",offset:8,children:(0,U.jsx)(n.Text,{style:Se.tooltipText,children:p((0,j.getAgentControlHintKey)("model"))})})]}):null,s[23]=V,s[24]=_,s[25]=ie,s[26]=K,s[27]=B,s[28]=N,s[29]=G,s[30]=ye,s[31]=Pe,s[32]=A,s[33]=D,s[34]=L,s[35]=R,s[36]=v,s[37]=y,s[38]=p,s[39]=Fe):Fe=s[39],s[40]!==E||s[41]!==q||s[42]!==z||s[43]!==Q||s[44]!==ae||s[45]!==te||s[46]!==re||s[47]!==X||s[48]!==fe.showCarets||s[49]!==fe.showThinkingLabel||s[50]!==he||s[51]!==P||s[52]!==p||s[53]!==ee||s[54]!==k?(Re=k&&k.length>0?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(I.Tooltip,{delayDuration:0,enabledOnDesktop:!0,enabledOnMobile:!1,children:[(0,U.jsx)(I.TooltipTrigger,{asChild:!0,triggerRefProp:"ref",children:(0,U.jsx)(W.AgentControlTrigger,{ref:ee,icon:f.Brain,surface:"toolbar",label:p("agentControls.thinking.title"),value:Q,showToolbarLabel:fe.showThinkingLabel,showCaret:fe.showCarets,open:"thinking"===X,disabled:z||!E,onPress:te,accessibilityLabel:p("agentControls.thinking.selectWithValue",{value:Q}),testID:"agent-thinking-selector"})}),(0,U.jsx)(I.TooltipContent,{side:"top",align:"center",offset:8,children:(0,U.jsx)(n.Text,{style:Se.tooltipText,children:p((0,j.getAgentControlHintKey)("thinking"))})})]}),(0,U.jsx)(T.Combobox,{options:q,value:P??"",onSelect:re,searchable:q.length>se,open:"thinking"===X,onOpenChange:ae,anchorRef:ee,desktopPlacement:"top-start",desktopMinWidth:200,renderOption:he})]}):null,s[40]=E,s[41]=q,s[42]=z,s[43]=Q,s[44]=ae,s[45]=te,s[46]=re,s[47]=X,s[48]=fe.showCarets,s[49]=fe.showThinkingLabel,s[50]=he,s[51]=P,s[52]=p,s[53]=ee,s[54]=k,s[55]=Re):Re=s[55],s[56]!==ve||s[57]!==A?(Ae=ve?(0,U.jsx)(O.AgentModeControl,Object.assign({},ve,{onClose:A})):null,s[56]=ve,s[57]=A,s[58]=Ae):Ae=s[58],s[59]!==me||s[60]!==z||s[61]!==w||s[62]!==xe||s[63]!==be||s[64]!==Me||s[65]!==pe||s[66]!==ue||s[67]!==je||s[68]!==A||s[69]!==F||s[70]!==X||s[71]!==fe.aggregateFeatures||s[72]!==p||s[73]!==u?(De=fe.aggregateFeatures&&w?.length?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(o.Pressable,{onPress:je,disabled:z,style:Se.modeIconBadge,accessibilityRole:"button",accessibilityLabel:p("agentControls.features.open"),testID:"agent-controls-features",children:(0,U.jsx)($.ComposerToolbarGlyph,{size:be,children:(0,U.jsx)(f.Settings2,{size:be,color:u.colors.foregroundMuted})})}),(0,U.jsx)(x.AdaptiveModalSheet,{header:xe,visible:"features"===me,onClose:Me,testID:"agent-features-sheet",children:w.map(e=>(0,U.jsx)(ge,{feature:e,disabled:z,openSelector:X,handleOpenChange:pe,onSetFeature:F},`feature-${e.id}`))})]}):w?.map(e=>(0,U.jsx)(ce,{feature:e,disabled:z,openSelector:X,handleOpenChange:ue,onSetFeature:F,onActionComplete:A},`feature-${e.id}`)),s[59]=me,s[60]=z,s[61]=w,s[62]=xe,s[63]=be,s[64]=Me,s[65]=pe,s[66]=ue,s[67]=je,s[68]=A,s[69]=F,s[70]=X,s[71]=fe.aggregateFeatures,s[72]=p,s[73]=u,s[74]=De):De=s[74],s[75]!==we||s[76]!==Fe||s[77]!==Re||s[78]!==Ae||s[79]!==De?(Le=(0,U.jsxs)(U.Fragment,{children:[we,Fe,Re,Ae,De]}),s[75]=we,s[76]=Fe,s[77]=Re,s[78]=Ae,s[79]=De,s[80]=Le):Le=s[80],Le}function ae(e){const o=(0,l.c)(54),{t:n}=(0,c.useTranslation)(),{provider:u,selectedModelId:p,selectedThinkingOptionId:h,features:v,onSetFeature:b,onToggleFavoriteModel:S,onDropdownClose:C,onModelSelectorOpen:M,onRetryModelProvider:y,isRetryingModelProvider:k,favoriteKeys:P,disabled:x,isModelLoading:I,canSelectModel:j,canSelectThinking:w,modelSelectorProviders:F,modelDisabled:R,comboboxThinkingOptions:A,openSelector:D,displayThinking:L,activeSheet:B,handleOpenSheet:_,handleCloseSheet:z,handleSheetModelSelect:K,handleSelectThinkingAndClose:$,handleOpenChange:V,renderThinkingOption:E,modeControl:G,glyphSize:N,modelSelectorServerId:Z}=e,q=(0,s.useRef)(null),J=A.length>0;let Q;o[0]!==_?(Q=()=>_("thinking"),o[0]=_,o[1]=Q):Q=o[1];const X=Q;let Y;o[2]!==z||o[3]!==_?(Y=e=>{e?_("thinking"):z()},o[2]=z,o[3]=_,o[4]=Y):Y=o[4];const ee=Y;let oe,ne,te,le,re;if(o[5]!==B||o[6]!==w||o[7]!==A||o[8]!==x||o[9]!==L||o[10]!==X||o[11]!==$||o[12]!==ee||o[13]!==J||o[14]!==E||o[15]!==h||o[16]!==n?(oe=J?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(W.AgentControlTrigger,{ref:q,icon:f.Brain,surface:"sheet",label:n("agentControls.thinking.title"),value:L,open:"thinking"===B,onPress:X,disabled:x||!w,accessibilityLabel:n("agentControls.thinking.selectWithValue",{value:L}),testID:"agent-controls-thinking"}),(0,U.jsx)(T.Combobox,{options:A,value:h??"",onSelect:$,searchable:!1,title:n("agentControls.thinking.title"),open:"thinking"===B,onOpenChange:ee,anchorRef:q,renderOption:E,presentation:"push"})]}):null,o[5]=B,o[6]=w,o[7]=A,o[8]=x,o[9]=L,o[10]=X,o[11]=$,o[12]=ee,o[13]=J,o[14]=E,o[15]=h,o[16]=n,o[17]=oe):oe=o[17],o[18]!==G?(ne=G?(0,U.jsx)(O.AgentModeControl,Object.assign({},G,{surface:"sheet"})):null,o[18]=G,o[19]=ne):ne=o[19],o[20]!==v?(te=v??[],o[20]=v,o[21]=te):te=o[21],o[22]!==x||o[23]!==V||o[24]!==b||o[25]!==D||o[26]!==te){let e;o[28]!==x||o[29]!==V||o[30]!==b||o[31]!==D?(e=e=>(0,U.jsx)(ge,{feature:e,disabled:x,openSelector:D,handleOpenChange:V,onSetFeature:b},`feature-${e.id}`),o[28]=x,o[29]=V,o[30]=b,o[31]=D,o[32]=e):e=o[32],le=te.map(e),o[22]=x,o[23]=V,o[24]=b,o[25]=D,o[26]=te,o[27]=le}else le=o[27];o[33]!==oe||o[34]!==ne||o[35]!==le?(re=(0,U.jsxs)(t.View,{style:Se.combinedSheetControls,testID:"agent-controls-combined-sheet-controls",children:[oe,ne,le]}),o[33]=oe,o[34]=ne,o[35]=le,o[36]=re):re=o[36];const ie=re;let se;return o[37]!==j||o[38]!==P||o[39]!==N||o[40]!==K||o[41]!==I||o[42]!==k||o[43]!==R||o[44]!==F||o[45]!==Z||o[46]!==C||o[47]!==M||o[48]!==y||o[49]!==S||o[50]!==u||o[51]!==p||o[52]!==ie?(se=j?(0,U.jsx)(H.CompactModelSheet,{providers:F,selectedProvider:u,selectedModel:p??"",onSelect:K,favoriteKeys:P,onToggleFavorite:S,isLoading:I,disabled:R,onOpen:M,onClose:C,onRetryProvider:y,isRetryingProvider:k,serverId:Z,glyphSize:N,children:ie}):null,o[37]=j,o[38]=P,o[39]=N,o[40]=K,o[41]=I,o[42]=k,o[43]=R,o[44]=F,o[45]=Z,o[46]=C,o[47]=M,o[48]=y,o[49]=S,o[50]=u,o[51]=p,o[52]=ie,o[53]=se):se=o[53],se}function ce(e){const o=(0,l.c)(77),{feature:t,disabled:c,openSelector:u,handleOpenChange:p,onSetFeature:v,onActionComplete:f}=e,{theme:b}=(0,h.useUnistyles)(),S=`feature-${t.id}`,C=(0,s.useRef)(null);let M;o[0]!==S||o[1]!==p?(M=p(S),o[0]=S,o[1]=p,o[2]=M):M=o[2];const y=M;let k;o[3]!==S||o[4]!==y||o[5]!==u?(k=()=>y(u!==S),o[3]=S,o[4]=y,o[5]=u,o[6]=k):k=o[6];const P=k;let O;o[7]!==t.id||o[8]!==t.type||o[9]!==t.value||o[10]!==f||o[11]!==v?(O=()=>{"toggle"===t.type&&(v?.(t.id,!t.value),f?.())},o[7]=t.id,o[8]=t.type,o[9]=t.value,o[10]=f,o[11]=v,o[12]=O):O=o[12];const x=O;let w;o[13]!==t.id||o[14]!==v?(w=e=>{v?.(t.id,e)},o[13]=t.id,o[14]=v,o[15]=w):w=o[15];const F=w;let R;o[16]!==t.options||o[17]!==t.type?(R="select"===t.type?t.options.map(ue):[],o[16]=t.options,o[17]=t.type,o[18]=R):R=o[18];const A=R;if("toggle"===t.type){let e;o[19]!==t.icon?(e=G(t.icon),o[19]=t.icon,o[20]=e):e=o[20];const l=e;let s;o[21]!==t.id||o[22]!==t.value||o[23]!==b.colors.foregroundMuted||o[24]!==b.colors.palette?(s=N(t.id,t.value,b.colors.palette,b.colors.foregroundMuted),o[21]=t.id,o[22]=t.value,o[23]=b.colors.foregroundMuted,o[24]=b.colors.palette,o[25]=s):s=o[25];const u=t.label;let p;o[26]!==t?(p=(0,j.getFeatureTooltip)(t),o[26]=t,o[27]=p):p=o[27];const h=`agent-feature-${t.id}`;let v,f,S,C;return o[28]!==l||o[29]!==c||o[30]!==t.label||o[31]!==x||o[32]!==h||o[33]!==s||o[34]!==p?(v=(0,U.jsx)(I.TooltipTrigger,{asChild:!0,triggerRefProp:"ref",children:(0,U.jsx)(W.AgentControlTrigger,{icon:l,iconColor:s,surface:"toolbar",label:u,showToolbarLabel:!1,disabled:c,onPress:x,accessibilityLabel:p,testID:h})}),o[28]=l,o[29]=c,o[30]=t.label,o[31]=x,o[32]=h,o[33]=s,o[34]=p,o[35]=v):v=o[35],o[36]!==t?(f=(0,j.getFeatureTooltip)(t),o[36]=t,o[37]=f):f=o[37],o[38]!==f?(S=(0,U.jsx)(I.TooltipContent,{side:"top",align:"center",offset:8,children:(0,U.jsx)(n.Text,{style:Se.tooltipText,children:f})}),o[38]=f,o[39]=S):S=o[39],o[40]!==v||o[41]!==S?(C=(0,U.jsxs)(I.Tooltip,{delayDuration:0,enabledOnDesktop:!0,enabledOnMobile:!1,children:[v,S]}),o[40]=v,o[41]=S,o[42]=C):C=o[42],C}if("select"===t.type){let e;o[43]!==t.icon?(e=G(t.icon),o[43]=t.icon,o[44]=e):e=o[44];const l=e;let s;if(o[45]!==t.options||o[46]!==t.value){let e;o[48]!==t.value?(e=e=>e.id===t.value,o[48]=t.value,o[49]=e):e=o[49],s=t.options.find(e),o[45]=t.options,o[46]=t.value,o[47]=s}else s=o[47];const p=s,h=t.label,v=p?.label??t.label,f=u===S;let b;o[50]!==t?(b=(0,j.getFeatureTooltip)(t),o[50]=t,o[51]=b):b=o[51];const M=`agent-feature-${t.id}`;let k,O,x,w;o[52]!==l||o[53]!==c||o[54]!==t.label||o[55]!==P||o[56]!==f||o[57]!==b||o[58]!==M||o[59]!==v?(k=(0,U.jsx)(I.TooltipTrigger,{asChild:!0,triggerRefProp:"ref",children:(0,U.jsx)(W.AgentControlTrigger,{ref:C,icon:l,surface:"toolbar",label:h,value:v,open:f,disabled:c,onPress:P,accessibilityLabel:b,testID:M})}),o[52]=l,o[53]=c,o[54]=t.label,o[55]=P,o[56]=f,o[57]=b,o[58]=M,o[59]=v,o[60]=k):k=o[60],o[61]!==t?(O=(0,j.getFeatureTooltip)(t),o[61]=t,o[62]=O):O=o[62],o[63]!==O?(x=(0,U.jsx)(I.TooltipContent,{side:"top",align:"center",offset:8,children:(0,U.jsx)(n.Text,{style:Se.tooltipText,children:O})}),o[63]=O,o[64]=x):x=o[64],o[65]!==k||o[66]!==x?(w=(0,U.jsxs)(I.Tooltip,{delayDuration:0,enabledOnDesktop:!0,enabledOnMobile:!1,children:[k,x]}),o[65]=k,o[66]=x,o[67]=w):w=o[67];const R=String(t.value),D=u===S;let L,B;return o[68]!==A||o[69]!==y||o[70]!==F||o[71]!==R||o[72]!==D?(L=(0,U.jsx)(T.Combobox,{options:A,value:R,onSelect:F,open:D,onOpenChange:y,anchorRef:C,desktopPlacement:"top-start"}),o[68]=A,o[69]=y,o[70]=F,o[71]=R,o[72]=D,o[73]=L):L=o[73],o[74]!==w||o[75]!==L?(B=(0,U.jsxs)(U.Fragment,{children:[w,L]}),o[74]=w,o[75]=L,o[76]=B):B=o[76],B}return null}function ue(e){return{id:e.id,label:e.label}}function ge(e){const o=(0,l.c)(69),{feature:n,disabled:t,openSelector:u,handleOpenChange:p,onSetFeature:v}=e,{theme:f}=(0,h.useUnistyles)(),{t:b}=(0,c.useTranslation)(),S=`feature-${n.id}`,C=(0,s.useRef)(null);let M;o[0]!==S||o[1]!==p?(M=p(S),o[0]=S,o[1]=p,o[2]=M):M=o[2];const y=M;let k;o[3]!==S||o[4]!==y||o[5]!==u?(k=()=>y(u!==S),o[3]=S,o[4]=y,o[5]=u,o[6]=k):k=o[6];const P=k;let O;o[7]!==n.label?(O={title:n.label},o[7]=n.label,o[8]=O):O=o[8];const x=O;let I;o[9]!==n.id||o[10]!==n.type||o[11]!==n.value||o[12]!==v?(I=()=>{"toggle"===n.type&&v?.(n.id,!n.value)},o[9]=n.id,o[10]=n.type,o[11]=n.value,o[12]=v,o[13]=I):I=o[13];const w=I;let F;o[14]!==n.id||o[15]!==v?(F=e=>{v?.(n.id,e)},o[14]=n.id,o[15]=v,o[16]=F):F=o[16];const R=F;let A;o[17]!==n.options||o[18]!==n.type?(A="select"===n.type?n.options.map(pe):[],o[17]=n.options,o[18]=n.type,o[19]=A):A=o[19];const D=A;if("toggle"===n.type){let e;o[20]!==n.icon?(e=G(n.icon),o[20]=n.icon,o[21]=e):e=o[21];const l=e;let s;o[22]!==n.id||o[23]!==n.value||o[24]!==f.colors.foregroundMuted||o[25]!==f.colors.palette?(s=N(n.id,n.value,f.colors.palette,f.colors.foregroundMuted),o[22]=n.id,o[23]=n.value,o[24]=f.colors.foregroundMuted,o[25]=f.colors.palette,o[26]=s):s=o[26];const c=n.label;let u,p;o[27]!==n.value||o[28]!==b?(u=n.value?b("agentControls.features.on"):b("agentControls.features.off"),o[27]=n.value,o[28]=b,o[29]=u):u=o[29],o[30]!==n?(p=(0,j.getFeatureTooltip)(n),o[30]=n,o[31]=p):p=o[31];const h=`agent-feature-${n.id}`;let v;return o[32]!==l||o[33]!==t||o[34]!==n.label||o[35]!==w||o[36]!==u||o[37]!==p||o[38]!==h||o[39]!==s?(v=(0,U.jsx)(W.AgentControlTrigger,{icon:l,iconColor:s,surface:"sheet",label:c,value:u,disabled:t,onPress:w,accessibilityLabel:p,testID:h}),o[32]=l,o[33]=t,o[34]=n.label,o[35]=w,o[36]=u,o[37]=p,o[38]=h,o[39]=s,o[40]=v):v=o[40],v}if("select"===n.type){let e;o[41]!==n.icon?(e=G(n.icon),o[41]=n.icon,o[42]=e):e=o[42];const l=e;let s;if(o[43]!==n.options||o[44]!==n.value){let e;o[46]!==n.value?(e=e=>e.id===n.value,o[46]=n.value,o[47]=e):e=o[47],s=n.options.find(e),o[43]=n.options,o[44]=n.value,o[45]=s}else s=o[45];const c=s,p=n.label,h=c?.label??n.label,v=u===S;let f;o[48]!==n?(f=(0,j.getFeatureTooltip)(n),o[48]=n,o[49]=f):f=o[49];const b=`agent-feature-${n.id}`;let M;o[50]!==l||o[51]!==t||o[52]!==n.label||o[53]!==P||o[54]!==h||o[55]!==v||o[56]!==f||o[57]!==b?(M=(0,U.jsx)(W.AgentControlTrigger,{ref:C,icon:l,surface:"sheet",label:p,value:h,open:v,disabled:t,onPress:P,accessibilityLabel:f,testID:b}),o[50]=l,o[51]=t,o[52]=n.label,o[53]=P,o[54]=h,o[55]=v,o[56]=f,o[57]=b,o[58]=M):M=o[58];const k=String(n.value),O=u===S;let I,w;return o[59]!==D||o[60]!==y||o[61]!==R||o[62]!==x||o[63]!==k||o[64]!==O?(I=(0,U.jsx)(T.Combobox,{options:D,value:k,onSelect:R,open:O,onOpenChange:y,anchorRef:C,presentation:"push",header:x}),o[59]=D,o[60]=y,o[61]=R,o[62]=x,o[63]=k,o[64]=O,o[65]=I):I=o[65],o[66]!==M||o[67]!==I?(w=(0,U.jsxs)(U.Fragment,{children:[M,I]}),o[66]=M,o[67]=I,o[68]=w):w=o[68],w}return null}function pe(e){return{id:e.id,label:e.label}}function he(e){const o=(0,l.c)(8),{option:n,selected:t,active:s,onPress:c,iconColor:u}=e;let p;o[0]!==u?(p=(0,U.jsx)(f.Brain,{size:16,color:u}),o[0]=u,o[1]=p):p=o[1];const h=p;let v;return o[2]!==s||o[3]!==h||o[4]!==c||o[5]!==n.label||o[6]!==t?(v=(0,U.jsx)(T.ComboboxItem,{label:n.label,selected:t,active:s,onPress:c,leadingSlot:h}),o[2]=s,o[3]=h,o[4]=c,o[5]=n.label,o[6]=t,o[7]=v):v=o[7],v}const ve=(0,s.memo)(function(e){const o=(0,l.c)(99),{agentId:n,serverId:t,isPaneFocused:s,onDropdownClose:u,isCompactLayout:p}=e,{t:h}=(0,c.useTranslation)(),{preferences:f,updatePreferences:b}=(0,P.useFormPreferences)();let S;o[0]!==n||o[1]!==t?(S=e=>oe(e,t,n),o[0]=n,o[1]=t,o[2]=S):S=o[2];const k=(0,M.useSessionStore)((0,v.useShallow)(S));let T;o[3]!==t?(T=e=>e.sessions[t]?.client??null,o[3]=t,o[4]=T):T=o[4];const x=(0,M.useSessionStore)(T),I=(0,F.useToast)(),w=(0,O.useLiveAgentModeControl)(t,n),_=k?.cwd;let z;o[5]!==_?(z={cwd:_},o[5]=_,o[6]=z):z=o[6];const{entries:K,isLoading:$,isRefreshing:W,refresh:H,refetchIfStale:V}=(0,y.useProvidersSnapshot)(t,z),E=k?.provider;let G;o[7]!==K||o[8]!==E?(G=ne(K,E),o[7]=K,o[8]=E,o[9]=G):G=o[9];const N=G,Z=N?.models??null,q="loading"===N?.status,J=k?.provider;let Q;o[10]!==K||o[11]!==J?(Q=te(J,K),o[10]=K,o[11]=J,o[12]=Q):Q=o[12];const X=Q;let Y,ee;o[13]!==k?.provider||o[14]!==Z?(Y=()=>le(k?.provider,Z),o[13]=k?.provider,o[14]=Z,o[15]=Y):Y=o[15],o[16]!==Y?(ee=Y(),o[16]=Y,o[17]=ee):ee=o[17];const re=ee;let se;e:{if(N){let e;o[18]!==N?(e=(0,C.buildSelectableProviderSelectorProviders)([N]),o[18]=N,o[19]=e):e=o[19],se=e;break e}let e;o[20]!==X||o[21]!==re?(e=(0,C.buildProviderSelectorProviders)({providerDefinitions:X,modelsByProvider:re}),o[20]=X,o[21]=re,o[22]=e):e=o[22],se=e}const de=se,ae=k?.runtimeModelId,ce=k?.model,ue=k?.thinkingOptionId;let ge;o[23]!==Z||o[24]!==ae||o[25]!==ce||o[26]!==ue?(ge=(0,j.resolveAgentModelSelection)({models:Z,runtimeModelId:ae,configuredModelId:ce,explicitThinkingOptionId:ue}),o[23]=Z,o[24]=ae,o[25]=ce,o[26]=ue,o[27]=ge):ge=o[27];const pe=ge;let he,ve;o[28]!==Z?(he=Z??[],o[28]=Z,o[29]=he):he=o[29],o[30]!==he?(ve=he.map(Ce),o[30]=he,o[31]=ve):ve=o[31];const fe=ve;let be;o[32]!==f.favoriteModels?(be=new Set((f.favoriteModels??[]).map(Me)),o[32]=f.favoriteModels,o[33]=be):be=o[33];const me=be;let Se,Oe;o[34]!==pe.thinkingOptions?(Se=pe.thinkingOptions??[],o[34]=pe.thinkingOptions,o[35]=Se):Se=o[35],o[36]!==Se?(Oe=Se.map(ye),o[36]=Se,o[37]=Oe):Oe=o[37];const xe=Oe,Ie=k?.provider,je=pe.activeModelId;let we;o[38]!==n||o[39]!==Ie||o[40]!==x||o[41]!==I||o[42]!==b?(we=async e=>{if(x&&Ie)try{await x.setAgentModel(n,e),await b(o=>(0,P.mergeProviderPreferences)({preferences:o,provider:Ie,updates:{model:e}}))}catch(e){const o=e;console.warn("[AgentControls] setAgentModel or persist preference failed",o),I.error((0,R.toErrorMessage)(o))}},o[38]=n,o[39]=Ie,o[40]=x,o[41]=I,o[42]=b,o[43]=we):we=o[43];const Fe=we,Re=Ie??null;let Ae;if(o[44]!==je||o[45]!==de||o[46]!==Fe||o[47]!==t||o[48]!==h||o[49]!==Re){let e;o[51]!==Fe?(e=(e,o)=>Fe(o),o[51]=Fe,o[52]=e):e=o[52],Ae=(0,L.buildModelChoiceContributions)({serverId:t,providers:de,selectedProvider:Re,selectedModelId:je,groupLabel:h("shell.commandCenter.modelGroupLabel"),searchKeywords:h("shell.commandCenter.modelSearchKeywords"),getIcon:B.getCommandCenterProviderIcon,select:e}),o[44]=je,o[45]=de,o[46]=Fe,o[47]=t,o[48]=h,o[49]=Re,o[50]=Ae}else Ae=o[50];const De=Ae,Le=`agent:${t}:${n}`,Be=s&&Boolean(x);let ze,Ke;o[53]!==De||o[54]!==Le||o[55]!==Be?(ze={sourceId:Le,enabled:Be,actions:De},o[53]=De,o[54]=Le,o[55]=Be,o[56]=ze):ze=o[56],(0,D.useCommandCenterActions)(ze),o[57]!==b?(Ke=(e,o)=>{b(n=>(0,P.toggleFavoriteModel)({preferences:n,provider:e,modelId:o})).catch(ke)},o[57]=b,o[58]=Ke):Ke=o[58];const $e=Ke;let We;o[59]!==je||o[60]!==n||o[61]!==Ie||o[62]!==x||o[63]!==I||o[64]!==b?(We=e=>{x&&Ie&&(je&&b(o=>(0,P.mergeProviderPreferences)({preferences:o,provider:Ie,updates:{model:je,thinkingByModel:{[je]:e}}})).catch(Pe),x.setAgentThinkingOption(n,e).then(e=>(0,A.showProviderNoticeToast)(I,e)).catch(e=>{console.warn("[AgentControls] setAgentThinkingOption failed",e),I.error((0,R.toErrorMessage)(e))}))},o[59]=je,o[60]=n,o[61]=Ie,o[62]=x,o[63]=I,o[64]=b,o[65]=We):We=o[65];const He=We;let Ue;o[66]!==n||o[67]!==Ie||o[68]!==x||o[69]!==I||o[70]!==b?(Ue=(e,o)=>{x&&Ie&&(b(n=>(0,P.mergeProviderPreferences)({preferences:n,provider:Ie,updates:{featureValues:{[e]:o}}})).catch(Te),x.setAgentFeature(n,e,o).catch(e=>{console.warn("[AgentControls] setAgentFeature failed",e),I.error((0,R.toErrorMessage)(e))}))},o[66]=n,o[67]=Ie,o[68]=x,o[69]=I,o[70]=b,o[71]=Ue):Ue=o[71];const Ve=Ue;let Ee;o[72]!==Ie||o[73]!==V?(Ee=()=>{V(Ie)},o[72]=Ie,o[73]=V,o[74]=Ee):Ee=o[74];const Ge=Ee;let Ne;o[75]!==H?(Ne=e=>{H([e])},o[75]=H,o[76]=Ne):Ne=o[76];const Ze=Ne;if(!k)return null;const qe=pe.activeModelId??void 0,Je=xe.length>1?xe:void 0,Qe=pe.selectedThinkingId??void 0,Xe=$||q,Ye=!x;let eo;return o[77]!==k.features||o[78]!==k.provider||o[79]!==de||o[80]!==me||o[81]!==Ge||o[82]!==Ze||o[83]!==Fe||o[84]!==He||o[85]!==Ve||o[86]!==$e||o[87]!==p||o[88]!==w||o[89]!==fe||o[90]!==u||o[91]!==t||o[92]!==W||o[93]!==qe||o[94]!==Je||o[95]!==Qe||o[96]!==Xe||o[97]!==Ye?(eo=(0,U.jsx)(ie,{provider:k.provider,modelSelectorProviders:de,modelOptions:fe,selectedModelId:qe,onSelectModel:Fe,favoriteKeys:me,onToggleFavoriteModel:$e,thinkingOptions:Je,selectedThinkingOptionId:Qe,onSelectThinkingOption:He,features:k.features,onSetFeature:Ve,isModelLoading:Xe,onModelSelectorOpen:Ge,onRetryModelProvider:Ze,isRetryingModelProvider:W,onDropdownClose:u,disabled:Ye,modeControl:w,modelSelectorServerId:t,isCompactLayout:p}),o[77]=k.features,o[78]=k.provider,o[79]=de,o[80]=me,o[81]=Ge,o[82]=Ze,o[83]=Fe,o[84]=He,o[85]=Ve,o[86]=$e,o[87]=p,o[88]=w,o[89]=fe,o[90]=u,o[91]=t,o[92]=W,o[93]=qe,o[94]=Je,o[95]=Qe,o[96]=Xe,o[97]=Ye,o[98]=eo):eo=o[98],eo});function fe(e){console.warn("[DraftAgentControls] toggle favorite model failed",e)}function be(e){return{id:e.id,label:e.label}}function me(e){return(0,P.buildFavoriteModelKey)(e)}const Se=h.StyleSheet.create(e=>({container:{minWidth:0,flexGrow:1,flexShrink:1,flexDirection:"row",alignItems:"center",gap:e.spacing[1],overflow:"hidden",uni__dependencies:[0]},modeBadge:{height:28,flexDirection:"row",alignItems:"center",backgroundColor:"transparent",gap:e.spacing[1],paddingHorizontal:e.spacing[2],borderRadius:e.borderRadius["2xl"],uni__dependencies:[0]},modelControl:{minWidth:0,flexShrink:1},toolbarCaret:{width:14,height:14,flexShrink:0},modeIconBadge:{width:28,height:28,alignItems:"center",justifyContent:"center",paddingHorizontal:0,flexShrink:0,backgroundColor:"transparent",borderRadius:e.borderRadius.full,uni__dependencies:[0]},modeBadgeHovered:{backgroundColor:e.colors.surface2,uni__dependencies:[0]},modeBadgePressed:{backgroundColor:e.colors.surface0,uni__dependencies:[0]},disabledBadge:{opacity:.5},modeBadgeText:{minWidth:0,flexShrink:1,color:e.colors.foregroundMuted,fontSize:e.fontSize.sm,fontWeight:e.fontWeight.normal,uni__dependencies:[0]},tooltipText:{color:e.colors.foreground,fontSize:e.fontSize.sm,lineHeight:1.4*e.fontSize.sm,uni__dependencies:[0]},combinedSheetControls:{gap:e.spacing[1],uni__dependencies:[0]}}));function Ce(e){return{id:e.id,label:e.label}}function Me(e){return(0,P.buildFavoriteModelKey)(e)}function ye(e){return{id:e.id,label:(0,j.formatThinkingOptionLabel)(e)}}function ke(e){console.warn("[AgentControls] toggle favorite model failed",e)}function Pe(e){console.warn("[AgentControls] persist thinking preference failed",e)}function Te(e){console.warn("[AgentControls] persist feature preference failed",e)}},3992,[1562,711,348,349,36,1563,146,234,1308,811,1426,56,3269,1590,3993,3994,4008,3272,3974,3976,4009,3609,4014,3576,3622,4016,3262,3594,3448,4015,3525,4022,4023,3263,4024,4019,4021,4020,4025,279]);
15648
15648
  __d(function(g,r,i,a,m,_e,d){"use strict";const e=["children","chevron","style","block","onFocus","onBlur"];Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"ComboboxTrigger",{enumerable:!0,get:function(){return b}});var n,o=r(d[0]),t=(n=o)&&n.__esModule?n:{default:n},s=r(d[1]),l=r(d[2]),c=r(d[3]),u=r(d[4]);r(d[5]),r(d[6]);var f=r(d[7]),h=r(d[8]),p=r(d[9]),v=r(d[10]);const w=(0,f.withUnistyles)(h.ChevronDown),_=e=>({color:e.colors.foregroundMuted}),b=(0,u.forwardRef)(function(n,o){const f=(0,c.c)(30);let h,b,y,j,k,S,B;if(f[0]!==n){var C=n;({children:b,chevron:h,style:S,block:B,onFocus:j,onBlur:y}=C),k=(0,t.default)(C,e),f[0]=n,f[1]=h,f[2]=b,f[3]=y,f[4]=j,f[5]=k,f[6]=S,f[7]=B}else h=f[1],b=f[2],y=f[3],j=f[4],k=f[5],S=f[6],B=f[7];const O=void 0!==B&&B,[P,F]=(0,u.useState)(!1);let I;f[8]!==P||f[9]!==S?(I=e=>{const{pressed:n,hovered:o}=e;return"function"==typeof S?S({pressed:n,hovered:void 0!==o&&o,focused:P}):S},f[8]=P,f[9]=S,f[10]=I):I=f[10];const M=I;let D;f[11]!==j?(D=e=>{F(!0),j?.(e)},f[11]=j,f[12]=D):D=f[12];const V=D;let W;f[13]!==y?(W=e=>{F(!1),y?.(e)},f[13]=y,f[14]=W):W=f[14];const z=W,E=O&&x.rowBlock;let G;f[15]!==E?(G=[x.row,E],f[15]=E,f[16]=G):G=f[16];const N=G;let R,T,U;return f[17]!==h?(R=null!==h&&(h??(0,v.jsx)(s.View,{style:x.chevronContainer,children:(0,v.jsx)(w,{size:p.ICON_SIZE.sm,uniProps:_})})),f[17]=h,f[18]=R):R=f[18],f[19]!==b||f[20]!==N||f[21]!==R?(T=(0,v.jsxs)(s.View,{style:N,children:[b,R]}),f[19]=b,f[20]=N,f[21]=R,f[22]=T):T=f[22],f[23]!==z||f[24]!==V||f[25]!==M||f[26]!==k||f[27]!==o||f[28]!==T?(U=(0,v.jsx)(l.Pressable,Object.assign({ref:o,collapsable:!1,style:M,onFocus:V,onBlur:z},k,{children:T})),f[23]=z,f[24]=V,f[25]=M,f[26]=k,f[27]=o,f[28]=T,f[29]=U):U=f[29],U}),x=f.StyleSheet.create(e=>({row:{minWidth:0,maxWidth:"100%",flexShrink:1,flexDirection:"row",alignItems:"center",gap:e.spacing[1],uni__dependencies:[0]},rowBlock:{flexGrow:1,gap:e.spacing[2],uni__dependencies:[0]},chevronContainer:{flexShrink:0,transform:[{translateY:1}]}}))},3993,[35,348,1562,349,36,1308,146,56,1590,305,279]);
15649
15649
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.CombinedModelSelector=function(h){const u=(0,n.c)(58),{providers:T,selectedProvider:z,selectedModel:j,onSelect:F,isLoading:I,favoriteKeys:R,onToggleFavorite:W,renderTrigger:H,onOpen:O,onClose:D,onRetryProvider:B,isRetryingProvider:G,disabled:E,serverId:V,desktopPlacement:N,desktopMinWidth:A,triggerFill:K,toolbar:Z}=h,q=void 0===R?C:R,U=void 0!==G&&G,J=void 0!==E&&E,Q=void 0===V?null:V,X=void 0!==K&&K,{t:Y}=(0,c.useTranslation)(),$=(0,s.useRef)(null),[ee,re]=(0,s.useState)(!1),[oe,te]=(0,s.useState)(v.isWeb);let ie;u[0]!==q||u[1]!==I||u[2]!==T||u[3]!==j||u[4]!==z||u[5]!==Q?(ie={providers:T,selectedProvider:z,selectedModel:j,isLoading:I,favoriteKeys:q,serverId:Q},u[0]=q,u[1]=I,u[2]=T,u[3]=j,u[4]=z,u[5]=Q,u[6]=ie):ie=u[6];const le=(0,f.useModelBrowser)(ie),{prepareToOpen:ne,reset:se}=le;let de;u[7]!==D||u[8]!==O||u[9]!==ne||u[10]!==se?(de=o=>{if(re(o),o)return ne(),void O?.();se(),D?.()},u[7]=D,u[8]=O,u[9]=ne,u[10]=se,u[11]=de):de=u[11];const ae=de;let ce;u[12]!==ae||u[13]!==F?(ce=(o,t)=>{F(o,t),ae(!1)},u[12]=ae,u[13]=F,u[14]=ce):ce=u[14];const ge=ce;let he,pe,ue;u[15]!==ee?(pe=()=>{if(v.isWeb)return k;if(!ee)return te(!1),_;const o=requestAnimationFrame(()=>{te(!0)});return()=>cancelAnimationFrame(o)},he=[ee],u[15]=ee,u[16]=he,u[17]=pe):(he=u[16],pe=u[17]);(0,s.useEffect)(pe,he),u[18]!==ae||u[19]!==ee?(ue=()=>{ae(!ee)},u[18]=ae,u[19]=ee,u[20]=ue):ue=u[20];const be=ue;let me;u[21]!==J||u[22]!==ee||u[23]!==H||u[24]!==X?(me=o=>{const{pressed:t,hovered:l}=o;return X?[w.trigger,w.customTriggerWrapper,w.triggerFill,J&&w.triggerDisabled]:[w.trigger,Boolean(l)&&w.triggerHovered,(t||ee)&&w.triggerPressed,J&&w.triggerDisabled,H?w.customTriggerWrapper:null]},u[21]=J,u[22]=ee,u[23]=H,u[24]=X,u[25]=me):me=u[25];const fe=me;let ve;u[26]!==le||u[27]!==ge||u[28]!==oe||u[29]!==U||u[30]!==B||u[31]!==W||u[32]!==Y?(ve=oe?(0,x.jsx)(f.ModelBrowser,{state:le,onSelect:ge,onToggleFavorite:W,onRetryProvider:B,isRetryingProvider:U}):(0,x.jsxs)(o.View,{style:w.sheetLoadingState,children:[(0,x.jsx)(M,{size:S.ICON_SIZE.sm,uniProps:L}),(0,x.jsx)(t.Text,{style:w.sheetLoadingText,children:Y("modelSelector.loadingSelector")})]}),u[26]=le,u[27]=ge,u[28]=oe,u[29]=U,u[30]=B,u[31]=W,u[32]=Y,u[33]=ve):ve=u[33];const Se=ve;let xe;u[34]!==le.selectedModelLabel||u[35]!==le.triggerLabel||u[36]!==J||u[37]!==be||u[38]!==ee||u[39]!==H||u[40]!==z||u[41]!==Y||u[42]!==Z?.glyphSize||u[43]!==Z?.showCaret||u[44]!==fe?(xe=H?(0,x.jsx)(l.Pressable,{ref:$,collapsable:!1,disabled:J,onPress:be,style:fe,accessibilityRole:"button",accessibilityLabel:Y("modelSelector.selectedModel",{model:le.selectedModelLabel}),testID:"combined-model-selector",children:o=>{const{pressed:t,hovered:l}=o;return H({selectedModelLabel:le.triggerLabel,onPress:be,disabled:J,isOpen:ee,hovered:Boolean(l),pressed:t})}}):(0,x.jsxs)(p.ComboboxTrigger,{ref:$,collapsable:!1,disabled:J,onPress:be,style:fe,accessibilityRole:"button",accessibilityLabel:Y("modelSelector.selectedModel",{model:le.selectedModelLabel}),testID:"combined-model-selector",chevron:!1===Z?.showCaret?null:void 0,children:[z.trim().length>0?(0,x.jsx)(o.View,{style:20===Z?.glyphSize?w.toolbarGlyph20:w.toolbarGlyph16,children:(0,x.jsx)(f.ModelProviderGlyph,{provider:z,size:Z?.glyphSize??S.ICON_SIZE.md})}):null,(0,x.jsx)(t.Text,{style:w.triggerText,numberOfLines:1,ellipsizeMode:"tail",children:le.triggerLabel})]}),u[34]=le.selectedModelLabel,u[35]=le.triggerLabel,u[36]=J,u[37]=be,u[38]=ee,u[39]=H,u[40]=z,u[41]=Y,u[42]=Z?.glyphSize,u[43]=Z?.showCaret,u[44]=fe,u[45]=xe):xe=u[45];const ye=!le.isProviderView||!v.isNative;let Ce,Me;u[46]!==le.desktopFixedHeight||u[47]!==le.header||u[48]!==A||u[49]!==N||u[50]!==ae||u[51]!==ee||u[52]!==Se||u[53]!==ye?(Ce=(0,x.jsx)(b.Combobox,{options:y,value:"",onSelect:P,open:ee,onOpenChange:ae,anchorRef:$,desktopPlacement:N,desktopMinWidth:A,desktopFixedHeight:le.desktopFixedHeight,header:le.header,mobileChildrenScrollEnabled:ye,mobileChildrenContentContainerStyle:w.mobileBrowserContent,children:Se}),u[46]=le.desktopFixedHeight,u[47]=le.header,u[48]=A,u[49]=N,u[50]=ae,u[51]=ee,u[52]=Se,u[53]=ye,u[54]=Ce):Ce=u[54];u[55]!==xe||u[56]!==Ce?(Me=(0,x.jsxs)(x.Fragment,{children:[xe,Ce]}),u[55]=xe,u[56]=Ce,u[57]=Me):Me=u[57];return Me};var o=r(d[0]),t=r(d[1]),l=r(d[2]),n=r(d[3]),s=r(d[4]);r(d[5]),r(d[6]),r(d[7]);var c=r(d[8]),h=r(d[9]),p=r(d[10]),u=r(d[11]),b=r(d[12]),f=r(d[13]),v=r(d[14]),S=r(d[15]),x=r(d[16]);const y=[],C=new Set,M=(0,h.withUnistyles)(u.LoadingSpinner),L=o=>({color:o.colors.foregroundMuted});function P(){}function _(){}function k(){}const w=h.StyleSheet.create(o=>({mobileBrowserContent:{paddingHorizontal:0},trigger:{height:28,minWidth:0,flexShrink:1,flexDirection:"row",alignItems:"center",backgroundColor:"transparent",gap:o.spacing[1],paddingHorizontal:o.spacing[2],borderRadius:o.borderRadius["2xl"],uni__dependencies:[0]},triggerHovered:{backgroundColor:o.colors.surface2,uni__dependencies:[0]},toolbarGlyph16:{width:16,height:16,flexShrink:0},toolbarGlyph20:{width:20,height:20,flexShrink:0},triggerPressed:{backgroundColor:o.colors.surface0,uni__dependencies:[0]},triggerDisabled:{opacity:.5},triggerText:{minWidth:0,flexShrink:1,color:o.colors.foregroundMuted,fontSize:o.fontSize.sm,fontWeight:o.fontWeight.normal,uni__dependencies:[0]},customTriggerWrapper:{paddingHorizontal:0,paddingVertical:0,height:"auto"},triggerFill:{alignSelf:"stretch",flexShrink:0,flexDirection:"column",alignItems:"stretch",backgroundColor:"transparent",borderRadius:0},sheetLoadingState:{minHeight:160,justifyContent:"center",alignItems:"center",gap:o.spacing[2],uni__dependencies:[0]},sheetLoadingText:{color:o.colors.foregroundMuted,fontSize:o.fontSize.sm,uni__dependencies:[0]}}))},3994,[348,711,1562,349,36,1308,234,146,1563,56,3993,3573,3609,3995,3263,305,279]);
@@ -15656,7 +15656,7 @@ __d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',
15656
15656
  __d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.OpenCodeIcon=function(e){const n=(0,o.c)(5),{size:u,color:s}=e,f=void 0===u?16:u,_=void 0===s?"currentColor":s;let h,v,H;n[0]===Symbol.for("react.memo_cache_sentinel")?(h=(0,c.jsx)(t.Path,{d:"M320 224V352H192V224H320Z",opacity:.4}),v=(0,c.jsx)(t.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M384 416H128V96H384V416ZM320 160H192V352H320V160Z"}),n[0]=h,n[1]=v):(h=n[0],v=n[1]);n[2]!==_||n[3]!==f?(H=(0,c.jsxs)(l.default,{width:f,height:f,viewBox:"96 64 288 384",fill:_,children:[h,v]}),n[2]=_,n[3]=f,n[4]=H):H=n[4];return H};var e,o=r(d[0]),t=r(d[1]),l=(e=t)&&e.__esModule?e:{default:e},c=r(d[2])},4001,[349,1594,279]);
15657
15657
  __d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.OmpIcon=function(e){const n=(0,o.c)(4),{size:h,color:u}=e,s=void 0===h?16:h,v=void 0===u?"currentColor":u;let _,f;n[0]===Symbol.for("react.memo_cache_sentinel")?(_=(0,l.jsx)(t.Path,{d:"M10 14h44v9H43v33h-9V23h-9v22h-9V23H10z"}),n[0]=_):_=n[0];n[1]!==v||n[2]!==s?(f=(0,l.jsx)(c.default,{width:s,height:s,viewBox:"4 4 56 56",fill:v,children:_}),n[1]=v,n[2]=s,n[3]=f):f=n[3];return f};var e,o=r(d[0]),t=r(d[1]),c=(e=t)&&e.__esModule?e:{default:e},l=r(d[2])},4002,[349,1594,279]);
15658
15658
  __d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.PiIcon=function(e){const u=(0,l.c)(8),{size:c,color:s}=e,f=void 0===c?16:c,H=void 0===s?"currentColor":s;let h,v,V;u[0]!==H?(h=(0,n.jsx)(t.Path,{d:"M165.29 165.29 H517.36 V400 H400 V517.36 H282.65 V634.72 H165.29 Z M282.65 282.65 V400 H400 V282.65 Z",fill:H,fillRule:"evenodd"}),v=(0,n.jsx)(t.Path,{d:"M517.36 400 H634.72 V634.72 H517.36 Z",fill:H}),u[0]=H,u[1]=h,u[2]=v):(h=u[1],v=u[2]);u[3]!==H||u[4]!==f||u[5]!==h||u[6]!==v?(V=(0,n.jsxs)(o.default,{width:f,height:f,viewBox:"100 100 600 600",fill:H,children:[h,v]}),u[3]=H,u[4]=f,u[5]=h,u[6]=v,u[7]=V):V=u[7];return V};var e,l=r(d[0]),t=r(d[1]),o=(e=t)&&e.__esModule?e:{default:e},n=r(d[2])},4003,[349,1594,279]);
15659
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"ACP_PROVIDER_CATALOG",{enumerable:!0,get:function(){return o}});var n=r(d[0]);const o=[{id:"agoragentic-acp",title:"Agoragentic",description:"Agent marketplace with 174+ AI capabilities. Browse, invoke, and pay for agent services settled in USDC on Base L2.",version:"1.3.6",iconId:"agoragentic-acp",installLink:"https://agoragentic.com",command:["npx","-y","agoragentic-mcp@1.3.6","--acp"]},{id:"amp-acp",title:"Amp",description:"ACP wrapper for Amp - the frontier coding agent",version:"0.7.0",iconId:"amp-acp",installLink:"https://github.com/tao12345666333/amp-acp",command:["amp-acp"]},{id:"auggie",title:"Auggie CLI",description:"Augment Code's powerful software agent, backed by industry-leading context engine",version:"0.33.0",iconId:"auggie",installLink:"https://www.augmentcode.com/",command:["npx","-y","@augmentcode/auggie@0.33.0","--acp"],env:{AUGMENT_DISABLE_AUTO_UPDATE:"1"}},{id:"autohand",title:"Autohand Code",description:"Autohand Code - AI coding agent powered by Autohand AI",version:"0.2.1",iconId:"autohand",installLink:"https://www.autohand.ai/cli/",command:["npx","-y","@autohandai/autohand-acp@0.2.1"]},{id:"cline",title:"Cline",description:"Autonomous coding agent CLI - capable of creating/editing files, running commands, using the browser, and more",version:"3.0.46",iconId:"cline",installLink:"https://cline.bot/cli",command:["npx","-y","cline@3.0.46","--acp"]},{id:"codebuddy-code",title:"Codebuddy Code",description:"Tencent Cloud's official intelligent coding tool",version:"manual",iconId:"codebuddy-code",installLink:"https://www.codebuddy.cn/cli/",command:["codebuddy","--acp"]},{id:"codewhale",title:"CodeWhale",description:"Terminal coding agent for DeepSeek V4 and open models",version:"0.8.55",iconId:"codewhale",installLink:"https://codewhale.net/",command:["codewhale","serve","--acp"]},{id:"cortex-code",title:"Cortex Code",description:"Snowflake's Cortex Code coding agent",version:"1.0.73",iconId:"cortex-code",installLink:"https://docs.snowflake.com/en/user-guide/cortex-code/cortex-code-cli",command:["cortex","acp","serve"]},{id:"corust-agent",title:"Corust Agent",description:"Co-building with a seasoned Rust partner.",version:"0.5.1",iconId:"corust-agent",installLink:"https://github.com/Corust-ai/corust-agent-release/releases",command:["corust-agent-acp"]},{id:"crow-cli",title:"crow-cli",description:"Minimal ACP Native Coding Agent",version:"0.1.23",iconId:"crow-cli",installLink:"https://crow-ai.dev/",command:["crow-cli","acp"]},{id:"cursor",title:"Cursor",description:"Cursor's coding agent",version:"2026.03.30",iconId:"cursor",installLink:"https://docs.cursor.com/en/cli/overview",command:["cursor-agent","acp"]},{id:"deepagents",title:"DeepAgents",description:"Batteries-included AI coding and general purpose agent powered by LangChain.",version:"0.1.20",iconId:"deepagents",installLink:"https://docs.langchain.com/oss/javascript/deepagents/overview",command:["npx","-y","deepagents-acp@0.1.20"]},{id:"devin",title:"Devin CLI",description:"Cognition's Devin for Terminal via Agent Client Protocol",version:"manual",iconId:null,installLink:"https://cli.devin.ai/docs",command:["devin","acp"]},{id:"dimcode",title:"DimCode",description:"A coding agent that puts leading models at your command.",version:"0.2.36",iconId:"dimcode",installLink:"https://dimcode.dev/docs/acp.html",command:["npx","-y","dimcode@0.2.36","acp"]},{id:"dirac",title:"Dirac",description:"Reduces API costs by more than 50%, produces better and faster work. Uses Hash anchored parallel edits, AST manipulation and a whole lot of neat optimizations. Fully Open Source.",version:"0.4.22",iconId:"dirac",installLink:"https://dirac.run",command:["npx","-y","dirac-cli@0.4.22","--acp"]},{id:"factory-droid",title:"Factory Droid",description:"Factory Droid - AI coding agent powered by Factory AI",version:"0.178.0",iconId:"factory-droid",installLink:"https://factory.ai/product/cli",command:["npx","-y","droid@0.178.0","exec","--output-format","acp-daemon"],env:{DROID_DISABLE_AUTO_UPDATE:"true",FACTORY_DROID_AUTO_UPDATE_ENABLED:"false"},params:{supportsMcpServers:!1}},{id:"fast-agent",title:"fast-agent",description:"Code and build agents with comprehensive multi-provider support",version:"0.9.22",iconId:"fast-agent",installLink:"https://fast-agent.ai/acp/",command:["uvx","--from","fast-agent-acp==0.9.22","fast-agent-acp","-x"]},{id:"gemini",title:"Gemini CLI",description:"Google's official CLI for Gemini",version:"0.52.0",iconId:"gemini",installLink:"https://geminicli.com",command:["npx","-y","@google/gemini-cli@0.52.0","--acp"]},{id:"glm-acp-agent",title:"GLM Agent",description:"ACP agent powered by Zhipu AI's GLM Coding Plan models (glm-5.1, glm-5-turbo, glm-4.7, glm-4.5-air). Supports streaming, tool calls, mid-session model switching, image input via Z.AI Coding Plan Vision MCP, and session load/fork/resume with on-disk persistence.",version:"1.3.0",iconId:"glm-acp-agent",installLink:"https://github.com/stefandevo/glm-acp-agent",command:["npx","-y","glm-acp-agent@1.3.0"]},{id:"goose",title:"goose",description:"A local, extensible, open source AI agent that automates engineering tasks",version:"1.33.1",iconId:"goose",installLink:"https://block.github.io/goose/",command:["goose","acp"]},{id:"grok",title:"Grok",description:"xAI's Grok Build agentic coding CLI with plan mode and parallel subagents. Requires a SuperGrok or X Premium+ subscription.",version:"0.2.11",iconId:"grok",installLink:"https://docs.x.ai/build/overview",command:["grok","agent","stdio"]},{id:"hermes",title:"Hermes",description:"Nous Research self-improving AI agent",version:"manual",iconId:null,installLink:"https://hermes-agent.nousresearch.com/docs/user-guide/features/acp",command:["hermes","acp"]},{id:"junie",title:"Junie",description:"AI Coding Agent by JetBrains",version:"1468.30.0",iconId:"junie",installLink:"https://junie.jetbrains.com/docs/junie-cli-acp.html",command:["junie","--acp","true"]},{id:"kilo",title:"Kilo",description:"The open source coding agent",version:"7.2.40",iconId:"kilo",installLink:"https://kilo.ai/docs/code-with-ai/platforms/cli",command:["kilo","acp"]},{id:"kiro",title:"Kiro CLI",description:"Amazon's AI coding agent with native ACP support",version:"manual",iconId:null,installLink:"https://kiro.dev/docs/cli/acp/",command:["kiro-cli","acp"]},{id:"kimi",title:"Kimi Code CLI",description:"Moonshot AI's open-source terminal coding agent",version:"0.11.0",iconId:"kimi",installLink:"https://github.com/MoonshotAI/kimi-code",command:["kimi","acp"]},{id:"minion-code",title:"Minion Code",description:"An enhanced AI code assistant built on the Minion framework with rich development tools",version:"0.1.44",iconId:"minion-code",installLink:"https://github.com/femto/minion-code",command:["uvx","--from","minion-code==0.1.44","minion-code","acp"]},{id:"mistral-vibe",title:"Mistral Vibe",description:"Mistral's open-source coding assistant",version:"2.9.3",iconId:"mistral-vibe",installLink:"https://github.com/mistralai/mistral-vibe",command:["vibe-acp"]},{id:"nova",title:"Nova",description:"Nova by Compass AI - a fully-fledged software engineer at your command",version:"1.1.29",iconId:"nova",installLink:"https://www.compassap.ai/portfolio/nova.html",command:["npx","-y","@compass-ai/nova@1.1.29","acp"]},{id:"poolside",title:"Poolside",description:"Poolside's coding agent",version:"1.0.0",iconId:"poolside",installLink:"https://docs.poolside.ai/cli/pool",command:["pool","acp"]},{id:"qoder",title:"Qoder CLI",description:"AI coding assistant with agentic capabilities",version:"1.1.4",iconId:"qoder",installLink:"https://qoder.com",command:["npx","-y","@qoder-ai/qodercli@1.1.4","--acp"]},{id:"qwen-code",title:"Qwen Code",description:"Alibaba's Qwen coding assistant",version:"0.20.1",iconId:"qwen-code",installLink:"https://qwenlm.github.io/qwen-code-docs/en/users/overview",command:["npx","-y","@qwen-code/qwen-code@0.20.1","--acp","--experimental-skills"]},{id:"sigit",title:"siGit Code",description:"Local-first coding agent. Runs entirely on your machine with optional on-device LLM inference via Onde.",version:"1.0.3",iconId:"sigit",installLink:"https://github.com/getsigit/sigit",command:["sigit"]},{id:"stakpak",title:"Stakpak",description:"Open-source DevOps agent in Rust with enterprise-grade security",version:"0.3.80",iconId:"stakpak",installLink:"https://stakpak.dev/",command:["stakpak","acp"]},{id:"traecli",title:"TRAE CLI",description:"ByteDance's official TRAE coding agent with native ACP support",version:"manual",iconId:"traecli",installLink:"https://docs.trae.cn/cli_get-started-with-trae-cli",command:["traecli","acp","serve"]},{id:"vtcode",title:"VT Code",description:"An open-source coding agent with LLM-native code understanding and robust shell safety. Supports multiple LLM providers with automatic failover and efficient context management.",version:"0.96.14",iconId:"vtcode",installLink:"https://github.com/vinhnx/VTCode/blob/main/docs/guides/zed-acp.md",command:["vtcode","acp"],env:{VT_ACP_ENABLED:"1",VT_ACP_ZED_ENABLED:"1"}}].map(o=>({id:o.id,title:o.title,description:o.description,version:o.version,installLink:o.installLink,command:o.command,env:"env"in o?o.env:void 0,params:"params"in o?o.params:void 0,iconSvg:o.iconId?n.ACP_PROVIDER_ICON_SVGS[o.iconId]??null:null}))},4004,[4005]);
15659
+ __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"ACP_PROVIDER_CATALOG",{enumerable:!0,get:function(){return o}});var n=r(d[0]);const o=[{id:"agoragentic-acp",title:"Agoragentic",description:"Agent marketplace with 174+ AI capabilities. Browse, invoke, and pay for agent services settled in USDC on Base L2.",version:"1.3.6",iconId:"agoragentic-acp",installLink:"https://agoragentic.com",command:["npx","-y","agoragentic-mcp@1.3.6","--acp"]},{id:"amp-acp",title:"Amp",description:"ACP wrapper for Amp - the frontier coding agent",version:"0.7.0",iconId:"amp-acp",installLink:"https://github.com/tao12345666333/amp-acp",command:["amp-acp"]},{id:"auggie",title:"Auggie CLI",description:"Augment Code's powerful software agent, backed by industry-leading context engine",version:"0.33.0",iconId:"auggie",installLink:"https://www.augmentcode.com/",command:["npx","-y","@augmentcode/auggie@0.33.0","--acp"],env:{AUGMENT_DISABLE_AUTO_UPDATE:"1"}},{id:"autohand",title:"Autohand Code",description:"Autohand Code - AI coding agent powered by Autohand AI",version:"0.2.1",iconId:"autohand",installLink:"https://www.autohand.ai/cli/",command:["npx","-y","@autohandai/autohand-acp@0.2.1"]},{id:"cline",title:"Cline",description:"Autonomous coding agent CLI - capable of creating/editing files, running commands, using the browser, and more",version:"3.0.46",iconId:"cline",installLink:"https://cline.bot/cli",command:["npx","-y","cline@3.0.46","--acp"]},{id:"codebuddy-code",title:"Codebuddy Code",description:"Tencent Cloud's official intelligent coding tool",version:"manual",iconId:"codebuddy-code",installLink:"https://www.codebuddy.cn/cli/",command:["codebuddy","--acp"]},{id:"codewhale",title:"CodeWhale",description:"Terminal coding agent for DeepSeek V4 and open models",version:"0.8.55",iconId:"codewhale",installLink:"https://codewhale.net/",command:["codewhale","serve","--acp"]},{id:"cortex-code",title:"Cortex Code",description:"Snowflake's Cortex Code coding agent",version:"1.0.73",iconId:"cortex-code",installLink:"https://docs.snowflake.com/en/user-guide/cortex-code/cortex-code-cli",command:["cortex","acp","serve"]},{id:"corust-agent",title:"Corust Agent",description:"Co-building with a seasoned Rust partner.",version:"0.5.1",iconId:"corust-agent",installLink:"https://github.com/Corust-ai/corust-agent-release/releases",command:["corust-agent-acp"]},{id:"crow-cli",title:"crow-cli",description:"Minimal ACP Native Coding Agent",version:"0.1.23",iconId:"crow-cli",installLink:"https://crow-ai.dev/",command:["crow-cli","acp"]},{id:"cursor",title:"Cursor",description:"Cursor's coding agent",version:"2026.03.30",iconId:"cursor",installLink:"https://docs.cursor.com/en/cli/overview",command:["cursor-agent","acp"]},{id:"deepagents",title:"DeepAgents",description:"Batteries-included AI coding and general purpose agent powered by LangChain.",version:"0.1.20",iconId:"deepagents",installLink:"https://docs.langchain.com/oss/javascript/deepagents/overview",command:["npx","-y","deepagents-acp@0.1.20"]},{id:"devin",title:"Devin CLI",description:"Cognition's Devin for Terminal via Agent Client Protocol",version:"manual",iconId:null,installLink:"https://cli.devin.ai/docs",command:["devin","acp"]},{id:"dimcode",title:"DimCode",description:"A coding agent that puts leading models at your command.",version:"0.2.36",iconId:"dimcode",installLink:"https://dimcode.dev/docs/acp.html",command:["npx","-y","dimcode@0.2.36","acp"]},{id:"dirac",title:"Dirac",description:"Reduces API costs by more than 50%, produces better and faster work. Uses Hash anchored parallel edits, AST manipulation and a whole lot of neat optimizations. Fully Open Source.",version:"0.4.22",iconId:"dirac",installLink:"https://dirac.run",command:["npx","-y","dirac-cli@0.4.22","--acp"]},{id:"factory-droid",title:"Factory Droid",description:"Factory Droid - AI coding agent powered by Factory AI",version:"0.179.0",iconId:"factory-droid",installLink:"https://factory.ai/product/cli",command:["npx","-y","droid@0.179.0","exec","--output-format","acp-daemon"],env:{DROID_DISABLE_AUTO_UPDATE:"true",FACTORY_DROID_AUTO_UPDATE_ENABLED:"false"},params:{supportsMcpServers:!1}},{id:"fast-agent",title:"fast-agent",description:"Code and build agents with comprehensive multi-provider support",version:"0.9.22",iconId:"fast-agent",installLink:"https://fast-agent.ai/acp/",command:["uvx","--from","fast-agent-acp==0.9.22","fast-agent-acp","-x"]},{id:"gemini",title:"Gemini CLI",description:"Google's official CLI for Gemini",version:"0.52.0",iconId:"gemini",installLink:"https://geminicli.com",command:["npx","-y","@google/gemini-cli@0.52.0","--acp"]},{id:"glm-acp-agent",title:"GLM Agent",description:"ACP agent powered by Zhipu AI's GLM Coding Plan models (glm-5.1, glm-5-turbo, glm-4.7, glm-4.5-air). Supports streaming, tool calls, mid-session model switching, image input via Z.AI Coding Plan Vision MCP, and session load/fork/resume with on-disk persistence.",version:"1.3.0",iconId:"glm-acp-agent",installLink:"https://github.com/stefandevo/glm-acp-agent",command:["npx","-y","glm-acp-agent@1.3.0"]},{id:"goose",title:"goose",description:"A local, extensible, open source AI agent that automates engineering tasks",version:"1.33.1",iconId:"goose",installLink:"https://block.github.io/goose/",command:["goose","acp"]},{id:"grok",title:"Grok",description:"xAI's Grok Build agentic coding CLI with plan mode and parallel subagents. Requires a SuperGrok or X Premium+ subscription.",version:"0.2.11",iconId:"grok",installLink:"https://docs.x.ai/build/overview",command:["grok","agent","stdio"]},{id:"hermes",title:"Hermes",description:"Nous Research self-improving AI agent",version:"manual",iconId:null,installLink:"https://hermes-agent.nousresearch.com/docs/user-guide/features/acp",command:["hermes","acp"]},{id:"junie",title:"Junie",description:"AI Coding Agent by JetBrains",version:"1468.30.0",iconId:"junie",installLink:"https://junie.jetbrains.com/docs/junie-cli-acp.html",command:["junie","--acp","true"]},{id:"kilo",title:"Kilo",description:"The open source coding agent",version:"7.2.40",iconId:"kilo",installLink:"https://kilo.ai/docs/code-with-ai/platforms/cli",command:["kilo","acp"]},{id:"kiro",title:"Kiro CLI",description:"Amazon's AI coding agent with native ACP support",version:"manual",iconId:null,installLink:"https://kiro.dev/docs/cli/acp/",command:["kiro-cli","acp"]},{id:"kimi",title:"Kimi Code CLI",description:"Moonshot AI's open-source terminal coding agent",version:"0.11.0",iconId:"kimi",installLink:"https://github.com/MoonshotAI/kimi-code",command:["kimi","acp"]},{id:"minion-code",title:"Minion Code",description:"An enhanced AI code assistant built on the Minion framework with rich development tools",version:"0.1.44",iconId:"minion-code",installLink:"https://github.com/femto/minion-code",command:["uvx","--from","minion-code==0.1.44","minion-code","acp"]},{id:"mistral-vibe",title:"Mistral Vibe",description:"Mistral's open-source coding assistant",version:"2.9.3",iconId:"mistral-vibe",installLink:"https://github.com/mistralai/mistral-vibe",command:["vibe-acp"]},{id:"nova",title:"Nova",description:"Nova by Compass AI - a fully-fledged software engineer at your command",version:"1.1.29",iconId:"nova",installLink:"https://www.compassap.ai/portfolio/nova.html",command:["npx","-y","@compass-ai/nova@1.1.29","acp"]},{id:"poolside",title:"Poolside",description:"Poolside's coding agent",version:"1.0.0",iconId:"poolside",installLink:"https://docs.poolside.ai/cli/pool",command:["pool","acp"]},{id:"qoder",title:"Qoder CLI",description:"AI coding assistant with agentic capabilities",version:"1.1.4",iconId:"qoder",installLink:"https://qoder.com",command:["npx","-y","@qoder-ai/qodercli@1.1.4","--acp"]},{id:"qwen-code",title:"Qwen Code",description:"Alibaba's Qwen coding assistant",version:"0.20.1",iconId:"qwen-code",installLink:"https://qwenlm.github.io/qwen-code-docs/en/users/overview",command:["npx","-y","@qwen-code/qwen-code@0.20.1","--acp","--experimental-skills"]},{id:"sigit",title:"siGit Code",description:"Local-first coding agent. Runs entirely on your machine with optional on-device LLM inference via Onde.",version:"1.0.3",iconId:"sigit",installLink:"https://github.com/getsigit/sigit",command:["sigit"]},{id:"stakpak",title:"Stakpak",description:"Open-source DevOps agent in Rust with enterprise-grade security",version:"0.3.80",iconId:"stakpak",installLink:"https://stakpak.dev/",command:["stakpak","acp"]},{id:"traecli",title:"TRAE CLI",description:"ByteDance's official TRAE coding agent with native ACP support",version:"manual",iconId:"traecli",installLink:"https://docs.trae.cn/cli_get-started-with-trae-cli",command:["traecli","acp","serve"]},{id:"vtcode",title:"VT Code",description:"An open-source coding agent with LLM-native code understanding and robust shell safety. Supports multiple LLM providers with automatic failover and efficient context management.",version:"0.96.14",iconId:"vtcode",installLink:"https://github.com/vinhnx/VTCode/blob/main/docs/guides/zed-acp.md",command:["vtcode","acp"],env:{VT_ACP_ENABLED:"1",VT_ACP_ZED_ENABLED:"1"}}].map(o=>({id:o.id,title:o.title,description:o.description,version:o.version,installLink:o.installLink,command:o.command,env:"env"in o?o.env:void 0,params:"params"in o?o.params:void 0,iconSvg:o.iconId?n.ACP_PROVIDER_ICON_SVGS[o.iconId]??null:null}))},4004,[4005]);
15660
15660
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"ACP_PROVIDER_ICON_SVGS",{enumerable:!0,get:function(){return c}});const c={agy:'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" fill-rule="evenodd">\n <path d="M21.751 22.607c1.34 1.005 3.35.335 1.508-1.508C17.73 15.74 18.904 1 12.037 1 5.17 1 6.342 15.74.815 21.1c-2.01 2.009.167 2.511 1.507 1.506 5.192-3.517 4.857-9.714 9.715-9.714 4.857 0 4.522 6.197 9.714 9.715z"/>\n</svg>\n',"agoragentic-acp":'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none">\n <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-width="1.5"/>\n <path d="M5.5 10.5L8 4L10.5 10.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n <line x1="6.25" y1="8.75" x2="9.75" y2="8.75" stroke="currentColor" stroke-width="1.2" stroke-linecap="round"/>\n</svg>\n',"amp-acp":'<svg width="16" height="16" viewBox="0 0 28 28" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M13.9197 13.61L17.3816 26.566L14.242 27.4049L11.2645 16.2643L0.119926 13.2906L0.957817 10.15L13.9197 13.61Z" fill="currentColor"/>\n<path d="M13.7391 16.0892L4.88169 24.9056L2.58872 22.6019L11.4461 13.7865L13.7391 16.0892Z" fill="currentColor"/>\n<path d="M18.9386 8.58315L22.4005 21.5392L19.2609 22.3781L16.2833 11.2374L5.13879 8.26381L5.97668 5.12318L18.9386 8.58315Z" fill="currentColor"/>\n<path d="M23.9803 3.55632L27.4422 16.5124L24.3025 17.3512L21.325 6.21062L10.1805 3.23698L11.0183 0.0963593L23.9803 3.55632Z" fill="currentColor"/>\n</svg>\n',auggie:'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16">\n <path fill="currentColor" d="M9.972 13.193h2.577q.187 0 .277-.09t.091-.294V10.47q0-.324.133-.59.135-.27.36-.424a1 1 0 0 1 .099-.06 1 1 0 0 1-.1-.058 1.1 1.1 0 0 1-.359-.424 1.3 1.3 0 0 1-.133-.59v-2.33q0-.202-.091-.293t-.277-.089H9.972a.38.38 0 0 1-.294-.124.4.4 0 0 1-.108-.281q.002-.176.131-.293a.46.46 0 0 1 .313-.111h2.775c.36 0 .642.097.836.288q.293.29.294.832V8.24q0 .39.152.562.148.168.555.178a.4.4 0 0 1 .27.128.41.41 0 0 1 .104.287.44.44 0 0 1-.1.282.34.34 0 0 1-.277.132c-.266.006-.452.066-.55.177q-.151.174-.152.573v2.318c0 .235-.043.44-.128.607a.85.85 0 0 1-.389.387 1.3 1.3 0 0 1-.534.124V14h-2.854a.45.45 0 0 1-.315-.118.38.38 0 0 1-.129-.286q0-.164.109-.282a.38.38 0 0 1 .293-.123zM1.103 9.108a.4.4 0 0 1 .276-.128q.4-.008.55-.177.15-.173.151-.562V5.923q.002-.543.294-.832c.195-.191.477-.288.836-.288h2.775q.188 0 .313.111a.37.37 0 0 1 .131.293.4.4 0 0 1-.108.281.38.38 0 0 1-.293.123H3.45q-.186 0-.277.09t-.092.292v2.33c0 .213-.044.413-.133.59a1.1 1.1 0 0 1-.359.424 1 1 0 0 1-.1.059 1 1 0 0 1 .1.059q.225.156.359.423t.133.59v2.34q0 .203.092.293.088.09.277.089h2.577a.38.38 0 0 1 .294.123q.108.12.108.281a.38.38 0 0 1-.13.286.45.45 0 0 1-.314.118l-2.775-.003a1.4 1.4 0 0 1-.613-.126.87.87 0 0 1-.388-.387 1.34 1.34 0 0 1-.129-.608v-2.318q0-.4-.151-.572-.151-.168-.55-.177a.35.35 0 0 1-.278-.132.42.42 0 0 1-.102-.28q0-.173.103-.287"/>\n <path fill="currentColor" d="M5.437 10.36a.986.986 0 0 1-.994-.975c0-.538.446-.976.994-.976s.994.438.994.976a.986.986 0 0 1-.994.976M10.562 8.41c.548 0 .994.437.994.975a.986.986 0 0 1-.994.976.986.986 0 0 1-.994-.976c0-.538.446-.976.994-.976M8.74 2c.37 0 .446.15.446.275v.034q0 .034-.009.201-.01.162-.017.549-.018.378-.044 1.06c0 .106-.065.233-.375.233-.311 0-.376-.126-.376-.23l-.07-1.835v-.003c0-.13.078-.284.446-.284M7.256 2c.369 0 .446.15.446.275v.034q0 .034-.01.201-.007.162-.017.549-.017.378-.043 1.06c0 .106-.065.233-.376.233-.31 0-.375-.126-.375-.23l-.07-1.835v-.003C6.81 2.154 6.887 2 7.256 2"/>\n</svg>\n',autohand:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M4.66949 9.56637C4.66949 8.92122 4.13288 8.39823 3.47094 8.39823C2.809 8.39823 2.2724 8.92122 2.2724 9.56637C2.2724 10.2115 2.809 10.7345 3.47094 10.7345V11C2.65856 11 2 10.3581 2 9.56637C2 8.7746 2.65856 8.13274 3.47094 8.13274C4.28332 8.13274 4.94189 8.7746 4.94189 9.56637C4.94189 10.3581 4.28332 11 3.47094 11V10.7345C4.13288 10.7345 4.66949 10.2115 4.66949 9.56637Z" fill="currentColor"/>\n<path d="M3.90678 9.59292C3.90678 9.81286 3.72385 9.99115 3.49818 9.99115C3.27252 9.99115 3.08959 9.81286 3.08959 9.59292C3.08959 9.37298 3.27252 9.19469 3.49818 9.19469C3.72385 9.19469 3.90678 9.37298 3.90678 9.59292Z" fill="currentColor"/>\n<path d="M3.8523 9.59292C3.8523 9.40231 3.69376 9.24779 3.49818 9.24779C3.30261 9.24779 3.14407 9.40231 3.14407 9.59292C3.14407 9.78353 3.30261 9.93805 3.49818 9.93805V9.99115C3.27252 9.99115 3.08959 9.81286 3.08959 9.59292C3.08959 9.37298 3.27252 9.19469 3.49818 9.19469C3.72385 9.19469 3.90678 9.37298 3.90678 9.59292C3.90678 9.81286 3.72385 9.99115 3.49818 9.99115V9.93805C3.69376 9.93805 3.8523 9.78353 3.8523 9.59292Z" fill="currentColor"/>\n<path d="M4.66949 6.43363C4.66949 5.78848 4.13288 5.26549 3.47094 5.26549C2.809 5.26549 2.2724 5.78848 2.2724 6.43363C2.2724 7.07878 2.809 7.60177 3.47094 7.60177V7.86726C2.65856 7.86726 2 7.2254 2 6.43363C2 5.64186 2.65856 5 3.47094 5C4.28332 5 4.94189 5.64186 4.94189 6.43363C4.94189 7.2254 4.28332 7.86726 3.47094 7.86726V7.60177C4.13288 7.60177 4.66949 7.07878 4.66949 6.43363Z" fill="currentColor"/>\n<path d="M3.90678 6.46018C3.90678 6.68011 3.72385 6.85841 3.49818 6.85841C3.27252 6.85841 3.08959 6.68011 3.08959 6.46018C3.08959 6.24024 3.27252 6.06195 3.49818 6.06195C3.72385 6.06195 3.90678 6.24024 3.90678 6.46018Z" fill="currentColor"/>\n<path d="M3.8523 6.46018C3.8523 6.26957 3.69376 6.11504 3.49818 6.11504C3.30261 6.11504 3.14407 6.26957 3.14407 6.46018C3.14407 6.65079 3.30261 6.80531 3.49818 6.80531V6.85841C3.27252 6.85841 3.08959 6.68011 3.08959 6.46018C3.08959 6.24024 3.27252 6.06195 3.49818 6.06195C3.72385 6.06195 3.90678 6.24024 3.90678 6.46018C3.90678 6.68011 3.72385 6.85841 3.49818 6.85841V6.80531C3.69376 6.80531 3.8523 6.65079 3.8523 6.46018Z" fill="currentColor"/>\n<path d="M8.04722 9.56637C8.04722 8.92122 7.51061 8.39823 6.84867 8.39823C6.18673 8.39823 5.65012 8.92122 5.65012 9.56637C5.65012 10.2115 6.18673 10.7345 6.84867 10.7345V11C6.03629 11 5.37772 10.3581 5.37772 9.56637C5.37772 8.7746 6.03629 8.13274 6.84867 8.13274C7.66105 8.13274 8.31961 8.7746 8.31961 9.56637C8.31961 10.3581 7.66105 11 6.84867 11V10.7345C7.51061 10.7345 8.04722 10.2115 8.04722 9.56637Z" fill="currentColor"/>\n<path d="M7.2845 9.59292C7.2845 9.81286 7.10157 9.99115 6.87591 9.99115C6.65025 9.99115 6.46731 9.81286 6.46731 9.59292C6.46731 9.37298 6.65025 9.19469 6.87591 9.19469C7.10157 9.19469 7.2845 9.37298 7.2845 9.59292Z" fill="currentColor"/>\n<path d="M7.23002 9.59292C7.23002 9.40231 7.07148 9.24779 6.87591 9.24779C6.68033 9.24779 6.52179 9.40231 6.52179 9.59292C6.52179 9.78353 6.68033 9.93805 6.87591 9.93805V9.99115C6.65025 9.99115 6.46731 9.81286 6.46731 9.59292C6.46731 9.37298 6.65025 9.19469 6.87591 9.19469C7.10157 9.19469 7.2845 9.37298 7.2845 9.59292C7.2845 9.81286 7.10157 9.99115 6.87591 9.99115V9.93805C7.07148 9.93805 7.23002 9.78353 7.23002 9.59292Z" fill="currentColor"/>\n<path d="M8.04722 6.43363C8.04722 5.78848 7.51061 5.26549 6.84867 5.26549C6.18673 5.26549 5.65012 5.78848 5.65012 6.43363C5.65012 7.07878 6.18673 7.60177 6.84867 7.60177V7.86726C6.03629 7.86726 5.37772 7.2254 5.37772 6.43363C5.37772 5.64186 6.03629 5 6.84867 5C7.66105 5 8.31961 5.64186 8.31961 6.43363C8.31961 7.2254 7.66105 7.86726 6.84867 7.86726V7.60177C7.51061 7.60177 8.04722 7.07878 8.04722 6.43363Z" fill="currentColor"/>\n<path d="M7.2845 6.46018C7.2845 6.68011 7.10157 6.85841 6.87591 6.85841C6.65025 6.85841 6.46731 6.68011 6.46731 6.46018C6.46731 6.24024 6.65025 6.06195 6.87591 6.06195C7.10157 6.06195 7.2845 6.24024 7.2845 6.46018Z" fill="currentColor"/>\n<path d="M7.23002 6.46018C7.23002 6.26957 7.07148 6.11504 6.87591 6.11504C6.68033 6.11504 6.52179 6.26957 6.52179 6.46018C6.52179 6.65079 6.68033 6.80531 6.87591 6.80531V6.85841C6.65025 6.85841 6.46731 6.68011 6.46731 6.46018C6.46731 6.24024 6.65025 6.06195 6.87591 6.06195C7.10157 6.06195 7.2845 6.24024 7.2845 6.46018C7.2845 6.68011 7.10157 6.85841 6.87591 6.85841V6.80531C7.07148 6.80531 7.23002 6.65079 7.23002 6.46018Z" fill="currentColor"/>\n<path d="M11.207 9.56637C11.207 8.92122 10.6704 8.39823 10.0085 8.39823C9.34653 8.39823 8.80993 8.92122 8.80993 9.56637C8.80993 10.2115 9.34653 10.7345 10.0085 10.7345V11C9.19609 11 8.53753 10.3581 8.53753 9.56637C8.53753 8.7746 9.19609 8.13274 10.0085 8.13274C10.8209 8.13274 11.4794 8.7746 11.4794 9.56637C11.4794 10.3581 10.8209 11 10.0085 11V10.7345C10.6704 10.7345 11.207 10.2115 11.207 9.56637Z" fill="currentColor"/>\n<path d="M10.4443 9.59292C10.4443 9.81286 10.2614 9.99115 10.0357 9.99115C9.81005 9.99115 9.62712 9.81286 9.62712 9.59292C9.62712 9.37298 9.81005 9.19469 10.0357 9.19469C10.2614 9.19469 10.4443 9.37298 10.4443 9.59292Z" fill="currentColor"/>\n<path d="M10.3898 9.59292C10.3898 9.40231 10.2313 9.24779 10.0357 9.24779C9.84014 9.24779 9.6816 9.40231 9.6816 9.59292C9.6816 9.78353 9.84014 9.93805 10.0357 9.93805V9.99115C9.81005 9.99115 9.62712 9.81286 9.62712 9.59292C9.62712 9.37298 9.81005 9.19469 10.0357 9.19469C10.2614 9.19469 10.4443 9.37298 10.4443 9.59292C10.4443 9.81286 10.2614 9.99115 10.0357 9.99115V9.93805C10.2313 9.93805 10.3898 9.78353 10.3898 9.59292Z" fill="currentColor"/>\n<path d="M11.207 6.43363C11.207 5.78848 10.6704 5.26549 10.0085 5.26549C9.34653 5.26549 8.80993 5.78848 8.80993 6.43363C8.80993 7.07878 9.34653 7.60177 10.0085 7.60177V7.86726C9.19609 7.86726 8.53753 7.2254 8.53753 6.43363C8.53753 5.64186 9.19609 5 10.0085 5C10.8209 5 11.4794 5.64186 11.4794 6.43363C11.4794 7.2254 10.8209 7.86726 10.0085 7.86726V7.60177C10.6704 7.60177 11.207 7.07878 11.207 6.43363Z" fill="currentColor"/>\n<path d="M10.4443 6.46018C10.4443 6.68011 10.2614 6.85841 10.0357 6.85841C9.81005 6.85841 9.62712 6.68011 9.62712 6.46018C9.62712 6.24024 9.81005 6.06195 10.0357 6.06195C10.2614 6.06195 10.4443 6.24024 10.4443 6.46018Z" fill="currentColor"/>\n<path d="M10.3898 6.46018C10.3898 6.26957 10.2313 6.11504 10.0357 6.11504C9.84014 6.11504 9.6816 6.26957 9.6816 6.46018C9.6816 6.65079 9.84014 6.80531 10.0357 6.80531V6.85841C9.81005 6.85841 9.62712 6.68011 9.62712 6.46018C9.62712 6.24024 9.81005 6.06195 10.0357 6.06195C10.2614 6.06195 10.4443 6.24024 10.4443 6.46018C10.4443 6.68011 10.2614 6.85841 10.0357 6.85841V6.80531C10.2313 6.80531 10.3898 6.65079 10.3898 6.46018Z" fill="currentColor"/>\n<path d="M14.5847 9.56637C14.5847 8.92122 14.0481 8.39823 13.3862 8.39823C12.7243 8.39823 12.1877 8.92122 12.1877 9.56637C12.1877 10.2115 12.7243 10.7345 13.3862 10.7345V11C12.5738 11 11.9153 10.3581 11.9153 9.56637C11.9153 8.7746 12.5738 8.13274 13.3862 8.13274C14.1986 8.13274 14.8571 8.7746 14.8571 9.56637C14.8571 10.3581 14.1986 11 13.3862 11V10.7345C14.0481 10.7345 14.5847 10.2115 14.5847 9.56637Z" fill="currentColor"/>\n<path d="M13.822 9.59292C13.822 9.81286 13.6391 9.99115 13.4134 9.99115C13.1878 9.99115 13.0048 9.81286 13.0048 9.59292C13.0048 9.37298 13.1878 9.19469 13.4134 9.19469C13.6391 9.19469 13.822 9.37298 13.822 9.59292Z" fill="currentColor"/>\n<path d="M13.7676 9.59292C13.7676 9.40231 13.609 9.24779 13.4134 9.24779C13.2179 9.24779 13.0593 9.40231 13.0593 9.59292C13.0593 9.78353 13.2179 9.93805 13.4134 9.93805V9.99115C13.1878 9.99115 13.0048 9.81286 13.0048 9.59292C13.0048 9.37298 13.1878 9.19469 13.4134 9.19469C13.6391 9.19469 13.822 9.37298 13.822 9.59292C13.822 9.81286 13.6391 9.99115 13.4134 9.99115V9.93805C13.609 9.93805 13.7676 9.78353 13.7676 9.59292Z" fill="currentColor"/>\n<path d="M14.5847 6.43363C14.5847 5.78848 14.0481 5.26549 13.3862 5.26549C12.7243 5.26549 12.1877 5.78848 12.1877 6.43363C12.1877 7.07878 12.7243 7.60177 13.3862 7.60177V7.86726C12.5738 7.86726 11.9153 7.2254 11.9153 6.43363C11.9153 5.64186 12.5738 5 13.3862 5C14.1986 5 14.8571 5.64186 14.8571 6.43363C14.8571 7.2254 14.1986 7.86726 13.3862 7.86726V7.60177C14.0481 7.60177 14.5847 7.07878 14.5847 6.43363Z" fill="currentColor"/>\n<path d="M13.822 6.46018C13.822 6.68011 13.6391 6.85841 13.4134 6.85841C13.1878 6.85841 13.0048 6.68011 13.0048 6.46018C13.0048 6.24024 13.1878 6.06195 13.4134 6.06195C13.6391 6.06195 13.822 6.24024 13.822 6.46018Z" fill="currentColor"/>\n<path d="M13.7676 6.46018C13.7676 6.26957 13.609 6.11504 13.4134 6.11504C13.2179 6.11504 13.0593 6.26957 13.0593 6.46018C13.0593 6.65079 13.2179 6.80531 13.4134 6.80531V6.85841C13.1878 6.85841 13.0048 6.68011 13.0048 6.46018C13.0048 6.24024 13.1878 6.06195 13.4134 6.06195C13.6391 6.06195 13.822 6.24024 13.822 6.46018C13.822 6.68011 13.6391 6.85841 13.4134 6.85841V6.80531C13.609 6.80531 13.7676 6.65079 13.7676 6.46018Z" fill="currentColor"/>\n</svg>\n',"claude-acp":'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 1200 1200">\n <path fill="currentColor" d="M 233.959793 800.214905 L 468.644287 668.536987 L 472.590637 657.100647 L 468.644287 650.738403 L 457.208069 650.738403 L 417.986633 648.322144 L 283.892639 644.69812 L 167.597321 639.865845 L 54.926208 633.825623 L 26.577238 627.785339 L 3.3e-05 592.751709 L 2.73832 575.27533 L 26.577238 559.248352 L 60.724873 562.228149 L 136.187973 567.382629 L 249.422867 575.194763 L 331.570496 580.026978 L 453.261841 592.671082 L 472.590637 592.671082 L 475.328857 584.859009 L 468.724915 580.026978 L 463.570557 575.194763 L 346.389313 495.785217 L 219.543671 411.865906 L 153.100723 363.543762 L 117.181267 339.060425 L 99.060455 316.107361 L 91.248367 266.01355 L 123.865784 230.093994 L 167.677887 233.073853 L 178.872513 236.053772 L 223.248367 270.201477 L 318.040283 343.570496 L 441.825592 434.738342 L 459.946411 449.798706 L 467.194672 444.64447 L 468.080597 441.020203 L 459.946411 427.409485 L 392.617493 305.718323 L 320.778564 181.932983 L 288.80542 130.630859 L 280.348999 99.865845 C 277.369171 87.221436 275.194641 76.590698 275.194641 63.624268 L 312.322174 13.20813 L 332.8591 6.604126 L 382.389313 13.20813 L 403.248352 31.328979 L 434.013519 101.71814 L 483.865753 212.537048 L 561.181274 363.221497 L 583.812134 407.919434 L 595.892639 449.315491 L 600.40271 461.959839 L 608.214783 461.959839 L 608.214783 454.711609 L 614.577271 369.825623 L 626.335632 265.61084 L 637.771851 131.516846 L 641.718201 93.745117 L 660.402832 48.483276 L 697.530334 24.000122 L 726.52356 37.852417 L 750.362549 72 L 747.060486 94.067139 L 732.886047 186.201416 L 705.100708 330.52356 L 686.979919 427.167847 L 697.530334 427.167847 L 709.61084 415.087341 L 758.496704 350.174561 L 840.644348 247.490051 L 876.885925 206.738342 L 919.167847 161.71814 L 946.308838 140.29541 L 997.61084 140.29541 L 1035.38269 196.429626 L 1018.469849 254.416199 L 965.637634 321.422852 L 921.825562 378.201538 L 859.006714 462.765259 L 819.785278 530.41626 L 823.409424 535.812073 L 832.75177 534.92627 L 974.657776 504.724915 L 1051.328979 490.872559 L 1142.818848 475.167786 L 1184.214844 494.496582 L 1188.724854 514.147644 L 1172.456421 554.335693 L 1074.604126 578.496765 L 959.838989 601.449829 L 788.939636 641.879272 L 786.845764 643.409485 L 789.261841 646.389343 L 866.255127 653.637634 L 899.194702 655.409424 L 979.812134 655.409424 L 1129.932861 666.604187 L 1169.154419 692.537109 L 1192.671265 724.268677 L 1188.724854 748.429688 L 1128.322144 779.194641 L 1046.818848 759.865845 L 856.590759 714.604126 L 791.355774 698.335754 L 782.335693 698.335754 L 782.335693 703.731567 L 836.69812 756.885986 L 936.322205 846.845581 L 1061.073975 962.81897 L 1067.436279 991.490112 L 1051.409424 1014.120911 L 1034.496704 1011.704712 L 924.885986 929.234924 L 882.604126 892.107544 L 786.845764 811.48999 L 780.483276 811.48999 L 780.483276 819.946289 L 802.550415 852.241699 L 919.087341 1027.409424 L 925.127625 1081.127686 L 916.671204 1098.604126 L 886.469849 1109.154419 L 853.288696 1103.114136 L 785.073914 1007.355835 L 714.684631 899.516785 L 657.906067 802.872498 L 650.979858 806.81897 L 617.476624 1167.704834 L 601.771851 1186.147705 L 565.530212 1200 L 535.328857 1177.046997 L 519.302124 1139.919556 L 535.328857 1066.550537 L 554.657776 970.792053 L 570.362488 894.68457 L 584.536926 800.134277 L 592.993347 768.724976 L 592.429626 766.630859 L 585.503479 767.516968 L 514.22821 865.369263 L 405.825531 1011.865906 L 320.053711 1103.677979 L 299.516815 1111.812256 L 263.919525 1093.369263 L 267.221497 1060.429688 L 287.114136 1031.114136 L 405.825531 880.107361 L 477.422913 786.52356 L 523.651062 732.483276 L 523.328918 724.671265 L 520.590698 724.671265 L 205.288605 929.395935 L 149.154434 936.644409 L 124.993355 914.01355 L 127.973183 876.885986 L 139.409409 864.80542 L 234.201385 799.570435 L 233.879227 799.8927 Z"/>\n</svg>\n',cline:'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 92 96" fill="currentColor">\n <path d="M65.45 16.3c10.89 0 19.71 8.86 19.71 19.8v6.6l5.74 11.46a4.48 4.48 0 0 1-.01 3.6L85.16 69.1v6.6c0 10.94-8.83 19.8-19.71 19.8H26.02c-10.89 0-19.71-8.86-19.71-19.8v-6.6L.45 57.8a4.48 4.48 0 0 1-.01-3.67L6.31 42.7v-6.6c0-10.94 8.83-19.8 19.71-19.8h39.43zm-2.52 5.7H29.19c-9.32 0-16.87 7.56-16.87 16.88v5.62l-4.88 9.46a4.48 4.48 0 0 0 .01 3.68l4.87 9.36v5.62c0 9.32 7.55 16.88 16.87 16.88h33.74c9.32 0 16.87-7.55 16.87-16.88V67l4.77-9.39a4.48 4.48 0 0 0 0-3.61L79.8 44.5v-5.62C79.8 29.56 72.25 22 62.93 22z" fill-rule="nonzero"/>\n <circle cx="45.73" cy="11" r="11"/>\n <rect stroke="currentColor" stroke-width="8" x="31" y="44.5" width="5" height="22" rx="2.5"/>\n <rect stroke="currentColor" stroke-width="8" x="55" y="44.5" width="5" height="22" rx="2.5"/>\n</svg>\n',"codebuddy-code":'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">\n <path fill="currentColor" d="M12.13 1.25c.15-.14.16-.14.28-.15.18 0 .36.08.64.34.68.62 1.61 1.89 2.2 2.97l.22.42.32.16c.3.16.81.48 1.02.65.09.08.11.08.21.04.45-.18 1.09.05 1.65.6.51.49 1 1.33 1.18 2.03.03.11.06.36.07.54.04.64-.16 1.14-.55 1.37-.08.04-.08.06-.08.26.02.95-.23 1.89-.74 2.82-.58 1.04-1.6 2.11-2.98 3.12-.74.55-2.5 1.58-3.3 1.95-1.9.86-3.43 1.2-4.76 1.03-.79-.09-1.69-.41-2.22-.77-.14-.1-.16-.1-.27-.07-.57.16-1.31-.18-1.94-.88-.25-.28-.66-.98-.79-1.35-.3-.87-.25-1.65.16-2.12.11-.12.09-.33.09-.33-.04-.33-.05-.82-.04-1.14v-.3l-.43-.79c-.68-1.23-1.12-2.25-1.28-3.04-.09-.43-.09-.62.02-.77.07-.09.28-.18.54-.22.66-.12 2.09-.01 3.69.27l.16.03.36-.32c.61-.54 1.01-.84 1.75-1.31.77-.48 1.64-.89 2.62-1.2l.32-.1.17-.46c.62-1.65 1.25-2.86 1.71-3.27h0Zm-5.19 8.45c-.7.41-1.05.61-1.3.84-1.04.93-1.43 2.39-.99 3.71.11.33.31.68.71 1.39.41.71.61 1.06.83 1.32.92 1.05 2.37 1.45 3.68 1 .32-.11.68-.31 1.38-.72l4.02-2.34c.7-.41 1.05-.61 1.3-.84 1.04-.93 1.43-2.39.99-3.71-.11-.33-.31-.68-.71-1.39s-.61-1.06-.83-1.32c-.92-1.05-2.37-1.45-3.68-1-.32.11-.67.31-1.38.72l-4.02 2.34Z"/>\n <path fill="currentColor" fill-opacity="0.4" d="M8.02 12.13c.38-.22.87-.09 1.09.29l.86 1.5c.22.38.09.88-.29 1.09-.38.22-.86.09-1.09-.29l-.86-1.5c-.22-.38-.09-.87.29-1.09Z"/>\n <path fill="currentColor" fill-opacity="0.4" d="M12.31 9.64c.38-.22.87-.09 1.09.29l.86 1.5c.22.38.09.87-.29 1.09s-.87.09-1.09-.29l-.86-1.5c-.22-.38-.09-.88.29-1.09Z"/>\n</svg>\n',"codex-acp":'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24">\n <path fill="currentColor" d="M22.282 9.821a5.985 5.985 0 0 0-.516-4.91 6.046 6.046 0 0 0-6.51-2.9A6.065 6.065 0 0 0 4.981 4.18a5.985 5.985 0 0 0-3.998 2.9 6.046 6.046 0 0 0 .743 7.097 5.98 5.98 0 0 0 .51 4.911 6.051 6.051 0 0 0 6.515 2.9A5.985 5.985 0 0 0 13.26 24a6.056 6.056 0 0 0 5.772-4.206 5.99 5.99 0 0 0 3.997-2.9 6.056 6.056 0 0 0-.747-7.073zM13.26 22.43a4.476 4.476 0 0 1-2.876-1.04l.141-.081 4.779-2.758a.795.795 0 0 0 .392-.681v-6.737l2.02 1.168a.071.071 0 0 1 .038.052v5.583a4.504 4.504 0 0 1-4.494 4.494zM3.6 18.304a4.47 4.47 0 0 1-.535-3.014l.142.085 4.783 2.759a.771.771 0 0 0 .78 0l5.843-3.369v2.332a.08.08 0 0 1-.033.062L9.74 19.95a4.5 4.5 0 0 1-6.14-1.646zM2.34 7.896a4.485 4.485 0 0 1 2.366-1.973V11.6a.766.766 0 0 0 .388.676l5.815 3.355-2.02 1.168a.076.076 0 0 1-.071 0l-4.83-2.786A4.504 4.504 0 0 1 2.34 7.872zm16.597 3.855l-5.833-3.387L15.119 7.2a.076.076 0 0 1 .071 0l4.83 2.791a4.494 4.494 0 0 1-.676 8.105v-5.678a.79.79 0 0 0-.407-.667zm2.01-3.023l-.141-.085-4.774-2.782a.776.776 0 0 0-.785 0L9.409 9.23V6.897a.066.066 0 0 1 .028-.061l4.83-2.787a4.5 4.5 0 0 1 6.68 4.66zm-12.64 4.135l-2.02-1.164a.08.08 0 0 1-.038-.057V6.075a4.5 4.5 0 0 1 7.375-3.453l-.142.08L8.704 5.46a.795.795 0 0 0-.393.681zm1.097-2.365l2.602-1.5 2.607 1.5v2.999l-2.597 1.5-2.607-1.5z"/>\n</svg>\n',"cortex-code":'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 362 362" overflow="hidden">\n <path fill="currentColor" fill-rule="evenodd" d="M1562.63,107.07h-4.18v5.15h4.18c1.94,0,3.21-.87,3.21-2.53,0-1.75-1.17-2.62-3.21-2.62ZM1553.3,102.31h9.42c5.15,0,8.55,2.82,8.55,7.19,0,2.72-1.36,4.76-3.4,6.02l3.69,5.34v1.07h-5.34l-3.59-5.15h-4.18v5.15h-5.15v-19.62ZM1579.63,112.51c0-10.49-6.99-18.46-17.68-18.46s-17.49,7.58-17.49,18.46,6.99,18.46,17.49,18.46,17.68-7.97,17.68-18.46ZM1584,112.51c0,12.34-8.26,22.63-22.05,22.63s-21.86-10.39-21.86-22.63,8.16-22.63,21.86-22.63,22.05,10.3,22.05,22.63ZM348.21,156.4l-42.55,24.61,42.55,24.54c10.75,6.22,14.42,19.9,8.21,30.67-6.2,10.7-19.92,14.37-30.63,8.18l-76.21-44c-5.08-2.96-8.61-7.59-10.18-12.8-.74-2.4-1.09-4.87-1-7.31.04-1.76.3-3.53.79-5.29,1.52-5.48,5.1-10.38,10.39-13.46l76.21-43.97c10.71-6.19,24.43-2.51,30.63,8.22,6.22,10.72,2.54,24.41-8.21,30.61ZM307.93,275.68l-76.19-43.94c-4.09-2.38-8.63-3.3-12.99-2.93-11.62.83-20.75,10.53-20.75,22.34v87.98c0,12.4,10,22.45,22.42,22.45s22.45-10.05,22.45-22.45v-49.21l42.66,24.63c10.72,6.23,24.43,2.54,30.61-8.17,6.17-10.74,2.53-24.5-8.21-30.7ZM220.01,189.61l-31.67,31.63c-.91.93-2.65,1.69-3.98,1.69h-9.31c-1.28,0-3.06-.76-3.98-1.69l-31.66-31.63c-.91-.89-1.64-2.68-1.64-3.94v-9.33c0-1.29.73-3.09,1.64-3.99l31.66-31.63c.92-.93,2.7-1.66,3.98-1.66h9.31c1.29,0,3.07.73,3.98,1.66l31.67,31.63c.9.9,1.63,2.7,1.63,3.99v9.33c0,1.26-.73,3.05-1.63,3.94ZM194.7,180.83c0-1.28-.77-3.06-1.68-4l-9.17-9.13c-.9-.9-2.68-1.65-3.96-1.65h-.36c-1.28,0-3.05.75-3.94,1.65l-9.17,9.13c-.92.95-1.62,2.73-1.62,4v.36c0,1.26.7,3.03,1.62,3.95l9.17,9.16c.9.9,2.67,1.65,3.94,1.65h.36c1.28,0,3.06-.75,3.96-1.65l9.17-9.16c.9-.92,1.68-2.68,1.68-3.95v-.36ZM51.48,86.28l76.21,43.99c4.09,2.35,8.64,3.29,13.01,2.93,11.6-.86,20.75-10.58,20.75-22.37V22.84c0-12.37-10.06-22.41-22.42-22.41s-22.45,10.05-22.45,22.41v49.23l-42.7-24.66c-10.71-6.2-24.4-2.53-30.61,8.2-6.19,10.76-2.53,24.47,8.2,30.67ZM218.75,133.19c4.36.36,8.9-.57,12.99-2.93l76.19-43.99c10.74-6.2,14.38-19.91,8.21-30.67-6.18-10.72-19.89-14.4-30.61-8.2l-42.66,24.66V22.84c0-12.37-10.03-22.41-22.45-22.41s-22.42,10.05-22.42,22.41v87.98c0,11.8,9.13,21.51,20.75,22.37ZM140.71,228.8c-4.38-.37-8.92.54-13.01,2.93l-76.21,43.94c-10.72,6.2-14.38,19.96-8.2,30.7,6.22,10.71,19.91,14.4,30.61,8.17l42.7-24.63v49.21c0,12.4,10.03,22.45,22.45,22.45s22.42-10.05,22.42-22.45v-87.98c0-11.81-9.16-21.51-20.75-22.34ZM120.04,187.6c.76-2.4,1.08-4.87,1.02-7.31-.09-1.76-.32-3.53-.82-5.29-1.51-5.48-5.08-10.38-10.44-13.46l-76.15-43.97c-10.75-6.19-24.45-2.51-30.63,8.22-6.23,10.72-2.55,24.41,8.2,30.61l42.55,24.61-42.55,24.54c-10.75,6.22-14.41,19.9-8.2,30.67,6.17,10.7,19.88,14.37,30.63,8.18l76.15-44c5.14-2.96,8.63-7.59,10.23-12.8Z"/>\n</svg>\n',"corust-agent":'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 12 12">\n <g transform="matrix(0.00160555,0,0,-0.0014599,-0.26812129,11.08482)" fill="currentColor">\n <path d="m 297,6493 c -4,-3 -7,-1357 -7,-3008 0,-2390 3,-3005 12,-3012 13,-10 1199,-9 1224,1 11,4 13,61 10,295 -2,159 -7,294 -10,299 -4,7 -112,11 -312,11 -168,0 -309,3 -314,6 -12,7 -13,4775 -2,4792 6,10 85,13 317,15 l 310,3 v 600 l -611,3 c -336,1 -614,-1 -617,-5 z"/>\n <path d="m 6287,6493 c -4,-3 -7,-136 -7,-294 0,-219 3,-290 13,-296 6,-4 152,-10 322,-13 l 310,-5 3,-2394 c 1,-1545 -1,-2398 -8,-2405 -6,-6 -127,-9 -316,-7 -246,2 -309,0 -315,-11 -5,-7 -9,-145 -9,-305 V 470 l 23,-1 c 158,-4 1192,-2 1200,3 14,9 22,5964 7,6002 l -10,26 h -603 c -332,0 -607,-3 -610,-7 z"/>\n <g transform="matrix(1.0249,0,0,1.0566,-429.39,51.322)">\n <path d="m 2476.7,5111.6 c -64.95,-6.2305 -71.077,-28.66 -73.528,-325.23 -3.6765,-261.68 4.9018,-351.4 36.764,-371.34 7.3528,-4.9844 583.32,-12.461 1276.9,-16.199 l 1262.2,-6.2306 73.528,-34.891 c 191.17,-90.966 300.24,-292.84 284.31,-527.1 -15.931,-223.05 -134.8,-392.52 -314.95,-449.85 -61.274,-19.938 -133.58,-21.184 -727.93,-18.692 -607.83,3.7384 -661.75,2.4922 -682.59,-17.446 -22.058,-19.938 -23.284,-43.614 -23.284,-331.47 0,-190.65 4.9019,-320.25 12.255,-335.2 11.029,-21.184 26.96,-23.676 123.77,-23.676 h 110.29 l 66.176,-63.552 c 36.764,-34.891 125,-125.86 198.53,-201.87 72.303,-76.013 322.3,-333.96 555.14,-571.96 l 424.01,-434.89 519.6,3.7383 c 390.93,2.4922 520.83,7.4767 520.83,18.692 0,7.4766 -223.04,249.22 -496.32,534.58 -562.49,589.41 -666.66,701.56 -660.53,707.79 2.451,2.4922 52.695,8.7227 111.52,13.707 322.3,24.922 593.13,194.39 790.43,495.95 129.9,199.38 187.5,391.28 196.08,660.44 8.5783,245.48 -14.706,368.85 -116.42,600.63 -123.77,286.61 -328.43,492.21 -596.8,601.87 -232.84,95.95 -167.89,92.212 -1574.7,93.458 -691.17,1.2462 -1274.5,1.2462 -1295.3,-1.2461 z"/>\n <path d="m 2430.1,3942.7 c -24.509,-18.692 -24.509,-33.645 -24.509,-1254.8 0,-1163.9 1.2255,-1238.6 22.058,-1271 l 20.833,-33.645 h 337 c 289.21,0 338.23,2.4922 354.16,19.938 18.382,17.446 19.608,145.79 18.382,1267.3 -1.2255,1115.3 -2.4509,1251.1 -19.608,1271 -18.382,18.692 -50.244,21.184 -351.71,21.184 -276.96,-1.2461 -335.78,-3.7383 -356.61,-19.938 z"/>\n </g>\n </g>\n</svg>\n',"crow-cli":'<svg\n width="16"\n height="16"\n viewBox="0 0 366 368"\n xmlns="http://www.w3.org/2000/svg">\n <path\n fill="currentColor"\n d="m 26,275.93574 c 0.65,-9.32 8.46,-15.43 15,-20.96 15.43,-13.04 35.67,-21.92 53,-32.71 20.67,-12.88 61.58,-40.31 80,-55.03 0,0 21,-18.39 21,-18.39 0,0 28,-23.91 28,-23.91 10,-8.33 14.1,-11.65 25,-18.92 7.42,-4.94 19.07,-12.550001 24.52,-19.330001 7.17,-8.93 4.16,-18.82 -4.53,-25.45 -5.67,-4.32 -23.5,-8.94 -30.99,-10.66 -3.1,-0.72 -11.45,-1.57 -13.38,-3.62 -3.22,-3.43 1.67,-6.99 4.38,-8.45 6.61,-3.54 17.51,-5.73 25,-5.82 0,0 4,0 4,0 16.51,-0.2 18.85,-12.47 40,-11.99 9.26,0.21 21.16,2.48 29,7.54 7.87,5.07 12.2,11.73 17.05,19.45 6.31,10.05 12.35,21.16 14.49,33 1.42,7.88 -0.45,13.62 -0.54,21.000001 -0.28,24.26 6.68,37.92 -2.44,63 -5.9,16.24 -14.87,35.36 -23.98,50 -9.34,15 -20.81,30.64 -35.58,40.64 0,0 -16,9.36 -16,9.36 -3.3,1.9 -6.18,2.94 -6.64,7.04 -0.68,2.83 -0.16,7.11 0,9.96 0,0 1.29,8 1.29,8 1.62,5.16 8.51,12.15 12.35,16 3.36,3.37 6.84,7.82 12,7.89 4.2,0.06 8.14,-2.87 12,-4.44 5.24,-2.13 11.35,-3.55 17,-3.94 6.33,-0.43 17.05,1.85 14,10.49 -2.84,-3.54 -6.09,-6.36 -11,-5.57 -2.47,0.4 -10.06,3.6 -8.09,7.08 1.19,2.08 7.67,3.01 10.09,3.88 6.26,2.25 10.83,5.76 14,11.61 0,0 -17,-6.33 -17,-6.33 -9.74,-2.08 -18.73,0.62 -28,3.33 5.49,3.71 8.06,5.51 12,11 -8.23,-1.96 -13.6,-7.46 -26,-6.96 -9.64,0.39 -11.89,4.13 -27,3.96 -9.42,-0.11 -17.78,-4.36 -27,-3.96 -9.45,0.41 -13.16,5.64 -21,8.96 3.16,-14.88 19.73,-16 32,-16 -7.31,-10.21 -20.46,-18.11 -23.28,-26 -0.7,-1.97 -0.69,-3.94 -0.71,-6 0,0 0,-14 0,-14 0.23,-2.35 1.13,-5.62 0,-7.73 -1.66,-2.77 -8.94,-4.64 -12.01,-5.55 -20.1,-5.96 -24.58,-0.84 -43,2.01 0,0 -14,2.11 -14,2.11 -9.78,1.06 -18.83,0.92 -28,5.02 0,0 -15,7.88 -15,7.88 -16.76,8.6 -42.02,22.27 -59,27.93 -9.14,3.04 -16.2,6.24 -26,6.33 0,0 5,-10 5,-10 -3.92,0.18 -15.76,3.08 -17.92,-0.51 -2.44,-4.07 5.28,-9.01 7.92,-10.91 0,0 36,-24.58 36,-24.58 0,0 -19,3.25 -19,3.25 z m 227,1.75 c -2.98,0.84 -11.45,3.61 -12.96,6.27 -0.95,1.89 -0.18,5.54 0,7.73 0.04,2.47 -0.13,4.56 0.61,7 1.52,5.07 11.84,17.33 16.35,19.88 3.38,1.91 15.93,0.11 20,-0.88 -4.12,-8.71 -16.66,-15.05 -21.99,-24 -3.43,-5.75 -0.8,-10.06 -2.01,-16 z" />\n</svg>\n',cursor:'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 466.73 532.09">\n <path fill="currentColor" d="M457.43,125.94L244.42,2.96c-6.84-3.95-15.28-3.95-22.12,0L9.3,125.94c-5.75,3.32-9.3,9.46-9.3,16.11v247.99c0,6.65,3.55,12.79,9.3,16.11l213.01,122.98c6.84,3.95,15.28,3.95,22.12,0l213.01-122.98c5.75-3.32,9.3-9.46,9.3-16.11v-247.99c0-6.65-3.55-12.79-9.3-16.11h-.01ZM444.05,151.99l-205.63,356.16c-1.39,2.4-5.06,1.42-5.06-1.36v-233.21c0-4.66-2.49-8.97-6.53-11.31L24.87,145.67c-2.4-1.39-1.42-5.06,1.36-5.06h411.26c5.84,0,9.49,6.33,6.57,11.39h-.01Z"/>\n</svg>\n',deepagents:'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 128 128">\n <path fill="currentColor" d="M40.1024 85.0722C47.6207 77.5537 51.8469 67.3453 51.8469 56.7136C51.8469 46.0818 47.617 35.8734 40.1024 28.355L11.7446 0C4.22995 7.5185 0 17.7269 0 28.3586C0 38.9903 4.22995 49.1987 11.7446 56.7172L40.0987 85.0722H40.1024Z"/>\n <path fill="currentColor" d="M99.4385 87.698C91.9239 80.1832 81.7121 75.9531 71.0844 75.9531C60.4566 75.9531 50.2448 80.1832 42.7266 87.698L71.0844 116.057C78.599 123.571 88.8107 127.802 99.4421 127.802C110.074 127.802 120.282 123.571 127.8 116.057L99.4421 87.698H99.4385Z"/>\n <path fill="currentColor" d="M11.8146 115.987C19.3329 123.502 29.541 127.732 40.1724 127.732V87.6289H0.0664062C0.0700559 98.2606 4.29635 108.469 11.8146 115.987Z"/>\n <path fill="currentColor" d="M110.387 45.7684C102.869 38.2535 92.6608 34.0198 82.0258 34.0234C71.3943 34.0234 61.1863 38.2535 53.668 45.772L82.0258 74.1306L110.387 45.7684Z"/>\n</svg>\n',codewhale:'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 32 32">\n <rect width="32" height="32" fill="currentColor" opacity="0.18"/>\n <text x="50%" y="55%" text-anchor="middle" dominant-baseline="middle" font-family="\'Noto Serif SC\', serif" font-weight="700" font-size="20" fill="currentColor">\u6df1</text>\n <rect x="0" y="29" width="32" height="3" fill="currentColor"/>\n</svg>\n',dimcode:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M3.12109 11.0078H1.99902V5.49316H3.12109V11.0078ZM3.7041 5.49316C4.91979 5.49316 5.31142 5.57449 5.80762 5.7373C6.50208 5.97365 6.85299 6.40958 6.86133 7.04492V9.45605C6.86125 10.207 6.37767 10.6797 5.41016 10.874C4.95546 10.9633 4.69632 11.0078 3.7041 11.0078V10.6064C4.72131 10.6064 4.95994 10.5507 5.34863 10.4404C5.91072 10.2671 6.19576 9.93907 6.2041 9.45605V7.04492C6.20402 6.4883 5.83211 6.13886 5.08789 5.99707C4.74057 5.93405 4.58897 5.89978 3.7041 5.89453V5.49316ZM9.16797 5.49316V11.0078H8.0459V5.49316H9.16797ZM14 6.79297V11.0078H12.8779V8.0791L13.8877 6.79297H14ZM14 5.49316V5.7373L11.3594 8.97852H10.7852L9.74219 6.94531V6.07812H9.86719L11.0723 8.33203L13.4258 5.49316H14Z" fill="currentColor"/>\n</svg>\n',dirac:'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="currentColor">\n <text x="8" y="10" text-anchor="middle" font-size="10.5" font-family="Georgia, serif" font-style="italic" fill="currentColor">\u03b4</text>\n <line x1="1" y1="14" x2="15" y2="14" stroke="currentColor" stroke-opacity="0.4" stroke-width="1" stroke-linecap="round"/>\n <line x1="8" y1="14" x2="8" y2="12" stroke="currentColor" stroke-width="1" stroke-linecap="round"/>\n <circle cx="8" cy="11.5" r="0.7" fill="currentColor"/>\n</svg>\n',"factory-droid":'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 900 900" fill="none"><path fill="currentColor" d="M622.037 192.524a10.58 10.58 0 0 1-4.056-2.001 10.573 10.573 0 0 1-3.98-7.89 10.595 10.595 0 0 1 .804-4.452c20.214-49.194 29.134-88.555 14.74-105.033-38.123-43.716-191.004 43.219-239.75 72.663a10.596 10.596 0 0 1-10.841.041 10.576 10.576 0 0 1-4.396-5.07c-20.491-49.089-42.031-83.233-63.865-84.714-57.871-3.96-104.516 165.624-118.17 220.895a10.574 10.574 0 0 1-1.993 4.057 10.572 10.572 0 0 1-7.884 3.977 10.586 10.586 0 0 1-4.447-.802c-49.194-20.215-88.572-29.134-105.033-14.74-43.717 38.123 43.202 191.005 72.644 239.75a10.553 10.553 0 0 1 1.454 4.279 10.573 10.573 0 0 1-6.481 10.958c-49.072 20.491-83.216 42.031-84.715 63.864-3.944 57.871 165.624 104.516 220.913 118.171a10.566 10.566 0 0 1 5.658 3.601 10.57 10.57 0 0 1 2.355 6.281 10.58 10.58 0 0 1-.799 4.442c-20.214 49.194-29.134 88.572-14.739 105.033 38.121 43.717 191.021-43.202 239.767-72.644a10.566 10.566 0 0 1 15.238 5.027c20.489 49.072 42.013 83.216 63.862 84.715 57.871 3.944 104.516-165.624 118.153-220.913a10.603 10.603 0 0 1 9.895-8.021 10.566 10.566 0 0 1 4.449.808c49.193 20.214 88.553 29.116 105.032 14.738 43.718-38.121-43.219-191.022-72.663-239.767a10.602 10.602 0 0 1 1.326-12.655 10.604 10.604 0 0 1 3.703-2.582c49.089-20.49 83.233-42.031 84.714-63.863 3.96-57.871-165.624-104.516-220.895-118.153Zm-66.394-55.478c11.123 19.938-46.196 152.797-88.83 245.724a8.36 8.36 0 0 1-8.239 4.855 8.374 8.374 0 0 1-7.412-6.043c-17.219-60.42-36.899-131.411-57.957-191.675a10.557 10.557 0 0 1 4.924-12.759c52.586-28.721 142.568-66.86 157.514-40.102ZM303.635 153.49c21.953 6.233 75.365 140.709 110.92 236.564a8.364 8.364 0 0 1-2.394 9.249 8.364 8.364 0 0 1-9.504.978c-54.943-30.493-119.013-66.824-176.522-94.546a10.565 10.565 0 0 1-5.528-12.501c16.926-57.44 53.532-148.095 83.028-139.744ZM137.064 343.322c19.921-11.123 152.795 46.197 245.707 88.83a8.369 8.369 0 0 1-1.189 15.652c-60.401 17.219-131.411 36.899-191.675 57.957a10.552 10.552 0 0 1-12.742-4.925c-28.668-52.584-66.876-142.568-40.101-157.514Zm16.443 252.009c6.217-21.953 140.709-75.365 236.564-110.921a8.368 8.368 0 0 1 10.227 11.898c-30.511 54.945-66.842 119.014-94.563 176.507a10.548 10.548 0 0 1-5.229 5.075 10.544 10.544 0 0 1-7.271.468c-57.441-16.822-148.095-53.531-139.728-83.027ZM343.34 761.902c-11.14-19.922 46.197-152.796 88.829-245.707a8.383 8.383 0 0 1 5.713-4.66 8.38 8.38 0 0 1 7.182 1.664 8.371 8.371 0 0 1 2.758 4.184c17.217 60.403 36.898 131.412 57.957 191.675a10.558 10.558 0 0 1-4.942 12.743c-52.568 28.668-142.568 66.875-157.445 40.101h-.052Zm252.009-16.443c-21.971-6.216-75.383-140.709-110.939-236.564a8.37 8.37 0 0 1 11.916-10.228c54.926 30.494 119.014 66.842 176.506 94.563a10.538 10.538 0 0 1 5.527 12.502c-16.909 57.526-53.515 148.094-83.01 139.727Zm166.57-189.834c-19.938 11.141-152.796-46.197-245.724-88.83a8.367 8.367 0 0 1-2.993-12.892 8.378 8.378 0 0 1 4.182-2.759c60.419-17.218 131.41-36.899 191.675-57.958a10.577 10.577 0 0 1 12.758 4.943c28.652 52.568 66.86 142.569 40.102 157.496Zm-16.444-252.009c-6.232 21.971-140.709 75.383-236.562 110.94a8.371 8.371 0 0 1-10.229-11.917c30.495-54.926 66.825-119.012 94.547-176.505a10.555 10.555 0 0 1 12.5-5.528c57.441 16.909 148.096 53.516 139.744 83.01Z"/></svg>\n',"fast-agent":'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 360 360" width="16" height="16">\n <g fill="currentColor">\n <circle cx="100.50" cy="40.50" r="4.50"/>\n <circle cx="112.50" cy="40.50" r="4.50"/>\n <circle cx="124.50" cy="40.50" r="4.50"/>\n <circle cx="136.50" cy="40.50" r="4.50"/>\n <circle cx="148.50" cy="40.50" r="4.50"/>\n <circle cx="76.50" cy="52.50" r="4.50"/>\n <circle cx="88.50" cy="52.50" r="4.50"/>\n <circle cx="100.50" cy="52.50" r="4.50"/>\n <circle cx="136.50" cy="52.50" r="4.50"/>\n <circle cx="148.50" cy="52.50" r="4.50"/>\n <circle cx="160.50" cy="52.50" r="4.50"/>\n <circle cx="64.50" cy="64.50" r="4.50"/>\n <circle cx="76.50" cy="64.50" r="4.50"/>\n <circle cx="88.50" cy="64.50" r="4.50"/>\n <circle cx="100.50" cy="64.50" r="4.50"/>\n <circle cx="136.50" cy="64.50" r="4.50"/>\n <circle cx="148.50" cy="64.50" r="4.50"/>\n <circle cx="160.50" cy="64.50" r="4.50"/>\n <circle cx="172.50" cy="64.50" r="4.50"/>\n <circle cx="52.50" cy="76.50" r="4.50"/>\n <circle cx="64.50" cy="76.50" r="4.50"/>\n <circle cx="76.50" cy="76.50" r="4.50"/>\n <circle cx="88.50" cy="76.50" r="4.50"/>\n <circle cx="100.50" cy="76.50" r="4.50"/>\n <circle cx="136.50" cy="76.50" r="4.50"/>\n <circle cx="148.50" cy="76.50" r="4.50"/>\n <circle cx="160.50" cy="76.50" r="4.50"/>\n <circle cx="52.50" cy="88.50" r="4.50"/>\n <circle cx="64.50" cy="88.50" r="4.50"/>\n <circle cx="76.50" cy="88.50" r="4.50"/>\n <circle cx="88.50" cy="88.50" r="4.50"/>\n <circle cx="100.50" cy="88.50" r="4.50"/>\n <circle cx="148.50" cy="88.50" r="4.50"/>\n <circle cx="52.50" cy="100.50" r="4.50"/>\n <circle cx="64.50" cy="100.50" r="4.50"/>\n <circle cx="76.50" cy="100.50" r="4.50"/>\n <circle cx="88.50" cy="100.50" r="4.50"/>\n <circle cx="100.50" cy="100.50" r="4.50"/>\n <circle cx="52.50" cy="112.50" r="4.50"/>\n <circle cx="64.50" cy="112.50" r="4.50"/>\n <circle cx="76.50" cy="112.50" r="4.50"/>\n <circle cx="88.50" cy="112.50" r="4.50"/>\n <circle cx="100.50" cy="112.50" r="4.50"/>\n <circle cx="52.50" cy="124.50" r="4.50"/>\n <circle cx="64.50" cy="124.50" r="4.50"/>\n <circle cx="76.50" cy="124.50" r="4.50"/>\n <circle cx="88.50" cy="124.50" r="4.50"/>\n <circle cx="100.50" cy="124.50" r="4.50"/>\n <circle cx="232.50" cy="124.50" r="4.50"/>\n <circle cx="244.50" cy="124.50" r="4.50"/>\n <circle cx="256.50" cy="124.50" r="4.50"/>\n <circle cx="28.50" cy="136.50" r="4.50"/>\n <circle cx="40.50" cy="136.50" r="4.50"/>\n <circle cx="52.50" cy="136.50" r="4.50"/>\n <circle cx="64.50" cy="136.50" r="4.50"/>\n <circle cx="76.50" cy="136.50" r="4.50"/>\n <circle cx="88.50" cy="136.50" r="4.50"/>\n <circle cx="100.50" cy="136.50" r="4.50"/>\n <circle cx="112.50" cy="136.50" r="4.50"/>\n <circle cx="124.50" cy="136.50" r="4.50"/>\n <circle cx="196.50" cy="136.50" r="4.50"/>\n <circle cx="208.50" cy="136.50" r="4.50"/>\n <circle cx="220.50" cy="136.50" r="4.50"/>\n <circle cx="232.50" cy="136.50" r="4.50"/>\n <circle cx="244.50" cy="136.50" r="4.50"/>\n <circle cx="256.50" cy="136.50" r="4.50"/>\n <circle cx="268.50" cy="136.50" r="4.50"/>\n <circle cx="280.50" cy="136.50" r="4.50"/>\n <circle cx="28.50" cy="148.50" r="4.50"/>\n <circle cx="40.50" cy="148.50" r="4.50"/>\n <circle cx="52.50" cy="148.50" r="4.50"/>\n <circle cx="64.50" cy="148.50" r="4.50"/>\n <circle cx="76.50" cy="148.50" r="4.50"/>\n <circle cx="88.50" cy="148.50" r="4.50"/>\n <circle cx="100.50" cy="148.50" r="4.50"/>\n <circle cx="112.50" cy="148.50" r="4.50"/>\n <circle cx="124.50" cy="148.50" r="4.50"/>\n <circle cx="172.50" cy="148.50" r="4.50"/>\n <circle cx="184.50" cy="148.50" r="4.50"/>\n <circle cx="196.50" cy="148.50" r="4.50"/>\n <circle cx="256.50" cy="148.50" r="4.50"/>\n <circle cx="268.50" cy="148.50" r="4.50"/>\n <circle cx="280.50" cy="148.50" r="4.50"/>\n <circle cx="292.50" cy="148.50" r="4.50"/>\n <circle cx="52.50" cy="160.50" r="4.50"/>\n <circle cx="64.50" cy="160.50" r="4.50"/>\n <circle cx="76.50" cy="160.50" r="4.50"/>\n <circle cx="88.50" cy="160.50" r="4.50"/>\n <circle cx="100.50" cy="160.50" r="4.50"/>\n <circle cx="160.50" cy="160.50" r="4.50"/>\n <circle cx="172.50" cy="160.50" r="4.50"/>\n <circle cx="184.50" cy="160.50" r="4.50"/>\n <circle cx="196.50" cy="160.50" r="4.50"/>\n <circle cx="256.50" cy="160.50" r="4.50"/>\n <circle cx="268.50" cy="160.50" r="4.50"/>\n <circle cx="280.50" cy="160.50" r="4.50"/>\n <circle cx="292.50" cy="160.50" r="4.50"/>\n <circle cx="304.50" cy="160.50" r="4.50"/>\n <circle cx="52.50" cy="172.50" r="4.50"/>\n <circle cx="64.50" cy="172.50" r="4.50"/>\n <circle cx="76.50" cy="172.50" r="4.50"/>\n <circle cx="88.50" cy="172.50" r="4.50"/>\n <circle cx="100.50" cy="172.50" r="4.50"/>\n <circle cx="160.50" cy="172.50" r="4.50"/>\n <circle cx="172.50" cy="172.50" r="4.50"/>\n <circle cx="184.50" cy="172.50" r="4.50"/>\n <circle cx="196.50" cy="172.50" r="4.50"/>\n <circle cx="208.50" cy="172.50" r="4.50"/>\n <circle cx="256.50" cy="172.50" r="4.50"/>\n <circle cx="268.50" cy="172.50" r="4.50"/>\n <circle cx="280.50" cy="172.50" r="4.50"/>\n <circle cx="292.50" cy="172.50" r="4.50"/>\n <circle cx="304.50" cy="172.50" r="4.50"/>\n <circle cx="52.50" cy="184.50" r="4.50"/>\n <circle cx="64.50" cy="184.50" r="4.50"/>\n <circle cx="76.50" cy="184.50" r="4.50"/>\n <circle cx="88.50" cy="184.50" r="4.50"/>\n <circle cx="100.50" cy="184.50" r="4.50"/>\n <circle cx="160.50" cy="184.50" r="4.50"/>\n <circle cx="172.50" cy="184.50" r="4.50"/>\n <circle cx="184.50" cy="184.50" r="4.50"/>\n <circle cx="196.50" cy="184.50" r="4.50"/>\n <circle cx="208.50" cy="184.50" r="4.50"/>\n <circle cx="256.50" cy="184.50" r="4.50"/>\n <circle cx="268.50" cy="184.50" r="4.50"/>\n <circle cx="280.50" cy="184.50" r="4.50"/>\n <circle cx="292.50" cy="184.50" r="4.50"/>\n <circle cx="304.50" cy="184.50" r="4.50"/>\n <circle cx="52.50" cy="196.50" r="4.50"/>\n <circle cx="64.50" cy="196.50" r="4.50"/>\n <circle cx="76.50" cy="196.50" r="4.50"/>\n <circle cx="88.50" cy="196.50" r="4.50"/>\n <circle cx="100.50" cy="196.50" r="4.50"/>\n <circle cx="172.50" cy="196.50" r="4.50"/>\n <circle cx="184.50" cy="196.50" r="4.50"/>\n <circle cx="196.50" cy="196.50" r="4.50"/>\n <circle cx="256.50" cy="196.50" r="4.50"/>\n <circle cx="268.50" cy="196.50" r="4.50"/>\n <circle cx="280.50" cy="196.50" r="4.50"/>\n <circle cx="292.50" cy="196.50" r="4.50"/>\n <circle cx="304.50" cy="196.50" r="4.50"/>\n <circle cx="52.50" cy="208.50" r="4.50"/>\n <circle cx="64.50" cy="208.50" r="4.50"/>\n <circle cx="76.50" cy="208.50" r="4.50"/>\n <circle cx="88.50" cy="208.50" r="4.50"/>\n <circle cx="100.50" cy="208.50" r="4.50"/>\n <circle cx="244.50" cy="208.50" r="4.50"/>\n <circle cx="256.50" cy="208.50" r="4.50"/>\n <circle cx="268.50" cy="208.50" r="4.50"/>\n <circle cx="280.50" cy="208.50" r="4.50"/>\n <circle cx="292.50" cy="208.50" r="4.50"/>\n <circle cx="304.50" cy="208.50" r="4.50"/>\n <circle cx="52.50" cy="220.50" r="4.50"/>\n <circle cx="64.50" cy="220.50" r="4.50"/>\n <circle cx="76.50" cy="220.50" r="4.50"/>\n <circle cx="88.50" cy="220.50" r="4.50"/>\n <circle cx="100.50" cy="220.50" r="4.50"/>\n <circle cx="220.50" cy="220.50" r="4.50"/>\n <circle cx="232.50" cy="220.50" r="4.50"/>\n <circle cx="256.50" cy="220.50" r="4.50"/>\n <circle cx="268.50" cy="220.50" r="4.50"/>\n <circle cx="280.50" cy="220.50" r="4.50"/>\n <circle cx="292.50" cy="220.50" r="4.50"/>\n <circle cx="304.50" cy="220.50" r="4.50"/>\n <circle cx="52.50" cy="232.50" r="4.50"/>\n <circle cx="64.50" cy="232.50" r="4.50"/>\n <circle cx="76.50" cy="232.50" r="4.50"/>\n <circle cx="88.50" cy="232.50" r="4.50"/>\n <circle cx="100.50" cy="232.50" r="4.50"/>\n <circle cx="196.50" cy="232.50" r="4.50"/>\n <circle cx="208.50" cy="232.50" r="4.50"/>\n <circle cx="220.50" cy="232.50" r="4.50"/>\n <circle cx="256.50" cy="232.50" r="4.50"/>\n <circle cx="268.50" cy="232.50" r="4.50"/>\n <circle cx="280.50" cy="232.50" r="4.50"/>\n <circle cx="292.50" cy="232.50" r="4.50"/>\n <circle cx="304.50" cy="232.50" r="4.50"/>\n <circle cx="52.50" cy="244.50" r="4.50"/>\n <circle cx="64.50" cy="244.50" r="4.50"/>\n <circle cx="76.50" cy="244.50" r="4.50"/>\n <circle cx="88.50" cy="244.50" r="4.50"/>\n <circle cx="100.50" cy="244.50" r="4.50"/>\n <circle cx="184.50" cy="244.50" r="4.50"/>\n <circle cx="196.50" cy="244.50" r="4.50"/>\n <circle cx="208.50" cy="244.50" r="4.50"/>\n <circle cx="256.50" cy="244.50" r="4.50"/>\n <circle cx="268.50" cy="244.50" r="4.50"/>\n <circle cx="280.50" cy="244.50" r="4.50"/>\n <circle cx="292.50" cy="244.50" r="4.50"/>\n <circle cx="304.50" cy="244.50" r="4.50"/>\n <circle cx="52.50" cy="256.50" r="4.50"/>\n <circle cx="64.50" cy="256.50" r="4.50"/>\n <circle cx="76.50" cy="256.50" r="4.50"/>\n <circle cx="88.50" cy="256.50" r="4.50"/>\n <circle cx="100.50" cy="256.50" r="4.50"/>\n <circle cx="172.50" cy="256.50" r="4.50"/>\n <circle cx="184.50" cy="256.50" r="4.50"/>\n <circle cx="196.50" cy="256.50" r="4.50"/>\n <circle cx="208.50" cy="256.50" r="4.50"/>\n <circle cx="256.50" cy="256.50" r="4.50"/>\n <circle cx="268.50" cy="256.50" r="4.50"/>\n <circle cx="280.50" cy="256.50" r="4.50"/>\n <circle cx="292.50" cy="256.50" r="4.50"/>\n <circle cx="304.50" cy="256.50" r="4.50"/>\n <circle cx="52.50" cy="268.50" r="4.50"/>\n <circle cx="64.50" cy="268.50" r="4.50"/>\n <circle cx="76.50" cy="268.50" r="4.50"/>\n <circle cx="88.50" cy="268.50" r="4.50"/>\n <circle cx="100.50" cy="268.50" r="4.50"/>\n <circle cx="160.50" cy="268.50" r="4.50"/>\n <circle cx="172.50" cy="268.50" r="4.50"/>\n <circle cx="184.50" cy="268.50" r="4.50"/>\n <circle cx="196.50" cy="268.50" r="4.50"/>\n <circle cx="256.50" cy="268.50" r="4.50"/>\n <circle cx="268.50" cy="268.50" r="4.50"/>\n <circle cx="280.50" cy="268.50" r="4.50"/>\n <circle cx="292.50" cy="268.50" r="4.50"/>\n <circle cx="304.50" cy="268.50" r="4.50"/>\n <circle cx="52.50" cy="280.50" r="4.50"/>\n <circle cx="64.50" cy="280.50" r="4.50"/>\n <circle cx="76.50" cy="280.50" r="4.50"/>\n <circle cx="88.50" cy="280.50" r="4.50"/>\n <circle cx="100.50" cy="280.50" r="4.50"/>\n <circle cx="160.50" cy="280.50" r="4.50"/>\n <circle cx="172.50" cy="280.50" r="4.50"/>\n <circle cx="184.50" cy="280.50" r="4.50"/>\n <circle cx="196.50" cy="280.50" r="4.50"/>\n <circle cx="208.50" cy="280.50" r="4.50"/>\n <circle cx="256.50" cy="280.50" r="4.50"/>\n <circle cx="268.50" cy="280.50" r="4.50"/>\n <circle cx="280.50" cy="280.50" r="4.50"/>\n <circle cx="292.50" cy="280.50" r="4.50"/>\n <circle cx="304.50" cy="280.50" r="4.50"/>\n <circle cx="52.50" cy="292.50" r="4.50"/>\n <circle cx="64.50" cy="292.50" r="4.50"/>\n <circle cx="76.50" cy="292.50" r="4.50"/>\n <circle cx="88.50" cy="292.50" r="4.50"/>\n <circle cx="100.50" cy="292.50" r="4.50"/>\n <circle cx="160.50" cy="292.50" r="4.50"/>\n <circle cx="172.50" cy="292.50" r="4.50"/>\n <circle cx="184.50" cy="292.50" r="4.50"/>\n <circle cx="196.50" cy="292.50" r="4.50"/>\n <circle cx="208.50" cy="292.50" r="4.50"/>\n <circle cx="220.50" cy="292.50" r="4.50"/>\n <circle cx="232.50" cy="292.50" r="4.50"/>\n <circle cx="244.50" cy="292.50" r="4.50"/>\n <circle cx="256.50" cy="292.50" r="4.50"/>\n <circle cx="268.50" cy="292.50" r="4.50"/>\n <circle cx="280.50" cy="292.50" r="4.50"/>\n <circle cx="292.50" cy="292.50" r="4.50"/>\n <circle cx="304.50" cy="292.50" r="4.50"/>\n <circle cx="52.50" cy="304.50" r="4.50"/>\n <circle cx="64.50" cy="304.50" r="4.50"/>\n <circle cx="76.50" cy="304.50" r="4.50"/>\n <circle cx="88.50" cy="304.50" r="4.50"/>\n <circle cx="100.50" cy="304.50" r="4.50"/>\n <circle cx="160.50" cy="304.50" r="4.50"/>\n <circle cx="172.50" cy="304.50" r="4.50"/>\n <circle cx="184.50" cy="304.50" r="4.50"/>\n <circle cx="196.50" cy="304.50" r="4.50"/>\n <circle cx="208.50" cy="304.50" r="4.50"/>\n <circle cx="220.50" cy="304.50" r="4.50"/>\n <circle cx="232.50" cy="304.50" r="4.50"/>\n <circle cx="256.50" cy="304.50" r="4.50"/>\n <circle cx="268.50" cy="304.50" r="4.50"/>\n <circle cx="280.50" cy="304.50" r="4.50"/>\n <circle cx="292.50" cy="304.50" r="4.50"/>\n <circle cx="304.50" cy="304.50" r="4.50"/>\n <circle cx="316.50" cy="304.50" r="4.50"/>\n <circle cx="328.50" cy="304.50" r="4.50"/>\n <circle cx="28.50" cy="316.50" r="4.50"/>\n <circle cx="40.50" cy="316.50" r="4.50"/>\n <circle cx="52.50" cy="316.50" r="4.50"/>\n <circle cx="64.50" cy="316.50" r="4.50"/>\n <circle cx="76.50" cy="316.50" r="4.50"/>\n <circle cx="88.50" cy="316.50" r="4.50"/>\n <circle cx="100.50" cy="316.50" r="4.50"/>\n <circle cx="112.50" cy="316.50" r="4.50"/>\n <circle cx="124.50" cy="316.50" r="4.50"/>\n <circle cx="172.50" cy="316.50" r="4.50"/>\n <circle cx="184.50" cy="316.50" r="4.50"/>\n <circle cx="196.50" cy="316.50" r="4.50"/>\n <circle cx="208.50" cy="316.50" r="4.50"/>\n <circle cx="220.50" cy="316.50" r="4.50"/>\n <circle cx="268.50" cy="316.50" r="4.50"/>\n <circle cx="280.50" cy="316.50" r="4.50"/>\n <circle cx="292.50" cy="316.50" r="4.50"/>\n <circle cx="304.50" cy="316.50" r="4.50"/>\n <circle cx="316.50" cy="316.50" r="4.50"/>\n </g>\n</svg>\n',gemini:'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24">\n <path fill="currentColor" d="M11.04 19.32Q12 21.51 12 24q0-2.49.93-4.68.96-2.19 2.58-3.81t3.81-2.55Q21.51 12 24 12q-2.49 0-4.68-.93a12.3 12.3 0 0 1-3.81-2.58 12.3 12.3 0 0 1-2.58-3.81Q12 2.49 12 0q0 2.49-.96 4.68-.93 2.19-2.55 3.81a12.3 12.3 0 0 1-3.81 2.58Q2.49 12 0 12q2.49 0 4.68.96 2.19.93 3.81 2.55t2.55 3.81"/>\n</svg>\n',"github-copilot-cli":'<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M7.99816 14.2779C12.0678 14.2779 14.9997 11.6274 14.9997 10.9574V9.3189C14.939 8.77306 14.4165 7.82349 13.6074 7.48636C13.5959 7.42498 13.5859 7.36153 13.5756 7.29542C13.5506 7.13548 13.5231 6.95977 13.4649 6.75954C13.6409 6.31508 13.6873 5.81187 13.6873 5.31135C13.6873 4.54947 13.5757 3.76321 13.0811 3.13712C12.5745 2.4959 11.7737 2.15372 10.6972 2.03411C9.64215 1.91688 8.71828 2.06409 8.12157 2.70342C8.07827 2.74981 8.0345 2.79812 7.99655 2.84746C7.95861 2.79812 7.91805 2.74981 7.87475 2.70342C7.27804 2.06409 6.35416 1.91688 5.29908 2.03411C4.22263 2.15372 3.42181 2.4959 2.91521 3.13712C2.42057 3.76321 2.30905 4.54947 2.30905 5.31135C2.30905 5.81187 2.35539 6.31508 2.53142 6.75954C2.47323 6.95977 2.44574 7.13542 2.42072 7.29536C2.41037 7.3615 2.40044 7.42496 2.38893 7.48636C1.57983 7.82349 1.05728 8.77306 0.996582 9.3189V10.9574C0.996582 11.6274 3.92849 14.2779 7.99816 14.2779ZM10.5523 3.33859C9.63863 3.23707 9.25001 3.41798 9.0811 3.59896C8.90273 3.79007 8.76738 4.19254 8.86971 5.0112C8.94909 5.64627 9.13423 6.08757 9.41018 6.36929C9.67188 6.63645 10.0966 6.8426 10.8435 6.8426C11.6506 6.8426 11.9631 6.66867 12.1051 6.51046C12.2619 6.33577 12.3748 6.00462 12.3748 5.31135C12.3748 4.64141 12.2675 4.22455 12.0513 3.95077C11.8469 3.69214 11.4446 3.43773 10.5523 3.33859ZM6.91639 3.59896C6.74748 3.41798 6.35886 3.23707 5.44518 3.33859C4.55289 3.43773 4.15058 3.69214 3.94624 3.95077C3.72994 4.22455 3.62271 4.64141 3.62271 5.31135C3.62271 6.00462 3.73563 6.33577 3.89239 6.51046C4.03436 6.66867 4.34693 6.8426 5.15396 6.8426C5.90092 6.8426 6.32561 6.63645 6.58731 6.36929C6.86326 6.08757 7.0484 5.64627 7.12778 5.0112C7.23011 4.19254 7.09476 3.79007 6.91639 3.59896ZM7.99818 12.9788C9.99307 12.9788 12.0088 12.0076 12.3748 11.7248V8.00133L12.3546 7.90026C11.9257 8.08369 11.4142 8.1551 10.8435 8.1551C9.84049 8.1551 9.04148 7.86851 8.47257 7.28773C8.28092 7.09208 8.12536 6.87308 7.99978 6.6378C7.8742 6.87308 7.71544 7.09208 7.52378 7.28773C6.95488 7.86851 6.15587 8.1551 5.15283 8.1551C4.58212 8.1551 4.07068 8.08369 3.6418 7.90026L3.62158 8.00133V11.7248C3.98755 12.0076 6.00329 12.9788 7.99818 12.9788Z" fill="currentColor"/>\n<path d="M6.46854 9.0301C6.83097 9.0301 7.12479 9.32391 7.12479 9.68635V10.9988C7.12479 11.3613 6.83097 11.6551 6.46854 11.6551C6.1061 11.6551 5.81229 11.3613 5.81229 10.9988V9.68635C5.81229 9.32391 6.1061 9.0301 6.46854 9.0301Z" fill="currentColor"/>\n<path d="M10.1873 9.68635C10.1873 9.32391 9.89347 9.0301 9.53104 9.0301C9.1686 9.0301 8.87479 9.32391 8.87479 9.68635V10.9988C8.87479 11.3613 9.1686 11.6551 9.53104 11.6551C9.89347 11.6551 10.1873 11.3613 10.1873 10.9988V9.68635Z" fill="currentColor"/>\n</svg>\n',"glm-acp-agent":'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="currentColor" fill-rule="evenodd"><title>Z.ai</title><path d="M8.07 1.333L6.618 3.302H.435L1.887 1.333h6.184zM15.503 12.699L14.052 14.667h-6.161l1.449-1.968h6.163zM16 1.333L6.176 14.667H0L9.824 1.333H16z"/></svg>\n',goose:'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24">\n <path fill="currentColor" d="M20.9093 19.3861L19.5185 18.2413C18.7624 17.619 18.1189 16.8713 17.6157 16.0313C16.9205 14.8706 15.9599 13.8912 14.8133 13.1735L14.2533 12.8475C14.0614 12.7141 13.9276 12.5062 13.9086 12.2716C13.8963 12.1204 13.9326 11.9852 14.0171 11.8662C14.3087 11.4553 15.896 9.74698 16.1722 9.51845C16.528 9.22442 16.9243 8.97987 17.2921 8.69986C17.3443 8.66 17.3968 8.62035 17.4485 8.57989C17.4503 8.57808 17.4529 8.57668 17.4545 8.57508C17.5725 8.48195 17.6838 8.383 17.7724 8.26563C18.2036 7.76631 18.195 7.3443 18.195 7.3443C18.195 7.3443 18.1954 7.3439 18.1956 7.3437C18.1497 7.23133 17.9847 6.88163 17.6492 6.71759C17.9458 6.71178 18.2805 6.82294 18.4323 6.97156C18.6148 6.68534 18.7328 6.49967 18.9162 6.18762C18.9599 6.11352 18.9831 5.97652 18.8996 5.89981C18.8996 5.89981 18.8992 5.89981 18.8988 5.89981C18.8988 5.89981 18.8988 5.8994 18.8988 5.899C18.8972 5.8974 18.8952 5.8962 18.8936 5.8946C18.892 5.893 18.891 5.89119 18.8892 5.88939C18.8892 5.88939 18.8888 5.88939 18.8884 5.88939C18.8884 5.88939 18.8884 5.88899 18.8884 5.88859C18.885 5.88518 18.8812 5.88258 18.8776 5.87938C18.8754 5.87717 18.8736 5.87457 18.8716 5.87217C18.8692 5.87016 18.8665 5.86836 18.8643 5.86616C18.8609 5.86275 18.8587 5.85855 18.8551 5.85534C18.8551 5.85534 18.8545 5.85514 18.8543 5.85534C18.8543 5.85534 18.8543 5.85494 18.8543 5.85454C18.8527 5.85294 18.8507 5.85174 18.8491 5.85013C18.8475 5.84853 18.8463 5.84653 18.8447 5.84493C18.8447 5.84493 18.8441 5.84473 18.8439 5.84493C18.8439 5.84493 18.8439 5.84453 18.8439 5.84413C18.7672 5.7606 18.6302 5.78384 18.5561 5.8275C18.1503 6.06625 17.7555 6.32322 17.3996 6.54855C17.3996 6.54855 16.9778 6.53973 16.4783 6.97116C16.3607 7.05989 16.2618 7.17125 16.1688 7.28902C16.167 7.29082 16.1654 7.29322 16.164 7.29503C16.1234 7.3465 16.0837 7.39898 16.0441 7.45145C15.7639 7.81939 15.5195 8.21556 15.2255 8.57128C14.9971 8.84768 13.2887 10.4348 12.8777 10.7264C12.7587 10.8109 12.6237 10.8474 12.4723 10.835C12.2379 10.8161 12.0298 10.6821 11.8965 10.4903L11.5704 9.93024C10.8527 8.78318 9.87332 7.82299 8.71264 7.12778C7.87262 6.62466 7.12514 5.98092 6.50264 5.22503L5.35778 3.83421C5.3013 3.76571 5.19314 3.77693 5.15268 3.85585C5.02249 4.10941 4.77393 4.64479 4.58346 5.36483C4.57885 5.38186 4.58286 5.39988 4.59407 5.4135C4.83082 5.69952 5.37901 6.32983 6.03196 6.863C6.07742 6.90005 6.04017 6.97336 5.98369 6.95774C5.42047 6.80432 4.87288 6.55796 4.46308 6.34805C4.42964 6.33103 4.38918 6.35226 4.38437 6.38951C4.32068 6.89985 4.30425 7.46027 4.37155 8.05112C4.37355 8.07035 4.38577 8.08697 4.4036 8.09479C4.87088 8.29808 5.61816 8.59311 6.40269 8.78078C6.45958 8.7944 6.45777 8.87632 6.40029 8.88733C5.78941 9.0023 5.14968 9.02794 4.62973 9.02113C4.59327 9.02073 4.56643 9.05518 4.57625 9.09023C4.6806 9.45896 4.822 9.8339 5.00847 10.2115C5.08559 10.3811 5.16951 10.5475 5.25944 10.7104C5.27486 10.7382 5.3047 10.7548 5.33655 10.7534C5.76577 10.7324 6.28452 10.6871 6.80608 10.595C6.89501 10.5794 6.94268 10.6964 6.86757 10.7466C6.51345 10.9834 6.13571 11.1873 5.7844 11.3551C5.73733 11.3777 5.72211 11.4378 5.75315 11.4797C5.96186 11.7625 6.19139 12.0301 6.44075 12.2794C6.44075 12.2794 7.66853 13.5441 7.70198 13.6432C8.41841 12.9096 9.59612 12.0964 10.8966 11.3864C9.15488 12.8036 8.18387 13.8499 7.69517 14.4444L7.35447 14.9225C7.17742 15.1708 7.02379 15.4346 6.89541 15.7112C6.46579 16.6356 5.75756 18.5051 5.75756 18.5051C5.70328 18.6515 5.74754 18.7959 5.84168 18.89C5.84388 18.8922 5.84609 18.8944 5.84849 18.8964C5.85069 18.8986 5.8527 18.901 5.8549 18.9032C5.94924 18.9976 6.09345 19.0416 6.23986 18.9874C6.23986 18.9874 8.10897 18.2791 9.03371 17.8495C9.31031 17.7211 9.57429 17.5673 9.82245 17.3905L10.349 17.0153C10.6278 16.8166 11.0096 16.8483 11.2517 17.0904L12.4655 18.3042C12.7148 18.5535 12.9824 18.7831 13.2652 18.9918C13.3073 19.0226 13.3672 19.0076 13.3898 18.9605C13.5579 18.6094 13.7618 18.2313 13.9983 17.8774C14.0486 17.8022 14.1657 17.8501 14.1499 17.9388C14.0576 18.4606 14.0127 18.9794 13.9915 19.4084C13.9899 19.44 14.0067 19.4701 14.0345 19.4855C14.1972 19.5756 14.3636 19.6595 14.5335 19.7364C14.911 19.9229 15.2862 20.0645 15.6547 20.1687C15.6897 20.1785 15.7242 20.1516 15.7238 20.1152C15.7168 19.595 15.7424 18.9553 15.8576 18.3446C15.8684 18.2869 15.9503 18.2851 15.9641 18.3422C16.1516 19.127 16.4466 19.8742 16.6501 20.3413C16.6579 20.3591 16.6744 20.3712 16.6938 20.3734C17.2847 20.4407 17.8451 20.4242 18.3554 20.3606C18.3929 20.3559 18.4141 20.3155 18.3969 20.2818C18.187 19.872 17.9406 19.3241 17.7872 18.7612C17.7718 18.7046 17.8449 18.6675 17.8819 18.713C18.4151 19.3659 19.0454 19.9141 19.3314 20.1508C19.345 20.1621 19.3633 20.1659 19.3801 20.1615C20.1003 19.9712 20.6357 19.7226 20.8891 19.5922C20.968 19.5518 20.9792 19.4436 20.9107 19.3871L20.9093 19.3861Z"/>\n</svg>\n',grok:'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 1024 1024" fill="none">\n <path fill="currentColor" d="M395.479 633.828L735.91 381.105C752.599 368.715 776.454 373.548 784.406 392.792C826.26 494.285 807.561 616.253 724.288 699.996C641.016 783.739 525.151 802.104 419.247 760.277L303.556 814.143C469.49 928.202 670.987 899.995 796.901 773.282C896.776 672.843 927.708 535.937 898.785 412.476L899.047 412.739C857.105 231.37 909.358 158.874 1016.4 10.6326C1018.93 7.11771 1021.47 3.60279 1024 0L883.144 141.651V141.212L395.392 633.916"/>\n <path fill="currentColor" d="M325.226 695.251C206.128 580.84 226.662 403.776 328.285 301.668C403.431 226.097 526.549 195.254 634.026 240.596L749.454 186.994C728.657 171.88 702.007 155.623 671.424 144.2C533.19 86.9942 367.693 115.465 255.323 228.382C147.234 337.081 113.244 504.215 171.613 646.833C215.216 753.423 143.739 828.818 71.7385 904.916C46.2237 931.893 20.6216 958.87 0 987.429L325.139 695.339"/>\n</svg>\n',junie:'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 40 40" fill="none">\n <path d="M25 15H35V16.75C35 29 30.5001 35 16.5001 35H15V25H16.5001C22.6251 25 25 22.875 25 16.75V15Z" fill="currentColor"/>\n <rect x="5" y="15" width="10" height="10" fill="currentColor"/>\n <rect x="15" y="5" width="10" height="10" fill="currentColor"/>\n</svg>\n',kilo:'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 40 40">\n <path fill="currentColor" d="M27.9998324,34.6666921h6.6666279v5.3333023h-8.3809037l-3.6190266-3.6190266v-8.3809037h5.3333023v6.6666279ZM39.9997627,26.2857884l-3.6190266-3.6190266h-8.3809037v5.3333023h6.6666279v6.6666279h5.3333023v-8.3809037ZM17.3332326,22.6667578h-5.3333023v5.3333023h5.3333023v-5.3333023ZM0,36.3809638l3.6190266,3.6190266h13.714206v-5.3333023H5.3333023v-11.9999302H0v13.714206ZM33.9600959,11.9999247V3.619021L30.3410693-.0000056h-7.6745392v5.3333023h5.9602634v6.6666279h-5.9602634v5.3333023h17.3332326v-5.3333023h-6.0396668ZM5.3333023,0H0v17.3332326h5.3333023v-5.9999651h6.6666279v5.9999651h5.3333023v-5.9999651l-5.3333023-5.3333023h-6.6666279V0ZM17.3332326,0h-5.3333023v5.9999651h5.3333023V0Z"/>\n</svg>\n',kimi:'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24">\n <path fill="currentColor" d="M19.514 7.342C19.711 7.862 19.814 8.413 19.816 8.969C19.816 12.494 15.998 14.697 12.946 12.934C11.529 12.116 10.657 10.605 10.657 8.969C10.657 5.646 14.085 3.431 17.115 4.793C15.26 3.373 12.99 2.607 10.655 2.612C4.772 2.614 0.005 7.381 0 13.265C0.002 19.148 4.772 23.918 10.655 23.92C16.538 23.916 21.306 19.147 21.31 13.265C21.312 11.155 20.687 9.095 19.514 7.342ZM14.841 4.666C14.841 8.191 18.657 10.395 21.709 8.632C23.127 7.814 24 6.302 24 4.666C24 1.14 20.184-1.061 17.13 0.699C15.714 1.519 14.841 3.03 14.841 4.666"/>\n</svg>\n',"minion-code":'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">\n <rect fill="none" stroke="currentColor" stroke-width="1.1" x="4.5" y="2.5" width="7" height="10" rx="3.5"/>\n <line stroke="currentColor" stroke-width="1" x1="3" y1="5.5" x2="13" y2="5.5"/>\n <circle fill="none" stroke="currentColor" stroke-width="1" cx="6.5" cy="5.5" r="1.6"/>\n <circle fill="none" stroke="currentColor" stroke-width="1" cx="9.5" cy="5.5" r="1.6"/>\n <circle fill="currentColor" cx="6.8" cy="5.6" r="0.55"/>\n <circle fill="currentColor" cx="9.8" cy="5.6" r="0.55"/>\n <path fill="none" stroke="currentColor" stroke-width="0.6" stroke-linecap="round" d="M7 8.3 Q8 9 9 8.3"/>\n <path fill="none" stroke="currentColor" stroke-width="0.9" stroke-linecap="round" d="M4.5 8 L3 9.5"/>\n <path fill="none" stroke="currentColor" stroke-width="0.9" stroke-linecap="round" d="M11.5 8 L13 9.5"/>\n <line stroke="currentColor" stroke-width="0.7" x1="5" y1="9.5" x2="11" y2="9.5"/>\n <line stroke="currentColor" stroke-width="0.9" x1="6.5" y1="12.5" x2="6.5" y2="14"/>\n <line stroke="currentColor" stroke-width="0.9" x1="9.5" y1="12.5" x2="9.5" y2="14"/>\n <line stroke="currentColor" stroke-width="0.9" stroke-linecap="round" x1="6.5" y1="14" x2="5.5" y2="14"/>\n <line stroke="currentColor" stroke-width="0.9" stroke-linecap="round" x1="9.5" y1="14" x2="10.5" y2="14"/>\n <line stroke="currentColor" stroke-width="0.7" stroke-linecap="round" x1="8" y1="2.5" x2="7.3" y2="0.8"/>\n <line stroke="currentColor" stroke-width="0.7" stroke-linecap="round" x1="8" y1="2.5" x2="8" y2="0.5"/>\n <line stroke="currentColor" stroke-width="0.7" stroke-linecap="round" x1="8" y1="2.5" x2="8.7" y2="0.8"/>\n</svg>\n',"mistral-vibe":'<svg width="16" height="16" viewBox="0 0 28 28" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M8.8147 5.35803H5.35791V8.46914H8.8147V5.35803Z" fill="currentColor"/>\n<path d="M22.6419 5.35803H19.1851V8.46914H22.6419V5.35803Z" fill="currentColor"/>\n<path d="M15.7283 15.7284H12.2715V18.8395H15.7283V15.7284Z" fill="currentColor"/>\n<path d="M8.8147 15.7284H5.35791V18.8395H8.8147V15.7284Z" fill="currentColor"/>\n<path d="M22.6419 15.7284H19.1851V18.8395H22.6419V15.7284Z" fill="currentColor"/>\n<path d="M12.2715 8.81482H5.35791V11.9259H12.2715V8.81482Z" fill="currentColor"/>\n<path d="M12.2718 19.1852H1.90137V22.2963H12.2718V19.1852Z" fill="currentColor"/>\n<path d="M26.0989 19.1852H15.7285V22.2963H26.0989V19.1852Z" fill="currentColor"/>\n<path d="M22.6419 12.2716H5.35791V15.3827H22.6419V12.2716Z" fill="currentColor"/>\n<path d="M22.6421 8.81482H15.7285V11.9259H22.6421V8.81482Z" fill="currentColor"/>\n</svg>\n',nova:'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">\n <circle cx="8" cy="8" r="6" fill="none" stroke="currentColor" stroke-width="1"/>\n <circle cx="8" cy="8" r="4.5" fill="none" stroke="currentColor" stroke-width="0.3" opacity="0.5"/>\n <line x1="8" y1="8" x2="13.5" y2="13.5" stroke="currentColor" stroke-width="1.3" stroke-linecap="round"/>\n <polygon points="14.5,14.5 12.3,13.5 13.5,12.3" fill="currentColor"/>\n <line x1="8" y1="8" x2="2.5" y2="2.5" stroke="currentColor" stroke-width="1.3" stroke-linecap="round"/>\n <polygon points="1.5,1.5 3.7,2.5 2.5,3.7" fill="currentColor"/>\n <circle cx="8" cy="8" r="1.3" fill="currentColor"/>\n <circle cx="8" cy="8" r="0.6" fill="none" stroke="currentColor" stroke-width="0.5" opacity="0.7"/>\n</svg>\n',opencode:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M13 14H3V2H13V14ZM10.5 4.4H5.5V11.6H10.5V4.4Z" fill="currentColor"/>\n</svg>\n',"pi-acp":'<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M1 1H11.7692V7.9999H8.17942V11.4999H4.58982V15H1V1ZM4.58982 4.50005V7.9999H8.17942V4.50005H4.58982Z" fill="currentColor"/>\n<path d="M11.7692 7.46154H15V15H11.7692V7.46154Z" fill="currentColor"/>\n</svg>\n',poolside:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M2.63653 5.50522L2.18735 5.28559C2.09852 5.46726 2.12787 5.68456 2.26172 5.83616C2.39558 5.98775 2.60757 6.04379 2.79884 5.97814L2.63653 5.50522ZM5.83578 6.94285L5.3732 7.13265L5.5645 7.59886L6.02919 7.40392L5.83578 6.94285ZM10.7441 9.44034L10.2614 9.57083L10.393 10.0573L10.8784 9.92198L10.7441 9.44034ZM2.5 8.24963C2.4998 7.97349 2.27577 7.74979 1.99963 7.75C1.72349 7.75021 1.4998 7.97423 1.5 8.25037L2.5 8.24963ZM13.4143 10.7751C12.0197 13.6273 8.57701 14.8089 5.72485 13.4143L5.28559 14.3126C8.63389 15.9498 12.6754 14.5627 14.3126 11.2144L13.4143 10.7751ZM3.08571 5.72485C4.48031 2.87269 7.92299 1.69111 10.7751 3.08571L11.2144 2.18735C7.86611 0.550151 3.82455 1.93728 2.18735 5.28559L3.08571 5.72485ZM10.7751 3.08571C13.6273 4.48031 14.8089 7.92299 13.4143 10.7751L14.3126 11.2144C15.9498 7.86611 14.5627 3.82455 11.2144 2.18735L10.7751 3.08571ZM2.79884 5.97814C3.02201 5.90155 3.54835 5.84926 4.09141 6.00587C4.61256 6.15616 5.10736 6.48476 5.3732 7.13265L6.29835 6.75304C5.89213 5.76303 5.11508 5.26032 4.3685 5.04503C3.64385 4.83605 2.9066 4.8839 2.47422 5.0323L2.79884 5.97814ZM6.02919 7.40392C6.25314 7.30998 6.55771 7.25841 6.85281 7.36034C7.13062 7.45631 7.49214 7.72014 7.78743 8.4398L8.71257 8.0602C8.3358 7.14195 7.79046 6.62626 7.17931 6.41515C6.58544 6.21001 6.01893 6.32381 5.64236 6.48177L6.02919 7.40392ZM6.26827 7.19375C6.80493 6.26869 8.18817 4.18684 11.1653 3.10654L10.8242 2.16652C7.53166 3.36127 5.99463 5.67263 5.40329 6.69195L6.26827 7.19375ZM14.3364 10.8325C14.1845 10.39 13.7564 9.79897 13.14 9.37995C12.504 8.94759 11.6302 8.67426 10.6099 8.9587L10.8784 9.92198C11.5634 9.73102 12.1368 9.90713 12.5779 10.207C13.0385 10.5201 13.3174 10.9441 13.3905 11.1571L14.3364 10.8325ZM11.2268 9.30984C11.1236 8.92833 10.8783 8.39265 10.3638 8.02453C9.82769 7.6409 9.08331 7.49864 8.11574 7.76836L8.38426 8.73164C9.1221 8.52595 9.53979 8.66454 9.78189 8.83777C10.0457 9.02651 10.1946 9.32371 10.2614 9.57083L11.2268 9.30984ZM11.216 9.60556C11.6225 8.44463 12.4244 5.47936 11.4712 2.48487L10.5183 2.78819C11.3726 5.47172 10.6545 8.18331 10.2722 9.27512L11.216 9.60556ZM7.80082 8.03037L5.05604 13.6438L5.9544 14.0831L8.69918 8.46963L7.80082 8.03037ZM5.72485 13.4143C3.68742 12.4181 2.50158 10.3763 2.5 8.24963L1.5 8.25037C1.50185 10.7441 2.89229 13.1424 5.28559 14.3126L5.72485 13.4143Z" fill="currentColor"/>\n</svg>\n',qoder:'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">\n <path fill="currentColor" d="M8 1C4.134 1 1 4.134 1 8s3.134 7 7 7c1.5 0 2.9-.47 4.05-1.28l1.12 1.12a.75.75 0 1 0 1.06-1.06l-1.12-1.12A6.97 6.97 0 0 0 15 8c0-3.866-3.134-7-7-7Zm0 2c2.761 0 5 2.239 5 5s-2.239 5-5 5-5-2.239-5-5 2.239-5 5-5Z"/>\n</svg>\n',"qwen-code":'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 141.38 140" width="16" height="16"><path fill="currentColor" d="m140.93 85-16.35-28.33-1.93-3.34 8.66-15a3.323 3.323 0 0 0 0-3.34l-9.62-16.67c-.3-.51-.72-.93-1.22-1.22s-1.07-.45-1.67-.45H82.23l-8.66-15a3.33 3.33 0 0 0-2.89-1.67H51.43c-.59 0-1.17.16-1.66.45-.5.29-.92.71-1.22 1.22L32.19 29.98l-1.92 3.33H12.96c-.59 0-1.17.16-1.66.45-.5.29-.93.71-1.22 1.22L.45 51.66a3.323 3.323 0 0 0 0 3.34l18.28 31.67-8.66 15a3.32 3.32 0 0 0 0 3.34l9.62 16.67c.3.51.72.93 1.22 1.22s1.07.45 1.67.45h36.56l8.66 15a3.35 3.35 0 0 0 2.89 1.67h19.25a3.34 3.34 0 0 0 2.89-1.67l18.28-31.67h17.32c.6 0 1.17-.16 1.67-.45s.92-.71 1.22-1.22l9.62-16.67a3.323 3.323 0 0 0 0-3.34ZM51.44 3.33 61.07 20l-9.63 16.66h76.98l-9.62 16.66H45.67l-11.54-20zM57.21 120H22.58l9.63-16.67h19.25l-38.5-66.67h19.25l9.62 16.67L68.78 100l-11.55 20Zm61.59-33.34-9.62-16.67-38.49 66.67-9.63-16.67 9.63-16.66 26.94-46.67h23.1l17.32 30z"/></svg>\n',sigit:'<?xml version="1.0" standalone="no" ?>\n<svg\n version="1.0"\n xmlns="http://www.w3.org/2000/svg"\n width="16"\n height="16"\n viewBox="0 0 1024 1024"\n preserveAspectRatio="xMidYMid meet"\n>\n\n<g\n transform="translate(0,1024) scale(0.1,-0.1)"\n fill="currentColor"\n stroke="none"\n >\n<path\n d="M6428 6358 c-104 -8 -227 -38 -314 -78 -73 -33 -196 -115 -239 -160\n-18 -19 -39 -30 -56 -30 -26 0 -27 1 -18 32 5 18 9 52 9 76 0 34 -6 49 -34 80\nl-34 37 -319 3 c-412 3 -383 18 -447 -236 -20 -78 -36 -154 -36 -168 0 -14 -5\n-35 -12 -47 -6 -12 -21 -60 -33 -107 l-22 -85 -22 43 c-47 91 -179 184 -310\n218 -146 37 -375 34 -536 -7 -203 -51 -365 -175 -443 -339 -68 -143 -109 -304\n-114 -445 l-2 -70 -127 5 c-70 3 -125 2 -123 -1 5 -8 -27 -21 -34 -14 -3 3 0\n5 7 5 7 0 9 5 6 10 -4 6 -11 8 -16 5 -5 -4 -15 -3 -21 2 -7 4 -17 8 -23 8 -5\n0 -10 7 -10 15 0 13 -142 15 -1205 18 -663 1 -1212 -1 -1220 -5 -8 -3 -19 -5\n-25 -4 -5 1 1 -8 15 -21 13 -13 29 -22 34 -20 5 2 3 -4 -4 -14 -13 -15 -15\n-14 -24 5 -5 13 -15 20 -24 16 -7 -3 -157 -5 -333 -5 l-319 0 0 -2540 0 -2540\n5120 0 5120 0 0 2540 0 2540 -685 1 c-377 1 -689 2 -694 3 -16 2 -25 16 -10\n16 11 0 11 2 -1 10 -8 5 -10 10 -4 10 5 0 16 -6 23 -12 11 -10 13 -10 7 0 -5\n8 1 12 18 12 14 0 27 -1 29 -2 1 -2 13 7 27 20 13 12 30 22 37 22 8 0 11 5 8\n10 -3 6 -2 10 2 10 5 0 9 8 9 18 1 9 18 82 38 161 20 79 36 158 36 176 0 42\n-38 97 -75 109 -17 6 -31 11 -32 11 -1 1 5 23 13 50 20 68 20 137 -2 169 -27\n43 -64 56 -155 56 -73 0 -80 2 -74 18 4 9 9 42 12 72 3 44 0 62 -17 88 -38 61\n-57 63 -396 60 l-304 -3 0 38 c0 29 -8 46 -34 75 l-34 37 -313 3 c-215 2 -321\n-1 -340 -8 -50 -21 -68 -52 -100 -177 l-31 -121 -28 16 c-16 9 -35 30 -43 47\n-23 48 -102 130 -168 174 -132 88 -315 126 -531 109z m296 -148 c43 -11 101\n-32 129 -47 67 -37 145 -115 170 -172 41 -92 33 -253 -25 -493 l-21 -88 -275\n0 -274 0 4 23 c3 12 22 91 42 175 25 102 36 170 34 205 -3 51 -4 52 -39 61\n-57 14 -98 -15 -128 -89 -36 -89 -321 -1238 -328 -1321 -5 -66 -4 -72 18 -88\n54 -38 118 -7 159 78 28 58 122 403 113 419 -2 4 -27 7 -54 7 -43 0 -50 3 -46\n18 3 9 20 79 38 154 l33 137 75 7 c79 7 558 1 566 -8 3 -3 -58 -260 -136 -572\nl-141 -566 -174 0 -174 0 0 29 c0 15 -3 49 -6 74 l-7 46 -61 -55 c-33 -30 -94\n-72 -135 -92 -74 -37 -76 -37 -201 -37 -126 0 -126 0 -202 38 -203 100 -254\n266 -179 592 66 287 235 944 271 1050 72 215 132 298 289 403 144 97 262 130\n462 131 95 1 145 -4 203 -19z m-1046 -37 c-3 -10 -18 -71 -33 -135 l-29 -118\n-273 0 c-213 0 -271 3 -268 13 2 6 13 50 25 97 11 46 25 101 31 122 l10 38\n271 0 c253 0 270 -1 266 -17z m2240 0 c-3 -10 -18 -71 -33 -135 l-29 -118\n-273 0 c-213 0 -271 3 -268 13 2 6 13 50 25 97 11 46 25 101 31 122 l10 38\n271 0 c253 0 270 -1 266 -17z m722 -139 c0 -3 -13 -59 -30 -124 -16 -65 -30\n-126 -30 -134 0 -13 13 -16 65 -16 45 0 65 -4 65 -12 0 -13 -31 -146 -51 -220\nl-10 -38 -72 0 -73 0 -132 -532 c-73 -293 -132 -552 -132 -574 0 -47 11 -54\n93 -54 26 0 47 -3 47 -7 0 -5 -15 -66 -33 -138 l-33 -130 -165 -3 c-326 -6\n-421 26 -459 155 -17 55 2 146 155 761 69 277 125 508 125 513 0 5 -25 9 -55\n9 l-55 0 7 28 c3 15 18 74 33 132 l26 105 59 5 59 5 34 138 34 137 264 0 c145\n0 264 -3 264 -6z m-4147 -223 c137 -36 218 -93 257 -183 27 -63 24 -128 -12\n-278 l-24 -95 -232 -3 c-143 -1 -232 1 -232 7 0 5 9 47 20 93 35 145 26 178\n-49 178 -65 0 -117 -79 -128 -195 -9 -104 10 -126 222 -252 211 -127 273 -191\n290 -305 14 -94 -44 -332 -112 -458 -105 -195 -319 -301 -607 -300 -253 1\n-438 89 -476 225 -17 61 -8 193 21 318 l22 97 234 0 233 0 -5 -22 c-3 -13 -14\n-61 -25 -108 -11 -47 -20 -106 -20 -132 0 -40 4 -50 25 -64 31 -20 85 -12 120\n19 32 28 64 120 72 203 8 82 7 82 -202 224 -178 120 -243 177 -277 242 -72\n138 33 532 175 650 70 59 97 75 175 105 101 38 184 51 328 52 99 1 149 -4 207\n-18z m1087 -20 c0 -7 -408 -1652 -426 -1718 l-6 -23 -269 0 c-173 0 -269 4\n-269 10 0 6 97 399 216 875 l216 865 269 0 c148 0 269 -4 269 -9z m2240 -1 c0\n-5 -97 -397 -215 -871 -118 -474 -215 -863 -215 -865 0 -2 -121 -4 -270 -4\n-174 0 -270 4 -270 10 0 6 97 399 216 875 l216 865 269 0 c166 0 269 -4 269\n-10z m1040 -742 c0 -5 -5 -6 -11 -2 -8 4 -9 -1 -4 -17 4 -13 4 -21 0 -17 -4 4\n-9 21 -11 39 -3 27 -2 30 11 19 8 -7 15 -17 15 -22z m-8192 4 c2 -7 -5 -12\n-15 -11 -12 0 -14 2 -4 6 11 5 11 7 0 15 -12 8 -12 9 0 6 8 -3 17 -10 19 -16z\nm1840 -1329 c-311 -2 -824 -2 -1140 0 -315 1 -60 2 567 2 627 0 885 -1 573 -2z\nm619 1 c-3 -3 -12 -4 -19 -1 -8 3 -5 6 6 6 11 1 17 -2 13 -5z"\n />\n<path\n d="M900 6270 c0 -11 6 -20 14 -20 7 0 16 -9 19 -20 5 -20 12 -20 1803\n-18 1731 3 1799 4 1802 21 3 12 -4 20 -17 24 -12 3 -21 12 -21 19 0 12 -274\n14 -1800 14 -1793 0 -1800 0 -1800 -20z"\n />\n<path\n d="M900 6005 c0 -15 6 -25 14 -25 7 0 16 -9 19 -20 5 -20 12 -20 1334\n-18 l1328 3 3 23 c3 17 -2 22 -17 22 -14 0 -21 6 -21 20 0 20 -7 20 -1330 20\nl-1330 0 0 -25z"\n />\n<path\n d="M737 5713 c-12 -12 -7 -43 7 -43 7 0 16 -9 19 -20 5 -20 12 -20 1323\n-18 1248 3 1319 4 1322 21 2 9 -4 20 -14 24 -10 3 -26 15 -35 24 -17 17 -83\n18 -1317 19 -714 0 -1302 -3 -1305 -7z"\n />\n<path\n d="M1953 5412 c-1265 -2 -1273 -2 -1273 -22 0 -11 6 -20 14 -20 7 0 16\n-9 19 -20 5 -20 12 -20 1298 -18 1242 3 1294 4 1297 21 3 12 -4 20 -17 24 -12\n3 -21 11 -21 18 0 7 -10 14 -22 16 -13 2 -596 3 -1295 1z"\n />\n<path d="M9010 5130 c-12 -7 -10 -9 7 -7 12 0 19 5 17 9 -6 10 -6 10 -24 -2z" />\n<path\n d="M3180 5109 c0 -5 5 -7 10 -4 6 3 10 8 10 11 0 2 -4 4 -10 4 -5 0 -10\n-5 -10 -11z"\n />\n</g>\n</svg>\n',stakpak:'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">\n <path fill="currentColor" d="M6.53 4.412h5.883v3.587H9.471v3.588H3.588V7.999H6.53Z"/>\n</svg>\n',traecli:'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="currentColor">\n <path fill-rule="evenodd" d="M2.4 4.8H21.6V19.2H2.4Z M5.92 7.52H19.2V15.36H5.92Z M10.08 9.6 11.92 11.44 10.08 13.28 8.24 11.44Z M15.04 9.6 16.88 11.44 15.04 13.28 13.2 11.44Z"/>\n</svg>\n',vtcode:'<svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">\n <path d="M0.5 5.5L2.5 8 0.5 10.5" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n <text x="3.2" y="11.5" font-family="\'SF Mono\', \'Fira Code\', \'Consolas\', monospace" font-size="10" font-weight="600" letter-spacing="-0.5" fill="currentColor">VT</text>\n</svg>\n'}},4005,[]);
15661
15661
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.resolveProviderIconName=function(n){if(t.has(n))return{kind:"builtin",id:n};if(o.has(n))return{kind:"catalog",id:n};return{kind:"bot"}};var n=r(d[0]);const t=new Set(n.BUILTIN_PROVIDER_ICON_NAMES),o=new Set(n.KNOWN_PROVIDER_ICON_NAMES)},4006,[4007]);
15662
15662
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"BUILTIN_PROVIDER_ICON_NAMES",{enumerable:!0,get:function(){return o}}),Object.defineProperty(e,"ACP_PROVIDER_ICON_NAMES",{enumerable:!0,get:function(){return t}}),Object.defineProperty(e,"TERMINAL_PROFILE_ICON_NAMES",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"KNOWN_PROVIDER_ICON_NAMES",{enumerable:!0,get:function(){return c}});const o=["claude","codex","copilot","kiro","minimax","omp","opencode","pi"],t=["agoragentic-acp","amp-acp","auggie","autohand","cline","codebuddy-code","codewhale","cortex-code","corust-agent","crow-cli","cursor","deepagents","dimcode","dirac","factory-droid","fast-agent","gemini","glm-acp-agent","goose","grok","junie","kilo","kimi","minion-code","mistral-vibe","nova","poolside","qoder","qwen-code","sigit","stakpak","traecli","vtcode"],n=["agy"],c=[...o,...t,...n]},4007,[]);
@@ -15740,7 +15740,7 @@ __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{v
15740
15740
  __d(function(g,r,i,_a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.filterAndRankCommandAutocompleteEntries=function(o,c){const s=c.trim().toLowerCase();if(0===s.length)return[...o];const a=[];for(const t of o){const o=n(t,s);o&&a.push({entry:t,score:o})}return a.sort((n,o)=>{const c=(0,t.compareMatchScores)(n.score,o.score);return 0!==c?c:n.entry.command.name.localeCompare(o.entry.command.name)}),a.map(t=>t.entry)},e.filterInlineSkillCommandEntries=function(t){return t.filter(t=>"provider"===t.source&&"skill"===t.command.kind)},e.findActiveSlashCommand=function(t){const n=Math.max(0,Math.min(t.cursorIndex,t.text.length)),c=t.text.slice(0,n);for(let s=c.lastIndexOf("/");s>=0;s=0===s?-1:c.lastIndexOf("/",s-1)){const a=s>0?t.text[s-1]:"";if(a&&!/\s/.test(a))continue;const l=c.slice(s+1);if(!o.test(l))return{start:s,end:n,query:l,position:0===s?"start":"inline"}}return null},e.applySlashCommandReplacement=function(t){const n=t.text.slice(0,t.command.start),o=t.text.slice(t.command.end),c=`${n}/${t.commandName}${o}`;return t.command.end===t.text.length?`${c} `:c};var t=r(d[0]);function n(n,o){return(0,t.scoreTextFields)(o,[n.command.name,...n.command.aliases??[]])}const o=/[/\s\n\r\t"']/},4085,[3536]);
15741
15741
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.findActiveFileMention=function(n){const l=Math.max(0,Math.min(n.cursorIndex,n.text.length)),o=n.text.slice(0,l);for(let n=o.lastIndexOf("@");n>=0;n=0===n?-1:o.lastIndexOf("@",n-1)){const c=o.slice(n+1);if(!t.test(c))return{start:n,end:l,query:c}}return null},e.formatQuotedFileMentionPath=n,e.applyFileMentionReplacement=function(t){const l=t.text.slice(0,t.mention.start),o=t.text.slice(t.mention.end);return`${l}${n(t.relativePath)}${o}`};const t=/[\s\n\r\t"']/;function n(t){return`"${t.replace(/"/g,'\\"')}"`}},4086,[]);
15742
15742
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.submitAgentInput=async function(s){const n=s.message.trim(),o=s.attachments,u="preserve-and-lock"!==s.submitBehavior;if(!n&&0===o.length&&!s.hasExternalContent&&!s.allowEmptySubmit)return"noop";if(!s.canSubmit)return"noop";if(s.isAgentRunning&&!s.forceSend)return s.queueMessage({message:n,attachments:o}),u&&(s.setUserInput(""),s.setAttachments([])),"queued";u&&(s.setUserInput(""),s.setAttachments([]));s.setSendError(null),s.setIsProcessing(!0);try{return await s.submitMessage({message:n,attachments:o}),s.clearDraft("sent"),s.setIsProcessing(!1),"submitted"}catch(c){return s.onSubmitError?.(c),u&&(s.setUserInput(n),s.setAttachments(o)),s.setSendError(c instanceof Error?c.message:s.failedToSendMessage??t.i18n.t("composer.errors.failedToSend")),s.setIsProcessing(!1),"failed"}};var t=r(d[0])},4087,[3454]);
15743
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"composerWorkspaceAttachment",{enumerable:!0,get:function(){return k}});var t=r(d[0]),n=r(d[1]),c=r(d[2]),o=r(d[3]),s=r(d[4]),l=r(d[5]),h=r(d[6]),u=r(d[7]),p=r(d[8]);function A(t,n){return"browser_element"===t.kind?n("composer.attachments.openBrowserElement"):(0,l.isPullRequestContextAttachment)(t)?"Open context attachment":"chat_history"===t.kind?"Open chat history attachment":n("composer.attachments.openReview")}function b(t,n){return"browser_element"===t.kind?n("composer.attachments.removeBrowserElement"):(0,l.isPullRequestContextAttachment)(t)?"Remove context attachment":"chat_history"===t.kind?"Remove chat history attachment":n("composer.attachments.removeReview")}function f(t){return"chat_history"===t.kind?"composer-chat-history-attachment-pill":"composer-review-attachment-pill"}function y(n){const l=(0,t.c)(29),{attachment:h,index:u,disabled:y,onOpen:k,onRemove:v}=n,{t:_}=(0,c.useTranslation)();let w;l[0]!==h||l[1]!==_?(w=(0,o.getWorkspaceAttachmentPillContent)(h,_),l[0]=h,l[1]=_,l[2]=w):w=l[2];const x=w;let O;l[3]!==h||l[4]!==k?(O=()=>{k(h)},l[3]=h,l[4]=k,l[5]=O):O=l[5];const S=O;let R;l[6]!==u||l[7]!==v?(R=()=>{v(u)},l[6]=u,l[7]=v,l[8]=R):R=l[8];const P=R;let W,j,C,K,q;return l[9]!==h?(W=f(h),l[9]=h,l[10]=W):W=l[10],l[11]!==h||l[12]!==_?(j=A(h,_),l[11]=h,l[12]=_,l[13]=j):j=l[13],l[14]!==h||l[15]!==_?(C=b(h,_),l[14]=h,l[15]=_,l[16]=C):C=l[16],l[17]!==x.icon||l[18]!==x.subtitle||l[19]!==x.title?(K=(0,p.jsx)(s.AttachmentLabel,{icon:x.icon,title:x.title,subtitle:x.subtitle}),l[17]=x.icon,l[18]=x.subtitle,l[19]=x.title,l[20]=K):K=l[20],l[21]!==y||l[22]!==S||l[23]!==P||l[24]!==W||l[25]!==j||l[26]!==C||l[27]!==K?(q=(0,p.jsx)(s.AttachmentPill,{testID:W,onOpen:S,onRemove:P,openAccessibilityLabel:j,removeAccessibilityLabel:C,disabled:y,children:K}),l[21]=y,l[22]=S,l[23]=P,l[24]=W,l[25]=j,l[26]=C,l[27]=K,l[28]=q):q=l[28],q}const k={is:l.isWorkspaceAttachment,renderPill:function(t){return(0,p.jsx)(y,Object.assign({},t,{attachment:t.attachment}),`workspace:${(0,h.getAttachmentKey)(t.attachment)}`)},toSubmitAttachment:l.workspaceAttachmentToSubmitAttachment,userAttachmentsOnly:l.userAttachmentsOnly,useBinding:function(c){const o=(0,t.c)(33),{normalAttachments:s,workspaceAttachments:p,onOpenWorkspaceAttachment:A}=c,b=(0,u.useClearReviewDraft)();let f;o[0]===Symbol.for("react.memo_cache_sentinel")?(f=[],o[0]=f):f=o[0];const[y,k]=(0,n.useState)(f);let v;o[1]!==p?(v=p.map(h.getAttachmentKey),o[1]=p,o[2]=v):v=o[2];const _=v;let w;if(o[3]!==y||o[4]!==_||o[5]!==p){let t;o[7]!==y||o[8]!==_?(t=(t,n)=>!y.includes(_[n]??""),o[7]=y,o[8]=_,o[9]=t):t=o[9],w=p.filter(t),o[3]=y,o[4]=_,o[5]=p,o[6]=w}else w=o[6];const x=w;let O;o[10]!==x||o[11]!==s?(O=x.length>0?[...s,...x]:s,o[10]=x,o[11]=s,o[12]=O):O=o[12];const S=O;let R,P,W;o[13]!==_?(R=()=>{k(t=>{const n=t.filter(t=>_.includes(t));return n.length===t.length?t:n})},P=[_],o[13]=_,o[14]=R,o[15]=P):(R=o[14],P=o[15]),(0,n.useEffect)(R,P),o[16]!==x?(W=t=>x.length>0?[...t,...x]:t,o[16]=x,o[17]=W):W=o[17];const j=W;let C;o[18]===Symbol.for("react.memo_cache_sentinel")?(C=t=>{const n=(0,h.getAttachmentKey)(t);k(t=>t.includes(n)?t:[...t,n])},o[18]=C):C=o[18];const K=C;let q;o[19]!==b?(q=t=>{for(const n of t)"review"===n.kind&&b({key:n.reviewDraftKey});(0,h.removeSentContextAttachments)(t)},o[19]=b,o[20]=q):q=o[20];const B=q;let D;o[21]===Symbol.for("react.memo_cache_sentinel")?(D=t=>{const{selectedAttachments:n,index:c}=t,o=n[c];if((0,l.isWorkspaceAttachment)(o)){if("browser_element"===o.kind||"chat_history"===o.kind||(0,l.isPullRequestContextAttachment)(o)){const t=(0,h.getAttachmentKey)(o);return(0,h.removeWorkspaceAttachmentsMatching)(t),!0}return K(o),!0}return!1},o[21]=D):D=o[21];const E=D;let L;o[22]!==A?(L=t=>{const{attachment:n}=t;return!(!(0,l.isWorkspaceAttachment)(n)||"review"!==n.kind)&&(A?.(n),!0)},o[22]=A,o[23]=L):L=o[23];const M=L;let T;o[24]===Symbol.for("react.memo_cache_sentinel")?(T=()=>{k([])},o[24]=T):T=o[24];const I=T;let $;o[25]!==B?($=t=>{const{result:n,outgoingAttachments:c}=t;"submitted"===n&&B(c),"queued"!==n&&"submitted"!==n||I()},o[25]=B,o[26]=$):$=o[26];const z=$;let F;return o[27]!==j||o[28]!==B||o[29]!==z||o[30]!==M||o[31]!==S?(F={selectedAttachments:S,buildOutgoingAttachments:j,removeAttachment:E,openAttachment:M,clearSentAttachments:B,completeSubmit:z,resetSuppression:I},o[27]=j,o[28]=B,o[29]=z,o[30]=M,o[31]=S,o[32]=F):F=o[32],F}}},4088,[349,36,1563,4089,4090,3450,4092,3948,279]);
15743
+ __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"composerWorkspaceAttachment",{enumerable:!0,get:function(){return k}});var t=r(d[0]),n=r(d[1]),c=r(d[2]),o=r(d[3]),s=r(d[4]),l=r(d[5]),h=r(d[6]),u=r(d[7]),p=r(d[8]);function A(t,n){return"browser_element"===t.kind?n("composer.attachments.openBrowserElement"):(0,l.isPullRequestContextAttachment)(t)?"Open context attachment":"chat_history"===t.kind?"Open chat history attachment":n("composer.attachments.openReview")}function b(t,n){return"browser_element"===t.kind?n("composer.attachments.removeBrowserElement"):(0,l.isPullRequestContextAttachment)(t)?"Remove context attachment":"chat_history"===t.kind?"Remove chat history attachment":n("composer.attachments.removeReview")}function f(t){return"chat_history"===t.kind?"composer-chat-history-attachment-pill":"composer-review-attachment-pill"}function y(n){const l=(0,t.c)(29),{attachment:h,index:u,disabled:y,onOpen:k,onRemove:_}=n,{t:v}=(0,c.useTranslation)();let w;l[0]!==h||l[1]!==v?(w=(0,o.getWorkspaceAttachmentPillContent)(h,v),l[0]=h,l[1]=v,l[2]=w):w=l[2];const S=w;let x;l[3]!==h||l[4]!==k?(x=()=>{k(h)},l[3]=h,l[4]=k,l[5]=x):x=l[5];const O=x;let R;l[6]!==u||l[7]!==_?(R=()=>{_(u)},l[6]=u,l[7]=_,l[8]=R):R=l[8];const P=R;let W,j,C,K,q;return l[9]!==h?(W=f(h),l[9]=h,l[10]=W):W=l[10],l[11]!==h||l[12]!==v?(j=A(h,v),l[11]=h,l[12]=v,l[13]=j):j=l[13],l[14]!==h||l[15]!==v?(C=b(h,v),l[14]=h,l[15]=v,l[16]=C):C=l[16],l[17]!==S.icon||l[18]!==S.subtitle||l[19]!==S.title?(K=(0,p.jsx)(s.AttachmentLabel,{icon:S.icon,title:S.title,subtitle:S.subtitle}),l[17]=S.icon,l[18]=S.subtitle,l[19]=S.title,l[20]=K):K=l[20],l[21]!==y||l[22]!==O||l[23]!==P||l[24]!==W||l[25]!==j||l[26]!==C||l[27]!==K?(q=(0,p.jsx)(s.AttachmentPill,{testID:W,onOpen:O,onRemove:P,openAccessibilityLabel:j,removeAccessibilityLabel:C,disabled:y,children:K}),l[21]=y,l[22]=O,l[23]=P,l[24]=W,l[25]=j,l[26]=C,l[27]=K,l[28]=q):q=l[28],q}const k={is:l.isWorkspaceAttachment,renderPill:function(t){return(0,p.jsx)(y,Object.assign({},t,{attachment:t.attachment}),`workspace:${(0,h.getAttachmentKey)(t.attachment)}`)},toSubmitAttachment:l.workspaceAttachmentToSubmitAttachment,userAttachmentsOnly:l.userAttachmentsOnly,useBinding:function(c){const o=(0,t.c)(34),{normalAttachments:s,workspaceAttachments:p,onOpenWorkspaceAttachment:A}=c,b=(0,u.useClearReviewDraft)();let f;o[0]===Symbol.for("react.memo_cache_sentinel")?(f=[],o[0]=f):f=o[0];const[y,k]=(0,n.useState)(f);let _;o[1]!==p?(_=p.map(h.getAttachmentKey),o[1]=p,o[2]=_):_=o[2];const v=_;let w;if(o[3]!==y||o[4]!==v||o[5]!==p){let t;o[7]!==y||o[8]!==v?(t=(t,n)=>!y.includes(v[n]??""),o[7]=y,o[8]=v,o[9]=t):t=o[9],w=p.filter(t),o[3]=y,o[4]=v,o[5]=p,o[6]=w}else w=o[6];const S=w;let x;o[10]!==S||o[11]!==s?(x=S.length>0?[...s,...S]:s,o[10]=S,o[11]=s,o[12]=x):x=o[12];const O=x;let R,P,W;o[13]!==v?(R=()=>{k(t=>{const n=t.filter(t=>v.includes(t));return n.length===t.length?t:n})},P=[v],o[13]=v,o[14]=R,o[15]=P):(R=o[14],P=o[15]),(0,n.useEffect)(R,P),o[16]!==S?(W=t=>S.length>0?[...t,...S]:t,o[16]=S,o[17]=W):W=o[17];const j=W;let C;o[18]===Symbol.for("react.memo_cache_sentinel")?(C=t=>{const n=(0,h.getAttachmentKey)(t);k(t=>t.includes(n)?t:[...t,n])},o[18]=C):C=o[18];const K=C;let q;o[19]!==b?(q=t=>{for(const n of t)"review"===n.kind&&b({key:n.reviewDraftKey});(0,h.removeSentContextAttachments)(t)},o[19]=b,o[20]=q):q=o[20];const B=q;let D;o[21]===Symbol.for("react.memo_cache_sentinel")?(D=t=>{const{selectedAttachments:n,index:c}=t,o=n[c];if((0,l.isWorkspaceAttachment)(o)){if("browser_element"===o.kind||"chat_history"===o.kind||(0,l.isPullRequestContextAttachment)(o)){const t=(0,h.getAttachmentKey)(o);return(0,h.removeWorkspaceAttachmentsMatching)(t),!0}return K(o),!0}return!1},o[21]=D):D=o[21];const E=D;let L;o[22]!==A?(L=t=>{const{attachment:n}=t;return!(!(0,l.isWorkspaceAttachment)(n)||"review"!==n.kind)&&(A?.(n),!0)},o[22]=A,o[23]=L):L=o[23];const M=L;let T;o[24]===Symbol.for("react.memo_cache_sentinel")?(T=()=>{k([])},o[24]=T):T=o[24];const z=T;let I;o[25]===Symbol.for("react.memo_cache_sentinel")?(I=t=>{const n=t.filter(l.isWorkspaceAttachment).map(h.getAttachmentKey);0!==n.length&&k(t=>{const c=new Set(t);for(const t of n)c.add(t);return c.size===t.length?t:Array.from(c)})},o[25]=I):I=o[25];const $=I;let F;o[26]!==B?(F=t=>{const{result:n,outgoingAttachments:c}=t;"submitted"===n&&B(c),"queued"!==n&&"submitted"!==n&&"failed"!==n||z()},o[26]=B,o[27]=F):F=o[27];const G=F;let H;return o[28]!==j||o[29]!==B||o[30]!==G||o[31]!==M||o[32]!==O?(H={selectedAttachments:O,buildOutgoingAttachments:j,removeAttachment:E,openAttachment:M,beginSubmit:$,clearSentAttachments:B,completeSubmit:G,resetSuppression:z},o[28]=j,o[29]=B,o[30]=G,o[31]=M,o[32]=O,o[33]=H):H=o[33],H}}},4088,[349,36,1563,4089,4090,3450,4092,3948,279]);
15744
15744
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.getAgentAttachmentPillContent=function(t,s){switch(t.type){case"review":return{icon:y,title:s("message.attachments.review"),subtitle:h(t.comments.length,s)};case"forge_change_request":{const s=(0,u.getForgePresentation)(t.forge??"github");return{icon:I,title:t.title,subtitle:`${s.changeRequestAbbrev} ${s.numberPrefix}${t.number}`}}case"github_pr":return{icon:I,title:t.title,subtitle:`PR #${t.number}`};case"forge_issue":case"github_issue":return{icon:k,title:t.title,subtitle:`Issue #${t.number}`};case"text":return{icon:q,title:t.title??s("message.attachments.textAttachment"),subtitle:b(t,s)};case"uploaded_file":return{icon:q,title:t.fileName,subtitle:(0,n.getFileTypeLabel)(t.fileName)??s("message.attachments.file")}}},e.getWorkspaceAttachmentPillContent=function(t,s){if("browser_element"===t.kind)return{icon:v,title:t.attachment.tag,subtitle:s("composer.attachments.element")};if((0,c.isPullRequestContextAttachment)(t))return{icon:q,title:t.title,subtitle:_(t)};if("chat_history"===t.kind)return{icon:q,title:t.attachment.title??s("message.attachments.textAttachment"),subtitle:b(t.attachment,s)};return{icon:y,title:s("message.attachments.review"),subtitle:h(t.commentCount,s)}};var t=r(d[0]),s=r(d[1]),n=r(d[2]),c=r(d[3]),u=r(d[4]),o=r(d[5]),l=r(d[6]);function h(t,s){return 1===t?s("message.attachments.commentsOne"):s("message.attachments.commentsMany",{count:t})}function _(t){return"forge.change_request_check"===t.kind||"github.pull_request_check"===t.kind?"Check logs":"forge.change_request_comment"===t.kind||"github.pull_request_comment"===t.kind?"Comment":"Review"}function b(t,s){return"chat_history"===t.contextKind?"Previous conversation":s("message.attachments.text")}const f=(0,s.withUnistyles)(t.FileText),P=(0,s.withUnistyles)(t.GitPullRequest),p=(0,s.withUnistyles)(t.CircleDot),x=(0,s.withUnistyles)(t.MessageSquareCode),C=(0,s.withUnistyles)(t.MousePointer2),w=t=>({color:t.colors.foregroundMuted}),y=(0,l.jsx)(x,{size:o.ICON_SIZE.sm,uniProps:w}),I=(0,l.jsx)(P,{size:o.ICON_SIZE.sm,uniProps:w}),k=(0,l.jsx)(p,{size:o.ICON_SIZE.sm,uniProps:w}),q=(0,l.jsx)(f,{size:o.ICON_SIZE.sm,uniProps:w}),v=(0,l.jsx)(C,{size:o.ICON_SIZE.sm,uniProps:w})},4089,[1590,56,3990,3450,3641,305,279]);
15745
15745
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.AttachmentPill=function(o){const l=(0,s.c)(21),{onOpen:b,onRemove:u,openAccessibilityLabel:y,removeAccessibilityLabel:j,disabled:w,testID:v,children:I}=o,P=void 0!==w&&w,C=(0,f.useIsCompactFormFactor)(),[L,A]=(0,c.useState)(!1),[z,H]=(0,c.useState)(!1),R=h.isNative||C,T=!(R||L||z)&&S.closeButtonHidden;let B;l[0]!==T?(B=[S.closeButton,T],l[0]=T,l[1]=B):B=l[1];const D=B;let O;l[2]===Symbol.for("react.memo_cache_sentinel")?(O=()=>A(!0),l[2]=O):O=l[2];const V=O;let W;l[3]===Symbol.for("react.memo_cache_sentinel")?(W=()=>A(!1),l[3]=W):W=l[3];const k=W;let F;l[4]===Symbol.for("react.memo_cache_sentinel")?(F=()=>H(!0),l[4]=F):F=l[4];const M=F;let U;l[5]===Symbol.for("react.memo_cache_sentinel")?(U=()=>H(!1),l[5]=U):U=l[5];const E=U;let N,X,q,G;l[6]!==I||l[7]!==P||l[8]!==b||l[9]!==y||l[10]!==v?(N=(0,_.jsx)(n.Pressable,{testID:v,onPress:b,disabled:P,onHoverIn:V,onHoverOut:k,accessibilityRole:"button",accessibilityLabel:y,style:S.frame,children:I}),l[6]=I,l[7]=P,l[8]=b,l[9]=y,l[10]=v,l[11]=N):N=l[11];l[12]===Symbol.for("react.memo_cache_sentinel")?(X=(0,_.jsx)(p,{size:12,uniProps:x}),l[12]=X):X=l[12];l[13]!==D||l[14]!==P||l[15]!==u||l[16]!==j?(q=(0,_.jsx)(n.Pressable,{onPress:u,disabled:P,onHoverIn:M,onHoverOut:E,hitSlop:8,accessibilityRole:"button",accessibilityLabel:j,style:D,children:X}),l[13]=D,l[14]=P,l[15]=u,l[16]=j,l[17]=q):q=l[17];l[18]!==q||l[19]!==N?(G=(0,_.jsxs)(t.View,{style:S.wrapper,children:[N,q]}),l[18]=q,l[19]=N,l[20]=G):G=l[20];return G},e.AttachmentFrame=function(o){const l=(0,s.c)(8),{onPress:c,accessibilityLabel:b,testID:u,children:h}=o;if(!c){let o;return l[0]!==h||l[1]!==u?(o=(0,_.jsx)(t.View,{testID:u,style:S.frame,children:h}),l[0]=h,l[1]=u,l[2]=o):o=l[2],o}let f;l[3]!==b||l[4]!==h||l[5]!==c||l[6]!==u?(f=(0,_.jsx)(n.Pressable,{testID:u,onPress:c,accessibilityRole:"button",accessibilityLabel:b,style:S.frame,children:h}),l[3]=b,l[4]=h,l[5]=c,l[6]=u,l[7]=f):f=l[7];return f},e.AttachmentLabel=function(n){const l=(0,s.c)(12),{icon:c,title:b,subtitle:u}=n;let h,f,y,p,x;l[0]!==c?(h=c?(0,_.jsx)(t.View,{style:S.labelIcon,children:c}):null,l[0]=c,l[1]=h):h=l[1];l[2]!==b?(f=(0,_.jsx)(o.Text,{style:S.labelTitle,numberOfLines:1,children:b}),l[2]=b,l[3]=f):f=l[3];l[4]!==u?(y=(0,_.jsx)(o.Text,{style:S.labelSubtitle,numberOfLines:1,children:u}),l[4]=u,l[5]=y):y=l[5];l[6]!==f||l[7]!==y?(p=(0,_.jsxs)(t.View,{style:S.labelTextColumn,children:[f,y]}),l[6]=f,l[7]=y,l[8]=p):p=l[8];l[9]!==h||l[10]!==p?(x=(0,_.jsxs)(t.View,{style:S.labelBody,children:[h,p]}),l[9]=h,l[10]=p,l[11]=x):x=l[11];return x},e.AttachmentThumbnail=function(o){const n=(0,s.c)(5),{metadata:c}=o,b=(0,y.useAttachmentPreviewUrl)(c),u=b??"";let h;n[0]!==u?(h={uri:u},n[0]=u,n[1]=h):h=n[1];const f=h;if(!b){let o;return n[2]===Symbol.for("react.memo_cache_sentinel")?(o=(0,_.jsx)(t.View,{style:S.thumbnailPlaceholder}),n[2]=o):o=n[2],o}let p;n[3]!==f?(p=(0,_.jsx)(l.Image,{source:f,style:S.thumbnail}),n[3]=f,n[4]=p):p=n[4];return p};var t=r(d[0]),o=r(d[1]),n=r(d[2]),l=r(d[3]),s=r(d[4]),c=r(d[5]);r(d[6]),r(d[7]),r(d[8]),r(d[9]);var b=r(d[10]),u=r(d[11]),h=r(d[12]),f=r(d[13]),y=r(d[14]),_=r(d[15]);const p=(0,b.withUnistyles)(u.X),x=t=>({color:t.colors.foregroundMuted}),S=b.StyleSheet.create(t=>({wrapper:{position:"relative"},frame:{borderRadius:t.borderRadius.md,borderWidth:t.borderWidth[1],borderColor:t.colors.borderAccent,overflow:"hidden",uni__dependencies:[0]},labelBody:{height:48,maxWidth:260,flexDirection:"row",alignItems:"center",gap:t.spacing[2],paddingHorizontal:t.spacing[3],backgroundColor:t.colors.surface1,uni__dependencies:[0]},labelIcon:{width:18,alignItems:"center",justifyContent:"center"},labelTextColumn:{minWidth:0,flexShrink:1},labelTitle:{color:t.colors.foreground,fontSize:t.fontSize.sm,uni__dependencies:[0]},labelSubtitle:{color:t.colors.foregroundMuted,fontSize:t.fontSize.xs,uni__dependencies:[0]},thumbnail:{width:48,height:48},thumbnailPlaceholder:{width:48,height:48,backgroundColor:t.colors.surface1,uni__dependencies:[0]},closeButton:{position:"absolute",top:-8,left:-8,width:24,height:24,borderRadius:12,backgroundColor:t.colors.surface2,borderWidth:t.borderWidth[1],borderColor:t.colors.border,alignItems:"center",justifyContent:"center",zIndex:1,uni__dependencies:[0]},closeButtonHidden:{opacity:0,pointerEvents:"none"}}))},4090,[348,711,1562,688,349,36,224,1308,234,146,56,1590,3263,3262,4091,279]);
15746
15746
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.useAttachmentPreviewUrl=function(l){const[c,u]=(0,t.useState)(null),s=(0,t.useRef)(null),o=(0,t.useRef)(l);o.current=l;const v=l?.id,f=l?.storageType,h=l?.storageKey,w=l?.mimeType;return(0,t.useEffect)(()=>{let t=!1,l=null;const c=o.current;if(s.current=c??null,c)return(async()=>{try{const s=await(0,n.resolveAttachmentPreviewUrl)(c);if(t)return void await(0,n.releaseAttachmentPreviewUrl)({attachment:c,url:s});l=s,u(s)}catch(n){console.error("[attachments] Failed to resolve preview URL",{attachmentId:c.id,error:n}),t||u(null)}})(),()=>{t=!0;const c=s.current;l&&c&&(0,n.releaseAttachmentPreviewUrl)({attachment:c,url:l})};u(null)},[v,f,h,w]),c};var t=r(d[0]),n=r(d[1])},4091,[36,3465]);
@@ -15885,7 +15885,7 @@ __d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',
15885
15885
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.registerPanel=function(n){t.set(n.kind,n)},e.getPanelRegistration=function(n){return t.get(n)};const t=new Map},4230,[]);
15886
15886
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.ensurePanelsRegistered=function(){if(c)return;(0,o.registerPanel)(l.draftPanelRegistration),(0,o.registerPanel)(t.agentPanelRegistration),(0,o.registerPanel)(u.providerSubagentPanelRegistration),(0,o.registerPanel)(f.setupPanelRegistration),(0,o.registerPanel)(R.terminalPanelRegistration),(0,o.registerPanel)(n.browserPanelRegistration),(0,o.registerPanel)(P.filePanelRegistration),(0,o.registerPanel)(s.commitDiffPanelRegistration),(0,o.registerPanel)(s.workingDiffPanelRegistration),c=!0};var t=r(d[0]),n=r(d[1]),s=r(d[2]),l=r(d[3]),P=r(d[4]),o=r(d[5]),f=r(d[6]),R=r(d[7]),u=r(d[8]);let c=!1},4231,[4232,4315,4317,4319,4320,4230,4335,4336,4364]);
15887
15887
  __d(function(g,r,i,_a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.AgentConversationPanel=ve,Object.defineProperty(_e,"agentPanelRegistration",{enumerable:!0,get:function(){return Se}}),_e.useDraftPanelDescriptor=function(e,t){const n=(0,o.c)(5);let s;n[0]!==t.serverId||n[1]!==e.draftId?(s=n=>{const s=n.pendingByDraftId[e.draftId];return s?.serverId!==t.serverId||"active"!==s.lifecycle?{isCreating:!1,pendingPrompt:null}:{isCreating:!0,pendingPrompt:s.text}},n[0]=t.serverId,n[1]=e.draftId,n[2]=s):s=n[2];const c=(0,U.useCreateFlowStore)((0,v.useShallow)(s));let l;n[3]!==c?(l=(0,B.buildDraftPanelDescriptor)(Object.assign({},c,{icon:a.SquarePen})),n[3]=c,n[4]=l):l=n[4];return l};var t=r(d[0]),n=r(d[1]),s=r(d[2]),o=r(d[3]),a=r(d[4]),c=r(d[5]),l=r(d[6]);r(d[7]);var u=e(r(d[8]));r(d[9]),r(d[10]);var f=e(r(d[11])),p=r(d[12]),h=r(d[13]),I=e(r(d[14])),v=r(d[15]),S=r(d[16]),y=r(d[17]),A=r(d[18]),x=r(d[19]),w=r(d[20]),b=r(d[21]),P=r(d[22]),k=r(d[23]),C=r(d[24]),j=r(d[25]),T=r(d[26]),F=r(d[27]),_=r(d[28]),D=r(d[29]),O=r(d[30]),R=r(d[31]),M=r(d[32]),W=r(d[33]),H=r(d[34]),z=r(d[35]),E=r(d[36]),V=r(d[37]),q=r(d[38]),B=r(d[39]),L=r(d[40]),K=r(d[41]),$=r(d[42]),U=r(d[43]),J=r(d[44]),N=r(d[45]),G=r(d[46]),Z=r(d[47]),Q=r(d[48]),X=r(d[49]),Y=r(d[50]),ee=r(d[51]),te=r(d[52]),ne=r(d[53]),re=r(d[54]),se=r(d[55]),oe=r(d[56]),ie=r(d[57]);function ae(e,t,n){if(!n)return null;const s=e.sessions[t];return s?.agents?.get(n)??s?.agentDetails?.get(n)??null}const ce={serverId:null,id:null,status:null,cwd:null,lastError:null,archivedAt:null,requiresAttention:!1,attentionReason:null};function le(e,t,n){const s=ae(e,t,n);return s?{serverId:s.serverId,id:s.id,provider:s.provider,status:s.status,cwd:s.cwd,workspaceId:s.workspaceId,capabilities:s.capabilities,currentModeId:s.currentModeId,model:s.model,thinkingOptionId:s.thinkingOptionId,runtimeInfo:s.runtimeInfo,features:s.features,lastError:s.lastError??null,archivedAt:s.archivedAt??null,requiresAttention:s.requiresAttention??!1,attentionReason:s.attentionReason??null}:ce}function ue(e,t){return e.serverId&&e.id&&e.status&&e.cwd?{serverId:e.serverId,id:e.id,provider:e.provider,status:e.status,cwd:e.cwd,workspaceId:e.workspaceId,capabilities:e.capabilities,currentModeId:e.currentModeId,model:e.model,thinkingOptionId:e.thinkingOptionId,runtimeInfo:e.runtimeInfo,features:e.features,lastError:e.lastError??null,projectPlacement:t}:null}function de(e){const{viewState:s,effectiveAgent:o,t:a}=e;return"not_found"===s.tag?(0,ie.jsx)(t.View,{style:Be.container,testID:"agent-not-found",children:(0,ie.jsx)(t.View,{style:Be.errorContainer,children:(0,ie.jsx)(n.Text,{style:Be.errorText,children:a("agentPanel.states.notFound")})})}):"error"===s.tag?(0,ie.jsx)(t.View,{style:Be.container,testID:"agent-load-error",children:(0,ie.jsxs)(t.View,{style:Be.errorContainer,children:[(0,ie.jsx)(n.Text,{style:Be.errorText,children:a("agentPanel.states.failedToLoad")}),(0,ie.jsx)(n.Text,{style:Be.statusText,children:s.message})]})}):"boot"!==s.tag&&o?null:(0,ie.jsx)(t.View,{style:Be.container,testID:"agent-loading",children:(0,ie.jsx)(t.View,{style:Be.errorContainer,children:(0,ie.jsx)(ze,{size:"large",uniProps:Ee})})})}function ge(e){return e?e.split(/[-_\s]+/).filter(e=>e.length>0).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" "):"Agent"}function fe(e){if("string"!=typeof e)return null;const t=e.trim();return t?"new agent"===t.toLowerCase()?null:t:null}function pe(e){const t=(0,te.normalizeAgentSnapshot)(e.result.agent,e.serverId),n=(0,ne.applyLegacyDaemonWorkspaceOwnership)({serverId:e.serverId,agent:Object.assign({},t,{projectPlacement:e.result.project})}),s=G.useSessionStore.getState();var o;return!(o=n).archivedAt&&Boolean(o.projectPlacement)?s.setAgents(e.serverId,e=>{const t=new Map(e);return t.set(n.id,n),t}):s.setAgentDetails(e.serverId,e=>{const t=new Map(e);return t.set(n.id,n),t}),s.setPendingPermissions(e.serverId,e=>{const t=new Map(e);for(const[e,s]of t.entries())s.agentId===n.id&&t.delete(e);for(const e of n.pendingPermissions){const s=(0,te.derivePendingPermissionKey)(n.id,e);t.set(s,{key:s,agentId:n.id,request:e})}return t}),n}function he(){const e=(0,o.c)(6),{serverId:t,workspaceId:n,target:s,openFileInWorkspace:a}=(0,V.usePaneContext)(),{isInteractive:c}=(0,V.usePaneFocus)();let l;return(0,I.default)("agent"===s.kind,"AgentPanel requires agent target"),e[0]!==c||e[1]!==a||e[2]!==t||e[3]!==s.agentId||e[4]!==n?(l=(0,ie.jsx)(be,{serverId:t,workspaceId:n,agentId:s.agentId,isPaneFocused:c,onOpenWorkspaceFile:a}),e[0]=c,e[1]=a,e[2]=t,e[3]=s.agentId,e[4]=n,e[5]=l):l=e[5],l}function Ie(){const e=(0,o.c)(13),{serverId:t,workspaceId:n,tabId:s,target:a,openFileInWorkspace:c,openImportSheet:l,retargetCurrentTab:u}=(0,V.usePaneContext)(),{isInteractive:f}=(0,V.usePaneFocus)();let p;(0,I.default)("draft"===a.kind,"DraftPanel requires draft target"),e[0]!==u||e[1]!==t?(p=e=>{const n=(0,te.normalizeAgentSnapshot)(e,t),s=(0,ne.applyLegacyDaemonWorkspaceOwnership)({serverId:t,agent:n});G.useSessionStore.getState().setAgents(t,t=>{const n=new Map(t);return n.set(e.id,s),n}),u({kind:"agent",agentId:e.id})},e[0]=u,e[1]=t,e[2]=p):p=e[2];const h=p;let v;return e[3]!==h||e[4]!==f||e[5]!==c||e[6]!==l||e[7]!==t||e[8]!==s||e[9]!==a.draftId||e[10]!==a.setup||e[11]!==n?(v=(0,ie.jsx)($.WorkspaceDraftAgentTab,{serverId:t,workspaceId:n,tabId:s,draftId:a.draftId,initialSetup:a.setup,isPaneFocused:f,onOpenWorkspaceFile:c,onCreated:h,onOpenImportSheet:l}),e[3]=h,e[4]=f,e[5]=c,e[6]=l,e[7]=t,e[8]=s,e[9]=a.draftId,e[10]=a.setup,e[11]=n,e[12]=v):v=e[12],v}function ve(){const e=(0,o.c)(2),{target:t}=(0,V.usePaneContext)();if("draft"===t.kind){let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,ie.jsx)(Ie,{}),e[0]=t):t=e[0],t}if("agent"===t.kind){let t;return e[1]===Symbol.for("react.memo_cache_sentinel")?(t=(0,ie.jsx)(he,{}),e[1]=t):t=e[1],t}(0,I.default)(!1,"AgentConversationPanel requires an agent or draft target")}const Se={kind:"agent",component:ve,useDescriptor:function(e,t){const n=(0,o.c)(24);let s;n[0]!==t.serverId||n[1]!==e?(s=n=>{const s=n.sessions[t.serverId],o=s?.agents?.get(e.agentId)??s?.agentDetails?.get(e.agentId)??null;return{provider:o?.provider??"codex",title:o?.title??null,status:o?.status??null,pendingPermissionCount:o?.pendingPermissions.length??0,requiresAttention:o?.requiresAttention??!1,attentionReason:o?.attentionReason??null}},n[0]=t.serverId,n[1]=e,n[2]=s):s=n[2];const a=(0,G.useSessionStore)((0,v.useShallow)(s)),c=a.provider;let l;n[3]!==a.title?(l=fe(a.title),n[3]=a.title,n[4]=l):l=n[4];const u=l;let f;n[5]!==c?(f=(0,C.getProviderIcon)(c),n[5]=c,n[6]=f):f=n[6];const p=f,h=u??"";let I;n[7]!==c?(I=ge(c),n[7]=c,n[8]=I):I=n[8];const S=`${I} agent`;let y;n[9]!==u||n[10]!==c?(y=u??`${ge(c)} agent`,n[9]=u,n[10]=c,n[11]=y):y=n[11];const A=u?"ready":"loading";let x,w;return n[12]!==a.attentionReason||n[13]!==a.pendingPermissionCount||n[14]!==a.requiresAttention||n[15]!==a.status?(x=a.status?(0,se.deriveSidebarStateBucket)({status:a.status,pendingPermissionCount:a.pendingPermissionCount,requiresAttention:a.requiresAttention,attentionReason:a.attentionReason}):null,n[12]=a.attentionReason,n[13]=a.pendingPermissionCount,n[14]=a.requiresAttention,n[15]=a.status,n[16]=x):x=n[16],n[17]!==p||n[18]!==h||n[19]!==S||n[20]!==y||n[21]!==A||n[22]!==x?(w={label:h,subtitle:S,tooltip:y,titleState:A,icon:p,statusBucket:x},n[17]=p,n[18]=h,n[19]=S,n[20]=y,n[21]=A,n[22]=x,n[23]=w):w=n[23],w}};const me=[],ye=new Map,Ae=[];function xe(e){return e instanceof Error?e.message:String(e)}function we(e){return/agent not found|not found/i.test(e)}function be(e){const t=(0,o.c)(29),{serverId:n,workspaceId:s,agentId:a,isPaneFocused:c,onOpenWorkspaceFile:u}=e,{t:f}=(0,l.useTranslation)();let p;t[0]!==a?(p=a.trim()||void 0,t[0]=a,t[1]=p):p=t[1];const h=p;let I;t[2]!==n?(I=n.trim()||void 0,t[2]=n,t[3]=I):I=t[3];const v=I,S=(0,L.useHosts)(),y=v??"",A=(0,L.useHostRuntimeClient)(y),x=(0,L.useHostRuntimeIsConnected)(y),w=(0,L.useHostRuntimeConnectionStatus)(y),b=(0,L.useHostRuntimeLastError)(y);let P;t[4]!==h||t[5]!==v?(P=e=>{if(!v||!h)return!1;const t=e.sessions[v];return Boolean(t?.agents.has(h)||t?.agentDetails.has(h))},t[4]=h,t[5]=v,t[6]=P):P=t[6];const k=(0,G.useSessionStore)(P),C=v??null;let j;t[7]!==C||t[8]!==S?(j=C?S.find(e=>e.serverId===C)??null:null,t[7]=C,t[8]=S,t[9]=j):j=t[9];const T=j;let F;t[10]!==C||t[11]!==T?.label||t[12]!==f?(F=T?.label??C??f("agentPanel.unavailable.selectedHost"),t[10]=C,t[11]=T?.label,t[12]=f,t[13]=F):F=t[13];const _=F,D=Boolean(C&&!T),O=D&&"connecting"===w?"offline":w,R=b;if(!v||!A&&!k){let e;return t[14]!==O||t[15]!==D||t[16]!==R||t[17]!==_||t[18]!==f?(e=(0,ie.jsx)(He,{serverLabel:_,connectionStatus:O,lastError:R,isUnknownDaemon:D,t:f}),t[14]=O,t[15]=D,t[16]=R,t[17]=_,t[18]=f,t[19]=e):e=t[19],e}let M;return t[20]!==O||t[21]!==c||t[22]!==u||t[23]!==h||t[24]!==v||t[25]!==A||t[26]!==x||t[27]!==s?(M=(0,ie.jsx)(Pe,{serverId:v,workspaceId:s,agentId:h,isPaneFocused:c,client:A,isConnected:x,connectionStatus:O,onOpenWorkspaceFile:u}),t[20]=O,t[21]=c,t[22]=u,t[23]=h,t[24]=v,t[25]=A,t[26]=x,t[27]=s,t[28]=M):M=t[28],M}function Pe({serverId:e,workspaceId:s,agentId:o,isPaneFocused:a,client:u,isConnected:f,connectionStatus:p,onOpenWorkspaceFile:h}){const{t:I}=(0,l.useTranslation)(),{isArchivingAgent:y}=(0,W.useArchiveAgent)(),A=(0,G.useSessionStore)(t=>Boolean(t.sessions[e])),x=(0,S.useStoreWithEqualityFn)(G.useSessionStore,t=>{if(!o)return null;const n=t.sessions[e];return n?.agents?.get(o)?.projectPlacement??n?.agentDetails?.get(o)?.projectPlacement??null},(e,t)=>e===t||JSON.stringify(e)===JSON.stringify(t)),w=(0,G.useSessionStore)((0,v.useShallow)(t=>le(t,e,o))),[b,P]=(0,c.useState)({tag:"idle"}),k=(0,c.useRef)(0),C=(0,Q.buildWorkspaceTabPersistenceKey)({serverId:e,workspaceId:s}),j=(0,Z.useWorkspaceLayoutStore)(e=>e.resolvePendingAgent);if((0,c.useEffect)(()=>{k.current+=1,P({tag:"idle"})},[o,e]),(0,c.useEffect)(()=>{if(!o)return;if(w.id)return C&&j(C,o),void("idle"!==b.tag&&P({tag:"idle"}));if(!u||!f||!A)return;if("loading"===b.tag||"not_found"===b.tag)return;P({tag:"loading"});const t=++k.current;u.fetchAgent({agentId:o}).then(n=>{if(t===k.current){if(!n)return C&&j(C,o),void P({tag:"not_found",message:`Agent not found: ${o}`});pe({serverId:e,result:n}),C&&j(C,o),P({tag:"idle"})}}).catch(e=>{if(t!==k.current)return;const n=xe(e);if(we(n))return C&&j(C,o),void P({tag:"not_found",message:n});P({tag:"error",message:n})})},[o,w.id,u,A,f,b.tag,j,e,C]),"not_found"===b.tag)return(0,ie.jsx)(t.View,{style:Be.container,testID:"agent-not-found",children:(0,ie.jsx)(t.View,{style:Be.errorContainer,children:(0,ie.jsx)(n.Text,{style:Be.errorText,children:I("agentPanel.states.notFound")})})});if("error"===b.tag)return(0,ie.jsx)(t.View,{style:Be.container,testID:"agent-load-error",children:(0,ie.jsxs)(t.View,{style:Be.errorContainer,children:[(0,ie.jsx)(n.Text,{style:Be.errorText,children:I("agentPanel.states.failedToLoad")}),(0,ie.jsx)(n.Text,{style:Be.statusText,children:b.message})]})});return(w.serverId&&w.id&&w.status&&w.cwd?{serverId:w.serverId,id:w.id,provider:w.provider,status:w.status,cwd:w.cwd,workspaceId:w.workspaceId,capabilities:w.capabilities,currentModeId:w.currentModeId,model:w.model,thinkingOptionId:w.thinkingOptionId,runtimeInfo:w.runtimeInfo,features:w.features,lastError:w.lastError??null,projectPlacement:x}:null)?(0,ie.jsx)(ke,{serverId:e,agentId:o,isPaneFocused:a,client:u,isConnected:f,connectionStatus:p,onOpenWorkspaceFile:h}):(0,ie.jsx)(t.View,{style:Be.container,testID:"agent-loading",children:(0,ie.jsx)(t.View,{style:Be.errorContainer,children:(0,ie.jsx)(ze,{size:"large",uniProps:Ee})})})}function ke({serverId:e,agentId:t,isPaneFocused:n,client:s,isConnected:o,connectionStatus:a,onOpenWorkspaceFile:u}){const{t:f}=(0,l.useTranslation)(),p=(0,w.useRetainedPanelActive)(),{api:h,toast:y,dismiss:A}=(0,j.useToastHost)(),{isArchivingAgent:x}=(0,W.useArchiveAgent)(),b=(0,c.useRef)(null),P=(0,c.useRef)(()=>{}),k=(0,c.useRef)(n),C=(0,c.useRef)(!1),T=(0,c.useRef)(0),F=(0,c.useRef)(null),_=(0,G.useSessionStore)((0,v.useShallow)(n=>le(n,e,t))),R=(0,S.useStoreWithEqualityFn)(G.useSessionStore,n=>{if(!t)return null;const s=n.sessions[e];return s?.agents?.get(t)?.projectPlacement??s?.agentDetails?.get(t)?.projectPlacement??null},(e,t)=>e===t||JSON.stringify(e)===JSON.stringify(t)),z=(0,G.useSessionStore)(n=>!!t&&(n.sessions[e]?.initializingAgents?.get(t)??!1)),V=(0,G.useSessionStore)(t=>t.sessions[e]?.historySyncGeneration??0),q=(0,G.useSessionStore)(n=>!!t&&!0===n.sessions[e]?.agentAuthoritativeHistoryApplied?.get(t)),B=(0,G.useSessionStore)(n=>t?n.sessions[e]?.agentHistorySyncGeneration?.get(t)??-1:-1),L=(0,G.useSessionStore)(t=>t.sessions[e]?.viewedTimelineSync??null),$=(0,c.useCallback)(e=>L?.subscribe(e)??(()=>{}),[L]),J=(0,c.useCallback)(()=>t&&L?L.getAgentTimelineStatus(t):"ready",[t,L]),N=(0,c.useSyncExternalStore)($,J,J),Z=p?N:"ready",Q=(0,U.useCreateFlowStore)(n=>{return!!(s={pendingByDraftId:n.pendingByDraftId,serverId:e,agentId:t}).agentId&&Object.values(s.pendingByDraftId).some(e=>"sent"===e.lifecycle&&e.serverId===s.serverId&&e.agentId===s.agentId);var s}),X=(0,G.useSessionStore)(t=>Boolean(t.sessions[e])),{ensureAgentIsInitialized:Y}=(0,O.useAgentInitialization)({serverId:e,client:X?s:null}),[te,ne]=(0,c.useState)({kind:"idle"}),re=q,se=(0,D.useAgentAttentionClear)({agentId:t,client:s,isConnected:o,requiresAttention:_.requiresAttention,attentionReason:_.attentionReason,isScreenFocused:n});(0,c.useEffect)(()=>{P.current=se.clearOnAgentBlur},[se.clearOnAgentBlur]);const{style:oe}=(0,H.useKeyboardShiftStyle)({mode:"translate"});(0,c.useEffect)(()=>{"online"!==a?"idle"!==a&&(C.current||(C.current=!0,h.show(f("agentPanel.states.reconnecting"),{durationMs:null,testID:"agent-reconnecting-toast"}))):C.current&&(C.current=!1,A())},[a,A,h,f]);const ae=Boolean(t&&x({serverId:e,agentId:t}));(0,c.useEffect)(()=>{k.current&&!n&&P.current(),k.current=n},[n]),(0,c.useEffect)(()=>()=>{k.current&&P.current()},[]);const ce=!!t&&z,ge=(0,c.useMemo)(()=>{if(!t||!ce)return!1;const n=(0,ee.getInitKey)(e,t);return Boolean((0,ee.getInitDeferred)(n))},[t,ce,e]),fe=(0,c.useMemo)(()=>!!t&&B<V,[B,t,V]),he=(0,c.useMemo)(()=>ue(_,R),[_,R]),Ie=(0,c.useMemo)(()=>Q&&t?{kind:"optimistic-create",agent:{serverId:e,id:t,status:"running",cwd:he?.cwd??".",projectPlacement:he?.projectPlacement??null}}:{kind:"none"},[he,t,Q,e]),ve=(0,M.useAgentScreenStateMachine)({routeKey:`${e}:${t??""}`,input:{agent:he??null,isArchived:null!==_.archivedAt,missingAgentState:te,isConnected:o,isArchivingCurrentAgent:ae,isHistorySyncing:ge,needsAuthoritativeSync:fe,visibilityCatchUpStatus:Z,continuity:Ie,hasHydratedHistoryBefore:re}}),Se="ready"===ve.tag?ve.agent:null,me=t?`${e}:${t}`:null;F.current=(0,K.deriveRouteBottomAnchorIntent)({cachedIntent:F.current,routeKey:me,hasAppliedAuthoritativeHistoryAtEntry:q});const ye=(0,c.useMemo)(()=>(0,K.deriveRouteBottomAnchorRequest)({intent:F.current,effectiveAgentId:Se?.id??null}),[Se?.id]),Ae=(0,c.useCallback)(e=>{t&&b.current?.prepareForViewportChange()},[t]),be=(0,c.useCallback)(()=>{t&&b.current?.scrollToBottom("message-sent")},[t]);(0,c.useEffect)(()=>{T.current+=1,ne({kind:"idle"})},[t,e]),(0,c.useEffect)(()=>{if(!t)return;if(_.archivedAt)return;if(_.id&&q)return void("resolving"!==te.kind&&"not_found"!==te.kind&&"error"!==te.kind||ne(E.reconcileMissingAgentStateWithPresentAgent));if(!(s&&p&&o&&X))return;if("resolving"===te.kind||"not_found"===te.kind||"error"===te.kind)return;ne({kind:"resolving"});const n=++T.current;Y(t).then(async()=>{if(n!==T.current)return;const o=G.useSessionStore.getState().sessions[e];if(!(o?.agents.get(t)??o?.agentDetails.get(t))){const o=await s.fetchAgent({agentId:t});if(n!==T.current)return;if(!o)return void ne({kind:"not_found",message:`Agent not found: ${t}`});pe({serverId:e,result:o})}n===T.current&&ne({kind:"idle"})}).catch(e=>{if(n!==T.current)return;const t=xe(e);we(t)?ne({kind:"not_found",message:t}):ne({kind:"error",message:t})})},[_.id,_.archivedAt,q,t,s,Y,X,o,p,te.kind,e]);const Pe=(0,c.useMemo)(()=>[qe.content,oe],[oe]),ke=de({viewState:ve,effectiveAgent:Se,t:f});if(ke)return ke;(0,I.default)(t,"agent id is defined when agent content is ready"),(0,I.default)(Se,"effectiveAgent is defined when the non-ready view is absent");const je=_.cwd;(0,I.default)(je,"agent cwd is defined when agent content is ready");const Te="ready"===ve.tag&&"catching_up"===ve.sync.status&&"overlay"===ve.sync.ui,Fe="ready"===ve.tag&&"sync_error"===ve.sync.status;return(0,ie.jsx)(Ce,{serverId:e,agentId:t,isPaneFocused:n,isArchivingCurrentAgent:ae,agentState:_,effectiveAgent:Se,routeBottomAnchorRequest:ye,hasAppliedAuthoritativeHistory:q,toastApi:h,toast:y,dismiss:A,streamViewRef:b,animatedContentStyle:Pe,handleComposerHeightChange:Ae,handleMessageSent:be,showHistorySyncOverlay:Te,showHistorySyncError:Fe,cwd:je,onAttentionInputFocus:se.clearOnInputFocus,onAttentionPromptSend:se.clearOnPromptSend,onOpenWorkspaceFile:u})}const Ce=(0,c.memo)(function(e){const s=(0,o.c)(69),{serverId:a,agentId:c,isPaneFocused:u,isArchivingCurrentAgent:p,agentState:h,effectiveAgent:I,routeBottomAnchorRequest:v,hasAppliedAuthoritativeHistory:S,toastApi:y,toast:A,dismiss:w,streamViewRef:P,animatedContentStyle:C,handleComposerHeightChange:T,handleMessageSent:F,showHistorySyncOverlay:_,showHistorySyncError:D,cwd:O,onAttentionInputFocus:M,onAttentionPromptSend:W,onOpenWorkspaceFile:H}=e,{t:z}=(0,l.useTranslation)();let E,V;s[0]!==c||s[1]!==a?(E=(0,J.buildDraftStoreKey)({serverId:a,agentId:c}),s[0]=c,s[1]=a,s[2]=E):E=s[2],s[3]!==E?(V={draftKey:E},s[3]=E,s[4]=V):V=s[4];const B=(0,R.useAgentInputDraft)(V),{text:L,setText:K,attachments:$,setAttachments:U,clear:N,isHydrated:G,attachmentFocusRequestId:Z,composerState:Q}=B;let X;s[5]!==Z||s[6]!==$||s[7]!==N||s[8]!==Q||s[9]!==G||s[10]!==U||s[11]!==K||s[12]!==L?(X={text:L,setText:K,attachments:$,setAttachments:U,clear:N,isHydrated:G,attachmentFocusRequestId:Z,composerState:Q},s[5]=Z,s[6]=$,s[7]=N,s[8]=Q,s[9]=G,s[10]=U,s[11]=K,s[12]=L,s[13]=X):X=s[13];const Y=X,ee=`AgentStreamSection:${c}`;let te,ne;s[14]!==c||s[15]!==I||s[16]!==S||s[17]!==H||s[18]!==v||s[19]!==a||s[20]!==P||s[21]!==y?(te=(0,ie.jsx)(je,{streamViewRef:P,serverId:a,agentId:c,agent:I,routeBottomAnchorRequest:v,hasAppliedAuthoritativeHistory:S,toast:y,onOpenWorkspaceFile:H}),s[14]=c,s[15]=I,s[16]=S,s[17]=H,s[18]=v,s[19]=a,s[20]=P,s[21]=y,s[22]=te):te=s[22],s[23]!==ee||s[24]!==te?(ne=(0,ie.jsx)(q.RenderProfile,{id:ee,children:te}),s[23]=ee,s[24]=te,s[25]=ne):ne=s[25];const re=ne,se=`AgentComposerSection:${c}`;let oe,ae;s[26]!==c||s[27]!==Y||s[28]!==h.archivedAt||s[29]!==O||s[30]!==T||s[31]!==F||s[32]!==p||s[33]!==u||s[34]!==M||s[35]!==W||s[36]!==a?(oe=(0,ie.jsx)(Te,{agentId:c,serverId:a,isPaneFocused:u,isArchivingCurrentAgent:p,archivedAt:h.archivedAt,cwd:O,isSubmitLoading:!1,agentInputDraft:Y,onAttentionInputFocus:M,onAttentionPromptSend:W,onComposerHeightChange:T,onMessageSent:F}),s[26]=c,s[27]=Y,s[28]=h.archivedAt,s[29]=O,s[30]=T,s[31]=F,s[32]=p,s[33]=u,s[34]=M,s[35]=W,s[36]=a,s[37]=oe):oe=s[37],s[38]!==se||s[39]!==oe?(ae=(0,ie.jsx)(q.RenderProfile,{id:se,children:oe}),s[38]=se,s[39]=oe,s[40]=ae):ae=s[40];const ce=ae;let le;if(s[41]!==C||s[42]!==re){const e=(0,ie.jsx)(f.default.View,{style:C,children:re});le=(0,ie.jsx)(t.View,{style:Be.contentContainer,children:e}),s[41]=C,s[42]=re,s[43]=le}else le=s[43];const ue=le;let de,ge,fe,pe,he,Ie,ve;return s[44]!==D||s[45]!==z?(de=D?(0,ie.jsx)(b.SidebarCallout,{title:z("agentPanel.states.timelineSyncFailed"),variant:"error",testID:"agent-timeline-sync-error"}):null,s[44]=D,s[45]=z,s[46]=de):de=s[46],s[47]!==_?(ge=_?(0,ie.jsx)(t.View,{style:Be.historySyncOverlay,testID:"agent-history-overlay",children:(0,ie.jsx)(ze,{size:"large",uniProps:Ee})}):null,s[47]=_,s[48]=ge):ge=s[48],s[49]!==w||s[50]!==A?(fe=(0,ie.jsx)(j.ToastViewport,{toast:A,onDismiss:w,placement:"panel"}),s[49]=w,s[50]=A,s[51]=fe):fe=s[51],s[52]!==ce||s[53]!==ue||s[54]!==p||s[55]!==de||s[56]!==ge||s[57]!==fe?(pe=(0,ie.jsxs)(x.FileDropZone,{style:Be.container,disabled:p,children:[ue,de,ce,ge,fe]}),s[52]=ce,s[53]=ue,s[54]=p,s[55]=de,s[56]=ge,s[57]=fe,s[58]=pe):pe=s[58],s[59]!==p||s[60]!==z?(he=p?(0,ie.jsxs)(t.View,{style:Be.archivingOverlay,testID:"agent-archiving-overlay",children:[(0,ie.jsx)(ze,{size:"large",uniProps:Ve}),(0,ie.jsx)(n.Text,{style:Be.archivingTitle,children:z("agentPanel.states.archivingTitle")}),(0,ie.jsx)(n.Text,{style:Be.archivingSubtitle,children:z("agentPanel.states.archivingSubtitle")})]}):null,s[59]=p,s[60]=z,s[61]=he):he=s[61],s[62]!==pe||s[63]!==he?(Ie=(0,ie.jsxs)(t.View,{style:Be.root,children:[pe,he]}),s[62]=pe,s[63]=he,s[64]=Ie):Ie=s[64],s[65]!==Y.setText||s[66]!==Y.text||s[67]!==Ie?(ve=(0,ie.jsx)(k.RewindComposerRestoreProvider,{text:Y.text,setText:Y.setText,children:Ie}),s[65]=Y.setText,s[66]=Y.text,s[67]=Ie,s[68]=ve):ve=s[68],ve}),je=(0,c.memo)(function({streamViewRef:e,serverId:t,agentId:n,agent:s,routeBottomAnchorRequest:o,hasAppliedAuthoritativeHistory:a,toast:l,onOpenWorkspaceFile:u}){const f=(0,G.useSessionStore)(e=>n?e.sessions[t]?.agentStreamTail?.get(n):void 0)??me,p=(0,S.useStoreWithEqualityFn)(G.useSessionStore,e=>{if(!n)return Ae;const s=e.sessions[t]?.pendingPermissions;if(!s)return Ae;const o=[];for(const e of s.values())e.agentId===n&&o.push(e);return o.length>0?o:Ae},v.shallow),h=(0,c.useMemo)(()=>0===p.length?ye:new Map(p.map(e=>[e.key,e])),[p]);return(0,ie.jsx)(y.AgentStreamView,{ref:e,agentId:s.id,serverId:t,context:s,streamItems:f,pendingPermissions:h,routeBottomAnchorRequest:o,isAuthoritativeHistoryReady:a,toast:l,onOpenWorkspaceFile:u})}),Te=(0,c.memo)(function(e){const t=(0,o.c)(14),{agentId:n,serverId:s,isPaneFocused:a,isArchivingCurrentAgent:c,archivedAt:l,cwd:u,isSubmitLoading:f,agentInputDraft:p,onAttentionInputFocus:h,onAttentionPromptSend:I,onComposerHeightChange:v,onMessageSent:S}=e;if(!n)return null;if(l){let e;return t[0]!==n||t[1]!==s?(e=(0,ie.jsx)(A.ArchivedAgentCallout,{serverId:s,agentId:n}),t[0]=n,t[1]=s,t[2]=e):e=t[2],e}if(c)return null;let y;return t[3]!==n||t[4]!==p||t[5]!==u||t[6]!==a||t[7]!==f||t[8]!==h||t[9]!==I||t[10]!==v||t[11]!==S||t[12]!==s?(y=(0,ie.jsx)(Fe,{agentId:n,serverId:s,isPaneFocused:a,cwd:u,isSubmitLoading:f,agentInputDraft:p,onAttentionInputFocus:h,onAttentionPromptSend:I,onComposerHeightChange:v,onMessageSent:S}),t[3]=n,t[4]=p,t[5]=u,t[6]=a,t[7]=f,t[8]=h,t[9]=I,t[10]=v,t[11]=S,t[12]=s,t[13]=y):y=t[13],y});function Fe(e){const t=(0,o.c)(78),{agentId:n,serverId:s,isPaneFocused:a,cwd:c,isSubmitLoading:l,agentInputDraft:u,onAttentionInputFocus:h,onAttentionPromptSend:I,onComposerHeightChange:v,onMessageSent:S}=e,y=(0,p.useSafeAreaInsets)(),A=(0,F.useIsCompactFormFactor)();let x;t[0]!==A?(x={initialIsBelow:A},t[0]=A,t[1]=x):x=t[1];const{onLayout:w,isBelow:b}=(0,z.useContainerWidthBelow)(F.COMPACT_FORM_FACTOR_WIDTH,x),k=(0,V.usePaneContext)(),{workspaceId:C,tabId:j,retargetCurrentTab:_,openTab:D}=k,{archiveAgent:O}=(0,W.useArchiveAgent)(),R=(0,Z.useWorkspaceLayoutStore)(We),M=(0,Z.useWorkspaceLayoutStore)(Me),E=(0,Z.useWorkspaceLayoutStore)(Re);let q;t[2]!==n||t[3]!==s?(q={serverId:s,parentAgentId:n},t[2]=n,t[3]=s,t[4]=q):q=t[4];const B=(0,X.useSubagentsForParent)(q);let L;t[5]!==s?(L=e=>!0===e.sessions[s]?.serverInfo?.features?.agentDetach,t[5]=s,t[6]=L):L=t[6];const K=(0,G.useSessionStore)(L);let $;t[7]!==s?($=e=>{(0,re.navigateToAgent)({serverId:s,agentId:e})},t[7]=s,t[8]=$):$=t[8];const U=$;let ee;t[9]!==D?(ee=(e,t)=>{D({kind:"provider_subagent",parentAgentId:e,subagentId:t})},t[9]=D,t[10]=ee):ee=t[10];const te=ee;let ne;t[11]!==s?(ne={serverId:s},t[11]=s,t[12]=ne):ne=t[12];const se=(0,X.useArchiveSubagent)(ne);let ce;t[13]!==s?(ce={serverId:s},t[13]=s,t[14]=ce):ce=t[14];const le=(0,X.useDetachSubagent)(ce);let ue;t[15]!==n||t[16]!==s?(ue={serverId:s,parentAgentId:n},t[15]=n,t[16]=s,t[17]=ue):ue=t[17];const de=(0,X.useHideFinishedProviderSubagents)(ue);let ge;t[18]!==c||t[19]!==s||t[20]!==C?(ge={serverId:s,cwd:c,workspaceId:C},t[18]=c,t[19]=s,t[20]=C,t[21]=ge):ge=t[21];const fe=(0,T.useWorkspaceAttachmentScopeKey)(ge);let pe;t[22]!==fe?(pe=[fe],t[22]=fe,t[23]=pe):pe=t[23];const he=pe,Ie=(0,N.usePanelStore)(Oe),ve=(0,N.usePanelStore)(De);let Se;t[24]!==A||t[25]!==Ie||t[26]!==s||t[27]!==ve?(Se=e=>{if("review"!==e.kind)return;const t={serverId:s,cwd:e.attachment.cwd,isGit:!0};Ie({checkout:t,isCompact:A}),ve(Object.assign({},t,{tab:"changes"}))},t[24]=A,t[25]=Ie,t[26]=s,t[27]=ve,t[28]=Se):Se=t[28];const me=Se;let ye;t[29]!==n||t[30]!==O||t[31]!==R||t[32]!==M||t[33]!==_||t[34]!==s||t[35]!==j||t[36]!==E||t[37]!==C?(ye=async e=>{const t=ae(G.useSessionStore.getState(),s,n);if(!t)throw new Error("Agent not found");const o=(0,Q.buildWorkspaceTabPersistenceKey)({serverId:s,workspaceId:C});o&&(E(o,n),M(o,n)),"replace-agent-with-draft"===e.kind?_({kind:"draft",draftId:(0,J.generateDraftId)(),setup:(0,oe.buildDraftAgentSetup)(t)}):o&&R(o,j),await O({serverId:s,agentId:n})},t[29]=n,t[30]=O,t[31]=R,t[32]=M,t[33]=_,t[34]=s,t[35]=j,t[36]=E,t[37]=C,t[38]=ye):ye=t[38];const Ae=ye;let xe;t[39]===Symbol.for("react.memo_cache_sentinel")?(xe={mode:"translate"},t[39]=xe):xe=t[39];const{style:we}=(0,H.useKeyboardShiftStyle)(xe);let be,Pe;t[40]!==y.bottom?(be={paddingBottom:y.bottom},t[40]=y.bottom,t[41]=be):be=t[41],t[42]!==we||t[43]!==be?(Pe=[qe.inputAreaWrapper,be,we],t[42]=we,t[43]=be,t[44]=Pe):Pe=t[44];const ke=Pe,Ce=K?le:void 0;let je;t[45]!==se||t[46]!==de||t[47]!==te||t[48]!==U||t[49]!==B||t[50]!==Ce?(je=(0,ie.jsx)(Y.SubagentsTrack,{rows:B,onOpenSubagent:U,onOpenProviderSubagent:te,onArchiveSubagent:se,onArchiveFinished:de,onDetachSubagent:Ce}),t[45]=se,t[46]=de,t[47]=te,t[48]=U,t[49]=B,t[50]=Ce,t[51]=je):je=t[51];const Te=u.text,Fe=u.setText,He=u.attachments,ze=u.setAttachments,Ee=u.clear,Ve=String(u.attachmentFocusRequestId);let Be,Le;return t[52]!==n||t[53]!==u.attachments||t[54]!==u.clear||t[55]!==u.setAttachments||t[56]!==u.setText||t[57]!==u.text||t[58]!==he||t[59]!==c||t[60]!==Ae||t[61]!==me||t[62]!==b||t[63]!==a||t[64]!==l||t[65]!==h||t[66]!==I||t[67]!==v||t[68]!==S||t[69]!==s||t[70]!==Ve||t[71]!==C?(Be=(0,ie.jsx)(P.Composer,{agentId:n,serverId:s,workspaceId:C,externalKeyboardShift:!0,isPaneFocused:a,value:Te,onChangeText:Fe,attachments:He,attachmentScopeKeys:he,onOpenWorkspaceAttachment:me,onChangeAttachments:ze,cwd:c,clearDraft:Ee,autoFocus:a,autoFocusKey:Ve,isSubmitLoading:l,onAttentionInputFocus:h,onAttentionPromptSend:I,onComposerHeightChange:v,onMessageSent:S,onClientSlashCommand:Ae,isCompactLayout:b}),t[52]=n,t[53]=u.attachments,t[54]=u.clear,t[55]=u.setAttachments,t[56]=u.setText,t[57]=u.text,t[58]=he,t[59]=c,t[60]=Ae,t[61]=me,t[62]=b,t[63]=a,t[64]=l,t[65]=h,t[66]=I,t[67]=v,t[68]=S,t[69]=s,t[70]=Ve,t[71]=C,t[72]=Be):Be=t[72],t[73]!==ke||t[74]!==w||t[75]!==je||t[76]!==Be?(Le=(0,ie.jsxs)(f.default.View,{style:ke,onLayout:w,children:[je,Be]}),t[73]=ke,t[74]=w,t[75]=je,t[76]=Be,t[77]=Le):Le=t[77],Le}function De(e){return e.setExplorerTabForCheckout}function Oe(e){return e.openFileExplorerForCheckout}function Re(e){return e.unpinAgent}function Me(e){return e.hideAgent}function We(e){return e.closeTab}function He(e){const a=(0,o.c)(18),{serverLabel:c,connectionStatus:l,lastError:u,isUnknownDaemon:f,t:p}=e;if(void 0!==f&&f){let e,s,o,l,u;return a[0]!==c||a[1]!==p?(e=p("agentPanel.unavailable.unknownHost",{serverLabel:c}),a[0]=c,a[1]=p,a[2]=e):e=a[2],a[3]!==e?(s=(0,ie.jsx)(n.Text,{style:Be.errorText,children:e}),a[3]=e,a[4]=s):s=a[4],a[5]!==p?(o=p("agentPanel.unavailable.addHost"),a[5]=p,a[6]=o):o=a[6],a[7]!==o?(l=(0,ie.jsx)(n.Text,{style:Be.statusText,children:o}),a[7]=o,a[8]=l):l=a[8],a[9]!==s||a[10]!==l?(u=(0,ie.jsx)(t.View,{style:Be.container,children:(0,ie.jsxs)(t.View,{style:Be.centerState,children:[s,l]})}),a[9]=s,a[10]=l,a[11]=u):u=a[11],u}const h="connecting"===l,I="online"===l;let v;return a[12]!==h||a[13]!==I||a[14]!==u||a[15]!==c||a[16]!==p?(v=(0,ie.jsx)(t.View,{style:Be.container,children:(0,ie.jsx)(t.View,{style:Be.centerState,children:h||I?(0,ie.jsxs)(ie.Fragment,{children:[(0,ie.jsx)(s.ActivityIndicator,{size:"large"}),(0,ie.jsx)(n.Text,{style:Be.loadingText,children:p(I?"agentPanel.unavailable.preparingSession":"agentPanel.unavailable.connecting",{serverLabel:c})}),(0,ie.jsx)(n.Text,{style:Be.statusText,children:p(I?"agentPanel.unavailable.showSoon":"agentPanel.unavailable.showWhenOnline")})]}):(0,ie.jsxs)(ie.Fragment,{children:[(0,ie.jsx)(n.Text,{style:Be.offlineTitle,children:p("agentPanel.unavailable.reconnectingTo",{serverLabel:c})}),(0,ie.jsx)(n.Text,{style:Be.offlineDescription,children:p("agentPanel.unavailable.showAgainWhenReachable")}),u?(0,ie.jsx)(n.Text,{style:Be.offlineDetails,children:u}):null]})})}),a[12]=h,a[13]=I,a[14]=u,a[15]=c,a[16]=p,a[17]=v):v=a[17],v}const ze=(0,h.withUnistyles)(s.ActivityIndicator),Ee=e=>({color:e.colors.foregroundMuted}),Ve=e=>({color:e.colors.foreground}),qe=u.default.create({content:{flex:1},inputAreaWrapper:{width:"100%"}}),Be=h.StyleSheet.create(e=>({root:{flex:1,backgroundColor:e.colors.surface0,uni__dependencies:[0]},container:{flex:1,backgroundColor:e.colors.surface0,uni__dependencies:[0]},contentContainer:Object.assign({flex:1,overflow:"hidden"},_.isWeb?{userSelect:"none"}:{}),historySyncOverlay:{position:"absolute",top:0,right:0,bottom:0,left:0,backgroundColor:e.colors.surface0,alignItems:"center",justifyContent:"center",zIndex:40,uni__dependencies:[0]},archivingOverlay:{position:"absolute",top:0,right:0,bottom:0,left:0,backgroundColor:"rgba(8, 10, 14, 0.86)",alignItems:"center",justifyContent:"center",paddingHorizontal:e.spacing[8],gap:e.spacing[3],zIndex:50,uni__dependencies:[0]},archivingTitle:{fontSize:e.fontSize.lg,fontWeight:e.fontWeight.semibold,color:e.colors.foreground,textAlign:"center",uni__dependencies:[0]},archivingSubtitle:{fontSize:e.fontSize.sm,color:e.colors.foregroundMuted,textAlign:"center",uni__dependencies:[0]},loadingText:{fontSize:e.fontSize.base,color:e.colors.foregroundMuted,uni__dependencies:[0]},centerState:{flex:1,alignItems:"center",justifyContent:"center",paddingHorizontal:e.spacing[6],gap:e.spacing[3],uni__dependencies:[0]},errorContainer:{flex:1,alignItems:"center",justifyContent:"center"},errorText:{fontSize:e.fontSize.lg,color:e.colors.foregroundMuted,textAlign:"center",uni__dependencies:[0]},statusText:{marginTop:e.spacing[2],textAlign:"center",fontSize:e.fontSize.sm,color:e.colors.foregroundMuted,uni__dependencies:[0]},offlineTitle:{fontSize:e.fontSize.base,fontWeight:e.fontWeight.semibold,color:e.colors.foreground,textAlign:"center",uni__dependencies:[0]},offlineDescription:{fontSize:e.fontSize.sm,color:e.colors.foregroundMuted,textAlign:"center",uni__dependencies:[0]},offlineDetails:{fontSize:e.fontSize.xs,color:e.colors.foregroundMuted,textAlign:"center",uni__dependencies:[0]}}))},4232,[348,711,3553,349,1590,36,1563,1401,59,234,146,444,1320,56,3442,3269,3499,4233,4292,3986,3658,3548,3991,4265,3996,3595,3483,3262,3263,4293,4141,4126,4294,3477,3963,4295,4296,4228,4290,4297,3367,4298,4299,3482,3480,3604,3272,3439,3426,4305,4312,3488,3473,3471,3521,3256,4084,279]);
15888
- __d(function(g,r,i,a,m,_e,d){"use strict";const e=["itemId","onInlineDetailsExpandedChangeByItemId"];function t(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"AgentStreamView",{enumerable:!0,get:function(){return ge}});var n=t(r(d[0])),s=r(d[1]),o=r(d[2]),l=r(d[3]),c=r(d[4]),u=r(d[5]),p=r(d[6]),h=t(p),y=r(d[7]),I=r(d[8]);r(d[9]),r(d[10]),r(d[11]),r(d[12]),r(d[13]);var f=r(d[14]),x=r(d[15]),b=r(d[16]),S=r(d[17]),v=t(S),w=r(d[18]),k=r(d[19]),C=r(d[20]),j=r(d[21]),T=r(d[22]),_=r(d[23]),P=r(d[24]),M=r(d[25]),O=r(d[26]),F=r(d[27]),A=r(d[28]),R=r(d[29]),B=r(d[30]),H=r(d[31]),D=r(d[32]),q=r(d[33]),E=r(d[34]),L=r(d[35]),W=r(d[36]),z=r(d[37]),V=r(d[38]),N=r(d[39]),G=r(d[40]),U=r(d[41]),K=r(d[42]),X=r(d[43]),$=r(d[44]),Q=r(d[45]),Y=r(d[46]),J=r(d[47]);function Z(e){if(!e.content)return null;const t=e.layoutItem.completedFooter,n=t?(0,J.jsx)(q.CompletedTurnFooterRow,{strategy:e.strategy,items:t.items,timing:t.timing,startIndex:t.startIndex,supportsTimelineCursor:e.supportsTimelineCursor,onForkAssistantTurn:e.onForkAssistantTurn}):null,s=(0,J.jsx)(Te,{gapBelow:e.layoutItem.gapBelow,children:e.content});return"footer-then-content"===e.layoutItem.frameOrder?(0,J.jsxs)(J.Fragment,{children:[n,s]}):(0,J.jsxs)(J.Fragment,{children:[s,n]})}function ee(e){const t=e.layoutItemById.get(e.item.id);return t?e.renderStreamItem(t):null}function te(e){const t=e.layoutItemById.get(e.item.id);return t?e.renderStreamItem(t):null}const ne=["supportsStreaming","supportsSessionPersistence","supportsDynamicModes","supportsMcpServers","supportsReasoningStream","supportsToolInvocations","supportsRewindConversation","supportsRewindFiles","supportsRewindBoth"],se=[];function re(e){if(!e.payload.attachment)throw new Error(e.missingAttachmentMessage);return{kind:"chat_history",id:`chat_history:${e.draftId}`,attachment:e.payload.attachment,source:{serverId:e.serverId,agentId:e.agentId,boundaryMessageId:e.payload.boundaryMessageId,boundaryCursor:e.payload.boundaryCursor,itemCount:e.payload.itemCount}}}function oe(e){if(!e.provider)return;const t={};for(const n of e.features??[])t[n.id]=n.value;return{provider:e.provider,cwd:e.cwd,modeId:e.currentModeId??e.runtimeInfo?.modeId??null,model:e.model??e.runtimeInfo?.model??null,thinkingOptionId:e.thinkingOptionId??e.runtimeInfo?.thinkingOptionId??null,featureValues:t}}const ie=(0,p.forwardRef)(function({agentId:e,serverId:t,context:n,streamItems:s,streamHead:u,pendingPermissions:f,routeBottomAnchorRequest:b=null,isAuthoritativeHistoryReady:j=!0,toast:O,onOpenWorkspaceFile:F,readOnly:U=!1,historyPagination:ne},ie){const{t:ae}=(0,I.useTranslation)(),de=(0,y.useRouter)(),le=(0,M.useSettings)(e=>e.autoExpandReasoning),ce=(0,M.useSettings)(e=>e.toolCallDetailLevel),ue=(0,p.useRef)(null),pe=(0,x.useIsCompactFormFactor)(),me=(0,p.useMemo)(()=>(0,D.resolveStreamRenderStrategy)({platform:"web",isMobileBreakpoint:pe}),[pe]),[ge,ye]=(0,p.useState)(!0),[Ie,fe]=(0,p.useState)(new Set),[xe,be]=(0,p.useState)(new Set),Se=(0,k.usePanelStore)(e=>e.openFileExplorerForCheckout),ve=(0,k.usePanelStore)(e=>e.setExplorerTabForCheckout),ke=t??n.serverId??"",je=(0,T.useSessionStore)(e=>e.sessions[ke]?.client??null),Te=(0,T.useSessionStore)(t=>t.sessions[ke]?.agentStreamHead?.get(e)),Pe=u??Te,Me=(0,T.useSessionStore)(e=>!U&&!0===e.sessions[ke]?.serverInfo?.features?.agentForkContext),Oe=(0,T.useSessionStore)(e=>!0===e.sessions[ke]?.serverInfo?.features?.agentForkContextCursor),Fe=n.cwd?.trim()||"",{requestDirectoryListing:Ae}=(0,_.useFileExplorerActions)({serverId:ke,workspaceId:n.workspaceId,workspaceRoot:Fe}),Re=(0,P.useLoadOlderAgentHistory)({serverId:ke,agentId:e,toast:O}),{isLoadingOlder:Be,hasOlder:He,loadOlder:De}=ne?{isLoadingOlder:ne.isLoadingOlder,hasOlder:ne.hasOlder,loadOlder:ne.onLoadOlder}:Re,qe=S.FadeIn.duration(200),Ee=S.FadeOut.duration(200);(0,p.useEffect)(()=>{ye(!0),fe(new Set),be(new Set)},[e]);const Le=(0,N.useStableEvent)((e,t)=>{if(!e.path)return;const s=(0,L.normalizeInlinePathTarget)(e.path,n.cwd);if(!s)return;if(s.file){const o=(0,W.normalizeWorkspaceFileLocation)({path:s.file,lineStart:e.lineStart,lineEnd:e.lineEnd});if(!o)return;return F?void F({location:o,disposition:t}):void(n.workspaceId&&(0,z.navigateToWorkspace)({serverId:ke,workspaceId:n.workspaceId,target:(0,W.createWorkspaceFileTabTarget)(o)}))}Ae(s.directory,{recordHistory:!1,setCurrentPath:!1});const o={serverId:ke,cwd:n.cwd,isGit:n.projectPlacement?.checkout?.isGit??!0};ve(Object.assign({},o,{tab:"files"})),Se({isCompact:pe,checkout:o})}),We=(0,N.useStableEvent)(e=>{Le({raw:e,path:e},"main")}),ze=(0,N.useStableEvent)(async({target:t,boundary:s})=>{try{if(!Me)return void O?.error(ae("message.actions.forkUnavailable"));if(!je)throw new Error(ae("workspace.terminal.hostDisconnected"));const c=oe(n),u=async()=>{const t=(0,X.generateDraftId)(),n=await je.buildAgentForkContext(e,s),o=re({draftId:t,serverId:ke,agentId:e,payload:n,missingAttachmentMessage:ae("message.actions.forkFailed")});return $.useWorkspaceAttachmentsStore.getState().setWorkspaceAttachments({scopeKey:(0,$.buildDraftWorkspaceAttachmentScopeKey)(t),attachments:[o]}),t};if("tab"===t){const e=n.workspaceId;if(!e)throw new Error(ae("message.actions.forkMissingWorkspace"));const t=await u();return void(0,z.navigateToWorkspace)({serverId:ke,workspaceId:e,target:(o=c,l=t,o?{kind:"draft",draftId:l,setup:o}:{kind:"draft",draftId:l})})}const p=await u(),h=n.projectPlacement?.checkout?.cwd?.trim()||n.cwd.trim()||void 0;c&&Y.useWorkspaceDraftSubmissionStore.getState().setDraftSetup({draftId:p,setup:c,sourceDirectory:h}),de.push((0,V.buildNewWorkspaceRoute)({serverId:ke,sourceDirectory:h,displayName:n.projectPlacement?.projectName,projectId:n.projectPlacement?.projectKey,draftId:p}))}catch(e){O?.error((0,Q.toErrorMessage)(e)||ae("message.actions.forkFailed"))}var o,l}),Ve=(0,K.useRetainedPanelActive)(),Ne=(0,p.useRef)(s),Ge=(0,p.useRef)(Pe);Ve&&(Ne.current=s,Ge.current=Pe);const Ue=Ve?s:Ne.current,Ke=Ve?Pe:Ge.current,Xe=(0,p.useMemo)(()=>(0,R.prepareToolCallHistory)(ce,Ue),[Ue,ce]),$e=(0,p.useMemo)(()=>(0,R.projectToolCallDetailLevel)({level:ce,tail:Ue,head:Ke??se,preparedHistory:Xe,isTurnActive:"running"===n.status}),[n.status,Ke,Ue,Xe,ce]),Qe=(0,p.useMemo)(()=>(0,H.buildAgentStreamRenderModel)({agentStatus:n.status,tail:$e.tail,head:$e.head,platform:G.isWeb?"web":"native",isMobileBreakpoint:pe}),[n.status,pe,$e.head,$e.tail]),Ye=(0,p.useMemo)(()=>(0,E.layoutStream)({strategy:me,agentStatus:n.status,history:Qe.history,liveHead:Qe.segments.liveHead,timingByAssistantId:Qe.turnTiming.byAssistantId}),[n.status,Qe.history,Qe.segments.liveHead,Qe.turnTiming.byAssistantId,me]);(0,p.useImperativeHandle)(ie,()=>({scrollToBottom(e="jump-to-bottom"){ue.current?.scrollToBottom(e)},prepareForViewportChange(){ue.current?.prepareForViewportChange()}}),[]);const Je=(0,p.useCallback)(()=>{ue.current?.scrollToBottom("jump-to-bottom")},[]),Ze=(0,p.useCallback)((e,t)=>{me.shouldDisableParentScrollOnInlineDetailsExpansion()&&fe(n=>{const s=new Set(n);return t?s.add(e):s.delete(e),s})},[me]),et=(0,p.useCallback)((e,t)=>{be(n=>{const s=new Set(n);return t?s.add(e):s.delete(e),s})},[]),tt=(0,p.useCallback)((t,s)=>(0,J.jsx)(C.UserMessage,{serverId:ke,agentId:e,messageId:s.id,message:s.text,images:s.images,attachments:s.attachments,timestamp:s.timestamp.getTime(),capabilities:n.capabilities,client:je,isFirstInGroup:t.isFirstInUserGroup,isLastInGroup:t.isLastInUserGroup}),[n.capabilities,e,je,ke]),nt=(0,p.useCallback)((e,t)=>(0,J.jsx)(L.AssistantFileLinkResolverProvider,{client:je,serverId:ke,workspaceRoot:Fe,onOpenWorkspaceFile:Le,toast:O,children:(0,J.jsx)(C.AssistantMessage,{message:t.text,timestamp:t.timestamp.getTime(),workspaceRoot:Fe,serverId:ke,client:je,spacing:e.assistantSpacing})}),[je,Le,ke,O,Fe]),st=(0,p.useCallback)((e,t)=>(0,J.jsx)(he,{itemId:t.id,onInlineDetailsExpandedChangeByItemId:Ze,toolName:"thinking",args:t.text,status:"ready"===t.status?"completed":"executing",isLastInSequence:e.isLastInToolSequence,defaultExpanded:le,forceInline:le}),[le,Ze]),rt=(0,p.useCallback)((e,t,s)=>{const{payload:o}=e;if("agent"===o.source){const l=o.data;return"speak"===l.name&&"unknown"===l.detail.type&&"string"==typeof l.detail.input&&l.detail.input.trim()?(0,J.jsx)(C.SpeakMessage,{message:l.detail.input,timestamp:e.timestamp.getTime()}):(0,J.jsx)(he,{itemId:e.id,onInlineDetailsExpandedChangeByItemId:Ze,toolName:l.name,error:l.error,status:l.status,detail:l.detail,cwd:n.cwd,metadata:l.metadata,isLastInSequence:t,onOpenFilePath:We,maxDetailHeight:s})}const l=o.data;return(0,J.jsx)(he,{itemId:e.id,onInlineDetailsExpandedChangeByItemId:Ze,toolName:l.toolName,args:l.arguments,result:l.result,status:l.status,isLastInSequence:t,onOpenFilePath:We,maxDetailHeight:s})},[n.cwd,Ze,We]),ot=(0,p.useCallback)((e,t)=>{const n=$e.groupsByHostId.get(t.id);if(!n)return rt(t,e.isLastInToolSequence);const s=xe.has(n.run.id);return(0,J.jsx)(B.OverviewToolCallGroupView,{group:n,expanded:s,isLastInSequence:e.isLastInToolSequence,onExpandedChange:et,children:s?n.run.calls.map((e,t)=>(0,J.jsx)(h.default.Fragment,{children:rt(e,t===n.run.calls.length-1,200)},e.id)):null})},[$e.groupsByHostId,xe,rt,et]),it=(0,p.useCallback)(e=>{const t=e.item;switch(t.kind){case"user_message":return tt(e,t);case"assistant_message":return nt(e,t);case"thought":return st(e,t);case"tool_call":return ot(e,t);case"activity_log":return(0,J.jsx)(C.ActivityLog,{type:t.activityType,message:t.message,timestamp:t.timestamp.getTime(),metadata:t.metadata});case"todo_list":return(0,J.jsx)(C.TodoListCard,{items:t.items});case"compaction":return(0,J.jsx)(C.CompactionMarker,{status:t.status,trigger:t.trigger,preTokens:t.preTokens});default:return null}},[tt,nt,st,ot]),at=Ye.auxiliaryTurnFooter,dt=(0,p.useCallback)(e=>Z({content:it(e),layoutItem:e,strategy:me,supportsTimelineCursor:Oe,onForkAssistantTurn:U?void 0:ze}),[ze,U,it,me,Oe]),lt=(0,p.useMemo)(()=>Array.from(f.values()).filter(t=>t.agentId===e),[f,e]),ct="running"===n.status,ut=(0,p.useMemo)(()=>{return 0===(e={pendingPermissions:lt,client:je}).pendingPermissions.length?null:(0,J.jsx)(c.View,{style:Ce.permissionsContainer,children:e.pendingPermissions.map(t=>(0,J.jsx)(we,{permission:t,client:e.client},t.key))});var e},[je,lt]),pt=(0,p.useMemo)(()=>ct||at?(0,J.jsx)(q.TurnFooter,{isRunning:ct,inFlightTurnStartedAt:Qe.turnTiming.runningStartedAt,host:at,strategy:me,supportsTimelineCursor:Oe,onForkAssistantTurn:U?void 0:ze}):null,[ze,U,ct,Qe.turnTiming.runningStartedAt,at,me,Oe]),mt=(0,p.useMemo)(()=>Object.assign({},Qe,{boundary:Qe.boundary,auxiliary:{pendingPermissions:ut,turnFooter:pt}}),[Qe,ut,pt]),gt=(0,p.useMemo)(()=>[Ce.emptyState,Ce.contentWrapper],[]),ht=(0,p.useMemo)(()=>{return(e={renderModel:mt,emptyStateStyle:gt,emptyText:ae("agentStream.empty")}).renderModel.boundary.hasVirtualizedHistory||e.renderModel.boundary.hasMountedHistory||e.renderModel.boundary.hasLiveHead||e.renderModel.auxiliary.pendingPermissions||e.renderModel.auxiliary.turnFooter?null:(0,J.jsx)(c.View,{style:e.emptyStateStyle,children:(0,J.jsx)(l.Text,{style:Ce.emptyStateText,children:e.emptyText})});var e},[mt,gt,ae]),{boundary:yt,auxiliary:It}=mt,ft=(0,p.useMemo)(()=>{const e=new Map;for(const t of Ye.history)e.set(t.item.id,t);return e},[Ye.history]),xt=(0,p.useMemo)(()=>{const e=new Map;for(const t of Ye.liveHead)e.set(t.item.id,t);return e},[Ye.liveHead]),bt=(0,p.useCallback)(e=>ee({item:e,layoutItemById:ft,renderStreamItem:dt}),[ft,dt]),St=(0,p.useCallback)(e=>bt(e),[bt]),vt=(0,p.useCallback)(e=>bt(e),[bt]),wt=(0,N.useStableEvent)(e=>te({item:e,layoutItemById:xt,renderStreamItem:dt})),kt=(0,p.useCallback)(()=>{return(e={pendingPermissions:It.pendingPermissions,turnFooter:It.turnFooter}).pendingPermissions||e.turnFooter?(0,J.jsxs)(J.Fragment,{children:[e.turnFooter,e.pendingPermissions?(0,J.jsx)(c.View,{style:Ce.contentWrapper,children:(0,J.jsx)(c.View,{style:Ce.listHeaderContent,children:e.pendingPermissions})}):null]}):null;var e},[It.pendingPermissions,It.turnFooter]),Ct=(0,p.useMemo)(()=>({renderHistoryVirtualizedRow:St,renderHistoryMountedRow:vt,renderLiveHeadRow:wt,renderLiveAuxiliary:kt}),[St,vt,wt,kt]),jt=!me.shouldDisableParentScrollOnInlineDetailsExpansion()||0===Ie.size,Tt=(0,p.useMemo)(()=>({contentById:$e.historyGroupUpdatesByHostId,displayStateById:xe,globalDisplayState:pe}),[xe,pe,$e.historyGroupUpdatesByHostId]);return(0,J.jsx)(A.ToolCallSheetProvider,{children:(0,J.jsxs)(c.View,{style:Ce.container,children:[(0,J.jsx)(C.MessageOuterSpacingProvider,{disableOuterSpacing:!0,children:me.render({agentId:e,segments:mt.segments,historyRowRevision:Tt,liveHeadRowRevision:xe,boundary:yt,renderers:Ct,listEmptyComponent:ht,viewportRef:ue,routeBottomAnchorRequest:b,isAuthoritativeHistoryReady:j,onNearBottomChange:ye,onNearHistoryStart:De,isLoadingOlderHistory:Be,hasOlderHistory:He,scrollEnabled:jt,listStyle:Ce.list,baseListContentContainerStyle:Ce.listContentContainer,forwardListContentContainerStyle:Ce.forwardListContentContainer})}),!ge&&(0,J.jsx)(c.View,{style:Ce.scrollToBottomContainer,pointerEvents:"box-none",children:(0,J.jsx)(v.default.View,{entering:qe,exiting:Ee,children:(0,J.jsx)(o.Pressable,{style:Ce.scrollToBottomButton,onPress:Je,accessibilityRole:"button",accessibilityLabel:ae("agentStream.scrollToBottom"),testID:"scroll-to-bottom-button",children:(0,J.jsx)(w.ChevronDown,{size:24,color:Ce.scrollToBottomIcon.color})})})})]})})});function ae(e,t){return ne.every(n=>e?.[n]===t?.[n])}function de(e,t){const n=[];return e?.checkout?.cwd!==t?.checkout?.cwd&&n.push("agent.projectPlacement.checkout.cwd"),e?.checkout?.isGit!==t?.checkout?.isGit&&n.push("agent.projectPlacement.checkout.isGit"),e?.projectName!==t?.projectName&&n.push("agent.projectPlacement.projectName"),e?.projectKey!==t?.projectKey&&n.push("agent.projectPlacement.projectKey"),n}function le(e,t){const n=[];return e.provider!==t.provider&&n.push("agent.provider"),e.currentModeId!==t.currentModeId&&n.push("agent.currentModeId"),e.model!==t.model&&n.push("agent.model"),e.thinkingOptionId!==t.thinkingOptionId&&n.push("agent.thinkingOptionId"),e.runtimeInfo?.modeId!==t.runtimeInfo?.modeId&&n.push("agent.runtimeInfo.modeId"),e.runtimeInfo?.model!==t.runtimeInfo?.model&&n.push("agent.runtimeInfo.model"),e.runtimeInfo?.thinkingOptionId!==t.runtimeInfo?.thinkingOptionId&&n.push("agent.runtimeInfo.thinkingOptionId"),e.features!==t.features&&n.push("agent.features"),n}function ce(e,t){const n=[];return e.serverId!==t.serverId&&n.push("agent.serverId"),e.id!==t.id&&n.push("agent.id"),e.workspaceId!==t.workspaceId&&n.push("agent.workspaceId"),e.status!==t.status&&n.push("agent.status"),e.cwd!==t.cwd&&n.push("agent.cwd"),ae(e.capabilities,t.capabilities)||n.push("agent.capabilities"),e.lastError!==t.lastError&&n.push("agent.lastError"),n.push(...le(e,t)),n.push(...de(e.projectPlacement,t.projectPlacement)),n}function ue(e,t){return e?.agentId===t?.agentId&&e?.reason===t?.reason&&e?.requestKey===t?.requestKey}function pe(e,t){return e?.hasOlder===t?.hasOlder&&e?.isLoadingOlder===t?.isLoadingOlder&&e?.onLoadOlder===t?.onLoadOlder}function me(e,t){const n=[];return e.agentId!==t.agentId&&n.push("agentId"),e.serverId!==t.serverId&&n.push("serverId"),n.push(...ce(e.context,t.context)),e.streamItems!==t.streamItems&&n.push("streamItems"),e.streamHead!==t.streamHead&&n.push("streamHead"),e.pendingPermissions!==t.pendingPermissions&&n.push("pendingPermissions"),ue(e.routeBottomAnchorRequest,t.routeBottomAnchorRequest)||n.push("routeBottomAnchorRequest"),e.isAuthoritativeHistoryReady!==t.isAuthoritativeHistoryReady&&n.push("isAuthoritativeHistoryReady"),e.toast!==t.toast&&n.push("toast"),e.onOpenWorkspaceFile!==t.onOpenWorkspaceFile&&n.push("onOpenWorkspaceFile"),e.readOnly!==t.readOnly&&n.push("readOnly"),pe(e.historyPagination,t.historyPagination)||n.push("historyPagination"),(0,U.recordRenderProfileReasons)(`AgentStreamView:${t.agentId}`,n),0===n.length}const ge=(0,p.memo)(ie,me);function he(t){const s=(0,u.c)(10);let o,l,c,p;if(s[0]!==t){var h=t;({itemId:o,onInlineDetailsExpandedChangeByItemId:l}=h),c=(0,n.default)(h,e),s[0]=t,s[1]=o,s[2]=l,s[3]=c}else o=s[1],l=s[2],c=s[3];s[4]!==o||s[5]!==l?(p=e=>l(o,e),s[4]=o,s[5]=l,s[6]=p):p=s[6];const y=p;let I;return s[7]!==y||s[8]!==c?(I=(0,J.jsx)(C.ToolCall,Object.assign({},c,{onInlineDetailsExpandedChange:y})),s[7]=y,s[8]=c,s[9]=I):I=s[9],I}ge.displayName="AgentStreamView";const ye=(0,f.withUnistyles)(s.ActivityIndicator),Ie=(0,f.withUnistyles)(w.Check),fe=(0,f.withUnistyles)(w.X),xe=e=>({color:e.colors.foreground}),be=e=>({color:e.colors.foregroundMuted}),Se=({pressed:e,hovered:t=!1})=>[je.optionButton,t?je.optionButtonHovered:null,e?je.optionButtonPressed:null];function ve(e){const t=(0,u.c)(16),{action:n,isRespondingAction:s,isResponding:p,isPrimary:h,Icon:y,testID:I,onPress:f}=e;let x;t[0]!==n||t[1]!==f?(x=()=>f(n),t[0]=n,t[1]=f,t[2]=x):x=t[2];const b=x;let S;t[3]!==h?(S=h?[je.optionText,je.optionTextPrimary]:je.optionText,t[3]=h,t[4]=S):S=t[4];const v=S,w=h?xe:be;let k,C;return t[5]!==y||t[6]!==n||t[7]!==w||t[8]!==s||t[9]!==v?(k=s?(0,J.jsx)(ye,{size:"small",uniProps:w}):(0,J.jsxs)(c.View,{style:je.optionContent,children:[(0,J.jsx)(y,{size:14,uniProps:w}),(0,J.jsx)(l.Text,{style:v,children:n.label})]}),t[5]=y,t[6]=n,t[7]=w,t[8]=s,t[9]=v,t[10]=k):k=t[10],t[11]!==b||t[12]!==p||t[13]!==k||t[14]!==I?(C=(0,J.jsx)(o.Pressable,{testID:I,style:Se,onPress:b,disabled:p,children:k}),t[11]=b,t[12]=p,t[13]=k,t[14]=I,t[15]=C):C=t[15],C}function we(e){const t=(0,u.c)(81),{permission:n,client:s}=e,{t:o}=(0,I.useTranslation)(),h=(0,x.useIsCompactFormFactor)(),{request:y}=n,f="plan"===y.kind;let S;t[0]!==f||t[1]!==y.name||t[2]!==y.title||t[3]!==o?(S=f?o("agentStream.permission.plan"):y.title??y.name??o("agentStream.permission.required"),t[0]=f,t[1]=y.name,t[2]=y.title,t[3]=o,t[4]=S):S=t[4];const v=S,w=y.description??"";let k;t[5]!==y.detail||t[6]!==y.input?(k=y.detail??{type:"unknown",input:y.input??null,output:null},t[5]=y.detail,t[6]=y.input,t[7]=k):k=t[7];const C=k;let T;e:{if("question"===y.kind){let e;t[8]===Symbol.for("react.memo_cache_sentinel")?(e=[],t[8]=e):e=t[8],T=e;break e}if(Array.isArray(y.actions)&&y.actions.length>0){T=y.actions;break e}let e,n,s,l,c;t[9]!==o?(e=o("agentStream.permission.deny"),t[9]=o,t[10]=e):e=t[10],t[11]!==e?(n={id:"reject",label:e,behavior:"deny",variant:"danger",intent:"dismiss"},t[11]=e,t[12]=n):n=t[12],t[13]!==f||t[14]!==o?(s=o(f?"agentStream.permission.implement":"agentStream.permission.accept"),t[13]=f,t[14]=o,t[15]=s):s=t[15],t[16]!==s?(l={id:"accept",label:s,behavior:"allow",variant:"primary"},t[16]=s,t[17]=l):l=t[17],t[18]!==n||t[19]!==l?(c=[n,l],t[18]=n,t[19]=l,t[20]=c):c=t[20],T=c}const _=T;let P;e:{if(!y){P=void 0;break e}const e="string"==typeof y.metadata?.planText?y.metadata.planText:void 0;if(e){P=e;break e}const t=y.input?.plan;"string"!=typeof t?P=void 0:P=t}const M=P;let A;t[21]!==s||t[22]!==o?(A={mutationFn:async e=>{if(!s)throw new Error(o("common.errors.daemonClientUnavailable"));return s.respondToPermissionAndWait(e.agentId,e.requestId,e.response,15e3)}},t[21]=s,t[22]=o,t[23]=A):A=t[23];const R=(0,b.useMutation)(A),{reset:B,mutateAsync:H,isPending:D}=R,[q,E]=(0,p.useState)(null);let L,W,z;t[24]!==B?(L=()=>{B(),E(null)},t[24]=B,t[25]=L):L=t[25],t[26]!==n.request.id||t[27]!==B?(W=[n.request.id,B],t[26]=n.request.id,t[27]=B,t[28]=W):W=t[28],(0,p.useEffect)(L,W),t[29]!==n.agentId||t[30]!==n.request.id||t[31]!==H?(z=e=>{H({agentId:n.agentId,requestId:n.request.id,response:e}).catch(ke)},t[29]=n.agentId,t[30]=n.request.id,t[31]=H,t[32]=z):z=t[32];const V=z;let N;t[33]!==V?(N=e=>{E(e.id),"allow"!==e.behavior?V({behavior:"deny",selectedActionId:e.id,message:"Denied by user"}):V({behavior:"allow",selectedActionId:e.id})},t[33]=V,t[34]=N):N=t[34];const G=N,U=!h&&je.optionsContainerDesktop;let K;t[35]!==U?(K=[je.optionsContainer,U],t[35]=U,t[36]=K):K=t[36];const X=K;if("question"===y.kind){let e;return t[37]!==V||t[38]!==D||t[39]!==n?(e=(0,J.jsx)(F.QuestionFormCard,{permission:n,onRespond:V,isResponding:D}),t[37]=V,t[38]=D,t[39]=n,t[40]=e):e=t[40],e}let $,Q,Y,Z,ee;if(t[41]!==o?($=o("agentStream.permission.question"),t[41]=o,t[42]=$):$=t[42],t[43]!==$?(Q=(0,J.jsx)(l.Text,{testID:"permission-request-question",style:je.question,children:$}),t[43]=$,t[44]=Q):Q=t[44],t[45]!==G||t[46]!==D||t[47]!==_||t[48]!==q){let e;t[50]!==G||t[51]!==D||t[52]!==q?(e=e=>{const t="primary"===e.variant,n=q===e.id,s="allow"===e.behavior?Ie:fe;let o;return o="deny"===e.behavior?"permission-request-deny":"accept"===e.id||"implement"===e.id?"permission-request-accept":`permission-request-action-${e.id}`,(0,J.jsx)(ve,{action:e,isRespondingAction:n,isResponding:D,isPrimary:t,Icon:s,testID:o,onPress:G},e.id)},t[50]=G,t[51]=D,t[52]=q,t[53]=e):e=t[53],Y=_.map(e),t[45]=G,t[46]=D,t[47]=_,t[48]=q,t[49]=Y}else Y=t[49];t[54]!==X||t[55]!==Y?(Z=(0,J.jsx)(c.View,{style:X,children:Y}),t[54]=X,t[55]=Y,t[56]=Z):Z=t[56],t[57]!==Q||t[58]!==Z?(ee=(0,J.jsxs)(J.Fragment,{children:[Q,Z]}),t[57]=Q,t[58]=Z,t[59]=ee):ee=t[59];const te=ee;if(f&&M){let e;return t[60]!==w||t[61]!==te||t[62]!==M||t[63]!==v?(e=(0,J.jsx)(j.PlanCard,{title:v,description:w,text:M,footer:te,testID:"permission-plan-card",disableOuterSpacing:!0}),t[60]=w,t[61]=te,t[62]=M,t[63]=v,t[64]=e):e=t[64],e}let ne,se,re,oe,ie;return t[65]!==v?(ne=(0,J.jsx)(l.Text,{style:je.title,children:v}),t[65]=v,t[66]=ne):ne=t[66],t[67]!==w?(se=w?(0,J.jsx)(l.Text,{style:je.description,children:w}):null,t[67]=w,t[68]=se):se=t[68],t[69]!==M||t[70]!==o?(re=M?(0,J.jsx)(j.PlanCard,{title:o("agentStream.permission.proposedPlan"),text:M,testID:"permission-plan-card",disableOuterSpacing:!0}):null,t[69]=M,t[70]=o,t[71]=re):re=t[71],t[72]!==f||t[73]!==C?(oe=f?null:(0,J.jsx)(O.ToolCallDetailsContent,{detail:C,maxHeight:200}),t[72]=f,t[73]=C,t[74]=oe):oe=t[74],t[75]!==te||t[76]!==ne||t[77]!==se||t[78]!==re||t[79]!==oe?(ie=(0,J.jsxs)(c.View,{style:je.container,children:[ne,se,re,oe,te]}),t[75]=te,t[76]=ne,t[77]=se,t[78]=re,t[79]=oe,t[80]=ie):ie=t[80],ie}function ke(e){console.error("[PermissionRequestCard] Failed to respond to permission:",e)}const Ce=f.StyleSheet.create(e=>({container:{flex:1,backgroundColor:e.colors.surface0,uni__dependencies:[0]},contentWrapper:{width:"100%",maxWidth:x.MAX_CONTENT_WIDTH,alignSelf:"center",paddingHorizontal:e.spacing[2],uni__dependencies:[0]},listContentContainer:{paddingVertical:0,flexGrow:1,paddingHorizontal:{xs:e.spacing[3],md:e.spacing[4]},uni__dependencies:[0]},forwardListContentContainer:{paddingTop:e.spacing[4],paddingBottom:e.spacing[4],uni__dependencies:[0]},list:{flex:1},streamItemWrapper:{width:"100%",maxWidth:x.MAX_CONTENT_WIDTH,alignSelf:"center",paddingHorizontal:e.spacing[2],uni__dependencies:[0]},emptyState:{flex:1,alignItems:"center",justifyContent:"center",paddingVertical:e.spacing[12],uni__dependencies:[0]},permissionsContainer:{gap:e.spacing[2],uni__dependencies:[0]},listHeaderContent:{gap:e.spacing[3],uni__dependencies:[0]},syncingIndicator:{flexDirection:"row",alignItems:"center",gap:e.spacing[2],paddingVertical:e.spacing[1],paddingLeft:e.spacing[2],uni__dependencies:[0]},syncingIndicatorText:{color:e.colors.foregroundMuted,fontSize:e.fontSize.sm,uni__dependencies:[0]},invertedWrapper:{transform:[{scaleY:-1}],width:"100%"},emptyStateText:{color:e.colors.foregroundMuted,fontSize:e.fontSize.sm,textAlign:"center",uni__dependencies:[0]},scrollToBottomContainer:{position:"absolute",bottom:16,left:0,right:0,alignItems:"center"},scrollToBottomButton:Object.assign({width:48,height:48,borderRadius:24,backgroundColor:e.colors.surface2,alignItems:"center",justifyContent:"center"},e.shadow.sm,{uni__dependencies:[0]}),scrollToBottomIcon:{color:e.colors.foreground,uni__dependencies:[0]}})),je=f.StyleSheet.create(e=>({container:{marginVertical:e.spacing[3],padding:e.spacing[3],borderRadius:e.spacing[2],borderWidth:1,gap:e.spacing[2],backgroundColor:e.colors.surface1,borderColor:e.colors.border,uni__dependencies:[0]},title:{fontSize:e.fontSize.base,lineHeight:22,color:e.colors.foreground,uni__dependencies:[0]},description:{fontSize:e.fontSize.sm,lineHeight:20,color:e.colors.foregroundMuted,uni__dependencies:[0]},section:{gap:e.spacing[2],uni__dependencies:[0]},sectionTitle:{fontSize:e.fontSize.xs,uni__dependencies:[0]},question:{fontSize:e.fontSize.sm,marginTop:e.spacing[1],marginBottom:e.spacing[1],color:e.colors.foregroundMuted,uni__dependencies:[0]},optionsContainer:{gap:e.spacing[2],uni__dependencies:[0]},optionsContainerDesktop:{flexDirection:"row",justifyContent:"flex-start",alignItems:"center",width:"100%"},optionButton:{paddingVertical:e.spacing[2],paddingHorizontal:e.spacing[3],borderRadius:e.borderRadius.md,alignItems:"center",borderWidth:e.borderWidth[1],backgroundColor:e.colors.surface1,borderColor:e.colors.borderAccent,uni__dependencies:[0]},optionButtonHovered:{backgroundColor:e.colors.surface2,uni__dependencies:[0]},optionButtonPressed:{opacity:.9},optionContent:{flexDirection:"row",alignItems:"center",gap:e.spacing[2],uni__dependencies:[0]},optionText:{fontSize:e.fontSize.sm,fontWeight:e.fontWeight.normal,color:e.colors.foregroundMuted,uni__dependencies:[0]},optionTextPrimary:{color:e.colors.foreground,uni__dependencies:[0]}}));function Te(e){const t=(0,u.c)(5),{gapBelow:n,children:s}=e;let o;t[0]!==n?(o=[Ce.streamItemWrapper,{marginBottom:n}],t[0]=n,t[1]=o):o=t[1];const l=o;let p;return t[2]!==s||t[3]!==l?(p=(0,J.jsx)(c.View,{style:l,children:s}),t[2]=s,t[3]=l,t[4]=p):p=t[4],p}},4233,[35,3553,1562,711,348,349,36,1143,1563,146,234,1308,25,1401,56,3262,916,444,1590,3604,4234,4248,3272,3937,4268,3623,4250,4269,4249,4271,4274,4275,4279,4286,4288,4254,3445,3507,3511,3549,3263,4290,3658,3480,3483,3448,4291,279]);
15888
+ __d(function(g,r,i,a,m,_e,d){"use strict";const e=["itemId","onInlineDetailsExpandedChangeByItemId"];function t(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"AgentStreamView",{enumerable:!0,get:function(){return ge}});var n=t(r(d[0])),s=r(d[1]),o=r(d[2]),l=r(d[3]),c=r(d[4]),u=r(d[5]),p=r(d[6]),h=t(p),y=r(d[7]),I=r(d[8]);r(d[9]),r(d[10]),r(d[11]),r(d[12]),r(d[13]);var f=r(d[14]),x=r(d[15]),b=r(d[16]),S=r(d[17]),v=t(S),w=r(d[18]),k=r(d[19]),C=r(d[20]),j=r(d[21]),T=r(d[22]),_=r(d[23]),P=r(d[24]),M=r(d[25]),O=r(d[26]),F=r(d[27]),A=r(d[28]),R=r(d[29]),B=r(d[30]),H=r(d[31]),D=r(d[32]),q=r(d[33]),E=r(d[34]),L=r(d[35]),W=r(d[36]),z=r(d[37]),V=r(d[38]),N=r(d[39]),G=r(d[40]),U=r(d[41]),K=r(d[42]),X=r(d[43]),$=r(d[44]),Q=r(d[45]),Y=r(d[46]),J=r(d[47]);function Z(e){if(!e.content)return null;const t=e.layoutItem.completedFooter,n=t?(0,J.jsx)(q.CompletedTurnFooterRow,{strategy:e.strategy,items:t.items,timing:t.timing,startIndex:t.startIndex,supportsTimelineCursor:e.supportsTimelineCursor,onForkAssistantTurn:e.onForkAssistantTurn}):null,s=(0,J.jsx)(Te,{gapBelow:e.layoutItem.gapBelow,children:e.content});return"footer-then-content"===e.layoutItem.frameOrder?(0,J.jsxs)(J.Fragment,{children:[n,s]}):(0,J.jsxs)(J.Fragment,{children:[s,n]})}function ee(e){const t=e.layoutItemById.get(e.item.id);return t?e.renderStreamItem(t):null}function te(e){const t=e.layoutItemById.get(e.item.id);return t?e.renderStreamItem(t):null}const ne=["supportsStreaming","supportsSessionPersistence","supportsDynamicModes","supportsMcpServers","supportsReasoningStream","supportsToolInvocations","supportsRewindConversation","supportsRewindFiles","supportsRewindBoth"],se=[];function re(e){if(!e.payload.attachment)throw new Error(e.missingAttachmentMessage);return{kind:"chat_history",id:`chat_history:${e.draftId}`,attachment:e.payload.attachment,source:{serverId:e.serverId,agentId:e.agentId,boundaryMessageId:e.payload.boundaryMessageId,boundaryCursor:e.payload.boundaryCursor,itemCount:e.payload.itemCount}}}function oe(e){if(!e.provider)return;const t={};for(const n of e.features??[])t[n.id]=n.value;return{provider:e.provider,cwd:e.cwd,modeId:e.currentModeId??e.runtimeInfo?.modeId??null,model:e.model??e.runtimeInfo?.model??null,thinkingOptionId:e.thinkingOptionId??e.runtimeInfo?.thinkingOptionId??null,featureValues:t}}const ie=(0,p.forwardRef)(function({agentId:e,serverId:t,context:n,streamItems:s,streamHead:u,pendingPermissions:f,routeBottomAnchorRequest:b=null,isAuthoritativeHistoryReady:j=!0,toast:O,onOpenWorkspaceFile:F,readOnly:U=!1,historyPagination:ne},ie){const{t:ae}=(0,I.useTranslation)(),de=(0,y.useRouter)(),le=(0,M.useSettings)(e=>e.autoExpandReasoning),ce=(0,M.useSettings)(e=>e.toolCallDetailLevel),ue=(0,p.useRef)(null),pe=(0,x.useIsCompactFormFactor)(),me=(0,p.useMemo)(()=>(0,D.resolveStreamRenderStrategy)({platform:"web",isMobileBreakpoint:pe}),[pe]),[ge,ye]=(0,p.useState)(!0),[Ie,fe]=(0,p.useState)(new Set),[xe,be]=(0,p.useState)(new Set),Se=(0,k.usePanelStore)(e=>e.openFileExplorerForCheckout),ve=(0,k.usePanelStore)(e=>e.setExplorerTabForCheckout),ke=t??n.serverId??"",je=(0,T.useSessionStore)(e=>e.sessions[ke]?.client??null),Te=(0,T.useSessionStore)(t=>t.sessions[ke]?.agentStreamHead?.get(e)),Pe=u??Te,Me=(0,T.useSessionStore)(e=>!U&&!0===e.sessions[ke]?.serverInfo?.features?.agentForkContext),Oe=(0,T.useSessionStore)(e=>!0===e.sessions[ke]?.serverInfo?.features?.agentForkContextCursor),Fe=n.cwd?.trim()||"",{requestDirectoryListing:Ae}=(0,_.useFileExplorerActions)({serverId:ke,workspaceId:n.workspaceId,workspaceRoot:Fe}),Re=(0,P.useLoadOlderAgentHistory)({serverId:ke,agentId:e,toast:O}),{isLoadingOlder:Be,hasOlder:He,loadOlder:De}=ne?{isLoadingOlder:ne.isLoadingOlder,hasOlder:ne.hasOlder,loadOlder:ne.onLoadOlder}:Re,qe=S.FadeIn.duration(200),Ee=S.FadeOut.duration(200);(0,p.useEffect)(()=>{ye(!0),fe(new Set),be(new Set)},[e]);const Le=(0,N.useStableEvent)((e,t)=>{if(!e.path)return;const s=(0,L.normalizeInlinePathTarget)(e.path,n.cwd);if(!s)return;if(s.file){const o=(0,W.normalizeWorkspaceFileLocation)({path:s.file,lineStart:e.lineStart,lineEnd:e.lineEnd});if(!o)return;return F?void F({location:o,disposition:t}):void(n.workspaceId&&(0,z.navigateToWorkspace)({serverId:ke,workspaceId:n.workspaceId,target:(0,W.createWorkspaceFileTabTarget)(o)}))}Ae(s.directory,{recordHistory:!1,setCurrentPath:!1});const o={serverId:ke,cwd:n.cwd,isGit:n.projectPlacement?.checkout?.isGit??!0};ve(Object.assign({},o,{tab:"files"})),Se({isCompact:pe,checkout:o})}),We=(0,N.useStableEvent)(e=>{Le({raw:e,path:e},"main")}),ze=(0,N.useStableEvent)(async({target:t,boundary:s})=>{try{if(!Me)return void O?.error(ae("message.actions.forkUnavailable"));if(!je)throw new Error(ae("workspace.terminal.hostDisconnected"));const c=oe(n),u=async()=>{const t=(0,X.generateDraftId)(),n=await je.buildAgentForkContext(e,s),o=re({draftId:t,serverId:ke,agentId:e,payload:n,missingAttachmentMessage:ae("message.actions.forkFailed")});return $.useWorkspaceAttachmentsStore.getState().setWorkspaceAttachments({scopeKey:(0,$.buildDraftWorkspaceAttachmentScopeKey)(t),attachments:[o]}),t};if("tab"===t){const e=n.workspaceId;if(!e)throw new Error(ae("message.actions.forkMissingWorkspace"));const t=await u();return void(0,z.navigateToWorkspace)({serverId:ke,workspaceId:e,target:(o=c,l=t,o?{kind:"draft",draftId:l,setup:o}:{kind:"draft",draftId:l})})}const p=await u(),h=n.projectPlacement?.checkout?.cwd?.trim()||n.cwd.trim()||void 0;c&&Y.useWorkspaceDraftSubmissionStore.getState().setDraftSetup({draftId:p,setup:c,sourceDirectory:h}),de.push((0,V.buildNewWorkspaceRoute)({serverId:ke,sourceDirectory:h,displayName:n.projectPlacement?.projectName,projectId:n.projectPlacement?.projectKey,draftId:p}))}catch(e){O?.error((0,Q.toErrorMessage)(e)||ae("message.actions.forkFailed"))}var o,l}),Ve=(0,K.useRetainedPanelActive)(),Ne=(0,p.useRef)(s),Ge=(0,p.useRef)(Pe);Ve&&(Ne.current=s,Ge.current=Pe);const Ue=Ve?s:Ne.current,Ke=Ve?Pe:Ge.current,Xe=(0,p.useMemo)(()=>(0,R.prepareToolCallHistory)(ce,Ue),[Ue,ce]),$e=(0,p.useMemo)(()=>(0,R.projectToolCallDetailLevel)({level:ce,tail:Ue,head:Ke??se,preparedHistory:Xe,isTurnActive:"running"===n.status}),[n.status,Ke,Ue,Xe,ce]),Qe=(0,p.useMemo)(()=>(0,H.buildAgentStreamRenderModel)({agentStatus:n.status,tail:$e.tail,head:$e.head,platform:G.isWeb?"web":"native",isMobileBreakpoint:pe}),[n.status,pe,$e.head,$e.tail]),Ye=(0,p.useMemo)(()=>(0,E.layoutStream)({strategy:me,agentStatus:n.status,history:Qe.history,liveHead:Qe.segments.liveHead,timingByAssistantId:Qe.turnTiming.byAssistantId}),[n.status,Qe.history,Qe.segments.liveHead,Qe.turnTiming.byAssistantId,me]);(0,p.useImperativeHandle)(ie,()=>({scrollToBottom(e="jump-to-bottom"){ue.current?.scrollToBottom(e)},prepareForViewportChange(){ue.current?.prepareForViewportChange()}}),[]);const Je=(0,p.useCallback)(()=>{ue.current?.scrollToBottom("jump-to-bottom")},[]),Ze=(0,p.useCallback)((e,t)=>{me.shouldDisableParentScrollOnInlineDetailsExpansion()&&fe(n=>{const s=new Set(n);return t?s.add(e):s.delete(e),s})},[me]),et=(0,p.useCallback)((e,t)=>{be(n=>{const s=new Set(n);return t?s.add(e):s.delete(e),s})},[]),tt=(0,p.useCallback)((t,s)=>(0,J.jsx)(C.UserMessage,{serverId:ke,agentId:e,messageId:s.id,message:s.text,images:s.images,attachments:s.attachments,timestamp:s.timestamp.getTime(),capabilities:n.capabilities,client:je,isFirstInGroup:t.isFirstInUserGroup,isLastInGroup:t.isLastInUserGroup}),[n.capabilities,e,je,ke]),nt=(0,p.useCallback)((e,t)=>(0,J.jsx)(L.AssistantFileLinkResolverProvider,{client:je,serverId:ke,workspaceRoot:Fe,onOpenWorkspaceFile:Le,toast:O,children:(0,J.jsx)(C.AssistantMessage,{message:t.text,timestamp:t.timestamp.getTime(),workspaceRoot:Fe,serverId:ke,client:je,spacing:e.assistantSpacing})}),[je,Le,ke,O,Fe]),st=(0,p.useCallback)((e,t)=>(0,J.jsx)(he,{itemId:t.id,onInlineDetailsExpandedChangeByItemId:Ze,toolName:"thinking",args:t.text,status:"ready"===t.status?"completed":"executing",isLastInSequence:e.isLastInToolSequence,defaultExpanded:le,forceInline:le}),[le,Ze]),rt=(0,p.useCallback)((e,t,s)=>{const{payload:o}=e;if("agent"===o.source){const l=o.data;return"speak"===l.name&&"unknown"===l.detail.type&&"string"==typeof l.detail.input&&l.detail.input.trim()?(0,J.jsx)(C.SpeakMessage,{message:l.detail.input,timestamp:e.timestamp.getTime()}):(0,J.jsx)(he,{itemId:e.id,onInlineDetailsExpandedChangeByItemId:Ze,toolName:l.name,error:l.error,status:l.status,detail:l.detail,cwd:n.cwd,metadata:l.metadata,isLastInSequence:t,onOpenFilePath:We,maxDetailHeight:s})}const l=o.data;return(0,J.jsx)(he,{itemId:e.id,onInlineDetailsExpandedChangeByItemId:Ze,toolName:l.toolName,args:l.arguments,result:l.result,status:l.status,isLastInSequence:t,onOpenFilePath:We,maxDetailHeight:s})},[n.cwd,Ze,We]),ot=(0,p.useCallback)((e,t)=>{const n=$e.groupsByHostId.get(t.id);if(!n)return rt(t,e.isLastInToolSequence);const s=xe.has(n.run.id);return(0,J.jsx)(B.OverviewToolCallGroupView,{group:n,expanded:s,isLastInSequence:e.isLastInToolSequence,onExpandedChange:et,children:s?n.run.calls.map((e,t)=>(0,J.jsx)(h.default.Fragment,{children:rt(e,t===n.run.calls.length-1,200)},e.id)):null})},[$e.groupsByHostId,xe,rt,et]),it=(0,p.useCallback)(e=>{const t=e.item;switch(t.kind){case"user_message":return tt(e,t);case"assistant_message":return nt(e,t);case"thought":return st(e,t);case"tool_call":return ot(e,t);case"activity_log":return(0,J.jsx)(C.ActivityLog,{type:t.activityType,message:t.message,timestamp:t.timestamp.getTime(),metadata:t.metadata});case"todo_list":return(0,J.jsx)(C.TodoListCard,{items:t.items});case"compaction":return(0,J.jsx)(C.CompactionMarker,{status:t.status,trigger:t.trigger,preTokens:t.preTokens});default:return null}},[tt,nt,st,ot]),at=Ye.auxiliaryTurnFooter,dt=(0,p.useCallback)(e=>Z({content:it(e),layoutItem:e,strategy:me,supportsTimelineCursor:Oe,onForkAssistantTurn:U?void 0:ze}),[ze,U,it,me,Oe]),lt=(0,p.useMemo)(()=>Array.from(f.values()).filter(t=>t.agentId===e),[f,e]),ct=Qe.turnTiming.isActive,ut=(0,p.useMemo)(()=>{return 0===(e={pendingPermissions:lt,client:je}).pendingPermissions.length?null:(0,J.jsx)(c.View,{style:Ce.permissionsContainer,children:e.pendingPermissions.map(t=>(0,J.jsx)(we,{permission:t,client:e.client},t.key))});var e},[je,lt]),pt=(0,p.useMemo)(()=>ct||at?(0,J.jsx)(q.TurnFooter,{isRunning:ct,inFlightTurnStartedAt:Qe.turnTiming.runningStartedAt,host:at,strategy:me,supportsTimelineCursor:Oe,onForkAssistantTurn:U?void 0:ze}):null,[ze,U,ct,Qe.turnTiming.runningStartedAt,at,me,Oe]),mt=(0,p.useMemo)(()=>Object.assign({},Qe,{boundary:Qe.boundary,auxiliary:{pendingPermissions:ut,turnFooter:pt}}),[Qe,ut,pt]),gt=(0,p.useMemo)(()=>[Ce.emptyState,Ce.contentWrapper],[]),ht=(0,p.useMemo)(()=>{return(e={renderModel:mt,emptyStateStyle:gt,emptyText:ae("agentStream.empty")}).renderModel.boundary.hasVirtualizedHistory||e.renderModel.boundary.hasMountedHistory||e.renderModel.boundary.hasLiveHead||e.renderModel.auxiliary.pendingPermissions||e.renderModel.auxiliary.turnFooter?null:(0,J.jsx)(c.View,{style:e.emptyStateStyle,children:(0,J.jsx)(l.Text,{style:Ce.emptyStateText,children:e.emptyText})});var e},[mt,gt,ae]),{boundary:yt,auxiliary:It}=mt,ft=(0,p.useMemo)(()=>{const e=new Map;for(const t of Ye.history)e.set(t.item.id,t);return e},[Ye.history]),xt=(0,p.useMemo)(()=>{const e=new Map;for(const t of Ye.liveHead)e.set(t.item.id,t);return e},[Ye.liveHead]),bt=(0,p.useCallback)(e=>ee({item:e,layoutItemById:ft,renderStreamItem:dt}),[ft,dt]),St=(0,p.useCallback)(e=>bt(e),[bt]),vt=(0,p.useCallback)(e=>bt(e),[bt]),wt=(0,N.useStableEvent)(e=>te({item:e,layoutItemById:xt,renderStreamItem:dt})),kt=(0,p.useCallback)(()=>{return(e={pendingPermissions:It.pendingPermissions,turnFooter:It.turnFooter}).pendingPermissions||e.turnFooter?(0,J.jsxs)(J.Fragment,{children:[e.turnFooter,e.pendingPermissions?(0,J.jsx)(c.View,{style:Ce.contentWrapper,children:(0,J.jsx)(c.View,{style:Ce.listHeaderContent,children:e.pendingPermissions})}):null]}):null;var e},[It.pendingPermissions,It.turnFooter]),Ct=(0,p.useMemo)(()=>({renderHistoryVirtualizedRow:St,renderHistoryMountedRow:vt,renderLiveHeadRow:wt,renderLiveAuxiliary:kt}),[St,vt,wt,kt]),jt=!me.shouldDisableParentScrollOnInlineDetailsExpansion()||0===Ie.size,Tt=(0,p.useMemo)(()=>({contentById:$e.historyGroupUpdatesByHostId,displayStateById:xe,globalDisplayState:pe}),[xe,pe,$e.historyGroupUpdatesByHostId]);return(0,J.jsx)(A.ToolCallSheetProvider,{children:(0,J.jsxs)(c.View,{style:Ce.container,children:[(0,J.jsx)(C.MessageOuterSpacingProvider,{disableOuterSpacing:!0,children:me.render({agentId:e,segments:mt.segments,historyRowRevision:Tt,liveHeadRowRevision:xe,boundary:yt,renderers:Ct,listEmptyComponent:ht,viewportRef:ue,routeBottomAnchorRequest:b,isAuthoritativeHistoryReady:j,onNearBottomChange:ye,onNearHistoryStart:De,isLoadingOlderHistory:Be,hasOlderHistory:He,scrollEnabled:jt,listStyle:Ce.list,baseListContentContainerStyle:Ce.listContentContainer,forwardListContentContainerStyle:Ce.forwardListContentContainer})}),!ge&&(0,J.jsx)(c.View,{style:Ce.scrollToBottomContainer,pointerEvents:"box-none",children:(0,J.jsx)(v.default.View,{entering:qe,exiting:Ee,children:(0,J.jsx)(o.Pressable,{style:Ce.scrollToBottomButton,onPress:Je,accessibilityRole:"button",accessibilityLabel:ae("agentStream.scrollToBottom"),testID:"scroll-to-bottom-button",children:(0,J.jsx)(w.ChevronDown,{size:24,color:Ce.scrollToBottomIcon.color})})})})]})})});function ae(e,t){return ne.every(n=>e?.[n]===t?.[n])}function de(e,t){const n=[];return e?.checkout?.cwd!==t?.checkout?.cwd&&n.push("agent.projectPlacement.checkout.cwd"),e?.checkout?.isGit!==t?.checkout?.isGit&&n.push("agent.projectPlacement.checkout.isGit"),e?.projectName!==t?.projectName&&n.push("agent.projectPlacement.projectName"),e?.projectKey!==t?.projectKey&&n.push("agent.projectPlacement.projectKey"),n}function le(e,t){const n=[];return e.provider!==t.provider&&n.push("agent.provider"),e.currentModeId!==t.currentModeId&&n.push("agent.currentModeId"),e.model!==t.model&&n.push("agent.model"),e.thinkingOptionId!==t.thinkingOptionId&&n.push("agent.thinkingOptionId"),e.runtimeInfo?.modeId!==t.runtimeInfo?.modeId&&n.push("agent.runtimeInfo.modeId"),e.runtimeInfo?.model!==t.runtimeInfo?.model&&n.push("agent.runtimeInfo.model"),e.runtimeInfo?.thinkingOptionId!==t.runtimeInfo?.thinkingOptionId&&n.push("agent.runtimeInfo.thinkingOptionId"),e.features!==t.features&&n.push("agent.features"),n}function ce(e,t){const n=[];return e.serverId!==t.serverId&&n.push("agent.serverId"),e.id!==t.id&&n.push("agent.id"),e.workspaceId!==t.workspaceId&&n.push("agent.workspaceId"),e.status!==t.status&&n.push("agent.status"),e.cwd!==t.cwd&&n.push("agent.cwd"),ae(e.capabilities,t.capabilities)||n.push("agent.capabilities"),e.lastError!==t.lastError&&n.push("agent.lastError"),n.push(...le(e,t)),n.push(...de(e.projectPlacement,t.projectPlacement)),n}function ue(e,t){return e?.agentId===t?.agentId&&e?.reason===t?.reason&&e?.requestKey===t?.requestKey}function pe(e,t){return e?.hasOlder===t?.hasOlder&&e?.isLoadingOlder===t?.isLoadingOlder&&e?.onLoadOlder===t?.onLoadOlder}function me(e,t){const n=[];return e.agentId!==t.agentId&&n.push("agentId"),e.serverId!==t.serverId&&n.push("serverId"),n.push(...ce(e.context,t.context)),e.streamItems!==t.streamItems&&n.push("streamItems"),e.streamHead!==t.streamHead&&n.push("streamHead"),e.pendingPermissions!==t.pendingPermissions&&n.push("pendingPermissions"),ue(e.routeBottomAnchorRequest,t.routeBottomAnchorRequest)||n.push("routeBottomAnchorRequest"),e.isAuthoritativeHistoryReady!==t.isAuthoritativeHistoryReady&&n.push("isAuthoritativeHistoryReady"),e.toast!==t.toast&&n.push("toast"),e.onOpenWorkspaceFile!==t.onOpenWorkspaceFile&&n.push("onOpenWorkspaceFile"),e.readOnly!==t.readOnly&&n.push("readOnly"),pe(e.historyPagination,t.historyPagination)||n.push("historyPagination"),(0,U.recordRenderProfileReasons)(`AgentStreamView:${t.agentId}`,n),0===n.length}const ge=(0,p.memo)(ie,me);function he(t){const s=(0,u.c)(10);let o,l,c,p;if(s[0]!==t){var h=t;({itemId:o,onInlineDetailsExpandedChangeByItemId:l}=h),c=(0,n.default)(h,e),s[0]=t,s[1]=o,s[2]=l,s[3]=c}else o=s[1],l=s[2],c=s[3];s[4]!==o||s[5]!==l?(p=e=>l(o,e),s[4]=o,s[5]=l,s[6]=p):p=s[6];const y=p;let I;return s[7]!==y||s[8]!==c?(I=(0,J.jsx)(C.ToolCall,Object.assign({},c,{onInlineDetailsExpandedChange:y})),s[7]=y,s[8]=c,s[9]=I):I=s[9],I}ge.displayName="AgentStreamView";const ye=(0,f.withUnistyles)(s.ActivityIndicator),Ie=(0,f.withUnistyles)(w.Check),fe=(0,f.withUnistyles)(w.X),xe=e=>({color:e.colors.foreground}),be=e=>({color:e.colors.foregroundMuted}),Se=({pressed:e,hovered:t=!1})=>[je.optionButton,t?je.optionButtonHovered:null,e?je.optionButtonPressed:null];function ve(e){const t=(0,u.c)(16),{action:n,isRespondingAction:s,isResponding:p,isPrimary:h,Icon:y,testID:I,onPress:f}=e;let x;t[0]!==n||t[1]!==f?(x=()=>f(n),t[0]=n,t[1]=f,t[2]=x):x=t[2];const b=x;let S;t[3]!==h?(S=h?[je.optionText,je.optionTextPrimary]:je.optionText,t[3]=h,t[4]=S):S=t[4];const v=S,w=h?xe:be;let k,C;return t[5]!==y||t[6]!==n||t[7]!==w||t[8]!==s||t[9]!==v?(k=s?(0,J.jsx)(ye,{size:"small",uniProps:w}):(0,J.jsxs)(c.View,{style:je.optionContent,children:[(0,J.jsx)(y,{size:14,uniProps:w}),(0,J.jsx)(l.Text,{style:v,children:n.label})]}),t[5]=y,t[6]=n,t[7]=w,t[8]=s,t[9]=v,t[10]=k):k=t[10],t[11]!==b||t[12]!==p||t[13]!==k||t[14]!==I?(C=(0,J.jsx)(o.Pressable,{testID:I,style:Se,onPress:b,disabled:p,children:k}),t[11]=b,t[12]=p,t[13]=k,t[14]=I,t[15]=C):C=t[15],C}function we(e){const t=(0,u.c)(81),{permission:n,client:s}=e,{t:o}=(0,I.useTranslation)(),h=(0,x.useIsCompactFormFactor)(),{request:y}=n,f="plan"===y.kind;let S;t[0]!==f||t[1]!==y.name||t[2]!==y.title||t[3]!==o?(S=f?o("agentStream.permission.plan"):y.title??y.name??o("agentStream.permission.required"),t[0]=f,t[1]=y.name,t[2]=y.title,t[3]=o,t[4]=S):S=t[4];const v=S,w=y.description??"";let k;t[5]!==y.detail||t[6]!==y.input?(k=y.detail??{type:"unknown",input:y.input??null,output:null},t[5]=y.detail,t[6]=y.input,t[7]=k):k=t[7];const C=k;let T;e:{if("question"===y.kind){let e;t[8]===Symbol.for("react.memo_cache_sentinel")?(e=[],t[8]=e):e=t[8],T=e;break e}if(Array.isArray(y.actions)&&y.actions.length>0){T=y.actions;break e}let e,n,s,l,c;t[9]!==o?(e=o("agentStream.permission.deny"),t[9]=o,t[10]=e):e=t[10],t[11]!==e?(n={id:"reject",label:e,behavior:"deny",variant:"danger",intent:"dismiss"},t[11]=e,t[12]=n):n=t[12],t[13]!==f||t[14]!==o?(s=o(f?"agentStream.permission.implement":"agentStream.permission.accept"),t[13]=f,t[14]=o,t[15]=s):s=t[15],t[16]!==s?(l={id:"accept",label:s,behavior:"allow",variant:"primary"},t[16]=s,t[17]=l):l=t[17],t[18]!==n||t[19]!==l?(c=[n,l],t[18]=n,t[19]=l,t[20]=c):c=t[20],T=c}const _=T;let P;e:{if(!y){P=void 0;break e}const e="string"==typeof y.metadata?.planText?y.metadata.planText:void 0;if(e){P=e;break e}const t=y.input?.plan;"string"!=typeof t?P=void 0:P=t}const M=P;let A;t[21]!==s||t[22]!==o?(A={mutationFn:async e=>{if(!s)throw new Error(o("common.errors.daemonClientUnavailable"));return s.respondToPermissionAndWait(e.agentId,e.requestId,e.response,15e3)}},t[21]=s,t[22]=o,t[23]=A):A=t[23];const R=(0,b.useMutation)(A),{reset:B,mutateAsync:H,isPending:D}=R,[q,E]=(0,p.useState)(null);let L,W,z;t[24]!==B?(L=()=>{B(),E(null)},t[24]=B,t[25]=L):L=t[25],t[26]!==n.request.id||t[27]!==B?(W=[n.request.id,B],t[26]=n.request.id,t[27]=B,t[28]=W):W=t[28],(0,p.useEffect)(L,W),t[29]!==n.agentId||t[30]!==n.request.id||t[31]!==H?(z=e=>{H({agentId:n.agentId,requestId:n.request.id,response:e}).catch(ke)},t[29]=n.agentId,t[30]=n.request.id,t[31]=H,t[32]=z):z=t[32];const V=z;let N;t[33]!==V?(N=e=>{E(e.id),"allow"!==e.behavior?V({behavior:"deny",selectedActionId:e.id,message:"Denied by user"}):V({behavior:"allow",selectedActionId:e.id})},t[33]=V,t[34]=N):N=t[34];const G=N,U=!h&&je.optionsContainerDesktop;let K;t[35]!==U?(K=[je.optionsContainer,U],t[35]=U,t[36]=K):K=t[36];const X=K;if("question"===y.kind){let e;return t[37]!==V||t[38]!==D||t[39]!==n?(e=(0,J.jsx)(F.QuestionFormCard,{permission:n,onRespond:V,isResponding:D}),t[37]=V,t[38]=D,t[39]=n,t[40]=e):e=t[40],e}let $,Q,Y,Z,ee;if(t[41]!==o?($=o("agentStream.permission.question"),t[41]=o,t[42]=$):$=t[42],t[43]!==$?(Q=(0,J.jsx)(l.Text,{testID:"permission-request-question",style:je.question,children:$}),t[43]=$,t[44]=Q):Q=t[44],t[45]!==G||t[46]!==D||t[47]!==_||t[48]!==q){let e;t[50]!==G||t[51]!==D||t[52]!==q?(e=e=>{const t="primary"===e.variant,n=q===e.id,s="allow"===e.behavior?Ie:fe;let o;return o="deny"===e.behavior?"permission-request-deny":"accept"===e.id||"implement"===e.id?"permission-request-accept":`permission-request-action-${e.id}`,(0,J.jsx)(ve,{action:e,isRespondingAction:n,isResponding:D,isPrimary:t,Icon:s,testID:o,onPress:G},e.id)},t[50]=G,t[51]=D,t[52]=q,t[53]=e):e=t[53],Y=_.map(e),t[45]=G,t[46]=D,t[47]=_,t[48]=q,t[49]=Y}else Y=t[49];t[54]!==X||t[55]!==Y?(Z=(0,J.jsx)(c.View,{style:X,children:Y}),t[54]=X,t[55]=Y,t[56]=Z):Z=t[56],t[57]!==Q||t[58]!==Z?(ee=(0,J.jsxs)(J.Fragment,{children:[Q,Z]}),t[57]=Q,t[58]=Z,t[59]=ee):ee=t[59];const te=ee;if(f&&M){let e;return t[60]!==w||t[61]!==te||t[62]!==M||t[63]!==v?(e=(0,J.jsx)(j.PlanCard,{title:v,description:w,text:M,footer:te,testID:"permission-plan-card",disableOuterSpacing:!0}),t[60]=w,t[61]=te,t[62]=M,t[63]=v,t[64]=e):e=t[64],e}let ne,se,re,oe,ie;return t[65]!==v?(ne=(0,J.jsx)(l.Text,{style:je.title,children:v}),t[65]=v,t[66]=ne):ne=t[66],t[67]!==w?(se=w?(0,J.jsx)(l.Text,{style:je.description,children:w}):null,t[67]=w,t[68]=se):se=t[68],t[69]!==M||t[70]!==o?(re=M?(0,J.jsx)(j.PlanCard,{title:o("agentStream.permission.proposedPlan"),text:M,testID:"permission-plan-card",disableOuterSpacing:!0}):null,t[69]=M,t[70]=o,t[71]=re):re=t[71],t[72]!==f||t[73]!==C?(oe=f?null:(0,J.jsx)(O.ToolCallDetailsContent,{detail:C,maxHeight:200}),t[72]=f,t[73]=C,t[74]=oe):oe=t[74],t[75]!==te||t[76]!==ne||t[77]!==se||t[78]!==re||t[79]!==oe?(ie=(0,J.jsxs)(c.View,{style:je.container,children:[ne,se,re,oe,te]}),t[75]=te,t[76]=ne,t[77]=se,t[78]=re,t[79]=oe,t[80]=ie):ie=t[80],ie}function ke(e){console.error("[PermissionRequestCard] Failed to respond to permission:",e)}const Ce=f.StyleSheet.create(e=>({container:{flex:1,backgroundColor:e.colors.surface0,uni__dependencies:[0]},contentWrapper:{width:"100%",maxWidth:x.MAX_CONTENT_WIDTH,alignSelf:"center",paddingHorizontal:e.spacing[2],uni__dependencies:[0]},listContentContainer:{paddingVertical:0,flexGrow:1,paddingHorizontal:{xs:e.spacing[3],md:e.spacing[4]},uni__dependencies:[0]},forwardListContentContainer:{paddingTop:e.spacing[4],paddingBottom:e.spacing[4],uni__dependencies:[0]},list:{flex:1},streamItemWrapper:{width:"100%",maxWidth:x.MAX_CONTENT_WIDTH,alignSelf:"center",paddingHorizontal:e.spacing[2],uni__dependencies:[0]},emptyState:{flex:1,alignItems:"center",justifyContent:"center",paddingVertical:e.spacing[12],uni__dependencies:[0]},permissionsContainer:{gap:e.spacing[2],uni__dependencies:[0]},listHeaderContent:{gap:e.spacing[3],uni__dependencies:[0]},syncingIndicator:{flexDirection:"row",alignItems:"center",gap:e.spacing[2],paddingVertical:e.spacing[1],paddingLeft:e.spacing[2],uni__dependencies:[0]},syncingIndicatorText:{color:e.colors.foregroundMuted,fontSize:e.fontSize.sm,uni__dependencies:[0]},invertedWrapper:{transform:[{scaleY:-1}],width:"100%"},emptyStateText:{color:e.colors.foregroundMuted,fontSize:e.fontSize.sm,textAlign:"center",uni__dependencies:[0]},scrollToBottomContainer:{position:"absolute",bottom:16,left:0,right:0,alignItems:"center"},scrollToBottomButton:Object.assign({width:48,height:48,borderRadius:24,backgroundColor:e.colors.surface2,alignItems:"center",justifyContent:"center"},e.shadow.sm,{uni__dependencies:[0]}),scrollToBottomIcon:{color:e.colors.foreground,uni__dependencies:[0]}})),je=f.StyleSheet.create(e=>({container:{marginVertical:e.spacing[3],padding:e.spacing[3],borderRadius:e.spacing[2],borderWidth:1,gap:e.spacing[2],backgroundColor:e.colors.surface1,borderColor:e.colors.border,uni__dependencies:[0]},title:{fontSize:e.fontSize.base,lineHeight:22,color:e.colors.foreground,uni__dependencies:[0]},description:{fontSize:e.fontSize.sm,lineHeight:20,color:e.colors.foregroundMuted,uni__dependencies:[0]},section:{gap:e.spacing[2],uni__dependencies:[0]},sectionTitle:{fontSize:e.fontSize.xs,uni__dependencies:[0]},question:{fontSize:e.fontSize.sm,marginTop:e.spacing[1],marginBottom:e.spacing[1],color:e.colors.foregroundMuted,uni__dependencies:[0]},optionsContainer:{gap:e.spacing[2],uni__dependencies:[0]},optionsContainerDesktop:{flexDirection:"row",justifyContent:"flex-start",alignItems:"center",width:"100%"},optionButton:{paddingVertical:e.spacing[2],paddingHorizontal:e.spacing[3],borderRadius:e.borderRadius.md,alignItems:"center",borderWidth:e.borderWidth[1],backgroundColor:e.colors.surface1,borderColor:e.colors.borderAccent,uni__dependencies:[0]},optionButtonHovered:{backgroundColor:e.colors.surface2,uni__dependencies:[0]},optionButtonPressed:{opacity:.9},optionContent:{flexDirection:"row",alignItems:"center",gap:e.spacing[2],uni__dependencies:[0]},optionText:{fontSize:e.fontSize.sm,fontWeight:e.fontWeight.normal,color:e.colors.foregroundMuted,uni__dependencies:[0]},optionTextPrimary:{color:e.colors.foreground,uni__dependencies:[0]}}));function Te(e){const t=(0,u.c)(5),{gapBelow:n,children:s}=e;let o;t[0]!==n?(o=[Ce.streamItemWrapper,{marginBottom:n}],t[0]=n,t[1]=o):o=t[1];const l=o;let p;return t[2]!==s||t[3]!==l?(p=(0,J.jsx)(c.View,{style:l,children:s}),t[2]=s,t[3]=l,t[4]=p):p=t[4],p}},4233,[35,3553,1562,711,348,349,36,1143,1563,146,234,1308,25,1401,56,3262,916,444,1590,3604,4234,4248,3272,3937,4268,3623,4250,4269,4249,4271,4274,4275,4279,4286,4288,4254,3445,3507,3511,3549,3263,4290,3658,3480,3483,3448,4291,279]);
15889
15889
  __d(function(g,r,i,a,m,_e,_d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.MessageOuterSpacingProvider=function(e){const t=(0,c.c)(3),{disableOuterSpacing:n,children:o}=e;let s;t[0]!==o||t[1]!==n?(s=(0,oe.jsx)(se.Provider,{value:n,children:o}),t[0]=o,t[1]=n,t[2]=s):s=t[2];return s},Object.defineProperty(_e,"STREAM_METADATA_FONT_SIZE",{enumerable:!0,get:function(){return Te}}),Object.defineProperty(_e,"UserMessage",{enumerable:!0,get:function(){return Oe}}),Object.defineProperty(_e,"AssistantTurnFooter",{enumerable:!0,get:function(){return De}}),Object.defineProperty(_e,"LiveElapsed",{enumerable:!0,get:function(){return Ae}}),Object.defineProperty(_e,"assistantMessageStylesheet",{enumerable:!0,get:function(){return Fe}}),Object.defineProperty(_e,"TurnCopyButton",{enumerable:!0,get:function(){return $e}}),Object.defineProperty(_e,"AssistantMessage",{enumerable:!0,get:function(){return it}}),Object.defineProperty(_e,"SpeakMessage",{enumerable:!0,get:function(){return ot}}),Object.defineProperty(_e,"ActivityLog",{enumerable:!0,get:function(){return at}}),Object.defineProperty(_e,"CompactionMarker",{enumerable:!0,get:function(){return ct}}),Object.defineProperty(_e,"TodoListCard",{enumerable:!0,get:function(){return mt}}),Object.defineProperty(_e,"ExpandableBadge",{enumerable:!0,get:function(){return jt}}),Object.defineProperty(_e,"ToolCall",{enumerable:!0,get:function(){return Lt}});var t=r(_d[0]),n=r(_d[1]),o=r(_d[2]),s=r(_d[3]),l=r(_d[4]),c=r(_d[5]);r(_d[6]),r(_d[7]),r(_d[8]),r(_d[9]),r(_d[10]);var d=r(_d[11]),u=r(_d[12]),h=r(_d[13]),p=r(_d[14]),f=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(p),b=r(_d[15]),y=r(_d[16]),x=e(r(_d[17])),S=r(_d[18]),w=r(_d[19]),_=r(_d[20]),v=r(_d[21]),k=e(v),j=r(_d[22]),T=e(j),L=r(_d[23]),I=r(_d[24]),C=r(_d[25]),M=r(_d[26]),P=r(_d[27]),R=r(_d[28]),W=r(_d[29]),O=r(_d[30]),E=r(_d[31]),D=r(_d[32]),A=r(_d[33]),F=r(_d[34]),B=r(_d[35]),V=r(_d[36]),z=r(_d[37]),H=r(_d[38]),N=r(_d[39]),X=r(_d[40]),U=r(_d[41]),$=r(_d[42]),q=r(_d[43]),G=r(_d[44]),K=r(_d[45]),Y=r(_d[46]),Q=r(_d[47]),J=r(_d[48]),Z=r(_d[49]),ee=r(_d[50]),te=r(_d[51]),ne=r(_d[52]),ie=r(_d[53]),re=r(_d[54]),oe=r(_d[55]);const se=(0,p.createContext)(!1);function ae(e){const t=(0,p.useContext)(se);return e??t}const le="paseo-toolcall-shimmer-keyframes",ce="paseo-toolcall-shimmer",de=["data:image/png;base64","data:image/gif;base64","data:image/jpeg;base64","https://","http://"],ue=(0,oe.jsx)(s.Text,{children:"..."},"dotdotdot"),me=(0,w.withUnistyles)(S.MicVocal),he=(0,w.withUnistyles)(S.Check),pe=(0,w.withUnistyles)(S.FileSymlink),ge=(0,w.withUnistyles)(S.TriangleAlertIcon),fe=(0,w.withUnistyles)(S.ChevronRight),be=e=>({color:e.colors.foreground}),ye=e=>({color:e.colors.foregroundMuted}),xe=e=>({color:e.colors.mutedForeground}),Se=e=>({color:e.colors.primaryForeground}),we=e=>({color:e.colors.destructive}),ve=`\n @keyframes ${ce} {\n 0% {\n background-position: var(--paseo-shimmer-start, -200px) 0;\n }\n 100% {\n background-position: var(--paseo-shimmer-end, 200px) 0;\n }\n }\n`;let ke=!1;const je=.5,Te=13;function Le(){if(ee.isNative)return;if("undefined"==typeof document)return;const e=document.getElementById(le);if(e)return e.textContent!==ve&&(e.textContent=ve),void(ke=!0);if(ke)return;const t=document.createElement("style");t.id=le,t.textContent=ve,document.head.appendChild(t),ke=!0}function Ie(e,t){const{target:n}=e;return n instanceof HTMLElement?n:n instanceof Node&&n.parentElement?n.parentElement:t}function Ce(e,t,n){if(0===n)return!1;const o=window.getComputedStyle(e),s="x"===t?o.overflowX:o.overflowY;if(!("auto"===s||"scroll"===s||"overlay"===s))return!1;const l="x"===t?e.scrollLeft:e.scrollTop,c="x"===t?e.scrollWidth-e.clientWidth:e.scrollHeight-e.clientHeight;return!(c<=je)&&(n>0?l<c-je:l>je)}function Me(e,t,n,o){if(0===o)return!1;let s=t;for(;s;){if(Ce(s,n,o))return!0;if(s===e)break;s=s.parentElement}return!1}function Pe(e,t){const n=Ie(t,e),o=t.deltaY;let s;s=0!==t.deltaX?t.deltaX:t.shiftKey?t.deltaY:0;const l=Math.abs(o)>je,c=Math.abs(s)>je;if(!l&&!c)return!1;const d=!!l&&Me(e,n,"y",o),u=!!c&&Me(e,n,"x",s);if(l&&c){return Math.abs(o)>=Math.abs(s)?d||u:u||d}return l?d:u}const Re=w.StyleSheet.create(e=>({container:Object.assign({flexDirection:"row",justifyContent:"flex-end"},ee.isWeb?{userSelect:"text"}:{}),content:{alignItems:"flex-end",maxWidth:"100%",cursor:"auto"},containerSpacing:{marginBottom:e.spacing[1],uni__dependencies:[0]},containerFirstInGroup:{marginTop:e.spacing[4],uni__dependencies:[0]},containerLastInGroup:{marginBottom:e.spacing[4],uni__dependencies:[0]},bubble:{backgroundColor:e.colors.surface3,borderRadius:e.borderRadius["2xl"],borderTopRightRadius:e.borderRadius.sm,paddingHorizontal:e.spacing[4],paddingVertical:e.spacing[4],minWidth:0,flexShrink:1,uni__dependencies:[0]},text:Object.assign({color:e.colors.foreground,fontSize:e.fontSize.base},ee.isWeb?{lineHeight:22,overflowWrap:"anywhere"}:{},{uni__dependencies:[0]}),imagePreviewContainer:{flexDirection:"row",gap:e.spacing[2],flexWrap:"wrap",uni__dependencies:[0]},attachmentPreviewContainer:{flexDirection:"row",gap:e.spacing[2],flexWrap:"wrap",uni__dependencies:[0]},imagePreviewSpacing:{marginBottom:e.spacing[2],uni__dependencies:[0]},copyButton:{alignSelf:"center",padding:e.spacing[1],paddingTop:e.spacing[1],marginTop:0,marginRight:-e.spacing[1],uni__dependencies:[0]},trailingRow:{alignSelf:"flex-end",flexDirection:"row",alignItems:"center",gap:e.spacing[2],marginTop:e.spacing[2],uni__dependencies:[0]},trailingRowHidden:{opacity:0},trailingRowVisible:{opacity:1},timestampText:{color:e.colors.foregroundMuted,fontSize:Te,uni__dependencies:[0]}}));function We(e){const t=(0,c.c)(9),{image:n,onOpen:o,accessibilityLabel:s}=e;let l;t[0]!==n||t[1]!==o?(l=()=>{o(n)},t[0]=n,t[1]=o,t[2]=l):l=t[2];const d=l;let u,h;return t[3]!==n?(u=(0,oe.jsx)(J.AttachmentThumbnail,{metadata:n}),t[3]=n,t[4]=u):u=t[4],t[5]!==s||t[6]!==d||t[7]!==u?(h=(0,oe.jsx)(J.AttachmentFrame,{onPress:d,accessibilityLabel:s,children:u}),t[5]=s,t[6]=d,t[7]=u,t[8]=h):h=t[8],h}const Oe=(0,p.memo)(function(e){const t=(0,c.c)(69),{serverId:n,agentId:o,messageId:u,message:h,images:f,attachments:b,timestamp:y,capabilities:x,client:S,isFirstInGroup:w,isLastInGroup:v,disableOuterSpacing:k}=e;let j;t[0]!==f?(j=void 0===f?[]:f,t[0]=f,t[1]=j):j=t[1];const T=j;let L;t[2]!==b?(L=void 0===b?[]:b,t[2]=b,t[3]=L):L=t[3];const I=L,C=void 0===w||w,M=void 0===v||v,P=(0,_.useIsCompactFormFactor)(),{t:R}=(0,d.useTranslation)(),[W,O]=(0,p.useState)(!1),[E,D]=(0,p.useState)(null);let F;t[4]===Symbol.for("react.memo_cache_sentinel")?(F=()=>D(null),t[4]=F):F=t[4];const B=F,V=ae(k);let z;t[5]!==h?(z=h.trim(),t[5]=h,t[6]=z):z=t[6];const H=z.length>0,N=T.length>0,U=I.length>0,$=H&&(P||ee.isNative||W);let q;t[7]!==y?(q=(0,A.formatMessageTimestamp)(new Date(y)),t[7]=y,t[8]=q):q=t[8];const G=q;let K;t[9]!==o||t[10]!==S||t[11]!==u||t[12]!==n?(K={serverId:n,agentId:o,client:S,messageId:u},t[9]=o,t[10]=S,t[11]=u,t[12]=n,t[13]=K):K=t[13];const Y=(0,ne.useRewindAgentMutation)(K);let Q;t[14]===Symbol.for("react.memo_cache_sentinel")?(Q=()=>O(!0),t[14]=Q):Q=t[14];const ie=Q;let re;t[15]===Symbol.for("react.memo_cache_sentinel")?(re=()=>O(!1),t[15]=re):re=t[15];const se=re;let le;t[16]!==h?(le=()=>h,t[16]=h,t[17]=le):le=t[17];const ce=le;let de;t[18]!==Y?(de=e=>Y.rewindAgent(e),t[18]=Y,t[19]=de):de=t[19];const ue=de;let me,he;t[20]!==C||t[21]!==M||t[22]!==V?(me=!V&&[C?Re.containerFirstInGroup:null,M?Re.containerLastInGroup:null,C&&M?null:Re.containerSpacing],t[20]=C,t[21]=M,t[22]=V,t[23]=me):me=t[23],t[24]!==me?(he=[Re.container,me],t[24]=me,t[25]=he):he=t[25];const pe=he,ge=H||U?Re.imagePreviewSpacing:void 0;let fe;t[26]!==ge?(fe=[Re.imagePreviewContainer,ge],t[26]=ge,t[27]=fe):fe=t[27];const be=fe,ye=H?Re.imagePreviewSpacing:void 0;let xe;t[28]!==ye?(xe=[Re.attachmentPreviewContainer,ye],t[28]=ye,t[29]=xe):xe=t[29];const Se=xe,we=$?Re.trailingRowVisible:Re.trailingRowHidden;let ve;t[30]!==we?(ve=[Re.trailingRow,we],t[30]=we,t[31]=ve):ve=t[31];const ke=ve;let je,Te,Le,Ie,Ce,Me,Pe,Oe;return t[32]!==N||t[33]!==be||t[34]!==T||t[35]!==R?(je=N?(0,oe.jsx)(l.View,{style:be,children:T.map(e=>(0,oe.jsx)(We,{image:e,onOpen:D,accessibilityLabel:R("composer.attachments.openImage")},e.id))}):null,t[32]=N,t[33]=be,t[34]=T,t[35]=R,t[36]=je):je=t[36],t[37]!==Se||t[38]!==I||t[39]!==U||t[40]!==R?(Te=U?(0,oe.jsx)(l.View,{style:Se,children:I.map((e,t)=>{const n=(0,X.getAgentAttachmentPillContent)(e,R);return(0,oe.jsx)(J.AttachmentFrame,{children:(0,oe.jsx)(J.AttachmentLabel,{icon:n.icon,title:n.title,subtitle:n.subtitle})},`${e.type}:${"number"in e?e.number:t}`)})}):null,t[37]=Se,t[38]=I,t[39]=U,t[40]=R,t[41]=Te):Te=t[41],t[42]!==H||t[43]!==h?(Le=H?(0,oe.jsx)(s.Text,{selectable:!0,style:Re.text,children:h}):null,t[42]=H,t[43]=h,t[44]=Le):Le=t[44],t[45]!==je||t[46]!==Te||t[47]!==Le?(Ie=(0,oe.jsxs)(l.View,{style:Re.bubble,children:[je,Te,Le]}),t[45]=je,t[46]=Te,t[47]=Le,t[48]=Ie):Ie=t[48],t[49]!==x||t[50]!==G||t[51]!==ce||t[52]!==ue||t[53]!==H||t[54]!==h||t[55]!==Y.isPending||t[56]!==$||t[57]!==R||t[58]!==ke?(Ce=H?(0,oe.jsxs)(l.View,{style:ke,pointerEvents:$?"auto":"none",children:[(0,oe.jsx)(s.Text,{style:Re.timestampText,children:G}),x?(0,oe.jsx)(te.RewindMenu,{capabilities:x,isPending:Y.isPending,rewoundText:h,onRewind:ue}):null,(0,oe.jsx)($e,{getContent:ce,containerStyle:Re.copyButton,accessibilityLabel:R("message.actions.copyMessage")})]}):null,t[49]=x,t[50]=G,t[51]=ce,t[52]=ue,t[53]=H,t[54]=h,t[55]=Y.isPending,t[56]=$,t[57]=R,t[58]=ke,t[59]=Ce):Ce=t[59],t[60]!==Ie||t[61]!==Ce?(Me=(0,oe.jsxs)(l.View,{style:Re.content,onPointerEnter:ie,onPointerLeave:se,children:[Ie,Ce]}),t[60]=Ie,t[61]=Ce,t[62]=Me):Me=t[62],t[63]!==E?(Pe=(0,oe.jsx)(Z.AttachmentLightbox,{metadata:E,onClose:B}),t[63]=E,t[64]=Pe):Pe=t[64],t[65]!==pe||t[66]!==Me||t[67]!==Pe?(Oe=(0,oe.jsxs)(l.View,{style:pe,testID:"user-message",children:[Me,Pe]}),t[65]=pe,t[66]=Me,t[67]=Pe,t[68]=Oe):Oe=t[68],Oe}),Ee=w.StyleSheet.create(e=>({container:{flexDirection:"row",alignItems:"center",gap:e.spacing[2],uni__dependencies:[0]},copyButton:{alignSelf:"center",padding:e.spacing[1],paddingTop:e.spacing[1],marginTop:0,marginLeft:-e.spacing[1],uni__dependencies:[0]},labelWrapper:{position:"relative"},labelSizer:{color:e.colors.foregroundMuted,fontSize:Te,opacity:0,uni__dependencies:[0]},labelOverlay:{position:"absolute",top:0,left:0,color:e.colors.foregroundMuted,fontSize:Te,uni__dependencies:[0]}})),De=(0,p.memo)(function(e){const t=(0,c.c)(27),{getContent:o,completedAt:d,durationMs:u,onFork:h}=e,[f,b]=(0,p.useState)(!1),[y,x]=(0,p.useState)(!1),S=(0,p.useRef)(null);let w,_,v;t[0]===Symbol.for("react.memo_cache_sentinel")?(w=()=>()=>{S.current&&(clearTimeout(S.current),S.current=null)},_=[],t[0]=w,t[1]=_):(w=t[0],_=t[1]),(0,p.useEffect)(w,_),t[2]!==u?(v=void 0!==u?`Worked for ${(0,A.formatDuration)(u)}`:"",t[2]=u,t[3]=v):v=t[3];const k=v;let j;t[4]!==d?(j=d?(0,A.formatMessageTimestamp)(d):"",t[4]=d,t[5]=j):j=t[5];const T=j,L=Boolean(T),I=L&&(ee.isWeb?f:y);let C;t[6]===Symbol.for("react.memo_cache_sentinel")?(C=()=>b(!0),t[6]=C):C=t[6];const M=C;let P;t[7]===Symbol.for("react.memo_cache_sentinel")?(P=()=>b(!1),t[7]=P):P=t[7];const R=P;let W;t[8]!==L?(W=()=>{!ee.isWeb&&L&&(S.current&&clearTimeout(S.current),x(Ct),S.current=setTimeout(()=>{x(!1),S.current=null},3e3))},t[8]=L,t[9]=W):W=t[9];const O=W;let E;t[10]!==h?(E=e=>h?.(e),t[10]=h,t[11]=E):E=t[11];const D=E,F=Boolean(h);let B,V,z,H;return t[12]!==o?(B=(0,oe.jsx)($e,{getContent:o,containerStyle:Ee.copyButton}),t[12]=o,t[13]=B):B=t[13],t[14]!==F||t[15]!==D?(V=F?(0,oe.jsx)(ie.AssistantForkMenu,{onFork:D}):null,t[14]=F,t[15]=D,t[16]=V):V=t[16],t[17]!==L||t[18]!==k||t[19]!==O||t[20]!==I||t[21]!==T?(z=k?(0,oe.jsx)(n.Pressable,{onPress:O,onHoverIn:M,onHoverOut:R,accessibilityRole:L?"button":void 0,accessibilityLabel:L?`${k}, ended ${T}`:k,children:(0,oe.jsxs)(l.View,{style:Ee.labelWrapper,children:[(0,oe.jsx)(s.Text,{style:Ee.labelSizer,"aria-hidden":!0,children:k.length>=T.length?k:T}),(0,oe.jsx)(s.Text,{style:Ee.labelOverlay,children:I?T:k})]})}):null,t[17]=L,t[18]=k,t[19]=O,t[20]=I,t[21]=T,t[22]=z):z=t[22],t[23]!==V||t[24]!==z||t[25]!==B?(H=(0,oe.jsxs)(l.View,{style:Ee.container,children:[B,V,z]}),t[23]=V,t[24]=z,t[25]=B,t[26]=H):H=t[26],H}),Ae=(0,p.memo)(function(e){const t=(0,c.c)(12),{startedAt:n,active:o,style:l,testID:d}=e,u=void 0===o||o,h=n.getTime();let f;t[0]!==h?(f=()=>Math.max(0,Date.now()-h),t[0]=h,t[1]=f):f=t[1];const[b,y]=(0,p.useState)(f),x=u?Math.max(0,Date.now()-h):b;let S,w,_,v;return t[2]!==u||t[3]!==h?(S=()=>{if(!u)return;y(Math.max(0,Date.now()-h));const e=setInterval(()=>{y(Math.max(0,Date.now()-h))},1e3);return()=>clearInterval(e)},w=[u,h],t[2]=u,t[3]=h,t[4]=S,t[5]=w):(S=t[4],w=t[5]),(0,p.useEffect)(S,w),t[6]!==x?(_=(0,A.formatDuration)(x),t[6]=x,t[7]=_):_=t[7],t[8]!==l||t[9]!==_||t[10]!==d?(v=(0,oe.jsx)(s.Text,{style:l,testID:d,children:_}),t[8]=l,t[9]=_,t[10]=d,t[11]=v):v=t[11],v}),Fe=w.StyleSheet.create(e=>({container:Object.assign({paddingVertical:e.spacing[3]},ee.isWeb?{userSelect:"text"}:{},{uni__dependencies:[0]}),containerCompactTop:{paddingTop:0},containerCompactBottom:{paddingBottom:0},imageFrame:{width:"100%",minHeight:160,marginHorizontal:-e.spacing[1],uni__dependencies:[0]},imageSurface:{width:"100%",overflow:"hidden"},image:{width:"100%",height:"100%"},imageState:{alignItems:"center",justifyContent:"center",paddingHorizontal:e.spacing[4],paddingVertical:e.spacing[6],gap:e.spacing[2],uni__dependencies:[0]},imageErrorText:{color:e.colors.foregroundMuted,fontSize:e.fontSize.sm,textAlign:"center",uni__dependencies:[0]}})),Be=(0,p.memo)(function(e){const n=(0,c.c)(44),{uri:u,alt:h,containerStyle:f,source:b,workspaceRoot:y,serverId:x}=e;let S;n[0]!==x||n[1]!==b||n[2]!==y?(S=(0,V.getAssistantImageMetadata)({source:b,workspaceRoot:y,serverId:x}),n[0]=x,n[1]=b,n[2]=y,n[3]=S):S=n[3];const w=S;let _;n[4]!==w?(_=()=>(0,V.getAssistantImageLoadStateFromMetadata)(w),n[4]=w,n[5]=_):_=n[5];const[v,k]=(0,p.useState)(_);let j,T,L;n[6]!==w||n[7]!==x||n[8]!==b||n[9]!==u||n[10]!==y?(j=()=>{if(w)return k((0,V.getAssistantImageLoadStateFromMetadata)(w)),Mt;k({status:"loading"});let e=!1;return o.Image.getSize(u,(t,n)=>{if(!e&&t>0&&n>0){const e=(0,V.setAssistantImageMetadata)({source:b,workspaceRoot:y,serverId:x},{width:t,height:n});k({status:"ready",aspectRatio:e?.aspectRatio??t/n})}},()=>{e||k({status:"error"})}),()=>{e=!0}},T=[w,x,b,u,y],n[6]=w,n[7]=x,n[8]=b,n[9]=u,n[10]=y,n[11]=j,n[12]=T):(j=n[11],T=n[12]),(0,p.useEffect)(j,T),n[13]===Symbol.for("react.memo_cache_sentinel")?(L=()=>{k({status:"error"})},n[13]=L):L=n[13];const I=L,{t:C}=(0,d.useTranslation)();let M;n[14]!==v.aspectRatio||n[15]!==v.status?(M=[Fe.imageSurface,"ready"===v.status?{aspectRatio:v.aspectRatio}:{height:160}],n[14]=v.aspectRatio,n[15]=v.status,n[16]=M):M=n[16];const P=M;let R;n[17]!==f?(R=[Fe.imageFrame,f],n[17]=f,n[18]=R):R=n[18];const W=R;let O;n[19]!==P?(O=[P,Fe.imageState],n[19]=P,n[20]=O):O=n[20];const E=O;let D;n[21]!==u?(D={uri:u},n[21]=u,n[22]=D):D=n[22];const A=D;if("ready"!==v.status){let e,o,c,d;return n[23]!==v.status?(e="loading"===v.status?(0,oe.jsx)(t.ActivityIndicator,{size:"small"}):null,n[23]=v.status,n[24]=e):e=n[24],n[25]!==v.status||n[26]!==C?(o="error"===v.status?(0,oe.jsx)(s.Text,{style:Fe.imageErrorText,children:C("message.attachments.imageUnavailable")}):null,n[25]=v.status,n[26]=C,n[27]=o):o=n[27],n[28]!==E||n[29]!==e||n[30]!==o?(c=(0,oe.jsxs)(l.View,{style:E,children:[e,o]}),n[28]=E,n[29]=e,n[30]=o,n[31]=c):c=n[31],n[32]!==W||n[33]!==c?(d=(0,oe.jsx)(l.View,{style:W,children:c}),n[32]=W,n[33]=c,n[34]=d):d=n[34],d}let F,B,z;return n[35]!==h||n[36]!==A?(F=(0,oe.jsx)(o.Image,{source:A,style:Fe.image,resizeMode:"contain",accessibilityLabel:h,onError:I}),n[35]=h,n[36]=A,n[37]=F):F=n[37],n[38]!==P||n[39]!==F?(B=(0,oe.jsx)(l.View,{style:P,children:F}),n[38]=P,n[39]=F,n[40]=B):B=n[40],n[41]!==W||n[42]!==B?(z=(0,oe.jsx)(l.View,{style:W,children:B}),n[41]=W,n[42]=B,n[43]=z):z=n[43],z});function Ve(e){const n=(0,c.c)(50),{source:o,alt:u,hasLeadingContent:h,client:p,workspaceRoot:f,serverId:b}=e,{t:x}=(0,d.useTranslation)();let S;n[0]!==o||n[1]!==f?(S=(0,H.resolveAssistantImageSource)({source:o,workspaceRoot:f}),n[0]=o,n[1]=f,n[2]=S):S=n[2];const w=S;let _;n[3]!==o?(_=(0,N.parseImageDataUrl)(o),n[3]=o,n[4]=_):_=n[4];const v=_,k=h?16:0;let j;n[5]!==k?(j={marginTop:k,marginBottom:0},n[5]=k,n[6]=j):j=n[6];const T=j,L=b??"unknown-server",I="file_rpc"===w?.kind?w.cwd:null,C="file_rpc"===w?.kind?w.path:null;let M;n[7]!==L||n[8]!==I||n[9]!==C?(M=["assistantMarkdownImage",L,I,C],n[7]=L,n[8]=I,n[9]=C,n[10]=M):M=n[10];const P=Boolean(p&&"file_rpc"===w?.kind);let R,W;n[11]!==p||n[12]!==w||n[13]!==x?(R=async()=>{if(!p||!w||"file_rpc"!==w.kind)return null;const e=await p.readFile(w.cwd,w.path);if("image"!==e.kind)throw new Error(x("message.attachments.imagePreviewUnavailable"));return await(0,Q.persistAttachmentFromBytes)({id:(0,N.createPreviewAttachmentId)({mimeType:e.mime,path:e.path||w.path,size:e.size,modifiedAt:e.modifiedAt,contentLength:e.bytes.byteLength}),bytes:e.bytes,mimeType:e.mime,fileName:(0,N.getFileNameFromPath)(e.path||w.path)})},n[11]=p,n[12]=w,n[13]=x,n[14]=R):R=n[14],n[15]!==R||n[16]!==M||n[17]!==P?(W={queryKey:M,enabled:P,staleTime:3e4,queryFn:R},n[15]=R,n[16]=M,n[17]=P,n[18]=W):W=n[18];const O=(0,y.useQuery)(W),E=v?.cacheKey??null;let D;n[19]!==E?(D=["assistantMarkdownDataImage",E],n[19]=E,n[20]=D):D=n[20];const A=null!==v;let F,B;n[21]!==v||n[22]!==o?(F=async()=>v?await(0,Q.persistAttachmentFromDataUrl)({id:(0,N.createPreviewAttachmentId)({mimeType:v.mimeType,contentLength:v.base64.length}),dataUrl:o,mimeType:v.mimeType}):null,n[21]=v,n[22]=o,n[23]=F):F=n[23],n[24]!==D||n[25]!==A||n[26]!==F?(B={queryKey:D,enabled:A,staleTime:3e4,queryFn:F},n[24]=D,n[25]=A,n[26]=F,n[27]=B):B=n[27];const V=(0,y.useQuery)(B),z=(0,Y.useAttachmentPreviewUrl)(O.data),X=(0,Y.useAttachmentPreviewUrl)(V.data),U=("direct"!==w?.kind||v?null:w.uri)??X??z??null;let $,q;n[28]===Symbol.for("react.memo_cache_sentinel")?($={height:160},n[28]=$):$=n[28],n[29]!==T?(q=[Fe.imageFrame,T,$,Fe.imageState],n[29]=T,n[30]=q):q=n[30];const G=q;if(U){let e;return n[31]!==u||n[32]!==T||n[33]!==U||n[34]!==b||n[35]!==o||n[36]!==f?(e=(0,oe.jsx)(Be,{uri:U,alt:u,containerStyle:T,source:o,workspaceRoot:f,serverId:b}),n[31]=u,n[32]=T,n[33]=U,n[34]=b,n[35]=o,n[36]=f,n[37]=e):e=n[37],e}if(O.isLoading||V.isLoading){let e,o;return n[38]===Symbol.for("react.memo_cache_sentinel")?(e=(0,oe.jsx)(t.ActivityIndicator,{size:"small"}),n[38]=e):e=n[38],n[39]!==G?(o=(0,oe.jsx)(l.View,{style:G,children:e}),n[39]=G,n[40]=o):o=n[40],o}let K;n[41]!==V.error||n[42]!==O.error||n[43]!==x?(K=ze(O.error,V.error,x("message.attachments.imagePreviewLoadFailed")),n[41]=V.error,n[42]=O.error,n[43]=x,n[44]=K):K=n[44];const J=K;let Z,ee;return n[45]!==J?(Z=(0,oe.jsx)(s.Text,{style:Fe.imageErrorText,children:J}),n[45]=J,n[46]=Z):Z=n[46],n[47]!==G||n[48]!==Z?(ee=(0,oe.jsx)(l.View,{style:G,children:Z}),n[47]=G,n[48]=Z,n[49]=ee):ee=n[49],ee}function ze(e,t,n){return e instanceof Error?e.message:t instanceof Error?t.message:n}function He(e,t){const n=t.trim();if(!n)return null;const o=e.linkify.match(n);if(!o||1!==o.length)return null;const[s]=o;return s&&0===s.index&&s.lastIndex===n.length?s.url:null}function Ne(e){return e.children.length?e.children.map(Ne).join(""):e.content??""}function Xe(e,t){return Array.isArray(e)?e.some(e=>e?.type===t):"object"==typeof e&&null!==e&&"type"in e&&e.type===t}const Ue=w.StyleSheet.create(e=>({container:{alignSelf:"flex-start",padding:e.spacing[2],paddingTop:0,marginTop:e.spacing[2],uni__dependencies:[0]},iconColor:{color:e.colors.foregroundMuted,uni__dependencies:[0]},iconHoveredColor:{color:e.colors.foreground,uni__dependencies:[0]}})),$e=(0,p.memo)(function(e){const t=(0,c.c)(18),{getContent:o,containerStyle:s,accessibilityLabel:l,copiedAccessibilityLabel:u}=e,{t:h}=(0,d.useTranslation)(),[f,b]=(0,p.useState)(!1),y=(0,p.useRef)(null);let x;t[0]!==o?(x=async()=>{const e=o();e&&(await(0,F.writeMarkdownToRichClipboard)(e,(0,B.getDefaultMarkdownClipboardEnvironment)()),b(!0),y.current&&clearTimeout(y.current),y.current=setTimeout(()=>{b(!1),y.current=null},1500))},t[0]=o,t[1]=x):x=t[1];const w=x;let _,v,k;t[2]===Symbol.for("react.memo_cache_sentinel")?(_=()=>()=>{y.current&&clearTimeout(y.current)},v=[],t[2]=_,t[3]=v):(_=t[2],v=t[3]),(0,p.useEffect)(_,v),t[4]!==s?(k=[Ue.container,s],t[4]=s,t[5]=k):k=t[5];const j=k;let T,L,I;return t[6]!==l||t[7]!==f||t[8]!==u||t[9]!==h?(T=f?u??h("message.actions.copied"):l??h("message.actions.copyTurn"),t[6]=l,t[7]=f,t[8]=u,t[9]=h,t[10]=T):T=t[10],t[11]!==f?(L=e=>{const{hovered:t}=e,n=t?Ue.iconHoveredColor.color:Ue.iconColor.color;return f?(0,oe.jsx)(S.Check,{size:16,color:n}):(0,oe.jsx)(S.Copy,{size:16,color:n})},t[11]=f,t[12]=L):L=t[12],t[13]!==w||t[14]!==j||t[15]!==T||t[16]!==L?(I=(0,oe.jsx)(n.Pressable,{onPress:w,style:j,accessibilityRole:"button",accessibilityLabel:T,children:L}),t[13]=w,t[14]=j,t[15]=T,t[16]=L,t[17]=I):I=t[17],I}),qe=w.StyleSheet.create(e=>({container:{marginHorizontal:-13},containerSpacing:{marginBottom:e.spacing[1],uni__dependencies:[0]},containerLastInSequence:{marginBottom:e.spacing[4],uni__dependencies:[0]},pressable:{borderRadius:e.borderRadius.lg,borderWidth:e.borderWidth[1],borderColor:"transparent",paddingHorizontal:e.spacing[2],paddingVertical:e.spacing[1],overflow:"hidden",uni__dependencies:[0]},pressablePressed:{opacity:.9},headerRow:{flexDirection:"row",alignItems:"center"},labelRow:{flex:1,flexDirection:"row",alignItems:"center",overflow:"hidden"},iconBadge:{width:22,height:22,borderRadius:11,alignItems:"center",justifyContent:"center",marginRight:e.spacing[1],backgroundColor:"transparent",uni__dependencies:[0]},label:{color:e.colors.foregroundMuted,fontSize:e.fontSize.base,fontWeight:e.fontWeight.normal,flexShrink:0,uni__dependencies:[0]},labelActive:{color:e.colors.foreground,uni__dependencies:[0]},labelLoading:{color:e.colors.foreground,opacity:.72,uni__dependencies:[0]},secondaryLabel:{flexShrink:1,minWidth:0,color:e.colors.foregroundMuted,fontSize:e.fontSize.base,fontWeight:e.fontWeight.normal,marginLeft:e.spacing[2],uni__dependencies:[0]},secondaryLabelActive:{color:e.colors.foreground,uni__dependencies:[0]},shimmerText:{color:"transparent",fontSize:e.fontSize.base,fontWeight:e.fontWeight.normal,uni__dependencies:[0]},spacer:{flex:1},chevron:{flexShrink:0},openFileButton:{marginLeft:e.spacing[1],padding:e.spacing[1],borderRadius:e.borderRadius.md,flexShrink:0,uni__dependencies:[0]},openFileButtonPlaceholderIcon:{width:14,height:14},detailWrapper:Object.assign({borderBottomLeftRadius:e.borderRadius.lg,borderBottomRightRadius:e.borderRadius.lg,borderWidth:e.borderWidth[1],borderTopWidth:0,borderColor:e.colors.border,padding:0,gap:0,flexShrink:1,minWidth:0,overflow:"hidden"},ee.isWeb?{cursor:"auto",userSelect:"text"}:{},{uni__dependencies:[0]}),pressableExpanded:{backgroundColor:e.colors.surface1,uni__dependencies:[0]},pressableExpandedAttached:{borderColor:e.colors.border,borderBottomLeftRadius:0,borderBottomRightRadius:0,uni__dependencies:[0]},detailWrapperBorderless:{borderWidth:0},shimmerOverlay:{position:"absolute",top:0,right:0,bottom:0,left:0,flexDirection:"row",alignItems:"center",overflow:"hidden"},shimmerMaskRow:{flexDirection:"row",alignItems:"center",width:"100%",height:"100%"},nativeShimmerTrack:{position:"absolute",top:0,right:0,bottom:0,left:0,overflow:"hidden"},nativeShimmerPeak:{position:"absolute",top:0,bottom:0,left:0}})),Ge={code:"function messageTsx1(){const{shimmerTranslateX}=this.__closure;return{transform:[{translateX:shimmerTranslateX.value}]};}"},Ke=(0,p.memo)(function(e){const t=(0,c.c)(41),{label:n,secondaryLabel:o,rowWidth:d,rowHeight:u,peakWidth:h,durationSeconds:f,gradientId:b}=e,y=(0,re.useRetainedPanelActive)(),S=(0,v.useSharedValue)(0);let w,_;t[0]!==f||t[1]!==y||t[2]!==h||t[3]!==d||t[4]!==S?(w=()=>{if(!y)return void(0,v.cancelAnimation)(S);const e=-h,t=d+h;return S.value=e,S.value=(0,v.withRepeat)((0,v.withTiming)(t,{duration:1e3*f,easing:v.Easing.linear}),-1,!1),()=>{(0,v.cancelAnimation)(S)}},_=[f,y,h,d,S],t[0]=f,t[1]=y,t[2]=h,t[3]=d,t[4]=S,t[5]=w,t[6]=_):(w=t[5],_=t[6]),(0,p.useEffect)(w,_);const j=(0,v.useAnimatedStyle)((function({_worklet_4627475087259_init_data:e,shimmerTranslateX:t}){const n=()=>({transform:[{translateX:t.value}]});return n.__closure={shimmerTranslateX:t},n.__workletHash=4627475087259,n.__initData=e,n})({_worklet_4627475087259_init_data:Ge,shimmerTranslateX:S}));let T;t[7]!==u||t[8]!==d?(T=[qe.nativeShimmerTrack,{width:d,height:u}],t[7]=u,t[8]=d,t[9]=T):T=t[9];const L=T;let I;t[10]!==u||t[11]!==d?(I=[qe.shimmerMaskRow,{width:d,height:u}],t[10]=u,t[11]=d,t[12]=I):I=t[12];const C=I;let M;t[13]===Symbol.for("react.memo_cache_sentinel")?(M=[qe.label,{color:"#000000",opacity:1}],t[13]=M):M=t[13];const P=M;let R;t[14]===Symbol.for("react.memo_cache_sentinel")?(R=[qe.secondaryLabel,{color:"#000000",opacity:1}],t[14]=R):R=t[14];const W=R;let O,E;t[15]!==h||t[16]!==u?(O={width:h,height:u},t[15]=h,t[16]=u,t[17]=O):O=t[17],t[18]!==j||t[19]!==O?(E=[qe.nativeShimmerPeak,j,O],t[18]=j,t[19]=O,t[20]=E):E=t[20];const D=E;let A,F,B;t[21]!==n?(A=(0,oe.jsx)(s.Text,{style:P,numberOfLines:1,children:n}),t[21]=n,t[22]=A):A=t[22],t[23]!==o?(F=o?(0,oe.jsx)(s.Text,{style:W,numberOfLines:1,children:o}):(0,oe.jsx)(l.View,{style:qe.spacer}),t[23]=o,t[24]=F):F=t[24],t[25]!==C||t[26]!==F||t[27]!==A?(B=(0,oe.jsxs)(l.View,{pointerEvents:"none",style:C,children:[A,F]}),t[25]=C,t[26]=F,t[27]=A,t[28]=B):B=t[28];const V=B;let z,H,N,X;return t[29]!==b?(z=(0,oe.jsx)(Ye,{gradientId:b}),t[29]=b,t[30]=z):z=t[30],t[31]!==D||t[32]!==z?(H=(0,oe.jsx)(k.default.View,{pointerEvents:"none",style:D,children:z}),t[31]=D,t[32]=z,t[33]=H):H=t[33],t[34]!==L||t[35]!==H?(N=(0,oe.jsx)(l.View,{pointerEvents:"none",style:L,children:H}),t[34]=L,t[35]=H,t[36]=N):N=t[36],t[37]!==V||t[38]!==L||t[39]!==N?(X=(0,oe.jsx)(l.View,{style:qe.shimmerOverlay,pointerEvents:"none",children:(0,oe.jsx)(x.default,{pointerEvents:"none",style:L,maskElement:V,children:N})}),t[37]=V,t[38]=L,t[39]=N,t[40]=X):X=t[40],X});function Ye(e){const t=(0,c.c)(10),{gradientId:n}=e;let o,s,l,d;t[0]===Symbol.for("react.memo_cache_sentinel")?(o=(0,oe.jsx)(j.Stop,{offset:"0%",stopColor:"#ffffff",stopOpacity:0}),s=(0,oe.jsx)(j.Stop,{offset:"50%",stopColor:"#ffffff",stopOpacity:1}),l=(0,oe.jsx)(j.Stop,{offset:"100%",stopColor:"#ffffff",stopOpacity:0}),t[0]=o,t[1]=s,t[2]=l):(o=t[0],s=t[1],l=t[2]),t[3]!==n?(d=(0,oe.jsx)(j.Defs,{children:(0,oe.jsxs)(j.LinearGradient,{id:n,x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[o,s,l]})}),t[3]=n,t[4]=d):d=t[4];const u=`url(#${n})`;let h,p;return t[5]!==u?(h=(0,oe.jsx)(j.Rect,{x:"0",y:"0",width:"100%",height:"100%",fill:u}),t[5]=u,t[6]=h):h=t[6],t[7]!==d||t[8]!==h?(p=(0,oe.jsxs)(T.default,{width:"100%",height:"100%",preserveAspectRatio:"none",children:[d,h]}),t[7]=d,t[8]=h,t[9]=p):p=t[9],p}function Qe(e){const t=(0,c.c)(8),{block:n,marginBottom:o,children:s}=e;let d;t[0]!==o?(d=o>0?{marginBottom:o}:void 0,t[0]=o,t[1]=d):d=t[1];const u=d;let h;t[2]!==n?(h=e=>{const{width:t,height:o}=e.nativeEvent.layout;(0,z.setAssistantMarkdownBlockHeight)({block:n,width:t,height:o})},t[2]=n,t[3]=h):h=t[3];const p=h,f=ee.isWeb?p:void 0;let b;return t[4]!==s||t[5]!==u||t[6]!==f?(b=(0,oe.jsx)(l.View,{style:u,onLayout:f,children:s}),t[4]=s,t[5]=u,t[6]=f,t[7]=b):b=t[7],b}const Je=f.memo(function(e){const t=(0,c.c)(5),{text:n,rules:o,parser:s,onLinkPress:l}=e;let d;return t[0]!==l||t[1]!==s||t[2]!==o||t[3]!==n?(d=(0,oe.jsx)(C.MarkdownRenderer,{text:n,enableHtmlish:!1,rules:o,markdownit:s,onLinkPress:l,allowedImageHandlers:de,topLevelMaxExceededItem:ue}),t[0]=l,t[1]=s,t[2]=o,t[3]=n,t[4]=d):d=t[4],d});function Ze(e){const t=(0,c.c)(10),{inheritedStyles:n,textStyle:o,style:s,monoSurface:l,children:d}=e;let h;t[0]!==n||t[1]!==s||t[2]!==o?(h=[n,o,s],t[0]=n,t[1]=s,t[2]=o,t[3]=h):h=t[3];const p=h,f=(0,G.useAssistantLinkPress)(),b=f?.onPress,y=f?.accessibilityRole;let x;return t[4]!==d||t[5]!==l||t[6]!==p||t[7]!==b||t[8]!==y?(x=(0,oe.jsx)(u.MarkdownTextSpan,{monoSurface:l,style:p,onPress:b,accessibilityRole:y,children:d}),t[4]=d,t[5]=l,t[6]=p,t[7]=b,t[8]=y,t[9]=x):x=t[9],x}const et={flex:1,flexShrink:1,minWidth:0};function tt(e){const t=(0,c.c)(5),{contentStyle:n,children:o}=e;let s;t[0]!==n?(s=[n,et],t[0]=n,t[1]=s):s=t[1];const d=s;let u;return t[2]!==o||t[3]!==d?(u=(0,oe.jsx)(l.View,{style:d,children:o}),t[2]=o,t[3]=d,t[4]=u):u=t[4],u}function nt(e){const t=(0,c.c)(6),{baseStyle:n,spacing:o,children:s}=e;let d;t[0]!==n||t[1]!==o?(d=[n,o],t[0]=n,t[1]=o,t[2]=d):d=t[2];const u=d;let h;return t[3]!==s||t[4]!==u?(h=(0,oe.jsx)(l.View,{style:u,children:s}),t[3]=s,t[4]=u,t[5]=h):h=t[5],h}const it=(0,p.memo)(function(e){const t=(0,c.c)(30),{message:n,workspaceRoot:o,serverId:s,client:d,spacing:u}=e,h=void 0===u?"default":u;let p;if(t[0]===Symbol.for("react.memo_cache_sentinel")){p=(0,b.MarkdownIt)({typographer:!0,linkify:!0});const e=p.validateLink.bind(p);p.validateLink=t=>!!t.trim().toLowerCase().startsWith("file://")||e(t),t[0]=p}else p=t[0];const f=p,y=(0,G.useAssistantFileLinkActions)();let x;t[1]!==y?(x=e=>(y.open({href:e},"main"),!1),t[1]=y,t[2]=x):x=t[2];const S=(0,O.useStableEvent)(x);let w,_,v;t[3]!==y?(w=(e,t,n,o,s)=>{const l=void 0===s?{}:s,c=e.content??"",d={href:c,text:c,sourceType:"inline-code"};if(!Xe(n,"link")&&y.canResolveFile(d))return(0,oe.jsx)(G.AssistantInlineCodePathLink,{content:c,inheritedStyles:l,codeInlineStyle:o.code_inline,linkStyle:o.link},e.key);const u=He(f,c);if(u){const t={href:(h={href:u,content:c}).href,text:h.content,markup:"linkify",sourceInfo:"auto"};return(0,oe.jsx)(G.AssistantMarkdownCodeLink,{source:t,inheritedStyles:l,codeInlineStyle:o.code_inline,linkStyle:o.link,children:c},e.key)}var h;return(0,oe.jsx)(Ze,{inheritedStyles:l,textStyle:o.code_inline,monoSurface:!0,children:c},e.key)},t[3]=y,t[4]=w):w=t[4],t[5]!==d||t[6]!==s||t[7]!==o?(_=(e,t,n,l)=>{const c=Array.isArray(n)?n.find(qt):null,u=(Array.isArray(c?.children)?c.children:[]).findIndex(t=>t?.key===e.key)>0;return(0,oe.jsx)(Ve,{source:String(e.attributes?.src??""),alt:"string"==typeof e.attributes?.alt?e.attributes.alt:void 0,hasLeadingContent:u,client:d,workspaceRoot:o,serverId:s},e.key)},t[5]=d,t[6]=s,t[7]=o,t[8]=_):_=t[8],t[9]!==w||t[10]!==_?(v={text:Pt,textgroup:Rt,strong:Wt,em:Ot,s:Et,hardbreak:Dt,softbreak:At,code_block:Ft,fence:Bt,code_inline:w,bullet_list:Vt,ordered_list:zt,list_item:Ht,th:Nt,td:Xt,paragraph:Ut,link:$t,image:_},t[9]=w,t[10]=_,t[11]=v):v=t[11];const k=v;let j;t[12]!==n?(j=(0,D.splitMarkdownBlocks)(n),t[12]=n,t[13]=j):j=t[13];const T=j;let L;t[14]!==T?(L=T.map(Gt),t[14]=T,t[15]=L):L=t[15];const I=L,C=("compactTop"===h||"compactBoth"===h)&&Fe.containerCompactTop,M=("compactBottom"===h||"compactBoth"===h)&&Fe.containerCompactBottom;let P;t[16]!==C||t[17]!==M?(P=[Fe.container,C,M],t[16]=C,t[17]=M,t[18]=P):P=t[18];const R=P;let W,E;if(t[19]!==S||t[20]!==I||t[21]!==k){let e;t[23]!==S||t[24]!==I.length||t[25]!==k?(e=(e,t)=>{const{key:n,block:o}=e;return(0,oe.jsx)(Qe,{block:o,marginBottom:t<I.length-1?12:0,children:(0,oe.jsx)(Je,{text:o,rules:k,parser:f,onLinkPress:S})},n)},t[23]=S,t[24]=I.length,t[25]=k,t[26]=e):e=t[26],W=I.map(e),t[19]=S,t[20]=I,t[21]=k,t[22]=W}else W=t[22];return t[27]!==R||t[28]!==W?(E=(0,oe.jsx)(l.View,{testID:"assistant-message",style:R,children:W}),t[27]=R,t[28]=W,t[29]=E):E=t[29],E}),rt=w.StyleSheet.create(e=>({container:{paddingVertical:e.spacing[3],uni__dependencies:[0]},containerSpacing:{marginBottom:e.spacing[4],uni__dependencies:[0]},header:{flexDirection:"row",alignItems:"center",gap:e.spacing[2],marginBottom:e.spacing[2],uni__dependencies:[0]},headerLabel:{fontFamily:e.fontFamily.ui,fontSize:e.fontSize.base,fontWeight:e.fontWeight.normal,color:e.colors.foregroundMuted,uni__dependencies:[0]},text:{fontFamily:e.fontFamily.ui,fontSize:e.fontSize.base,lineHeight:22,color:e.colors.foreground,uni__dependencies:[0]}})),ot=(0,p.memo)(function(e){const t=(0,c.c)(13),{message:n,disableOuterSpacing:o}=e,{t:u}=(0,d.useTranslation)(),h=!ae(o)&&rt.containerSpacing;let p;t[0]!==h?(p=[rt.container,h],t[0]=h,t[1]=p):p=t[1];const f=p;let b,y,x,S,w;return t[2]===Symbol.for("react.memo_cache_sentinel")?(b=(0,oe.jsx)(me,{size:12,uniProps:ye}),t[2]=b):b=t[2],t[3]!==u?(y=u("message.speak.header"),t[3]=u,t[4]=y):y=t[4],t[5]!==y?(x=(0,oe.jsxs)(l.View,{style:rt.header,children:[b,(0,oe.jsx)(s.Text,{style:rt.headerLabel,children:y})]}),t[5]=y,t[6]=x):x=t[6],t[7]!==n?(S=(0,oe.jsx)(s.Text,{style:rt.text,children:n}),t[7]=n,t[8]=S):S=t[8],t[9]!==f||t[10]!==x||t[11]!==S?(w=(0,oe.jsxs)(l.View,{testID:"speak-message",style:f,children:[x,S]}),t[9]=f,t[10]=x,t[11]=S,t[12]=w):w=t[12],w}),st=w.StyleSheet.create(e=>({pressable:{borderRadius:e.borderRadius.md,overflow:"hidden",uni__dependencies:[0]},pressableSpacing:{marginBottom:e.spacing[1],uni__dependencies:[0]},pressableActive:{opacity:.7},systemBg:{backgroundColor:"rgba(39, 39, 42, 0.5)"},infoBg:{backgroundColor:"rgba(30, 58, 138, 0.3)"},successBg:{backgroundColor:"rgba(20, 83, 45, 0.3)"},errorBg:{},artifactBg:{backgroundColor:"rgba(30, 58, 138, 0.4)"},content:{paddingHorizontal:e.spacing[3],paddingVertical:10,uni__dependencies:[0]},row:{flexDirection:"row",alignItems:"flex-start",gap:e.spacing[2],uni__dependencies:[0]},iconContainer:{flexShrink:0,height:20,justifyContent:"center"},textContainer:{flex:1},messageText:{fontSize:e.fontSize.sm,lineHeight:20,uni__dependencies:[0]},detailsRow:{flexDirection:"row",alignItems:"center",marginTop:e.spacing[1],uni__dependencies:[0]},detailsText:{color:e.colors.foregroundMuted,fontSize:e.fontSize.xs,marginRight:e.spacing[1],uni__dependencies:[0]},metadataContainer:{marginTop:e.spacing[2],backgroundColor:"rgba(0, 0, 0, 0.5)",borderRadius:e.borderRadius.base,padding:e.spacing[2],borderWidth:e.borderWidth[1],borderColor:e.colors.border,uni__dependencies:[0]},metadataText:{color:e.colors.foreground,fontSize:e.fontSize.code,fontFamily:e.fontFamily.mono,lineHeight:16,uni__dependencies:[0]}})),at=(0,p.memo)(function(e){const t=(0,c.c)(39),{type:o,message:u,metadata:h,artifactId:f,artifactType:b,title:y,onArtifactClick:x,disableOuterSpacing:w}=e,{t:_}=(0,d.useTranslation)(),v=ae(w),[k,j]=(0,p.useState)(!1);let T;t[0]===Symbol.for("react.memo_cache_sentinel")?(T={system:{bg:st.systemBg,color:"#a1a1aa",Icon:S.Circle},info:{bg:st.infoBg,color:"#60a5fa",Icon:S.Info},success:{bg:st.successBg,color:"#4ade80",Icon:S.CheckCircle},error:{bg:st.errorBg,color:"#f87171",Icon:S.XCircle},artifact:{bg:st.artifactBg,color:"#93c5fd",Icon:S.FileText}},t[0]=T):T=t[0];const I=T[o],C=I.Icon;let M;t[1]!==f||t[2]!==h||t[3]!==x||t[4]!==o?(M=()=>{"artifact"===o&&f&&x?x(f):h&&j(Kt)},t[1]=f,t[2]=h,t[3]=x,t[4]=o,t[5]=M):M=t[5];const P=M,R="artifact"===o&&b&&y?`${b}: ${y}`:u,W="artifact"===o||h,O=!v&&st.pressableSpacing,E=W&&st.pressableActive;let D;t[6]!==I.bg||t[7]!==O||t[8]!==E?(D=[st.pressable,O,I.bg,E],t[6]=I.bg,t[7]=O,t[8]=E,t[9]=D):D=t[9];const A=D;let F;t[10]!==I.color?(F=[st.messageText,{color:I.color}],t[10]=I.color,t[11]=F):F=t[11];const B=F,V=!W;let z,H,N,X,U,$,q,G;return t[12]!==C||t[13]!==I.color?(z=(0,oe.jsx)(l.View,{style:st.iconContainer,children:(0,oe.jsx)(C,{size:16,color:I.color})}),t[12]=C,t[13]=I.color,t[14]=z):z=t[14],t[15]!==R||t[16]!==B?(H=(0,oe.jsx)(s.Text,{style:B,selectable:!0,children:R}),t[15]=R,t[16]=B,t[17]=H):H=t[17],t[18]!==k||t[19]!==h||t[20]!==_?(N=h&&(0,oe.jsxs)(l.View,{style:st.detailsRow,children:[(0,oe.jsx)(s.Text,{style:st.detailsText,children:_("message.activity.details")}),k?(0,oe.jsx)(S.ChevronDown,{size:12,color:"#71717a"}):(0,oe.jsx)(S.ChevronRight,{size:12,color:"#71717a"})]}),t[18]=k,t[19]=h,t[20]=_,t[21]=N):N=t[21],t[22]!==N||t[23]!==H?(X=(0,oe.jsxs)(l.View,{style:st.textContainer,children:[H,N]}),t[22]=N,t[23]=H,t[24]=X):X=t[24],t[25]!==X||t[26]!==z?(U=(0,oe.jsxs)(l.View,{style:st.row,children:[z,X]}),t[25]=X,t[26]=z,t[27]=U):U=t[27],t[28]!==k||t[29]!==h?($=k&&h&&(0,oe.jsx)(l.View,{style:st.metadataContainer,dataSet:L.CODE_SURFACE_DATASET,children:(0,oe.jsx)(s.Text,{style:st.metadataText,children:JSON.stringify(h,null,2)})}),t[28]=k,t[29]=h,t[30]=$):$=t[30],t[31]!==U||t[32]!==$?(q=(0,oe.jsxs)(l.View,{style:st.content,children:[U,$]}),t[31]=U,t[32]=$,t[33]=q):q=t[33],t[34]!==P||t[35]!==A||t[36]!==q||t[37]!==V?(G=(0,oe.jsx)(n.Pressable,{onPress:P,disabled:V,style:A,children:q}),t[34]=P,t[35]=A,t[36]=q,t[37]=V,t[38]=G):G=t[38],G}),lt=w.StyleSheet.create(e=>({container:{flexDirection:"row",alignItems:"center",paddingVertical:e.spacing[3],paddingHorizontal:e.spacing[4],gap:e.spacing[2],uni__dependencies:[0]},line:{flex:1,height:1,backgroundColor:e.colors.border,uni__dependencies:[0]},label:{flexDirection:"row",alignItems:"center",gap:e.spacing[2],uni__dependencies:[0]},text:{fontFamily:e.fontFamily.ui,fontSize:13,color:e.colors.foregroundMuted,uni__dependencies:[0]}})),ct=(0,p.memo)(function(e){const n=(0,c.c)(15),{status:o,trigger:d,preTokens:u}=e;let h;n[0]!==u||n[1]!==o||n[2]!==d?(h=(0,K.getCompactionMarkerLabel)({status:o,trigger:d,preTokens:u}),n[0]=u,n[1]=o,n[2]=d,n[3]=h):h=n[3];const p=h;let f,b,y,x,w,_;return n[4]===Symbol.for("react.memo_cache_sentinel")?(f=(0,oe.jsx)(l.View,{style:lt.line}),n[4]=f):f=n[4],n[5]!==o?(b="loading"===o?(0,oe.jsx)(t.ActivityIndicator,{size:"small",color:"#a1a1aa"}):(0,oe.jsx)(S.Scissors,{size:12,color:"#a1a1aa"}),n[5]=o,n[6]=b):b=n[6],n[7]!==p?(y=(0,oe.jsx)(s.Text,{style:lt.text,children:p}),n[7]=p,n[8]=y):y=n[8],n[9]!==b||n[10]!==y?(x=(0,oe.jsxs)(l.View,{style:lt.label,children:[b,y]}),n[9]=b,n[10]=y,n[11]=x):x=n[11],n[12]===Symbol.for("react.memo_cache_sentinel")?(w=(0,oe.jsx)(l.View,{style:lt.line}),n[12]=w):w=n[12],n[13]!==x?(_=(0,oe.jsxs)(l.View,{style:lt.container,children:[f,x,w]}),n[13]=x,n[14]=_):_=n[14],_});function dt(e){const t=(0,c.c)(15),{text:n,completed:o}=e,d=o?ut.radioBadgeComplete:ut.radioBadgeIncomplete;let u;t[0]!==d?(u=[ut.radioBadge,d],t[0]=d,t[1]=u):u=t[1];const h=u,p=o&&ut.itemTextCompleted;let f;t[2]!==p?(f=[ut.itemText,p],t[2]=p,t[3]=f):f=t[3];const b=f;let y,x,S,w;return t[4]!==o?(y=o?(0,oe.jsx)(he,{size:12,uniProps:Se}):null,t[4]=o,t[5]=y):y=t[5],t[6]!==h||t[7]!==y?(x=(0,oe.jsx)(l.View,{style:h,children:y}),t[6]=h,t[7]=y,t[8]=x):x=t[8],t[9]!==n||t[10]!==b?(S=(0,oe.jsx)(s.Text,{style:b,children:n}),t[9]=n,t[10]=b,t[11]=S):S=t[11],t[12]!==x||t[13]!==S?(w=(0,oe.jsxs)(l.View,{style:ut.itemRow,children:[x,S]}),t[12]=x,t[13]=S,t[14]=w):w=t[14],w}const ut=w.StyleSheet.create(e=>({detailsWrapper:{padding:e.spacing[2],uni__dependencies:[0]},list:{gap:e.spacing[1],uni__dependencies:[0]},itemRow:{flexDirection:"row",alignItems:"center",gap:e.spacing[2],uni__dependencies:[0]},radioBadge:{width:16,height:16,borderRadius:8,backgroundColor:e.colors.foregroundMuted,alignItems:"center",justifyContent:"center",uni__dependencies:[0]},radioBadgeIncomplete:{opacity:.55},radioBadgeComplete:{opacity:.95},itemText:{flex:1,color:e.colors.foreground,fontSize:e.fontSize.base,uni__dependencies:[0]},itemTextCompleted:{color:e.colors.foregroundMuted,textDecorationLine:"line-through",uni__dependencies:[0]},emptyText:{color:e.colors.foregroundMuted,fontSize:e.fontSize.base,uni__dependencies:[0]}})),mt=(0,p.memo)(function(e){const t=(0,c.c)(12),{items:n,disableOuterSpacing:o}=e,{t:u}=(0,d.useTranslation)(),[h,f]=(0,p.useState)(!1),b=n.find(Yt)?.text;let y;t[0]===Symbol.for("react.memo_cache_sentinel")?(y=()=>{f(Qt)},t[0]=y):y=t[0];const x=y;let w;t[1]!==n||t[2]!==u?(w=()=>(0,oe.jsx)(l.View,{style:ut.detailsWrapper,children:(0,oe.jsx)(l.View,{style:ut.list,children:0===n.length?(0,oe.jsx)(s.Text,{style:ut.emptyText,children:u("message.todo.empty")}):n.map(Jt)})}),t[1]=n,t[2]=u,t[3]=w):w=t[3];const _=w;let v,k;return t[4]!==u?(v=u("message.todo.title"),t[4]=u,t[5]=v):v=t[5],t[6]!==o||t[7]!==h||t[8]!==b||t[9]!==_||t[10]!==v?(k=(0,oe.jsx)(jt,{label:v,secondaryLabel:b,icon:S.CheckSquare,isExpanded:h,onToggle:x,renderDetails:_,disableOuterSpacing:o}),t[6]=o,t[7]=h,t[8]=b,t[9]=_,t[10]=v,t[11]=k):k=t[11],k});function ht(e){const t=(0,c.c)(4),{secondaryLabel:n,secondaryLabelStyle:o,shouldMeasureWebShimmer:l,onSecondaryLayout:d}=e;if(!n)return null;const u=l?d:void 0;let h;return t[0]!==n||t[1]!==o||t[2]!==u?(h=(0,oe.jsx)(s.Text,{style:o,numberOfLines:1,onLayout:u,children:n}),t[0]=n,t[1]=o,t[2]=u,t[3]=h):h=t[3],h}function pt(e){const t=(0,c.c)(16),{label:n,secondaryLabel:o,shimmerLabelTextStyle:d,shimmerSecondaryTextStyle:u,showOpenFileButton:h}=e;let p,f,b,y,x;return t[0]!==n||t[1]!==d?(p=(0,oe.jsx)(s.Text,{style:d,numberOfLines:1,children:n}),t[0]=n,t[1]=d,t[2]=p):p=t[2],t[3]!==o||t[4]!==u?(f=o?(0,oe.jsx)(s.Text,{style:u,numberOfLines:1,children:o}):null,t[3]=o,t[4]=u,t[5]=f):f=t[5],t[6]!==h?(b=h?(0,oe.jsx)(l.View,{style:qe.openFileButton,children:(0,oe.jsx)(l.View,{style:qe.openFileButtonPlaceholderIcon})}):null,t[6]=h,t[7]=b):b=t[7],t[8]!==o||t[9]!==h?(y=o||h?null:(0,oe.jsx)(l.View,{style:qe.spacer}),t[8]=o,t[9]=h,t[10]=y):y=t[10],t[11]!==p||t[12]!==f||t[13]!==b||t[14]!==y?(x=(0,oe.jsxs)(l.View,{style:qe.shimmerOverlay,pointerEvents:"none",children:[p,f,b,y]}),t[11]=p,t[12]=f,t[13]=b,t[14]=y,t[15]=x):x=t[15],x}function gt(e){const t=(0,c.c)(39),{label:o,labelStyle:u,secondaryLabel:h,secondaryLabelStyle:p,shouldMeasureWebShimmer:f,shouldMeasureNativeShimmer:b,isWebShimmer:y,isNativeShimmer:x,shimmerLabelTextStyle:S,shimmerSecondaryTextStyle:w,labelRowWidth:_,labelRowHeight:v,nativeShimmerPeakWidth:k,shimmerDuration:j,nativeGradientId:T,onLabelRowLayout:L,onLabelLayout:I,onSecondaryLayout:C,showOpenFileButton:M,isOpenFileHovered:P,onOpenFilePress:R,onOpenFileHoverIn:W,onOpenFileHoverOut:O}=e,{t:E}=(0,d.useTranslation)(),D=b?L:void 0,A=f?I:void 0;let F,B,V,z,H,N;return t[0]!==o||t[1]!==u||t[2]!==A?(F=(0,oe.jsx)(s.Text,{style:u,numberOfLines:1,onLayout:A,children:o}),t[0]=o,t[1]=u,t[2]=A,t[3]=F):F=t[3],t[4]!==C||t[5]!==h||t[6]!==p||t[7]!==f?(B=(0,oe.jsx)(ht,{secondaryLabel:h,secondaryLabelStyle:p,shouldMeasureWebShimmer:f,onSecondaryLayout:C}),t[4]=C,t[5]=h,t[6]=p,t[7]=f,t[8]=B):B=t[8],t[9]!==P||t[10]!==W||t[11]!==O||t[12]!==R||t[13]!==M||t[14]!==E?(V=M?(0,oe.jsx)(n.Pressable,{onPress:R,onHoverIn:W,onHoverOut:O,accessibilityRole:"button",accessibilityLabel:E("message.actions.openFile"),testID:"tool-call-open-file",style:qe.openFileButton,hitSlop:6,children:(0,oe.jsx)(pe,{size:14,uniProps:P?be:ye})}):null,t[9]=P,t[10]=W,t[11]=O,t[12]=R,t[13]=M,t[14]=E,t[15]=V):V=t[15],t[16]!==y||t[17]!==o||t[18]!==h||t[19]!==S||t[20]!==w||t[21]!==M?(z=y?(0,oe.jsx)(pt,{label:o,secondaryLabel:h,shimmerLabelTextStyle:S,shimmerSecondaryTextStyle:w,showOpenFileButton:M}):null,t[16]=y,t[17]=o,t[18]=h,t[19]=S,t[20]=w,t[21]=M,t[22]=z):z=t[22],t[23]!==x||t[24]!==o||t[25]!==v||t[26]!==_||t[27]!==T||t[28]!==k||t[29]!==h||t[30]!==j?(H=x?(0,oe.jsx)(Ke,{label:o,secondaryLabel:h,rowWidth:_,rowHeight:v,peakWidth:k,durationSeconds:j,gradientId:T}):null,t[23]=x,t[24]=o,t[25]=v,t[26]=_,t[27]=T,t[28]=k,t[29]=h,t[30]=j,t[31]=H):H=t[31],t[32]!==D||t[33]!==F||t[34]!==B||t[35]!==V||t[36]!==z||t[37]!==H?(N=(0,oe.jsxs)(l.View,{style:qe.labelRow,onLayout:D,children:[F,B,V,z,H]}),t[32]=D,t[33]=F,t[34]=B,t[35]=V,t[36]=z,t[37]=H,t[38]=N):N=t[38],N}const ft={marginLeft:-1},bt={marginLeft:-4};function yt({isError:e,isActive:t,ThemedIcon:n}){return e?(0,oe.jsx)(l.View,{style:ft,children:(0,oe.jsx)(ge,{size:12,opacity:.8,uniProps:we})}):n?(0,oe.jsx)(l.View,{style:ft,children:(0,oe.jsx)(n,{size:12,uniProps:t?be:xe})}):null}function xt({showChevron:e,chevronStyle:t,iconNode:n}){return e?(0,oe.jsx)(l.View,{style:t,children:(0,oe.jsx)(fe,{size:12,uniProps:be})}):n}function St(e){const t=e.label.trim().length+(e.secondaryLabel?.trim().length??0),n=t<=12?.25:0,o=Math.max(1,Math.min(2.3,1.25+.008*t-n)),s=Math.max(32,Math.min(120,e.labelRowWidth>0?.28*e.labelRowWidth:0)),l=e.isLoading&&ee.isWeb,c=ee.isWeb,d=e.isLoading&&ee.isNative,u=d&&e.labelRowWidth>0&&e.labelRowHeight>0,h=e.labelOffsetX,p=e.secondaryLabel?e.secondaryOffsetX+e.secondaryWidth:e.labelOffsetX+e.labelWidth,f=Math.max(1,p-h),b=Math.max(42,Math.min(120,.22*f));return{shimmerDuration:o,nativeShimmerPeakWidth:s,isWebShimmer:l,shouldMeasureWebShimmer:c,shouldMeasureNativeShimmer:d,isNativeShimmer:u,webShimmerPeakWidth:b,webShimmerTrackStart:h-b,webShimmerTrackEnd:p}}function wt(e){const t=(0,c.c)(4),{detailWrapperRef:n,enabled:o}=e;let s,l;t[0]!==n||t[1]!==o?(s=()=>{if(!o)return vt;const e=n.current;if(!(e instanceof HTMLElement))return _t;const t=e,s=e=>{Pe(t,e)&&e.stopPropagation()};return t.addEventListener("wheel",s,{passive:!0}),()=>{t.removeEventListener("wheel",s)}},l=[n,o],t[0]=n,t[1]=o,t[2]=s,t[3]=l):(s=t[2],l=t[3]),(0,p.useEffect)(s,l)}function _t(){}function vt(){}function kt(e){return e.isWebShimmer?(0,I.inlineUnistylesStyle)({opacity:1,color:"transparent",backgroundImage:"linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.45) 24%, #ffffff 40%, #ffffff 60%, rgba(255, 255, 255, 0.45) 76%, rgba(255, 255, 255, 0) 100%)",backgroundSize:`${e.webShimmerPeakWidth}px 100%`,backgroundRepeat:"no-repeat",backgroundClip:"text",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent",animation:`${ce} ${e.shimmerDuration}s linear infinite`,"--paseo-shimmer-start":e.webShimmerTrackStart-e.offsetX+"px","--paseo-shimmer-end":e.webShimmerTrackEnd-e.offsetX+"px"}):null}const jt=(0,p.memo)(function({label:e,style:t,secondaryLabel:o,icon:s,isExpanded:c,onToggle:d,onOpenFile:u,onDetailHoverChange:h,renderDetails:f,isLoading:b=!1,isError:y=!1,isLastInSequence:x=!1,disableOuterSpacing:S,borderlessWhenExpanded:_=!1,testID:v}){const k=ae(S),[j,T]=(0,p.useState)(!1),[L,C]=(0,p.useState)(!1),[M,P]=(0,p.useState)(!1),R=Boolean(d),W=Boolean(f),O=W&&c?f?.():null,E=(0,p.useRef)(null),D=(0,p.useCallback)(()=>T(!0),[]),A=(0,p.useCallback)(()=>{T(!1),P(!1)},[]),F=(0,p.useCallback)(()=>P(!0),[]),B=(0,p.useCallback)(()=>P(!1),[]),V=(0,p.useCallback)(()=>h?.(!0),[h]),z=(0,p.useCallback)(()=>h?.(!1),[h]),H=(0,p.useCallback)(e=>{e.stopPropagation?.(),u?.()},[u]),N=(0,p.useCallback)(()=>C(!0),[]),X=(0,p.useCallback)(()=>C(!1),[]),U=(0,p.useRef)(`shimmer-gradient-${Math.random().toString(36).substring(2,9)}`),[$,q]=(0,p.useState)(0),[G,K]=(0,p.useState)(0),[Y,Q]=(0,p.useState)(0),[J,Z]=(0,p.useState)(0),[te,ne]=(0,p.useState)(0),[ie,re]=(0,p.useState)(0),{shimmerDuration:se,nativeShimmerPeakWidth:le,isWebShimmer:ce,shouldMeasureWebShimmer:de,shouldMeasureNativeShimmer:ue,isNativeShimmer:me,webShimmerPeakWidth:he,webShimmerTrackStart:pe,webShimmerTrackEnd:ge}=St({label:e,secondaryLabel:o,isLoading:b,labelRowWidth:$,labelRowHeight:G,labelOffsetX:Y,labelWidth:J,secondaryOffsetX:te,secondaryWidth:ie}),fe=(0,p.useCallback)(e=>{if(!ue)return;const{width:t,height:n}=e.nativeEvent.layout;q(e=>Math.abs(e-t)>.5?t:e),K(e=>Math.abs(e-n)>.5?n:e)},[ue]),be=(0,p.useCallback)(e=>{if(!de)return;const{x:t,width:n}=e.nativeEvent.layout;Q(e=>Math.abs(e-t)>.5?t:e),Z(e=>Math.abs(e-n)>.5?n:e)},[de]),ye=(0,p.useCallback)(e=>{if(!de||!o)return;const{x:t,width:n}=e.nativeEvent.layout;ne(e=>Math.abs(e-t)>.5?t:e),re(e=>Math.abs(e-n)>.5?n:e)},[de,o]);(0,p.useEffect)(()=>{ce&&Le()},[ce]),wt({detailWrapperRef:E,enabled:!ee.isNative&&c&&W});const xe=(0,p.useMemo)(()=>kt({isWebShimmer:ce,webShimmerPeakWidth:he,shimmerDuration:se,webShimmerTrackStart:pe,webShimmerTrackEnd:ge,offsetX:Y}),[ce,he,se,pe,ge,Y]),Se=(0,p.useMemo)(()=>kt({isWebShimmer:ce,webShimmerPeakWidth:he,shimmerDuration:se,webShimmerTrackStart:pe,webShimmerTrackEnd:ge,offsetX:te}),[ce,he,se,pe,ge,te]),we=(0,p.useMemo)(()=>[qe.container,!k&&(x?qe.containerLastInSequence:qe.containerSpacing),t],[x,k,t]),ve=(0,p.useMemo)(()=>[qe.pressable,M&&R?qe.pressablePressed:null,c&&qe.pressableExpanded,c&&!_&&qe.pressableExpandedAttached],[_,c,R,M]),ke=(0,p.useMemo)(()=>[qe.detailWrapper,_&&qe.detailWrapperBorderless],[_]),je=(0,p.useMemo)(()=>R?{expanded:c}:void 0,[c,R]),Te=j||c,Ie=(0,p.useMemo)(()=>[qe.label,Te&&qe.labelActive,b&&qe.labelLoading],[Te,b]),Ce=(0,p.useMemo)(()=>[qe.secondaryLabel,Te&&qe.secondaryLabelActive],[Te]),Me=(0,p.useMemo)(()=>[qe.label,b&&qe.labelLoading,qe.shimmerText,xe],[b,xe]),Pe=(0,p.useMemo)(()=>[qe.secondaryLabel,qe.shimmerText,Se],[Se]),Re=(0,p.useMemo)(()=>[qe.chevron,bt,(0,I.inlineUnistylesStyle)({transform:c?[{scale:1.3},{rotate:"90deg"}]:[{scale:1.3}]})],[c]),We=(0,p.useMemo)(()=>s?(0,w.withUnistyles)(s):null,[s]),Oe=yt({isError:y,isActive:Te,ThemedIcon:We}),Ee=xt({showChevron:R&&(j||c),chevronStyle:Re,iconNode:Oe}),De=R?{onPress:d,onPressIn:F,onPressOut:B,accessibilityRole:"button"}:{};return(0,oe.jsxs)(l.View,{style:we,testID:v,onPointerEnter:ee.isWeb?D:void 0,onPointerLeave:ee.isWeb?A:void 0,children:[(0,oe.jsx)(n.Pressable,Object.assign({},De,{disabled:!R,accessibilityState:je,style:ve,children:(0,oe.jsxs)(l.View,{style:qe.headerRow,children:[(0,oe.jsx)(l.View,{style:qe.iconBadge,children:Ee}),(0,oe.jsx)(gt,{label:e,labelStyle:Ie,secondaryLabel:o,secondaryLabelStyle:Ce,shouldMeasureWebShimmer:de,shouldMeasureNativeShimmer:ue,isWebShimmer:ce,isNativeShimmer:me,shimmerLabelTextStyle:Me,shimmerSecondaryTextStyle:Pe,labelRowWidth:$,labelRowHeight:G,nativeShimmerPeakWidth:le,shimmerDuration:se,nativeGradientId:U.current,onLabelRowLayout:fe,onLabelLayout:be,onSecondaryLayout:ye,showOpenFileButton:Boolean(u&&j),isOpenFileHovered:L,onOpenFilePress:H,onOpenFileHoverIn:N,onOpenFileHoverOut:X})]})})),O?(0,oe.jsx)(n.Pressable,{ref:E,style:ke,onHoverIn:V,onHoverOut:z,children:O}):null]})},Tt);function Tt(e,t){return e.label===t.label&&(e.secondaryLabel===t.secondaryLabel&&(e.icon===t.icon&&(e.isExpanded===t.isExpanded&&(e.style===t.style&&(e.isLoading===t.isLoading&&(e.isError===t.isError&&(e.isLastInSequence===t.isLastInSequence&&(e.disableOuterSpacing===t.disableOuterSpacing&&(e.borderlessWhenExpanded===t.borderlessWhenExpanded&&(e.testID===t.testID&&(e.onToggle===t.onToggle&&(e.onOpenFile===t.onOpenFile&&(e.onDetailHoverChange===t.onDetailHoverChange&&e.renderDetails===t.renderDetails)))))))))))))}const Lt=(0,p.memo)(function(e){const t=(0,c.c)(57),{toolName:n,args:o,result:s,error:l,status:d,detail:u,cwd:h,metadata:f,isLastInSequence:b,disableOuterSpacing:y,onInlineDetailsHoverChange:x,onInlineDetailsExpandedChange:S,onOpenFilePath:w,defaultExpanded:v,forceInline:k,maxDetailHeight:j}=e,T=void 0!==b&&b,L=void 0!==k&&k,I=void 0===j?400:j,{openToolCall:C}=(0,$.useToolCallSheet)(),[R,W]=(0,p.useState)(v??!1),O=!(0,_.useIsCompactFormFactor)()||L;let E;e:if(u)E=u;else{if(void 0!==o||void 0!==s){const e=o??null,n=s??null;let l;t[0]!==e||t[1]!==n?(l={type:"unknown",input:e,output:n},t[0]=e,t[1]=n,t[2]=l):l=t[2],E=l;break e}E=void 0}const D=E,A=l??null;let F;t[3]!==h||t[4]!==D||t[5]!==f||t[6]!==d||t[7]!==A||t[8]!==n?(F=(0,M.buildToolCallPresentation)({toolName:n,status:d,error:A,detail:D,metadata:f,cwd:h,resolveIcon:P.resolveToolCallIcon}),t[3]=h,t[4]=D,t[5]=f,t[6]=d,t[7]=A,t[8]=n,t[9]=F):F=t[9];const B=F;let V;e:{const e=B.openFilePath;if(!e||!w){V=void 0;break e}let n;t[10]!==w||t[11]!==e?(n=()=>w(e),t[10]=w,t[11]=e,t[12]=n):n=t[12],V=n}const z=V;let H;t[13]!==D||t[14]!==C||t[15]!==B.displayName||t[16]!==B.errorText||t[17]!==B.icon||t[18]!==B.isLoadingDetails||t[19]!==B.summary||t[20]!==O?(H=()=>{O?W(Zt):C({displayName:B.displayName,summary:B.summary,detail:D,errorText:B.errorText,icon:B.icon,showLoadingSkeleton:B.isLoadingDetails})},t[13]=D,t[14]=C,t[15]=B.displayName,t[16]=B.errorText,t[17]=B.icon,t[18]=B.isLoadingDetails,t[19]=B.summary,t[20]=O,t[21]=H):H=t[21];const N=H;let X,G,K,Y,Q,J,Z;t[22]!==R||t[23]!==x||t[24]!==O?(G=()=>{x&&O&&!R&&x(!1)},X=[R,O,x],t[22]=R,t[23]=x,t[24]=O,t[25]=X,t[26]=G):(X=t[25],G=t[26]),(0,p.useEffect)(G,X),t[27]!==R||t[28]!==S||t[29]!==O?(K=()=>{S&&S(!!O&&R)},Y=[R,O,S],t[27]=R,t[28]=S,t[29]=O,t[30]=K,t[31]=Y):(K=t[30],Y=t[31]),(0,p.useEffect)(K,Y),t[32]!==S?(Q=()=>S?()=>{S(!1)}:en,J=[S],t[32]=S,t[33]=Q,t[34]=J):(Q=t[33],J=t[34]),(0,p.useEffect)(Q,J),t[35]!==D||t[36]!==I||t[37]!==B.errorText||t[38]!==B.isLoadingDetails||t[39]!==O?(Z=()=>O?(0,oe.jsx)(q.ToolCallDetailsContent,{detail:D,errorText:B.errorText,maxHeight:I,showLoadingSkeleton:B.isLoadingDetails}):null,t[35]=D,t[36]=I,t[37]=B.errorText,t[38]=B.isLoadingDetails,t[39]=O,t[40]=Z):Z=t[40];const ee=Z;if(B.isPlan&&"plan"===D?.type){let e;return t[41]!==y||t[42]!==D.text?(e=(0,oe.jsx)(U.PlanCard,{text:D.text,testID:"timeline-plan-card",disableOuterSpacing:y}),t[41]=y,t[42]=D.text,t[43]=e):e=t[43],e}const te=O&&R,ne=B.canOpenDetails?N:void 0,ie=B.canOpenDetails&&O?ee:void 0,re="running"===d||"executing"===d,se="failed"===d;let ae;return t[44]!==y||t[45]!==z||t[46]!==T||t[47]!==x||t[48]!==B.displayName||t[49]!==B.icon||t[50]!==B.summary||t[51]!==te||t[52]!==ne||t[53]!==ie||t[54]!==re||t[55]!==se?(ae=(0,oe.jsx)(jt,{testID:"tool-call-badge",label:B.displayName,secondaryLabel:B.summary,icon:B.icon,isExpanded:te,onToggle:ne,onOpenFile:z,renderDetails:ie,isLoading:re,isError:se,isLastInSequence:T,disableOuterSpacing:y,onDetailHoverChange:x}),t[44]=y,t[45]=z,t[46]=T,t[47]=x,t[48]=B.displayName,t[49]=B.icon,t[50]=B.summary,t[51]=te,t[52]=ne,t[53]=ie,t[54]=re,t[55]=se,t[56]=ae):ae=t[56],ae},It);function It(e,t){return e.toolName===t.toolName&&(e.args===t.args&&(e.result===t.result&&(e.error===t.error&&(e.status===t.status&&(e.detail===t.detail&&(e.cwd===t.cwd&&(e.metadata===t.metadata&&(e.isLastInSequence===t.isLastInSequence&&(e.disableOuterSpacing===t.disableOuterSpacing&&(e.onOpenFilePath===t.onOpenFilePath&&(e.defaultExpanded===t.defaultExpanded&&(e.forceInline===t.forceInline&&e.maxDetailHeight===t.maxDetailHeight))))))))))))}function Ct(e){return!e}function Mt(){}function Pt(e,t,n,o,s){const l=void 0===s?{}:s;return(0,oe.jsx)(Ze,{inheritedStyles:l,textStyle:o.text,children:e.content},e.key)}function Rt(e,t,n,o,s){const l=void 0===s?{}:s;return(0,oe.jsx)(Ze,{inheritedStyles:l,textStyle:o.textgroup,children:t},e.key)}function Wt(e,t,n,o,s){const l=void 0===s?{}:s;return(0,oe.jsx)(Ze,{inheritedStyles:l,textStyle:o.strong,children:t},e.key)}function Ot(e,t,n,o,s){const l=void 0===s?{}:s;return(0,oe.jsx)(Ze,{inheritedStyles:l,textStyle:o.em,children:t},e.key)}function Et(e,t,n,o,s){const l=void 0===s?{}:s;return(0,oe.jsx)(Ze,{inheritedStyles:l,textStyle:o.s,children:t},e.key)}function Dt(e,t,n,o){return(0,oe.jsx)(u.MarkdownTextSpan,{style:o.hardbreak,children:"\n"},e.key)}function At(e,t,n,o){return(0,oe.jsx)(u.MarkdownTextSpan,{style:o.softbreak,children:"\n"},e.key)}function Ft(e,t,n,o,s){const l=void 0===s?{}:s;return(0,oe.jsx)(E.HighlightedCodeBlock,{code:e.content,language:null,inheritedStyles:l,textStyle:o.code_block},e.key)}function Bt(e,t,n,o,s){const l=void 0===s?{}:s;return(0,oe.jsx)(E.HighlightedCodeBlock,{code:e.content,language:e.sourceInfo,inheritedStyles:l,textStyle:o.fence},e.key)}function Vt(e,t,n,o){return(0,oe.jsx)(nt,{baseStyle:o.bullet_list,spacing:(0,R.getMarkdownListSpacing)(e,n),children:t},e.key)}function zt(e,t,n,o){return(0,oe.jsx)(nt,{baseStyle:o.ordered_list,spacing:(0,R.getMarkdownListSpacing)(e,n),children:t},e.key)}function Ht(e,t,n,o){const{isOrdered:c,marker:d}=(0,R.getMarkdownListMarker)(e,n),u=c?o.ordered_list_icon:o.bullet_list_icon,h=c?o.ordered_list_content:o.bullet_list_content;return(0,oe.jsxs)(l.View,{style:o.list_item,children:[(0,oe.jsx)(s.Text,{style:u,children:d}),(0,oe.jsx)(tt,{contentStyle:h,children:t})]},e.key)}function Nt(e,t,n,o){return(0,oe.jsx)(h.MarkdownTableCellText,{children:(0,oe.jsx)(l.View,{style:o._VIEW_SAFE_th,children:t})},e.key)}function Xt(e,t,n,o){return(0,oe.jsx)(h.MarkdownTableCellText,{children:(0,oe.jsx)(l.View,{style:o._VIEW_SAFE_td,children:t})},e.key)}function Ut(e,t,n,o){return(0,oe.jsx)(u.MarkdownParagraphView,{paragraphStyle:o.paragraph,containsImage:(0,W.markdownNodeContainsType)(e,"image"),children:t},e.key)}function $t(e,t,n,o){return(0,oe.jsx)(G.AssistantMarkdownLink,{source:(s=e,{href:"string"==typeof s.attributes?.href?s.attributes.href:"",text:Ne(s),markup:s.markup,sourceInfo:s.sourceInfo,sourceType:"inline-code"===s.sourceType?"inline-code":void 0}),style:o.link,children:p.Children.map(t,e=>{if(!(0,p.isValidElement)(e))return e;const t=e.props;return(0,p.cloneElement)(e,{style:[t.style,{color:o.link.color}]})})},e.key);var s}function qt(e){return"paragraph"===e?.type}function Gt(e,t){return{key:`${t}:${e.slice(0,32)}`,block:e}}function Kt(e){return!e}function Yt(e){return!e.completed}function Qt(e){return!e}function Jt(e){return(0,oe.jsx)(dt,{text:e.text,completed:e.completed},e.text)}function Zt(e){return!e}function en(){}},4234,[3553,1562,688,711,348,349,146,234,224,1308,1401,1563,3864,3867,36,3768,916,4204,1590,56,3262,444,1594,3592,3593,3767,4235,4242,3868,3869,3549,3863,3358,3523,3902,3901,4244,4247,4245,4049,4089,4248,4249,4250,4254,4261,4091,3465,4090,4094,3263,4262,4264,4267,3658,279]);
15890
15890
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.buildToolCallPresentation=function(n){const s=(T=n.detail,T??{type:"unknown",input:null,output:null}),u=(0,l.buildToolCallDisplayModel)({name:n.toolName,status:(y=n.status,"executing"===y?"running":y),error:n.error??null,detail:s,metadata:n.metadata,cwd:n.cwd}),c=(0,o.isPendingToolCallDetail)({detail:n.detail,status:n.status,error:n.error}),p=Boolean(n.error)||(0,o.hasMeaningfulToolCallDetail)(n.detail);var y;var T;return{displayName:u.displayName,summary:u.summary,errorText:u.errorText,icon:n.resolveIcon(n.toolName,n.detail),isLoadingDetails:c,hasDetails:p,canOpenDetails:p||c,openFilePath:(0,t.extractToolCallFilePath)(n.detail),isPlan:"plan"===n.detail?.type}};var l=r(d[0]),t=r(d[1]),o=r(d[2])},4235,[4236,4240,4241]);
15891
15891
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"buildToolCallDisplayModel",{enumerable:!0,get:function(){return l.buildToolCallDisplayModel}});var l=r(d[0])},4236,[4237]);
@@ -15928,7 +15928,7 @@ __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{v
15928
15928
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.buildOverviewGroup=function(t){const n=new Set,s=new Set;let c=!1,f=0,p=0,C=0,h=0;for(const _ of t.calls){const t=(0,o.describeToolCall)(_),w=t.name.trim().toLowerCase();c||="running"===t.status||"executing"===t.status,l(t.name,w)?h+=1:"edit"===t.detail.type||"write"===t.detail.type?n.add(t.detail.filePath):"shell"===t.detail.type?f+=1:"read"===t.detail.type?s.add(t.detail.filePath):"search"===t.detail.type||u(w)?p+=1:C+=1}const _={editedFileCount:n.size,commandCount:f,readFileCount:s.size,searchCount:p,otherToolCount:C,paseoCallCount:h};return{mode:"overview",run:t,isLoading:c,summary:_}};var t=r(d[0]),o=r(d[1]);const n="paseo_",s=/(?:^|[_.:/])(?:web_search|llm_context)$/;function l(o,s){return(0,t.isPaseoToolName)(o)||s.startsWith(n)}function u(t){return s.test(t)}},4273,[4238,4272]);
15929
15929
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"OverviewToolCallGroupView",{enumerable:!0,get:function(){return f}});var o=r(d[0]),n=r(d[1]),t=r(d[2]);r(d[3]);var l=r(d[4]),u=r(d[5]),s=r(d[6]),c=r(d[7]),C=r(d[8]);function p(o,n){if(0===o.length)return"";let t=o[0]??"";2===o.length?t=`${o[0]} ${n} ${o[1]}`:o.length>2&&(t=`${o.slice(0,-1).join(", ")}, ${n} ${o.at(-1)}`);const l=t[0];return l?`${l.toLocaleUpperCase()}${t.slice(1)}`:t}function h(o){const t=(0,n.c)(27),{t:u}=(0,l.useTranslation)();let s;if(t[0]!==o.commandCount||t[1]!==o.editedFileCount||t[2]!==o.otherToolCount||t[3]!==o.paseoCallCount||t[4]!==o.readFileCount||t[5]!==o.searchCount||t[6]!==u){const n=[];let l,c,C,h,f,F,T;t[8]!==o.editedFileCount?(l=[o.editedFileCount,"toolCallGroup.editedFiles"],t[8]=o.editedFileCount,t[9]=l):l=t[9],t[10]!==o.commandCount?(c=[o.commandCount,"toolCallGroup.commands"],t[10]=o.commandCount,t[11]=c):c=t[11],t[12]!==o.readFileCount?(C=[o.readFileCount,"toolCallGroup.readFiles"],t[12]=o.readFileCount,t[13]=C):C=t[13],t[14]!==o.searchCount?(h=[o.searchCount,"toolCallGroup.searches"],t[14]=o.searchCount,t[15]=h):h=t[15],t[16]!==o.otherToolCount?(f=[o.otherToolCount,"toolCallGroup.otherTools"],t[16]=o.otherToolCount,t[17]=f):f=t[17],t[18]!==o.paseoCallCount?(F=[o.paseoCallCount,"toolCallGroup.paseoCalls"],t[18]=o.paseoCallCount,t[19]=F):F=t[19],t[20]!==l||t[21]!==c||t[22]!==C||t[23]!==h||t[24]!==f||t[25]!==F?(T=[l,c,C,h,f,F],t[20]=l,t[21]=c,t[22]=C,t[23]=h,t[24]=f,t[25]=F,t[26]=T):T=t[26];const S=T;for(const[o,t]of S)o>0&&n.push(u(`${t}.${1===o?"one":"other"}`,{count:o}));s=p(n,u("toolCallGroup.and")),t[0]=o.commandCount,t[1]=o.editedFileCount,t[2]=o.otherToolCount,t[3]=o.paseoCallCount,t[4]=o.readFileCount,t[5]=o.searchCount,t[6]=u,t[7]=s}else s=t[7];return s}const f=(0,t.memo)(function(l){const s=(0,n.c)(14),{group:p,expanded:f,isLastInSequence:T,onExpandedChange:S,children:$}=l,b=(0,t.useRef)(null),x=h(p.summary);let G;s[0]===Symbol.for("react.memo_cache_sentinel")?(G=()=>{b.current?.scrollToEnd({animated:!1})},s[0]=G):G=s[0];const _=G;let y;s[1]!==f||s[2]!==p.run.id||s[3]!==S?(y=()=>{S(p.run.id,!f)},s[1]=f,s[2]=p.run.id,s[3]=S,s[4]=y):y=s[4];const L=y;let E;s[5]!==$?(E=()=>(0,C.jsx)(o.ScrollView,{ref:b,style:F.scroll,contentContainerStyle:F.content,nestedScrollEnabled:!0,showsVerticalScrollIndicator:!0,onContentSizeChange:_,children:$}),s[5]=$,s[6]=E):E=s[6];const j=E;let v;return s[7]!==x||s[8]!==f||s[9]!==p.isLoading||s[10]!==T||s[11]!==j||s[12]!==L?(v=(0,C.jsx)(c.ExpandableBadge,{testID:"tool-call-group",label:x,icon:u.Wrench,isLoading:p.isLoading,isExpanded:f,isLastInSequence:T,onToggle:L,renderDetails:j,borderlessWhenExpanded:!0}),s[7]=x,s[8]=f,s[9]=p.isLoading,s[10]=T,s[11]=j,s[12]=L,s[13]=v):v=s[13],v}),F=s.StyleSheet.create(o=>({scroll:{maxHeight:400},content:{paddingTop:o.spacing[1],paddingHorizontal:13,uni__dependencies:[0]}}))},4274,[690,349,36,182,1563,1590,56,4234,279]);
15930
15930
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.buildAgentStreamRenderModel=function(t){const n=(0,o.resolveStreamRenderStrategy)({platform:"web"===t.platform?"web":"native",isMobileBreakpoint:t.isMobileBreakpoint}),l=`${t.platform}:${t.isMobileBreakpoint}`,M=p({cache:c,source:t.tail,cacheKey:l,order:t=>(0,s.orderTailForStreamRenderStrategy)({strategy:n,streamItems:t})}),y=p({cache:h,source:t.head,cacheKey:l,order:t=>(0,s.orderHeadForStreamRenderStrategy)({strategy:n,streamHead:t})}),S=f({orderedTail:M,platform:t.platform,isMobileBreakpoint:t.isMobileBreakpoint}),w=b({agentStatus:t.agentStatus,tail:t.tail,head:t.head});return{history:S.history,segments:Object.assign({},S.segments,{liveHead:y}),turnTiming:w,boundary:{hasVirtualizedHistory:S.segments.historyVirtualized.length>0,hasMountedHistory:S.segments.historyMounted.length>0,hasLiveHead:y.length>0},auxiliary:u}};var t=r(d[0]),n=r(d[1]),s=r(d[2]),o=r(d[3]);const l=[],u={pendingPermissions:null,turnFooter:null},c=new WeakMap,h=new WeakMap,M=new WeakMap,y=new WeakMap;function p(t){const{cache:n,source:s,cacheKey:o,order:l}=t;let u=n.get(s);u||(u=new Map,n.set(s,u));const c=u.get(o);if(c)return c;const h=l(s);return u.set(o,h),h}function f(t){const{orderedTail:s,platform:o,isMobileBreakpoint:u}=t,c="web"===o&&!u&&s.length>(0,n.getWebPartialVirtualizationThreshold)(),h=`${o}:${u}:${(0,n.getWebMountedRecentStreamItems)()}:${c}`;let y=M.get(s);y||(y=new Map,M.set(s,y));const p=y.get(h);if(p)return p;if(!c){const t={history:s,segments:{historyVirtualized:l,historyMounted:s,liveHead:l}};return y.set(h,t),t}const f=(0,n.findMountedWindowStart)({items:s,minMountedCount:(0,n.getWebMountedRecentStreamItems)()}),b={history:s,segments:{historyVirtualized:s.slice(0,f),historyMounted:s.slice(f),liveHead:l}};return y.set(h,b),b}function b(n){let s=y.get(n.tail);s||(s=new WeakMap,y.set(n.tail,s));let o=s.get(n.head);o||(o=new Map,s.set(n.head,o));const l=o.get(n.agentStatus);if(l)return l;const u=(0,t.deriveStreamTurnTiming)(n);return o.set(n.agentStatus,u),u}},4275,[4276,4277,4278,4279]);
15931
- __d(function(g,r,_i,a,m,e,d){"use strict";function t(t){for(let n=t.length-1;n>=0;n-=1){const s=t[n];if("user_message"===s?.kind)return s.timestamp}return null}Object.defineProperty(e,'__esModule',{value:!0}),e.deriveStreamTurnTiming=function(n){const s=new Map;let i=null,u=null,o=[];const l=()=>{if(!i||!u||0===o.length)return;const t={startedAt:i,completedAt:u,durationMs:Math.max(0,u.getTime()-i.getTime())};for(const n of o)s.set(n,t)},c=t=>{if("user_message"===t.kind)return l(),i=t.timestamp,u=null,void(o=[]);i&&(u=t.timestamp,"assistant_message"===t.kind&&o.push(t.id))};for(const t of n.tail)c(t);for(const t of n.head)c(t);const f="running"===n.agentStatus?t(n.head)??i:null;"running"!==n.agentStatus&&l();return{byAssistantId:s,runningStartedAt:f}}},4276,[]);
15931
+ __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.deriveStreamTurnTiming=function(t){const n=new Map;let s=null,u=null,o=!1,l=null,c=[];const f=()=>{if(!s||!l||0===c.length)return;const t={startedAt:s,completedAt:l,durationMs:Math.max(0,l.getTime()-s.getTime())};for(const s of c)n.set(s,t)},p=t=>{if("user_message"===t.kind)return f(),s=t.timestamp,u=t.optimistic?null:t.timestamp,o=!0===t.optimistic,l=null,void(c=[]);s&&(l=t.timestamp,"assistant_message"===t.kind&&c.push(t.id))};for(const n of t.tail)p(n);for(const n of t.head)p(n);const _="running"===t.agentStatus,A=_?u:null;"running"!==t.agentStatus&&f();return{byAssistantId:n,runningStartedAt:A,isActive:_||o}}},4276,[]);
15932
15932
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"DEFAULT_WEB_PARTIAL_VIRTUALIZATION_THRESHOLD",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"DEFAULT_WEB_MOUNTED_RECENT_STREAM_ITEMS",{enumerable:!0,get:function(){return s}}),e.getWebPartialVirtualizationThreshold=function(){return o(globalThis.__PASEO_E2E_WEB_PARTIAL_VIRTUALIZATION_THRESHOLD)??n},e.getWebMountedRecentStreamItems=function(){return o(globalThis.__PASEO_E2E_WEB_MOUNTED_RECENT_STREAM_ITEMS)??s},e.estimateStreamItemHeight=function(n){switch(n.kind){case"user_message":return n.images&&n.images.length>0?220:96;case"assistant_message":return(0,t.estimateAssistantMessageHeightFromCache)(n.text)??220;case"tool_call":case"thought":return u;case"todo_list":return 144;case"activity_log":return 88;case"compaction":return 72;default:return 120}},e.findMountedWindowStart=c,e.splitWebVirtualizedHistory=function(t){const n=c({items:t.entries.map(t=>t.item),minMountedCount:t.minMountedCount});return{virtualizedEntries:t.entries.slice(0,n),mountedEntries:t.entries.slice(n)}};var t=r(d[0]);const n=100,s=50,u=40;function o(t){if(!Number.isFinite(t))return null;const n=Math.trunc(t);return n>0?n:null}function c(t){const{items:n,minMountedCount:s}=t;if(n.length<=s)return 0;let u=Math.max(n.length-s,0);for(;u>0&&"user_message"!==n[u]?.kind;)u-=1;return u}},4277,[4247]);
15933
15933
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.createStreamStrategy=function(t){return{render:t.render,orderTail:n=>t.orderTailReverse?[...n].toReversed():n,orderHead:n=>t.orderHeadReverse?[...n].toReversed():n,getNeighborIndex:(n,o)=>"above"===o?n+t.assistantTurnTraversalStep:n-t.assistantTurnTraversalStep,getNeighborItem:(n,o,s)=>{const l="above"===s?o+t.assistantTurnTraversalStep:o-t.assistantTurnTraversalStep;if(!(l<0||l>=n.length))return n[l]},collectAssistantTurnContent:(n,o)=>{const s=[];for(let l=o;l>=0&&l<n.length;l+=t.assistantTurnTraversalStep){const t=n[l];if("user_message"===t.kind)break;"assistant_message"===t.kind&&s.push(t.text)}return s.toReversed().join("\n\n")},isNearBottom:n=>t.isNearBottom(n),getBottomOffset:n=>t.getBottomOffset(n),getEdgeSlotProps:(n,o)=>"header"===t.edgeSlot?{ListHeaderComponent:n,ListHeaderComponentStyle:{marginBottom:o}}:{ListFooterComponent:n,ListFooterComponentStyle:{marginTop:o}},getMaintainVisibleContentPosition:()=>t.maintainVisibleContentPosition,getBottomAnchorTransportBehavior:()=>t.bottomAnchorTransportBehavior,getHistoryLiveBoundaryIndex:n=>0===n.length?null:"first"===t.historyLiveBoundaryEdge?0:n.length-1,getLiveHeadHistoryBoundaryIndex:n=>0===n.length?null:"first"===t.liveHeadHistoryBoundaryEdge?0:n.length-1,getLatestItemIndex:n=>0===n.length?null:"first"===t.historyLiveBoundaryEdge?0:n.length-1,getFrameChildOrder:()=>t.frameChildOrder,getFlatListInverted:()=>t.flatListInverted,getOverlayScrollbarInverted:()=>t.overlayScrollbarInverted,shouldDisableParentScrollOnInlineDetailsExpansion:()=>t.disableParentScrollOnInlineDetailsExpansion,shouldAnchorBottomOnContentSizeChange:()=>t.anchorBottomOnContentSizeChange,shouldAnimateManualScrollToBottom:()=>t.animateManualScrollToBottom,shouldUseVirtualizedList:()=>t.useVirtualizedList}},e.resolveBottomAnchorTransportBehavior=function(n){const o=n.strategy.getBottomAnchorTransportBehavior();if(!n.isViewportSettling||!n.strategy.getFlatListInverted())return o;return{verificationDelayFrames:Math.max(o.verificationDelayFrames,t),verificationRetryMode:"recheck"}},e.orderTailForStreamRenderStrategy=function(t){return t.strategy.orderTail(t.streamItems)},e.orderHeadForStreamRenderStrategy=function(t){return t.strategy.orderHead(t.streamHead)},e.getStreamNeighborIndex=function(t){return t.strategy.getNeighborIndex(t.index,t.relation)},e.getStreamNeighborItem=function(t){return t.strategy.getNeighborItem(t.items,t.index,t.relation)},e.collectAssistantTurnContentForStreamRenderStrategy=function(t){return t.strategy.collectAssistantTurnContent(t.items,t.startIndex)},e.isNearBottomForStreamRenderStrategy=function(t){return t.strategy.isNearBottom({offsetY:t.offsetY,threshold:t.threshold,contentHeight:t.contentHeight,viewportHeight:t.viewportHeight})},e.getBottomOffsetForStreamRenderStrategy=function(t){return t.strategy.getBottomOffset({contentHeight:t.contentHeight,viewportHeight:t.viewportHeight})},e.getStreamEdgeSlotProps=function(t){return t.strategy.getEdgeSlotProps(t.component,t.gapSize)},e.getHistoryLiveBoundaryIndexForStreamRenderStrategy=function(t){return t.strategy.getHistoryLiveBoundaryIndex(t.history)},e.getLiveHeadHistoryBoundaryIndexForStreamRenderStrategy=function(t){return t.strategy.getLiveHeadHistoryBoundaryIndex(t.liveHead)},e.getFrameChildOrderForStreamRenderStrategy=function(t){return t.strategy.getFrameChildOrder()};const t=4},4278,[]);
15934
15934
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.resolveStreamRenderStrategy=function(o){if("web"===o.platform)return(0,n.createWebStreamStrategy)({isMobileBreakpoint:o.isMobileBreakpoint});return(0,t.createNativeStreamStrategy)()};var t=r(d[0]),n=r(d[1])},4279,[4280,4282]);
@@ -15973,7 +15973,7 @@ __d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',
15973
15973
  __d(function(g,_r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.resolveCommitDiffFile=l,e.resolveCommitDiffFiles=u,e.useCommitDiffFiles=function(l){const f=(0,t.c)(34),{serverId:h,cwd:p,sha:v,enabled:y}=l,C=void 0===y||y,F=(0,r.useHostRuntimeClient)(h),_=(0,r.useHostRuntimeIsConnected)(h);let b;f[0]!==p||f[1]!==C||f[2]!==h?(b={serverId:h,cwd:p,enabled:C},f[0]=p,f[1]=C,f[2]=h,f[3]=b):b=f[3];const M=(0,n.useCheckoutCommitsQuery)(b),D="loaded"===M.status?M.data:null;let I;e:{if(!v||!D){let t;f[4]===Symbol.for("react.memo_cache_sentinel")?(t=[],f[4]=t):t=f[4],I=t;break e}let t;f[5]!==D.commits||f[6]!==v?(t=D.commits.find(t=>t.sha===v)?.files??[],f[5]=D.commits,f[6]=v,f[7]=t):t=f[7],I=t}const w=I,k=C&&"loaded"===M.status&&Boolean(p)&&Boolean(v)&&Boolean(F)&&_;let E;if(f[8]!==F||f[9]!==w||f[10]!==p||f[11]!==k||f[12]!==h||f[13]!==v){let t;f[15]!==F||f[16]!==p||f[17]!==k||f[18]!==h||f[19]!==v?(t=t=>({queryKey:(0,o.checkoutCommitFileDiffQueryKey)(h,p,v,t.path),queryFn:async()=>{if(!F)throw new Error("Host disconnected");return F.getCommitFileDiff(p,v,t.path)},enabled:k,staleTimeMs:o.COMMIT_FILE_DIFF_STALE_TIME,dataShape:"value"}),f[15]=F,f[16]=p,f[17]=k,f[18]=h,f[19]=v,f[20]=t):t=f[20],E=w.map(t),f[8]=F,f[9]=w,f[10]=p,f[11]=k,f[12]=h,f[13]=v,f[14]=E}else E=f[14];const L=(0,s.useFetchQueries)(E),T="connecting"===M.status||"loading"===M.status,B="error"===M.status?M.error:null,H="unsupported"===M.status;let Q;if(f[21]!==w||f[22]!==L){const t=new Map;w.forEach((s,o)=>{const n=L[o];t.set(s.path,n?.data?n.data.file:void 0)}),Q=u(w,t),f[21]=w,f[22]=L,f[23]=Q}else Q=f[23];const S=Q;let q,K=null;if(f[24]!==L){for(const t of L)if(t.error){K=t.error;break}f[24]=L,f[25]=K}else K=f[25];f[26]!==T||f[27]!==L?(q=T||L.some(c),f[26]=T,f[27]=L,f[28]=q):q=f[28];const O=B??K;let R;f[29]!==H||f[30]!==S||f[31]!==q||f[32]!==O?(R={files:S,isLoading:q,error:O,capabilityMissing:H},f[29]=H,f[30]=S,f[31]=q,f[32]=O,f[33]=R):R=f[33];return R};var t=_r(d[0]);_r(d[1]);var s=_r(d[2]),o=_r(d[3]),n=_r(d[4]),r=_r(d[5]);function l(t,s){return null!=s?s:void 0===s?null:{path:t.path,isNew:"added"===t.status,isDeleted:"deleted"===t.status,additions:t.additions,deletions:t.deletions,hunks:[],status:"binary"}}function u(t,s){return t.flatMap(t=>{const o=l(t,s.get(t.path));return o?[o]:[]})}function c(t){return t.isLoading}},4318,[349,36,3538,3427,3928,3367]);
15974
15974
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"draftPanelRegistration",{enumerable:!0,get:function(){return n}});var t=r(d[0]);const n={kind:"draft",component:t.AgentConversationPanel,useDescriptor:t.useDraftPanelDescriptor}},4319,[4232]);
15975
15975
  __d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"filePanelRegistration",{enumerable:!0,get:function(){return j}});var e=r(d[0]),t=r(d[1]),n=r(d[2]);r(d[3]),r(d[4]),r(d[5]);var o,l=r(d[6]),s=(o=l)&&o.__esModule?o:{default:o},c=r(d[7]),u=r(d[8]),p=r(d[9]),f=r(d[10]),h=r(d[11]),v=r(d[12]);const y={flex:1,alignItems:"center",justifyContent:"center",padding:16};const j={kind:"file",component:function(){const o=(0,n.c)(9),{t:l}=(0,c.useTranslation)(),{serverId:h,workspaceId:j,target:k,fileNavigationRevision:x}=(0,p.usePaneContext)(),P=(0,f.useWorkspaceDirectory)(h,j);if((0,s.default)("file"===k.kind,"FilePanel requires file target"),!P){let n,s;return o[0]!==l?(n=l("panels.file.directoryMissing"),o[0]=l,o[1]=n):n=o[1],o[2]!==n?(s=(0,v.jsx)(e.View,{style:y,children:(0,v.jsx)(t.Text,{children:n})}),o[2]=n,o[3]=s):s=o[3],s}const _=x??0;let b;return o[4]!==h||o[5]!==_||o[6]!==k||o[7]!==P?(b=(0,v.jsx)(u.FilePane,{serverId:h,workspaceRoot:P,location:k,navigationRevision:_}),o[4]=h,o[5]=_,o[6]=k,o[7]=P,o[8]=b):b=o[8],b},useDescriptor:function(e){const t=(0,n.c)(8);let o;t[0]!==e.path?(o=e.path.split("/").findLast(Boolean)??e.path,t[0]=e.path,t[1]=o):o=t[1];const l=o;let s;t[2]!==l?(s=(0,h.createMaterialFileIcon)(l),t[2]=l,t[3]=s):s=t[3];const c=s;let u;return t[4]!==l||t[5]!==c||t[6]!==e.path?(u={label:l,subtitle:e.path,tooltip:e.path,titleState:"ready",icon:c,statusBucket:null},t[4]=l,t[5]=c,t[6]=e.path,t[7]=u):u=t[7],u}}},4320,[348,711,349,234,146,36,3442,1563,4321,4228,3543,3961,279]);
15976
- __d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.FilePane=function(e){const t=(0,c.c)(60),{serverId:n,workspaceRoot:o,location:l,navigationRevision:s}=e,{t:h}=(0,p.useTranslation)(),f=(0,w.useIsCompactFormFactor)(),[v,x]=(0,u.useState)("preview");let S;t[0]===Symbol.for("react.memo_cache_sentinel")?(S={key:null,file:null,imageAttachment:null},t[0]=S):S=t[0];const[b,_]=(0,u.useState)(S);let k;t[1]!==n?(k=e=>e.sessions[n]?.client??null,t[1]=n,t[2]=k):k=t[2];const j=(0,y.useSessionStore)(k);let T;t[3]!==n?(T=e=>!0===e.sessions[n]?.serverInfo?.features?.workspaceFileEditing,t[3]=n,t[4]=T):T=t[4];const z=(0,y.useSessionStore)(T);let I;t[5]!==o?(I=o.trim(),t[5]=o,t[6]=I):I=t[6];const B=I;let L;t[7]!==l.path?(L=O(l.path),t[7]=l.path,t[8]=L):L=t[8];const U=L;let $;t[9]!==U||t[10]!==B?($=U?(0,F.resolveFilePreviewReadTarget)({path:U,workspaceRoot:B}):null,t[9]=U,t[10]=B,t[11]=$):$=t[11];const N=$,H=(0,A.useRetainedPanelActive)(),W=(0,V.useAppActivelyVisible)(),G=Boolean(j&&N);let q;t[12]!==H||t[13]!==W||t[14]!==G?(q=(0,E.isFileQueryEnabled)({hasReadTarget:G,isTabActive:H,isAppVisible:W}),t[12]=H,t[13]=W,t[14]=G,t[15]=q):q=t[15];const Q=q,J=N?.cwd??null,X=N?.path??null;let te;t[16]!==j||t[17]!==Q||t[18]!==n||t[19]!==z||t[20]!==X||t[21]!==J?(te={client:j,serverId:n,cwd:J,path:X,enabled:Q,liveUpdates:z},t[16]=j,t[17]=Q,t[18]=n,t[19]=z,t[20]=X,t[21]=J,t[22]=te):te=t[22];const{query:ne,version:ie}=(0,P.useLiveFile)(te);let oe,le,re;t[23]!==ne.data||t[24]!==N?(oe=()=>{let e=!0;const t=N?`${N.cwd}:${N.path}`:null;return(async()=>{const n=await K(ne.data??null);e&&_(Object.assign({key:t},n))})(),()=>{e=!1}},le=[ne.data,N],t[23]=ne.data,t[24]=N,t[25]=oe,t[26]=le):(oe=t[25],le=t[26]);(0,u.useEffect)(oe,le),t[27]===Symbol.for("react.memo_cache_sentinel")?(re=()=>x("preview"),t[27]=re):re=t[27];const se=N?.path;let ae;t[28]!==se?(ae=[se],t[28]=se,t[29]=ae):ae=t[29];(0,u.useEffect)(re,ae);const ce=N?`${N.cwd}:${N.path}`:null,de=b.key===ce?b.file:null,ue=(0,M.useAttachmentPreviewUrl)(b.key===ce?b.imageAttachment:null),me=Y(de,l.path);let he;t[30]!==de||t[31]!==z?(fe={preview:de,supportsEditing:z},he=Boolean(R.isWeb&&fe.supportsEditing&&"text"===fe.preview?.kind&&fe.preview.size<=1048576),t[30]=de,t[31]=z,t[32]=he):he=t[32];var fe;const ge=he;let pe;t[33]!==de?(pe="text"===de?.kind?(de.content??"").split("\n").length:void 0,t[33]=de,t[34]=pe):pe=t[34];const ve=pe;let we;t[35]!==ne.error||t[36]!==h?(we=Z(ne.error,h("panels.file.failedToLoad")),t[35]=ne.error,t[36]=h,t[37]=we):we=t[37];const ye=we;let xe;t[38]!==l.path?(xe=(0,C.getFileNameFromPath)(l.path)??l.path,t[38]=l.path,t[39]=xe):xe=t[39];const Se=me?v:void 0,be=me?x:void 0;let ke,je;t[40]!==h?(ke=h("workspace.terminal.hostDisconnected"),t[40]=h,t[41]=ke):ke=t[41];t[42]!==j||t[43]!==ge||t[44]!==ye||t[45]!==ue||t[46]!==f||t[47]!==ve||t[48]!==l||t[49]!==s||t[50]!==de||t[51]!==ne.isFetching||t[52]!==N||t[53]!==n||t[54]!==xe||t[55]!==Se||t[56]!==be||t[57]!==ke||t[58]!==ie?(je=(0,D.jsx)(ee,{serverId:n,client:j,readTarget:N,preview:de,version:ie,filename:xe,markdownMode:Se,onMarkdownModeChange:be,lineCount:ve,editable:ge,disconnectedMessage:ke,errorMessage:ye,isLoading:ne.isFetching,isMobile:f,location:l,navigationRevision:s,imagePreviewUri:ue}),t[42]=j,t[43]=ge,t[44]=ye,t[45]=ue,t[46]=f,t[47]=ve,t[48]=l,t[49]=s,t[50]=de,t[51]=ne.isFetching,t[52]=N,t[53]=n,t[54]=xe,t[55]=Se,t[56]=be,t[57]=ke,t[58]=ie,t[59]=je):je=t[59];return je};var e,t=r(d[0]),n=r(d[1]),o=r(d[2]),l=r(d[3]),s=r(d[4]),c=r(d[5]),u=r(d[6]),h=(e=u)&&e.__esModule?e:{default:e};r(d[7]),r(d[8]),r(d[9]),r(d[10]),r(d[11]);var f=r(d[12]),p=r(d[13]),v=r(d[14]),w=r(d[15]),y=r(d[16]),x=r(d[17]),S=r(d[18]),b=r(d[19]),_=r(d[20]),k=r(d[21]),j=r(d[22]),M=r(d[23]),T=r(d[24]),C=r(d[25]),z=r(d[26]),F=r(d[27]),A=r(d[28]),V=r(d[29]),E=r(d[30]),R=r(d[31]),I=r(d[32]),P=r(d[33]),B=r(d[34]),L=r(d[35]),U=r(d[36]),$=r(d[37]),N=r(d[38]),D=r(d[39]);function O(e){if("string"!=typeof e)return null;const t=e.trim();return t.length>0?t:null}function H({size:e}){return e<1024?`${e} B`:e<1048576?`${(e/1024).toFixed(1)} KB`:`${(e/1048576).toFixed(1)} MB`}async function K(e){if(!e)return{file:null,imageAttachment:null};const t=(0,z.explorerFileFromReadResult)(e);if("image"!==e.kind)return{file:t,imageAttachment:null};return{file:t,imageAttachment:await(0,T.persistAttachmentFromBytes)({id:(0,C.createPreviewAttachmentId)({mimeType:e.mime,path:e.path,size:e.size,modifiedAt:e.modifiedAt,contentLength:e.bytes.byteLength}),bytes:e.bytes,mimeType:e.mime,fileName:(0,C.getFileNameFromPath)(e.path)})}}function W(e){if(!e.lineStart||e.lineStart<=0||e.lineCount<=0)return null;const t=Math.min(Math.floor(e.lineStart),e.lineCount),n=e.lineEnd&&e.lineEnd>=e.lineStart?e.lineEnd:e.lineStart,o=Math.min(Math.floor(n),e.lineCount);return{lineStart:t,lineEnd:Math.max(t,o)}}const G=h.default.memo(function(e){const o=(0,c.c)(21),{tokens:l,lineNumber:s,gutterWidth:u,highlighted:h}=e;let f,p;o[0]!==u?(f=(0,b.inlineUnistylesStyle)({width:u}),o[0]=u,o[1]=f):f=o[1],o[2]!==f?(p=[Q.gutter,f],o[2]=f,o[3]=p):p=o[3];const v=p,w=h&&Q.highlightedLine;let y;o[4]!==w?(y=[Q.line,w],o[4]=w,o[5]=y):y=o[5];const x=y;let S;o[6]!==l?(S=l.map(ie),o[6]=l,o[7]=S):S=o[7];const _=S,k=String(s);let j,M,T,C,z;return o[8]!==k?(j=(0,D.jsx)(n.Text,{numberOfLines:1,style:Q.gutterText,children:k}),o[8]=k,o[9]=j):j=o[9],o[10]!==v||o[11]!==j?(M=(0,D.jsx)(t.View,{style:v,children:j}),o[10]=v,o[11]=j,o[12]=M):M=o[12],o[13]!==_?(T=_.map(oe),o[13]=_,o[14]=T):T=o[14],o[15]!==T?(C=(0,D.jsx)(n.Text,{selectable:!0,style:Q.lineText,children:T}),o[15]=T,o[16]=C):C=o[16],o[17]!==x||o[18]!==C||o[19]!==M?(z=(0,D.jsxs)(t.View,{style:x,children:[M,C]}),o[17]=x,o[18]=C,o[19]=M,o[20]=z):z=o[20],z});function q(e){const t=(0,c.c)(5),{token:o}=e;let l,s;return t[0]!==o.style?(l=(0,S.syntaxTokenStyleFor)(o.style),t[0]=o.style,t[1]=l):l=t[1],t[2]!==l||t[3]!==o.text?(s=(0,D.jsx)(n.Text,{style:l,children:o.text}),t[2]=l,t[3]=o.text,t[4]=s):s=t[4],s}const Q=f.StyleSheet.create(e=>({line:{flexDirection:"row"},highlightedLine:{backgroundColor:e.colors.accentBorder,uni__dependencies:[0]},gutter:{alignItems:"flex-end",paddingRight:e.spacing[3],flexShrink:0,uni__dependencies:[0]},gutterText:{color:e.colors.foreground,fontFamily:e.fontFamily.mono,fontSize:e.fontSize.code,lineHeight:1.45*e.fontSize.code,opacity:.4,userSelect:"none",uni__dependencies:[0]},lineText:{fontFamily:e.fontFamily.mono,fontSize:e.fontSize.code,lineHeight:1.45*e.fontSize.code,flex:1,uni__dependencies:[0]}}));function J(e){const h=(0,c.c)(63),{preview:w,isLoading:y,isMobile:S,location:b,navigationRevision:M,imagePreviewUri:T}=e;let C;h[0]===Symbol.for("react.memo_cache_sentinel")?(C=f.UnistylesRuntime.getTheme(),h[0]=C):C=h[0];const z=C,{t:F}=(0,p.useTranslation)(),A=b.path,V="text"===w?.kind&&(0,j.isRenderedMarkdownFile)(A)&&!b.lineStart,E=(0,u.useRef)(null);let R;e:{if(!w||"text"!==w.kind||V){R=null;break e}const e=w.content??"";let t;h[1]!==A||h[2]!==e?(t=(0,x.highlightCode)(e,A),h[1]=A,h[2]=e,h[3]=t):t=h[3],R=t}const I=R;let P;e:{if(!I){P=0;break e}let e;h[4]!==I.length?(e=(0,_.lineNumberGutterWidth)(I.length,z.fontSize.code),h[4]=I.length,h[5]=e):e=h[5],P=e}const B=P,L=1.45*z.fontSize.code;let U;e:{if(!I){U=null;break e}let e;h[6]!==I.length||h[7]!==b.lineEnd||h[8]!==b.lineStart?(e=W({lineStart:b.lineStart,lineEnd:b.lineEnd,lineCount:I.length}),h[6]=I.length,h[7]=b.lineEnd,h[8]=b.lineStart,h[9]=e):e=h[9],U=e}const $=U;let N;h[10]!==T?(N=T?{uri:T}:null,h[10]=T,h[11]=N):N=h[11];const O=N;let K,q,Q,J,Y,Z,ee;if(h[12]!==$?(K=()=>{if(!$)return;const e=setTimeout(()=>{E.current?.scrollTo({y:Math.max(0,($.lineStart-1)*L),animated:!1})},0);return()=>clearTimeout(e)},h[12]=$,h[13]=K):K=h[13],h[14]!==$||h[15]!==M?(q=[L,$,M],h[14]=$,h[15]=M,h[16]=q):q=h[16],(0,u.useEffect)(K,q),y&&!w){let e,o,l;return h[17]===Symbol.for("react.memo_cache_sentinel")?(e=(0,D.jsx)(s.ActivityIndicator,{size:"small"}),h[17]=e):e=h[17],h[18]!==F?(o=F("panels.file.loading"),h[18]=F,h[19]=o):o=h[19],h[20]!==o?(l=(0,D.jsxs)(t.View,{style:ne.centerState,children:[e,(0,D.jsx)(n.Text,{style:ne.loadingText,children:o})]}),h[20]=o,h[21]=l):l=h[21],l}if(!w){let e,o;return h[22]!==F?(e=F("panels.file.noPreview"),h[22]=F,h[23]=e):e=h[23],h[24]!==e?(o=(0,D.jsx)(t.View,{style:ne.centerState,children:(0,D.jsx)(n.Text,{style:ne.emptyText,children:e})}),h[24]=e,h[25]=o):o=h[25],o}if("text"===w.kind){if(V){const e=w.content??"";let n;return h[26]!==e?(n=(0,D.jsx)(t.View,{style:ne.previewScrollContainer,children:(0,D.jsx)(o.ScrollView,{ref:E,style:ne.previewContent,contentContainerStyle:ne.previewMarkdownScrollContent,showsVerticalScrollIndicator:!0,children:(0,D.jsx)(v.MarkdownRenderer,{text:e})})}),h[26]=e,h[27]=n):n=h[27],n}let e,n,l,s;if(h[28]!==B||h[29]!==I||h[30]!==$||h[31]!==w.content){const o=(I??[[{text:w.content??"",style:null}]]).map(X);let s;e=t.View,n=k.CODE_SURFACE_DATASET,h[35]!==B||h[36]!==$?(s=e=>{const{key:t,tokens:n,lineNumber:o}=e;return(0,D.jsx)(G,{tokens:n,lineNumber:o,gutterWidth:B,highlighted:Boolean($)&&o>=($?.lineStart??0)&&o<=($?.lineEnd??0)},t)},h[35]=B,h[36]=$,h[37]=s):s=h[37],l=o.map(s),h[28]=B,h[29]=I,h[30]=$,h[31]=w.content,h[32]=e,h[33]=n,h[34]=l}else e=h[32],n=h[33],l=h[34];h[38]!==e||h[39]!==n||h[40]!==l?(s=(0,D.jsx)(e,{dataSet:n,children:l}),h[38]=e,h[39]=n,h[40]=l,h[41]=s):s=h[41];const c=s;let u;return h[42]!==c||h[43]!==S?(u=(0,D.jsx)(t.View,{style:ne.previewScrollContainer,children:(0,D.jsx)(o.ScrollView,{ref:E,style:ne.previewContent,showsVerticalScrollIndicator:!0,children:S?(0,D.jsx)(t.View,{style:ne.previewCodeScrollContent,children:c}):(0,D.jsx)(o.ScrollView,{horizontal:!0,nestedScrollEnabled:!0,showsHorizontalScrollIndicator:!0,contentContainerStyle:ne.previewCodeScrollContent,children:c})})}),h[42]=c,h[43]=S,h[44]=u):u=h[44],u}if("image"===w.kind){if(!T){let e,o,l;return h[45]===Symbol.for("react.memo_cache_sentinel")?(e=(0,D.jsx)(s.ActivityIndicator,{size:"small"}),h[45]=e):e=h[45],h[46]!==F?(o=F("panels.file.loading"),h[46]=F,h[47]=o):o=h[47],h[48]!==o?(l=(0,D.jsxs)(t.View,{style:ne.centerState,children:[e,(0,D.jsx)(n.Text,{style:ne.loadingText,children:o})]}),h[48]=o,h[49]=l):l=h[49],l}const e=O??void 0;let c;return h[50]!==e?(c=(0,D.jsx)(t.View,{style:ne.previewScrollContainer,children:(0,D.jsx)(o.ScrollView,{ref:E,style:ne.previewContent,contentContainerStyle:ne.previewImageScrollContent,showsVerticalScrollIndicator:!0,children:(0,D.jsx)(l.Image,{source:e,style:ne.previewImage,resizeMode:"contain"})})}),h[50]=e,h[51]=c):c=h[51],c}return h[52]!==F?(Q=F("panels.file.binaryPreviewUnavailable"),h[52]=F,h[53]=Q):Q=h[53],h[54]!==Q?(J=(0,D.jsx)(n.Text,{style:ne.emptyText,children:Q}),h[54]=Q,h[55]=J):J=h[55],h[56]!==w.size?(Y=H({size:w.size}),h[56]=w.size,h[57]=Y):Y=h[57],h[58]!==Y?(Z=(0,D.jsx)(n.Text,{style:ne.binaryMetaText,children:Y}),h[58]=Y,h[59]=Z):Z=h[59],h[60]!==Z||h[61]!==J?(ee=(0,D.jsxs)(t.View,{style:ne.centerState,children:[J,Z]}),h[60]=Z,h[61]=J,h[62]=ee):ee=h[62],ee}function X(e,t){return{key:`line-${t}`,tokens:e,lineNumber:t+1}}function Y(e,t){return"text"===e?.kind&&(0,j.isRenderedMarkdownFile)(t)}function Z(e,t){return e?e instanceof Error?e.message:t:null}function ee(e){const o=(0,c.c)(34),{serverId:l,client:s,readTarget:u,preview:h,version:f,filename:p,markdownMode:v,onMarkdownModeChange:w,lineCount:y,editable:x,disconnectedMessage:S,errorMessage:b,isLoading:_,isMobile:k,location:j,navigationRevision:M,imagePreviewUri:T}=e;if(!s&&u){let e;return o[0]!==S?(e=(0,D.jsx)(t.View,{style:ne.container,testID:"workspace-file-pane",children:(0,D.jsx)(t.View,{style:ne.centerState,children:(0,D.jsx)(n.Text,{style:ne.errorText,children:S})})}),o[0]=S,o[1]=e):e=o[1],e}if(x&&s&&u&&"text"===h?.kind){const e=`${l}:${u.cwd}:${u.path}`,t=h;let n;return o[2]!==s||o[3]!==p||o[4]!==_||o[5]!==k||o[6]!==j||o[7]!==v||o[8]!==M||o[9]!==w||o[10]!==u.cwd||o[11]!==u.path||o[12]!==e||o[13]!==t||o[14]!==f?(n=(0,D.jsx)(te,{client:s,cwd:u.cwd,path:u.path,preview:t,version:f,filename:p,mode:v,onModeChange:w,isLoading:_,isMobile:k,location:j,navigationRevision:M},e),o[2]=s,o[3]=p,o[4]=_,o[5]=k,o[6]=j,o[7]=v,o[8]=M,o[9]=w,o[10]=u.cwd,o[11]=u.path,o[12]=e,o[13]=t,o[14]=f,o[15]=n):n=o[15],n}let C,z,F,A;return o[16]!==y||o[17]!==v||o[18]!==w||o[19]!==h?(C=h?(0,D.jsx)(B.FilePanelBar,{size:h.size,lineCount:y,mode:v,onModeChange:w}):null,o[16]=y,o[17]=v,o[18]=w,o[19]=h,o[20]=C):C=o[20],o[21]!==b?(z=b?(0,D.jsx)(t.View,{style:ne.centerState,children:(0,D.jsx)(n.Text,{style:ne.errorText,children:b})}):null,o[21]=b,o[22]=z):z=o[22],o[23]!==T||o[24]!==_||o[25]!==k||o[26]!==j||o[27]!==M||o[28]!==h?(F=(0,D.jsx)(J,{preview:h,isLoading:_,isMobile:k,location:j,navigationRevision:M,imagePreviewUri:T}),o[23]=T,o[24]=_,o[25]=k,o[26]=j,o[27]=M,o[28]=h,o[29]=F):F=o[29],o[30]!==C||o[31]!==z||o[32]!==F?(A=(0,D.jsxs)(t.View,{style:ne.container,testID:"workspace-file-pane",children:[C,z,F]}),o[30]=C,o[31]=z,o[32]=F,o[33]=A):A=o[33],A}function te(e){const n=(0,c.c)(64),{client:o,cwd:l,path:s,preview:h,version:v,filename:w,mode:y,onModeChange:x,isLoading:S,isMobile:b,location:_,navigationRevision:k}=e,{settings:j}=(0,I.useAppSettings)(),{t:M}=(0,p.useTranslation)();let T;n[0]===Symbol.for("react.memo_cache_sentinel")?(T={line:1,column:1},n[0]=T):T=n[0];const[C,F]=(0,u.useState)(T),[A,V]=(0,u.useState)(j.vimKeybindings?"NORMAL":null);let E;n[1]!==o||n[2]!==l||n[3]!==s?(E={async read(){const e=await o.readFile(l,s),t=(0,z.explorerFileFromReadResult)(e);if("text"!==t.kind||void 0===t.content)throw new Error("File is no longer text.");return{content:t.content,hasBom:t.hasBom,version:{status:"ready",cwd:l,path:s,size:e.size,modifiedAt:e.modifiedAt,revision:e.revision}}},write:e=>o.writeFile(Object.assign({cwd:l,path:s},e))},n[1]=o,n[2]=l,n[3]=s,n[4]=E):E=n[4];const R=E;let P;n[5]!==l||n[6]!==s||n[7]!==h.content||n[8]!==h.hasBom||n[9]!==h.modifiedAt||n[10]!==h.size||n[11]!==R?(P=()=>new L.FileEditorModel({file:{content:h.content??"",hasBom:h.hasBom,version:{status:"ready",cwd:l,path:s,size:h.size,modifiedAt:h.modifiedAt}},session:R}),n[5]=l,n[6]=s,n[7]=h.content,n[8]=h.hasBom,n[9]=h.modifiedAt,n[10]=h.size,n[11]=R,n[12]=P):P=n[12];const[O]=(0,u.useState)(P),H=(0,u.useSyncExternalStore)(O.subscribe,O.getSnapshot,O.getSnapshot);let K;n[13]!==O?(K=()=>O.suspendAutosave(),n[13]=O,n[14]=K):K=n[14];const W=K;let G,q;n[15]!==H.modified||n[16]!==W?(G={modified:H.modified,suspendPendingSave:W},n[15]=H.modified,n[16]=W,n[17]=G):G=n[17],(0,N.usePublishPanelInstanceAttributes)(G),n[18]===Symbol.for("react.memo_cache_sentinel")?(q=f.UnistylesRuntime.getTheme(),n[18]=q):q=n[18];const Q=q;let X;n[19]===Symbol.for("react.memo_cache_sentinel")?(X={colorScheme:Q.colorScheme,background:Q.colors.surface0,foreground:Q.colors.foreground,cursor:Q.colors.terminal.cursor,foregroundMuted:Q.colors.foregroundMuted,border:Q.colors.border,selection:Q.colors.terminal.selectionBackground,monoFont:Q.fontFamily.mono,codeFontSize:Q.fontSize.code,syntax:Q.colors.syntax},n[19]=X):X=n[19];const Y=X;let Z,ee,te,ie,oe;n[20]!==O?(Z=()=>()=>O.dispose(),ee=[O],n[20]=O,n[21]=Z,n[22]=ee):(Z=n[21],ee=n[22]),(0,u.useEffect)(Z,ee),n[23]!==O||n[24]!==v?(te=()=>{v&&O.receiveFileVersion(v)},ie=[O,v],n[23]=O,n[24]=v,n[25]=te,n[26]=ie):(te=n[25],ie=n[26]),(0,u.useEffect)(te,ie),n[27]!==O||n[28]!==M?(oe=()=>{(async()=>{await(0,$.confirmDialog)({title:M("panels.file.editor.reloadTitle"),message:M("panels.file.editor.reloadMessage"),confirmLabel:M("panels.file.editor.reload"),destructive:!0})&&O.reload()})()},n[27]=O,n[28]=M,n[29]=oe):oe=n[29];const le=oe;let re;n[30]!==O?(re=()=>{O.overwrite()},n[30]=O,n[31]=re):re=n[31];const se=re;let ae;n[32]===Symbol.for("react.memo_cache_sentinel")?(ae=e=>V(e),n[32]=ae):ae=n[32];const ce=ae,de="ready"===H.version.status?H.version.size:h.size,ue="ready"===H.version.status?H.version.modifiedAt:h.modifiedAt;let me;n[33]!==h||n[34]!==H.content||n[35]!==de||n[36]!==ue?(me=Object.assign({},h,{content:H.content,size:de,modifiedAt:ue}),n[33]=h,n[34]=H.content,n[35]=de,n[36]=ue,n[37]=me):me=n[37];const he=me,fe="preview"!==y,ge="ready"===H.observedVersion.status?H.observedVersion.size:h.size;let pe;n[38]!==H.content?(pe=H.content.split("\n"),n[38]=H.content,n[39]=pe):pe=n[39];const ve=fe?C:void 0,we=fe?A:null,ye="ready"!==H.observedVersion.status;let xe,Se,be;return n[40]!==se||n[41]!==le||n[42]!==y||n[43]!==x||n[44]!==H.status||n[45]!==ge||n[46]!==pe.length||n[47]!==ve||n[48]!==we||n[49]!==ye?(xe=(0,D.jsx)(B.FilePanelBar,{size:ge,lineCount:pe.length,editorStatus:H.status,cursor:ve,vimMode:we,conflictUnavailable:ye,onOverwrite:se,onReload:le,mode:y,onModeChange:x}),n[40]=se,n[41]=le,n[42]=y,n[43]=x,n[44]=H.status,n[45]=ge,n[46]=pe.length,n[47]=ve,n[48]=we,n[49]=ye,n[50]=xe):xe=n[50],n[51]!==w||n[52]!==S||n[53]!==b||n[54]!==_||n[55]!==O||n[56]!==k||n[57]!==he||n[58]!==j.vimKeybindings||n[59]!==fe?(Se=fe?(0,D.jsx)(U.FileEditorView,{model:O,filename:w,location:_,navigationRevision:k,vimEnabled:j.vimKeybindings,theme:Y,onCursorChange:F,onVimModeChange:ce}):(0,D.jsx)(J,{preview:he,isLoading:S,isMobile:b,location:_,navigationRevision:k,imagePreviewUri:null}),n[51]=w,n[52]=S,n[53]=b,n[54]=_,n[55]=O,n[56]=k,n[57]=he,n[58]=j.vimKeybindings,n[59]=fe,n[60]=Se):Se=n[60],n[61]!==xe||n[62]!==Se?(be=(0,D.jsxs)(t.View,{style:ne.container,testID:"workspace-file-pane",children:[xe,Se]}),n[61]=xe,n[62]=Se,n[63]=be):be=n[63],be}const ne=f.StyleSheet.create(e=>({container:{flex:1,minHeight:0,backgroundColor:e.colors.surface0,uni__dependencies:[0]},centerState:{flex:1,alignItems:"center",justifyContent:"center",padding:e.spacing[4],uni__dependencies:[0]},loadingText:{marginTop:e.spacing[2],color:e.colors.foregroundMuted,fontSize:e.fontSize.sm,uni__dependencies:[0]},errorText:{color:e.colors.destructive,fontSize:e.fontSize.sm,textAlign:"center",uni__dependencies:[0]},emptyText:{color:e.colors.foregroundMuted,fontSize:e.fontSize.sm,textAlign:"center",uni__dependencies:[0]},binaryMetaText:{marginTop:e.spacing[2],color:e.colors.foregroundMuted,fontSize:e.fontSize.sm,uni__dependencies:[0]},previewScrollContainer:{flex:1,minHeight:0},previewContent:{flex:1,minHeight:0},previewCodeScrollContent:{padding:e.spacing[4],uni__dependencies:[0]},previewMarkdownScrollContent:{padding:e.spacing[4],uni__dependencies:[0]},previewImageScrollContent:{flexGrow:1,padding:e.spacing[4],alignItems:"center",justifyContent:"center",uni__dependencies:[0]},previewImage:{width:"100%",height:420}}));function ie(e,t){return{key:`${t}-${e.text}`,token:e}}function oe(e){const{key:t,token:n}=e;return(0,D.jsx)(q,{token:n},t)}},4321,[348,711,690,688,3553,349,36,1401,224,182,234,146,56,1563,3767,3262,3272,306,3865,3593,3940,3592,4322,4091,3465,4049,3938,4246,3658,4138,4323,3263,3623,4324,4325,4329,4330,3715,4227,279]);
15976
+ __d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.FilePane=function(e){const t=(0,c.c)(60),{serverId:n,workspaceRoot:o,location:l,navigationRevision:s}=e,{t:h}=(0,p.useTranslation)(),f=(0,w.useIsCompactFormFactor)(),[v,x]=(0,u.useState)("preview");let S;t[0]===Symbol.for("react.memo_cache_sentinel")?(S={key:null,file:null,imageAttachment:null},t[0]=S):S=t[0];const[b,_]=(0,u.useState)(S);let k;t[1]!==n?(k=e=>e.sessions[n]?.client??null,t[1]=n,t[2]=k):k=t[2];const j=(0,y.useSessionStore)(k);let T;t[3]!==n?(T=e=>!0===e.sessions[n]?.serverInfo?.features?.workspaceFileEditing,t[3]=n,t[4]=T):T=t[4];const z=(0,y.useSessionStore)(T);let I;t[5]!==o?(I=o.trim(),t[5]=o,t[6]=I):I=t[6];const B=I;let L;t[7]!==l.path?(L=O(l.path),t[7]=l.path,t[8]=L):L=t[8];const U=L;let $;t[9]!==U||t[10]!==B?($=U?(0,F.resolveFilePreviewReadTarget)({path:U,workspaceRoot:B}):null,t[9]=U,t[10]=B,t[11]=$):$=t[11];const N=$,H=(0,A.useRetainedPanelActive)(),W=(0,V.useAppActivelyVisible)(),G=Boolean(j&&N);let q;t[12]!==H||t[13]!==W||t[14]!==G?(q=(0,E.isFileQueryEnabled)({hasReadTarget:G,isTabActive:H,isAppVisible:W}),t[12]=H,t[13]=W,t[14]=G,t[15]=q):q=t[15];const Q=q,J=N?.cwd??null,X=N?.path??null;let te;t[16]!==j||t[17]!==Q||t[18]!==n||t[19]!==z||t[20]!==X||t[21]!==J?(te={client:j,serverId:n,cwd:J,path:X,enabled:Q,liveUpdates:z},t[16]=j,t[17]=Q,t[18]=n,t[19]=z,t[20]=X,t[21]=J,t[22]=te):te=t[22];const{query:ne,version:ie}=(0,P.useLiveFile)(te);let oe,le,re;t[23]!==ne.data||t[24]!==N?(oe=()=>{let e=!0;const t=N?`${N.cwd}:${N.path}`:null;return(async()=>{const n=await K(ne.data??null);e&&_(Object.assign({key:t},n))})(),()=>{e=!1}},le=[ne.data,N],t[23]=ne.data,t[24]=N,t[25]=oe,t[26]=le):(oe=t[25],le=t[26]);(0,u.useEffect)(oe,le),t[27]===Symbol.for("react.memo_cache_sentinel")?(re=()=>x("preview"),t[27]=re):re=t[27];const se=N?.path;let ae;t[28]!==se?(ae=[se],t[28]=se,t[29]=ae):ae=t[29];(0,u.useEffect)(re,ae);const ce=N?`${N.cwd}:${N.path}`:null,de=b.key===ce?b.file:null,ue=(0,M.useAttachmentPreviewUrl)(b.key===ce?b.imageAttachment:null),me=Y(de,l.path);let he;t[30]!==de||t[31]!==z?(fe={preview:de,supportsEditing:z},he=Boolean(R.isWeb&&fe.supportsEditing&&"text"===fe.preview?.kind&&fe.preview.size<=1048576),t[30]=de,t[31]=z,t[32]=he):he=t[32];var fe;const ge=he,pe=me&&ge;let ve;t[33]!==de?(ve="text"===de?.kind?(de.content??"").split("\n").length:void 0,t[33]=de,t[34]=ve):ve=t[34];const we=ve;let ye;t[35]!==ne.error||t[36]!==h?(ye=Z(ne.error,h("panels.file.failedToLoad")),t[35]=ne.error,t[36]=h,t[37]=ye):ye=t[37];const xe=ye;let Se;t[38]!==l.path?(Se=(0,C.getFileNameFromPath)(l.path)??l.path,t[38]=l.path,t[39]=Se):Se=t[39];const be=pe?v:void 0,ke=pe?x:void 0;let je,Me;t[40]!==h?(je=h("workspace.terminal.hostDisconnected"),t[40]=h,t[41]=je):je=t[41];t[42]!==j||t[43]!==ge||t[44]!==xe||t[45]!==ue||t[46]!==f||t[47]!==we||t[48]!==l||t[49]!==s||t[50]!==de||t[51]!==ne.isFetching||t[52]!==N||t[53]!==n||t[54]!==Se||t[55]!==be||t[56]!==ke||t[57]!==je||t[58]!==ie?(Me=(0,D.jsx)(ee,{serverId:n,client:j,readTarget:N,preview:de,version:ie,filename:Se,markdownMode:be,onMarkdownModeChange:ke,lineCount:we,editable:ge,disconnectedMessage:je,errorMessage:xe,isLoading:ne.isFetching,isMobile:f,location:l,navigationRevision:s,imagePreviewUri:ue}),t[42]=j,t[43]=ge,t[44]=xe,t[45]=ue,t[46]=f,t[47]=we,t[48]=l,t[49]=s,t[50]=de,t[51]=ne.isFetching,t[52]=N,t[53]=n,t[54]=Se,t[55]=be,t[56]=ke,t[57]=je,t[58]=ie,t[59]=Me):Me=t[59];return Me};var e,t=r(d[0]),n=r(d[1]),o=r(d[2]),l=r(d[3]),s=r(d[4]),c=r(d[5]),u=r(d[6]),h=(e=u)&&e.__esModule?e:{default:e};r(d[7]),r(d[8]),r(d[9]),r(d[10]),r(d[11]);var f=r(d[12]),p=r(d[13]),v=r(d[14]),w=r(d[15]),y=r(d[16]),x=r(d[17]),S=r(d[18]),b=r(d[19]),_=r(d[20]),k=r(d[21]),j=r(d[22]),M=r(d[23]),T=r(d[24]),C=r(d[25]),z=r(d[26]),F=r(d[27]),A=r(d[28]),V=r(d[29]),E=r(d[30]),R=r(d[31]),I=r(d[32]),P=r(d[33]),B=r(d[34]),L=r(d[35]),U=r(d[36]),$=r(d[37]),N=r(d[38]),D=r(d[39]);function O(e){if("string"!=typeof e)return null;const t=e.trim();return t.length>0?t:null}function H({size:e}){return e<1024?`${e} B`:e<1048576?`${(e/1024).toFixed(1)} KB`:`${(e/1048576).toFixed(1)} MB`}async function K(e){if(!e)return{file:null,imageAttachment:null};const t=(0,z.explorerFileFromReadResult)(e);if("image"!==e.kind)return{file:t,imageAttachment:null};return{file:t,imageAttachment:await(0,T.persistAttachmentFromBytes)({id:(0,C.createPreviewAttachmentId)({mimeType:e.mime,path:e.path,size:e.size,modifiedAt:e.modifiedAt,contentLength:e.bytes.byteLength}),bytes:e.bytes,mimeType:e.mime,fileName:(0,C.getFileNameFromPath)(e.path)})}}function W(e){if(!e.lineStart||e.lineStart<=0||e.lineCount<=0)return null;const t=Math.min(Math.floor(e.lineStart),e.lineCount),n=e.lineEnd&&e.lineEnd>=e.lineStart?e.lineEnd:e.lineStart,o=Math.min(Math.floor(n),e.lineCount);return{lineStart:t,lineEnd:Math.max(t,o)}}const G=h.default.memo(function(e){const o=(0,c.c)(21),{tokens:l,lineNumber:s,gutterWidth:u,highlighted:h}=e;let f,p;o[0]!==u?(f=(0,b.inlineUnistylesStyle)({width:u}),o[0]=u,o[1]=f):f=o[1],o[2]!==f?(p=[Q.gutter,f],o[2]=f,o[3]=p):p=o[3];const v=p,w=h&&Q.highlightedLine;let y;o[4]!==w?(y=[Q.line,w],o[4]=w,o[5]=y):y=o[5];const x=y;let S;o[6]!==l?(S=l.map(ie),o[6]=l,o[7]=S):S=o[7];const _=S,k=String(s);let j,M,T,C,z;return o[8]!==k?(j=(0,D.jsx)(n.Text,{numberOfLines:1,style:Q.gutterText,children:k}),o[8]=k,o[9]=j):j=o[9],o[10]!==v||o[11]!==j?(M=(0,D.jsx)(t.View,{style:v,children:j}),o[10]=v,o[11]=j,o[12]=M):M=o[12],o[13]!==_?(T=_.map(oe),o[13]=_,o[14]=T):T=o[14],o[15]!==T?(C=(0,D.jsx)(n.Text,{selectable:!0,style:Q.lineText,children:T}),o[15]=T,o[16]=C):C=o[16],o[17]!==x||o[18]!==C||o[19]!==M?(z=(0,D.jsxs)(t.View,{style:x,children:[M,C]}),o[17]=x,o[18]=C,o[19]=M,o[20]=z):z=o[20],z});function q(e){const t=(0,c.c)(5),{token:o}=e;let l,s;return t[0]!==o.style?(l=(0,S.syntaxTokenStyleFor)(o.style),t[0]=o.style,t[1]=l):l=t[1],t[2]!==l||t[3]!==o.text?(s=(0,D.jsx)(n.Text,{style:l,children:o.text}),t[2]=l,t[3]=o.text,t[4]=s):s=t[4],s}const Q=f.StyleSheet.create(e=>({line:{flexDirection:"row"},highlightedLine:{backgroundColor:e.colors.accentBorder,uni__dependencies:[0]},gutter:{alignItems:"flex-end",paddingRight:e.spacing[3],flexShrink:0,uni__dependencies:[0]},gutterText:{color:e.colors.foreground,fontFamily:e.fontFamily.mono,fontSize:e.fontSize.code,lineHeight:1.45*e.fontSize.code,opacity:.4,userSelect:"none",uni__dependencies:[0]},lineText:{fontFamily:e.fontFamily.mono,fontSize:e.fontSize.code,lineHeight:1.45*e.fontSize.code,flex:1,uni__dependencies:[0]}}));function J(e){const h=(0,c.c)(63),{preview:w,isLoading:y,isMobile:S,location:b,navigationRevision:M,imagePreviewUri:T}=e;let C;h[0]===Symbol.for("react.memo_cache_sentinel")?(C=f.UnistylesRuntime.getTheme(),h[0]=C):C=h[0];const z=C,{t:F}=(0,p.useTranslation)(),A=b.path,V="text"===w?.kind&&(0,j.isRenderedMarkdownFile)(A)&&!b.lineStart,E=(0,u.useRef)(null);let R;e:{if(!w||"text"!==w.kind||V){R=null;break e}const e=w.content??"";let t;h[1]!==A||h[2]!==e?(t=(0,x.highlightCode)(e,A),h[1]=A,h[2]=e,h[3]=t):t=h[3],R=t}const I=R;let P;e:{if(!I){P=0;break e}let e;h[4]!==I.length?(e=(0,_.lineNumberGutterWidth)(I.length,z.fontSize.code),h[4]=I.length,h[5]=e):e=h[5],P=e}const B=P,L=1.45*z.fontSize.code;let U;e:{if(!I){U=null;break e}let e;h[6]!==I.length||h[7]!==b.lineEnd||h[8]!==b.lineStart?(e=W({lineStart:b.lineStart,lineEnd:b.lineEnd,lineCount:I.length}),h[6]=I.length,h[7]=b.lineEnd,h[8]=b.lineStart,h[9]=e):e=h[9],U=e}const $=U;let N;h[10]!==T?(N=T?{uri:T}:null,h[10]=T,h[11]=N):N=h[11];const O=N;let K,q,Q,J,Y,Z,ee;if(h[12]!==$?(K=()=>{if(!$)return;const e=setTimeout(()=>{E.current?.scrollTo({y:Math.max(0,($.lineStart-1)*L),animated:!1})},0);return()=>clearTimeout(e)},h[12]=$,h[13]=K):K=h[13],h[14]!==$||h[15]!==M?(q=[L,$,M],h[14]=$,h[15]=M,h[16]=q):q=h[16],(0,u.useEffect)(K,q),y&&!w){let e,o,l;return h[17]===Symbol.for("react.memo_cache_sentinel")?(e=(0,D.jsx)(s.ActivityIndicator,{size:"small"}),h[17]=e):e=h[17],h[18]!==F?(o=F("panels.file.loading"),h[18]=F,h[19]=o):o=h[19],h[20]!==o?(l=(0,D.jsxs)(t.View,{style:ne.centerState,children:[e,(0,D.jsx)(n.Text,{style:ne.loadingText,children:o})]}),h[20]=o,h[21]=l):l=h[21],l}if(!w){let e,o;return h[22]!==F?(e=F("panels.file.noPreview"),h[22]=F,h[23]=e):e=h[23],h[24]!==e?(o=(0,D.jsx)(t.View,{style:ne.centerState,children:(0,D.jsx)(n.Text,{style:ne.emptyText,children:e})}),h[24]=e,h[25]=o):o=h[25],o}if("text"===w.kind){if(V){const e=w.content??"";let n;return h[26]!==e?(n=(0,D.jsx)(t.View,{style:ne.previewScrollContainer,children:(0,D.jsx)(o.ScrollView,{ref:E,style:ne.previewContent,contentContainerStyle:ne.previewMarkdownScrollContent,showsVerticalScrollIndicator:!0,children:(0,D.jsx)(v.MarkdownRenderer,{text:e})})}),h[26]=e,h[27]=n):n=h[27],n}let e,n,l,s;if(h[28]!==B||h[29]!==I||h[30]!==$||h[31]!==w.content){const o=(I??[[{text:w.content??"",style:null}]]).map(X);let s;e=t.View,n=k.CODE_SURFACE_DATASET,h[35]!==B||h[36]!==$?(s=e=>{const{key:t,tokens:n,lineNumber:o}=e;return(0,D.jsx)(G,{tokens:n,lineNumber:o,gutterWidth:B,highlighted:Boolean($)&&o>=($?.lineStart??0)&&o<=($?.lineEnd??0)},t)},h[35]=B,h[36]=$,h[37]=s):s=h[37],l=o.map(s),h[28]=B,h[29]=I,h[30]=$,h[31]=w.content,h[32]=e,h[33]=n,h[34]=l}else e=h[32],n=h[33],l=h[34];h[38]!==e||h[39]!==n||h[40]!==l?(s=(0,D.jsx)(e,{dataSet:n,children:l}),h[38]=e,h[39]=n,h[40]=l,h[41]=s):s=h[41];const c=s;let u;return h[42]!==c||h[43]!==S?(u=(0,D.jsx)(t.View,{style:ne.previewScrollContainer,children:(0,D.jsx)(o.ScrollView,{ref:E,style:ne.previewContent,showsVerticalScrollIndicator:!0,children:S?(0,D.jsx)(t.View,{style:ne.previewCodeScrollContent,children:c}):(0,D.jsx)(o.ScrollView,{horizontal:!0,nestedScrollEnabled:!0,showsHorizontalScrollIndicator:!0,contentContainerStyle:ne.previewCodeScrollContent,children:c})})}),h[42]=c,h[43]=S,h[44]=u):u=h[44],u}if("image"===w.kind){if(!T){let e,o,l;return h[45]===Symbol.for("react.memo_cache_sentinel")?(e=(0,D.jsx)(s.ActivityIndicator,{size:"small"}),h[45]=e):e=h[45],h[46]!==F?(o=F("panels.file.loading"),h[46]=F,h[47]=o):o=h[47],h[48]!==o?(l=(0,D.jsxs)(t.View,{style:ne.centerState,children:[e,(0,D.jsx)(n.Text,{style:ne.loadingText,children:o})]}),h[48]=o,h[49]=l):l=h[49],l}const e=O??void 0;let c;return h[50]!==e?(c=(0,D.jsx)(t.View,{style:ne.previewScrollContainer,children:(0,D.jsx)(o.ScrollView,{ref:E,style:ne.previewContent,contentContainerStyle:ne.previewImageScrollContent,showsVerticalScrollIndicator:!0,children:(0,D.jsx)(l.Image,{source:e,style:ne.previewImage,resizeMode:"contain"})})}),h[50]=e,h[51]=c):c=h[51],c}return h[52]!==F?(Q=F("panels.file.binaryPreviewUnavailable"),h[52]=F,h[53]=Q):Q=h[53],h[54]!==Q?(J=(0,D.jsx)(n.Text,{style:ne.emptyText,children:Q}),h[54]=Q,h[55]=J):J=h[55],h[56]!==w.size?(Y=H({size:w.size}),h[56]=w.size,h[57]=Y):Y=h[57],h[58]!==Y?(Z=(0,D.jsx)(n.Text,{style:ne.binaryMetaText,children:Y}),h[58]=Y,h[59]=Z):Z=h[59],h[60]!==Z||h[61]!==J?(ee=(0,D.jsxs)(t.View,{style:ne.centerState,children:[J,Z]}),h[60]=Z,h[61]=J,h[62]=ee):ee=h[62],ee}function X(e,t){return{key:`line-${t}`,tokens:e,lineNumber:t+1}}function Y(e,t){return"text"===e?.kind&&(0,j.isRenderedMarkdownFile)(t)}function Z(e,t){return e?e instanceof Error?e.message:t:null}function ee(e){const o=(0,c.c)(34),{serverId:l,client:s,readTarget:u,preview:h,version:f,filename:p,markdownMode:v,onMarkdownModeChange:w,lineCount:y,editable:x,disconnectedMessage:S,errorMessage:b,isLoading:_,isMobile:k,location:j,navigationRevision:M,imagePreviewUri:T}=e;if(!s&&u){let e;return o[0]!==S?(e=(0,D.jsx)(t.View,{style:ne.container,testID:"workspace-file-pane",children:(0,D.jsx)(t.View,{style:ne.centerState,children:(0,D.jsx)(n.Text,{style:ne.errorText,children:S})})}),o[0]=S,o[1]=e):e=o[1],e}if(x&&s&&u&&"text"===h?.kind){const e=`${l}:${u.cwd}:${u.path}`,t=h;let n;return o[2]!==s||o[3]!==p||o[4]!==_||o[5]!==k||o[6]!==j||o[7]!==v||o[8]!==M||o[9]!==w||o[10]!==u.cwd||o[11]!==u.path||o[12]!==e||o[13]!==t||o[14]!==f?(n=(0,D.jsx)(te,{client:s,cwd:u.cwd,path:u.path,preview:t,version:f,filename:p,mode:v,onModeChange:w,isLoading:_,isMobile:k,location:j,navigationRevision:M},e),o[2]=s,o[3]=p,o[4]=_,o[5]=k,o[6]=j,o[7]=v,o[8]=M,o[9]=w,o[10]=u.cwd,o[11]=u.path,o[12]=e,o[13]=t,o[14]=f,o[15]=n):n=o[15],n}let C,z,F,A;return o[16]!==y||o[17]!==v||o[18]!==w||o[19]!==h?(C=h?(0,D.jsx)(B.FilePanelBar,{size:h.size,lineCount:y,mode:v,onModeChange:w}):null,o[16]=y,o[17]=v,o[18]=w,o[19]=h,o[20]=C):C=o[20],o[21]!==b?(z=b?(0,D.jsx)(t.View,{style:ne.centerState,children:(0,D.jsx)(n.Text,{style:ne.errorText,children:b})}):null,o[21]=b,o[22]=z):z=o[22],o[23]!==T||o[24]!==_||o[25]!==k||o[26]!==j||o[27]!==M||o[28]!==h?(F=(0,D.jsx)(J,{preview:h,isLoading:_,isMobile:k,location:j,navigationRevision:M,imagePreviewUri:T}),o[23]=T,o[24]=_,o[25]=k,o[26]=j,o[27]=M,o[28]=h,o[29]=F):F=o[29],o[30]!==C||o[31]!==z||o[32]!==F?(A=(0,D.jsxs)(t.View,{style:ne.container,testID:"workspace-file-pane",children:[C,z,F]}),o[30]=C,o[31]=z,o[32]=F,o[33]=A):A=o[33],A}function te(e){const n=(0,c.c)(64),{client:o,cwd:l,path:s,preview:h,version:v,filename:w,mode:y,onModeChange:x,isLoading:S,isMobile:b,location:_,navigationRevision:k}=e,{settings:j}=(0,I.useAppSettings)(),{t:M}=(0,p.useTranslation)();let T;n[0]===Symbol.for("react.memo_cache_sentinel")?(T={line:1,column:1},n[0]=T):T=n[0];const[C,F]=(0,u.useState)(T),[A,V]=(0,u.useState)(j.vimKeybindings?"NORMAL":null);let E;n[1]!==o||n[2]!==l||n[3]!==s?(E={async read(){const e=await o.readFile(l,s),t=(0,z.explorerFileFromReadResult)(e);if("text"!==t.kind||void 0===t.content)throw new Error("File is no longer text.");return{content:t.content,hasBom:t.hasBom,version:{status:"ready",cwd:l,path:s,size:e.size,modifiedAt:e.modifiedAt,revision:e.revision}}},write:e=>o.writeFile(Object.assign({cwd:l,path:s},e))},n[1]=o,n[2]=l,n[3]=s,n[4]=E):E=n[4];const R=E;let P;n[5]!==l||n[6]!==s||n[7]!==h.content||n[8]!==h.hasBom||n[9]!==h.modifiedAt||n[10]!==h.size||n[11]!==R?(P=()=>new L.FileEditorModel({file:{content:h.content??"",hasBom:h.hasBom,version:{status:"ready",cwd:l,path:s,size:h.size,modifiedAt:h.modifiedAt}},session:R}),n[5]=l,n[6]=s,n[7]=h.content,n[8]=h.hasBom,n[9]=h.modifiedAt,n[10]=h.size,n[11]=R,n[12]=P):P=n[12];const[O]=(0,u.useState)(P),H=(0,u.useSyncExternalStore)(O.subscribe,O.getSnapshot,O.getSnapshot);let K;n[13]!==O?(K=()=>O.suspendAutosave(),n[13]=O,n[14]=K):K=n[14];const W=K;let G,q;n[15]!==H.modified||n[16]!==W?(G={modified:H.modified,suspendPendingSave:W},n[15]=H.modified,n[16]=W,n[17]=G):G=n[17],(0,N.usePublishPanelInstanceAttributes)(G),n[18]===Symbol.for("react.memo_cache_sentinel")?(q=f.UnistylesRuntime.getTheme(),n[18]=q):q=n[18];const Q=q;let X;n[19]===Symbol.for("react.memo_cache_sentinel")?(X={colorScheme:Q.colorScheme,background:Q.colors.surface0,foreground:Q.colors.foreground,cursor:Q.colors.terminal.cursor,foregroundMuted:Q.colors.foregroundMuted,border:Q.colors.border,selection:Q.colors.terminal.selectionBackground,monoFont:Q.fontFamily.mono,codeFontSize:Q.fontSize.code,syntax:Q.colors.syntax},n[19]=X):X=n[19];const Y=X;let Z,ee,te,ie,oe;n[20]!==O?(Z=()=>()=>O.dispose(),ee=[O],n[20]=O,n[21]=Z,n[22]=ee):(Z=n[21],ee=n[22]),(0,u.useEffect)(Z,ee),n[23]!==O||n[24]!==v?(te=()=>{v&&O.receiveFileVersion(v)},ie=[O,v],n[23]=O,n[24]=v,n[25]=te,n[26]=ie):(te=n[25],ie=n[26]),(0,u.useEffect)(te,ie),n[27]!==O||n[28]!==M?(oe=()=>{(async()=>{await(0,$.confirmDialog)({title:M("panels.file.editor.reloadTitle"),message:M("panels.file.editor.reloadMessage"),confirmLabel:M("panels.file.editor.reload"),destructive:!0})&&O.reload()})()},n[27]=O,n[28]=M,n[29]=oe):oe=n[29];const le=oe;let re;n[30]!==O?(re=()=>{O.overwrite()},n[30]=O,n[31]=re):re=n[31];const se=re;let ae;n[32]===Symbol.for("react.memo_cache_sentinel")?(ae=e=>V(e),n[32]=ae):ae=n[32];const ce=ae,de="ready"===H.version.status?H.version.size:h.size,ue="ready"===H.version.status?H.version.modifiedAt:h.modifiedAt;let me;n[33]!==h||n[34]!==H.content||n[35]!==de||n[36]!==ue?(me=Object.assign({},h,{content:H.content,size:de,modifiedAt:ue}),n[33]=h,n[34]=H.content,n[35]=de,n[36]=ue,n[37]=me):me=n[37];const he=me,fe="preview"!==y,ge="ready"===H.observedVersion.status?H.observedVersion.size:h.size;let pe;n[38]!==H.content?(pe=H.content.split("\n"),n[38]=H.content,n[39]=pe):pe=n[39];const ve=fe?C:void 0,we=fe?A:null,ye="ready"!==H.observedVersion.status;let xe,Se,be;return n[40]!==se||n[41]!==le||n[42]!==y||n[43]!==x||n[44]!==H.status||n[45]!==ge||n[46]!==pe.length||n[47]!==ve||n[48]!==we||n[49]!==ye?(xe=(0,D.jsx)(B.FilePanelBar,{size:ge,lineCount:pe.length,editorStatus:H.status,cursor:ve,vimMode:we,conflictUnavailable:ye,onOverwrite:se,onReload:le,mode:y,onModeChange:x}),n[40]=se,n[41]=le,n[42]=y,n[43]=x,n[44]=H.status,n[45]=ge,n[46]=pe.length,n[47]=ve,n[48]=we,n[49]=ye,n[50]=xe):xe=n[50],n[51]!==w||n[52]!==S||n[53]!==b||n[54]!==_||n[55]!==O||n[56]!==k||n[57]!==he||n[58]!==j.vimKeybindings||n[59]!==fe?(Se=fe?(0,D.jsx)(U.FileEditorView,{model:O,filename:w,location:_,navigationRevision:k,vimEnabled:j.vimKeybindings,theme:Y,onCursorChange:F,onVimModeChange:ce}):(0,D.jsx)(J,{preview:he,isLoading:S,isMobile:b,location:_,navigationRevision:k,imagePreviewUri:null}),n[51]=w,n[52]=S,n[53]=b,n[54]=_,n[55]=O,n[56]=k,n[57]=he,n[58]=j.vimKeybindings,n[59]=fe,n[60]=Se):Se=n[60],n[61]!==xe||n[62]!==Se?(be=(0,D.jsxs)(t.View,{style:ne.container,testID:"workspace-file-pane",children:[xe,Se]}),n[61]=xe,n[62]=Se,n[63]=be):be=n[63],be}const ne=f.StyleSheet.create(e=>({container:{flex:1,minHeight:0,backgroundColor:e.colors.surface0,uni__dependencies:[0]},centerState:{flex:1,alignItems:"center",justifyContent:"center",padding:e.spacing[4],uni__dependencies:[0]},loadingText:{marginTop:e.spacing[2],color:e.colors.foregroundMuted,fontSize:e.fontSize.sm,uni__dependencies:[0]},errorText:{color:e.colors.destructive,fontSize:e.fontSize.sm,textAlign:"center",uni__dependencies:[0]},emptyText:{color:e.colors.foregroundMuted,fontSize:e.fontSize.sm,textAlign:"center",uni__dependencies:[0]},binaryMetaText:{marginTop:e.spacing[2],color:e.colors.foregroundMuted,fontSize:e.fontSize.sm,uni__dependencies:[0]},previewScrollContainer:{flex:1,minHeight:0},previewContent:{flex:1,minHeight:0},previewCodeScrollContent:{padding:e.spacing[4],uni__dependencies:[0]},previewMarkdownScrollContent:{padding:e.spacing[4],uni__dependencies:[0]},previewImageScrollContent:{flexGrow:1,padding:e.spacing[4],alignItems:"center",justifyContent:"center",uni__dependencies:[0]},previewImage:{width:"100%",height:420}}));function ie(e,t){return{key:`${t}-${e.text}`,token:e}}function oe(e){const{key:t,token:n}=e;return(0,D.jsx)(q,{token:n},t)}},4321,[348,711,690,688,3553,349,36,1401,224,182,234,146,56,1563,3767,3262,3272,306,3865,3593,3940,3592,4322,4091,3465,4049,3938,4246,3658,4138,4323,3263,3623,4324,4325,4329,4330,3715,4227,279]);
15977
15977
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.isRenderedMarkdownFile=function(n){const t=n.trim().toLowerCase();return t.endsWith(".md")||t.endsWith(".markdown")}},4322,[]);
15978
15978
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.isFileQueryEnabled=function(t){return t.hasReadTarget&&t.isTabActive&&t.isAppVisible}},4323,[]);
15979
15979
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.useLiveFile=function(s){const u=(0,t.c)(33),p=(0,l.useQueryClient)(),[v,o]=(0,n.useState)(!s.liveUpdates),[h,w]=(0,n.useState)(null),y=(0,n.useRef)(null);let b;u[0]!==s.cwd||u[1]!==s.path||u[2]!==s.serverId?(b=["workspaceFile",s.serverId,s.cwd,s.path],u[0]=s.cwd,u[1]=s.path,u[2]=s.serverId,u[3]=b):b=u[3];const f=b;let F,I;u[4]!==s||u[5]!==p||u[6]!==f?(F=()=>{y.current=null,w(null);const{client:t,cwd:n,path:l}=s;if(!(s.liveUpdates&&t&&n&&l&&s.enabled))return void o(!s.liveUpdates);let c=!1,u=null;return o(!1),(async()=>{try{const s=await t.subscribeFile({cwd:n,path:l},t=>{c||(y.current=t,w(t),p.invalidateQueries({queryKey:f}))});if(c)return void s.unsubscribe();u=s.unsubscribe,y.current=s.initial,w(s.initial),o(!0)}catch{c||o(!0)}})(),()=>{c=!0,u?.()}},u[4]=s,u[5]=p,u[6]=f,u[7]=F):F=u[7];u[8]!==s.client||u[9]!==s.cwd||u[10]!==s.enabled||u[11]!==s.liveUpdates||u[12]!==s.path||u[13]!==s.serverId||u[14]!==p||u[15]!==f?(I=[s.client,s.cwd,s.enabled,s.liveUpdates,s.path,p,f,s.serverId],u[8]=s.client,u[9]=s.cwd,u[10]=s.enabled,u[11]=s.liveUpdates,u[12]=s.path,u[13]=s.serverId,u[14]=p,u[15]=f,u[16]=I):I=u[16];(0,n.useEffect)(F,I);const U=s.enabled&&Boolean(s.client&&s.cwd&&s.path)&&v;let q,Q;u[17]!==s.client||u[18]!==s.cwd||u[19]!==s.path?(q=async()=>{if(!s.client||!s.cwd||!s.path)throw new Error("File unavailable.");return s.client.readFile(s.cwd,s.path)},u[17]=s.client,u[18]=s.cwd,u[19]=s.path,u[20]=q):q=u[20];u[21]!==f||u[22]!==U||u[23]!==q?(Q={queryKey:f,enabled:U,queryFn:q,dataShape:"value",staleTimeMs:5e3},u[21]=f,u[22]=U,u[23]=q,u[24]=Q):Q=u[24];const _=(0,c.useFetchQuery)(Q);let E,K,S;u[25]!==_.data||u[26]!==p||u[27]!==f?(E=()=>{const t=y.current;_.data&&"ready"===t?.status&&_.data.modifiedAt!==t.modifiedAt&&p.invalidateQueries({queryKey:f})},K=[_.data,p,f],u[25]=_.data,u[26]=p,u[27]=f,u[28]=E,u[29]=K):(E=u[28],K=u[29]);(0,n.useEffect)(E,K),u[30]!==_||u[31]!==h?(S={query:_,version:h},u[30]=_,u[31]=h,u[32]=S):S=u[32];return S};var t=r(d[0]),n=r(d[1]),l=r(d[2]),c=r(d[3])},4324,[349,36,916,3538]);
@@ -16278,7 +16278,7 @@ __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{v
16278
16278
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.executeDaemonManagementToggle=async function(n,t,s){if(!n){await s.persistSettings({manageBuiltInDaemon:!0});return{kind:"enabled",newStatus:await s.startDaemon()}}if(!await s.confirm())return{kind:"cancelled"};if(await s.persistSettings({manageBuiltInDaemon:!1}),"running"===t?.status&&t.desktopManaged){return{kind:"disabled",newStatus:await s.stopDaemon()}}return{kind:"disabled",newStatus:null}}},4519,[]);
16279
16279
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"DaemonConnectionRegistrationError",{enumerable:!0,get:function(){return t}}),Object.defineProperty(e,"DaemonManagementOperationError",{enumerable:!0,get:function(){return o}}),e.getDaemonManagementErrorPresentation=function(s,u){const c=s instanceof o?s.originalError:s,f=s instanceof o?s.wasManagingDaemon:u;if(c instanceof t)return{message:n.i18n.t("desktop.daemon.management.registrationFailed"),refreshStatus:!0};if(f)return{message:n.i18n.t("desktop.daemon.management.pausedStopFailed"),refreshStatus:!1};return{message:n.i18n.t("desktop.daemon.management.updateFailed"),refreshStatus:!1}};var n=r(d[0]);class t extends Error{constructor(n){super(n),this.name="DaemonConnectionRegistrationError"}}class o extends Error{constructor(n,t){super(n.message),this.name=n.name,this.cause=n,this.originalError=n,this.wasManagingDaemon=t}}},4520,[3454]);
16280
16280
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.useDaemonStatus=function(){const y=(0,t.c)(17),{t:D}=(0,s.useTranslation)(),f=(0,o.useQueryClient)();let p;y[0]===Symbol.for("react.memo_cache_sentinel")?(p=(0,n.shouldUseDesktopDaemon)(),y[0]=p):p=y[0];const _=p;let k;y[1]===Symbol.for("react.memo_cache_sentinel")?(k={queryKey:l,enabled:_,staleTime:3e4,refetchOnMount:"always",retry:!1,queryFn:c},y[1]=k):k=y[1];const b=(0,o.useQuery)(k),L=b.error;let S,h,v;y[2]!==D?(S=D("desktop.daemon.loadFailed"),y[2]=D,y[3]=S):S=y[3];y[4]!==b.error||y[5]!==S?(h={error:L,message:S,logLabel:"[DesktopDaemon] Failed to load daemon status"},y[4]=b.error,y[5]=S,y[6]=h):h=y[6];(0,u.useDesktopIpcQueryErrorToast)(h),y[7]!==f?(v=t=>{f.setQueryData(l,o=>o?Object.assign({},o,{status:t}):void 0)},y[7]=f,y[8]=v):v=y[8];const Q=v;let q;y[9]!==f?(q=()=>{f.invalidateQueries({queryKey:l})},y[9]=f,y[10]=q):q=y[10];const F=q,O=b.data??null,T=b.error instanceof Error?b.error.message:null;let j;y[11]!==b.isLoading||y[12]!==F||y[13]!==Q||y[14]!==O||y[15]!==T?(j={data:O,isLoading:b.isLoading,error:T,setStatus:Q,refetch:F},y[11]=b.isLoading,y[12]=F,y[13]=Q,y[14]=O,y[15]=T,y[16]=j):j=y[16];return j};var t=r(d[0]);r(d[1]);var o=r(d[2]),s=r(d[3]),n=r(d[4]),u=r(d[5]);const l=["desktopDaemonStatus"];async function c(){const[t,o]=await Promise.all([(0,n.getDesktopDaemonStatus)(),(0,n.getDesktopDaemonLogs)()]);return{status:t,logs:o}}},4521,[349,36,916,1563,3418,3625]);
16281
- __d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.ProvidersSection=function({serverId:e}){const{t:s}=(0,c.useTranslation)(),o=(0,b.useHostRuntimeIsConnected)(e),u=(0,h.useHostFeature)(e,"providerRemoval"),{entries:v,isLoading:_,refresh:j}=(0,x.useProvidersSnapshot)(e),{patchConfig:T}=(0,y.useDaemonConfig)(e),P=(0,R.useProviderSettingsStore)(e=>e.open),[I,L]=(0,l.useState)(null),[V,k]=(0,l.useState)(null),B=(0,l.useRef)(null),[E,F]=(0,l.useState)(null),U=(0,l.useMemo)(()=>(0,S.buildProviderDefinitions)(v),[v]),W=e.length>0,$=(0,l.useCallback)(t=>{P({serverId:e,provider:t})},[P,e]),A=(0,l.useCallback)(async(e,t)=>{L(e);try{await T({providers:{[e]:{enabled:t}}})}catch(e){p.default.alert(s("settings.providers.updateErrorTitle"),e instanceof Error?e.message:String(e))}finally{L(t=>t===e?null:t)}},[T,s]),q=(0,l.useCallback)(async(e,t)=>{if(!B.current){B.current=e,k(e);try{if(!await(0,D.confirmDialog)({title:s("settings.providers.remove.confirmTitle",{name:t}),message:s("settings.providers.remove.confirmMessage"),confirmLabel:s("settings.providers.remove.confirm"),destructive:!0}))return;await T({removeProviders:[e]})}catch(e){p.default.alert(s("settings.providers.remove.errorTitle"),e instanceof Error?e.message:String(e))}finally{B.current===e&&(B.current=null),k(t=>t===e?null:t)}}},[T,s]),G=(0,l.useCallback)(async e=>{if(!E){F(e.id);try{await T((0,w.buildAcpProviderConfigPatch)(e)),await j([e.id])}catch(e){p.default.alert(s("settings.providers.addErrorTitle"),e instanceof Error?e.message:String(e))}finally{F(t=>t===e.id?null:t)}}},[E,T,j,s]);return(0,M.jsxs)(M.Fragment,{children:[(0,M.jsxs)(z.SettingsSection,{title:s("settings.providers.title"),testID:"host-page-providers-card",style:O.sectionSpacing,children:[W&&o?null:(0,M.jsx)(t.View,{style:[f.settingsStyles.card,O.emptyCard],children:(0,M.jsx)(n.Text,{style:O.emptyText,children:s("settings.providers.unavailable")})}),W&&o&&_?(0,M.jsx)(t.View,{style:[f.settingsStyles.card,O.emptyCard],children:(0,M.jsx)(n.Text,{style:O.emptyText,children:s("settings.providers.loading")})}):null,W&&o&&!_&&U.length>0?(0,M.jsx)(t.View,{style:f.settingsStyles.card,children:U.map((e,t)=>{const n=v?.find(t=>t.provider===e.id);return n?(0,M.jsx)(H,{def:e,entry:n,enabled:n.enabled??!0,isToggling:I===e.id,isRemoving:V===e.id,canRemove:u&&"custom"===n.source,isFirst:0===t,onPress:$,onToggleEnabled:A,onRemove:q},e.id):null})}):null]}),W&&o?(0,M.jsx)(z.SettingsSection,{title:s("settings.providers.addProvider"),testID:"host-page-add-provider-card",style:O.addProviderSection,children:(0,M.jsx)(C.ProviderCatalogList,{serverId:e,installingProviderId:E,onInstall:G})}):null]})};var e,t=r(d[0]),n=r(d[1]),s=r(d[2]),o=r(d[3]),l=r(d[4]),c=r(d[5]),u=r(d[6]),p=(e=u)&&e.__esModule?e:{default:e};r(d[7]),r(d[8]),r(d[9]);var v=r(d[10]),f=r(d[11]),b=r(d[12]),h=r(d[13]),x=r(d[14]),y=r(d[15]),S=r(d[16]),w=r(d[17]),C=r(d[18]),_=r(d[19]),j=r(d[20]),T=r(d[21]),P=r(d[22]),z=r(d[23]),R=r(d[24]),D=r(d[25]),I=r(d[26]),M=r(d[27]);function L(e,t,n,s){return t?"loading"===e?{tone:"loading",label:s("settings.providers.statuses.loading"),modelCount:null}:"error"===e?{tone:"danger",label:s("settings.providers.statuses.error"),modelCount:null}:"ready"===e?{tone:"success",label:s("settings.providers.statuses.available"),modelCount:n>0?n:null}:{tone:"warning",label:s("settings.providers.statuses.notInstalled"),modelCount:null}:{tone:"muted",label:s("settings.providers.statuses.disabled"),modelCount:null}}function V(e){e.stopPropagation()}function k(e){const t=(0,o.c)(32),{providerId:n,providerLabel:s,isRemoving:l,iconSize:u,foregroundColor:p,foregroundMutedColor:v,dangerColor:f,onRemove:b}=e,{t:h}=(0,c.useTranslation)();let x;t[0]!==b||t[1]!==n||t[2]!==s?(x=()=>{b(n,s)},t[0]=b,t[1]=n,t[2]=s,t[3]=x):x=t[3];const y=x,S=B;let w;t[4]!==f?(w=(0,M.jsx)(I.Trash2,{size:16,color:f}),t[4]=f,t[5]=w):w=t[5];const C=w;let _;t[6]!==s||t[7]!==h?(_=h("settings.providers.actions.menu",{name:s}),t[6]=s,t[7]=h,t[8]=_):_=t[8];const j=`provider-actions-${n}`;let T,z;t[9]!==p||t[10]!==v||t[11]!==u?(T=e=>{const{hovered:t,open:n}=e;return(0,M.jsx)(I.MoreHorizontal,{size:u,color:t||n?p:v})},t[9]=p,t[10]=v,t[11]=u,t[12]=T):T=t[12],t[13]!==l||t[14]!==_||t[15]!==j||t[16]!==T?(z=(0,M.jsx)(P.DropdownMenuTrigger,{disabled:l,hitSlop:8,onPressIn:V,style:S,accessibilityRole:"button",accessibilityLabel:_,testID:j,children:T}),t[13]=l,t[14]=_,t[15]=j,t[16]=T,t[17]=z):z=t[17];const R=l?"pending":"idle";let D;t[18]!==h?(D=h("settings.providers.actions.removing"),t[18]=h,t[19]=D):D=t[19];const L=`provider-remove-${n}`;let k,H,E;return t[20]!==h?(k=h("settings.providers.actions.remove"),t[20]=h,t[21]=k):k=t[21],t[22]!==y||t[23]!==k||t[24]!==R||t[25]!==D||t[26]!==L||t[27]!==C?(H=(0,M.jsx)(P.DropdownMenuContent,{align:"end",width:220,children:(0,M.jsx)(P.DropdownMenuItem,{destructive:!0,leading:C,onSelect:y,status:R,pendingLabel:D,testID:L,children:k})}),t[22]=y,t[23]=k,t[24]=R,t[25]=D,t[26]=L,t[27]=C,t[28]=H):H=t[28],t[29]!==H||t[30]!==z?(E=(0,M.jsxs)(P.DropdownMenu,{children:[z,H]}),t[29]=H,t[30]=z,t[31]=E):E=t[31],E}function B(e){const{pressed:t,hovered:n,open:s}=e;return[O.menuButton,(n||s)&&O.menuButtonHovered,t&&O.menuButtonPressed]}function H(e){const l=(0,o.c)(45),{def:u,entry:p,enabled:b,isToggling:h,isRemoving:x,canRemove:y,isFirst:S,onPress:w,onToggleEnabled:C,onRemove:j}=e,{t:P}=(0,c.useTranslation)(),{theme:z}=(0,v.useUnistyles)();let R;l[0]!==u.id?(R=(0,_.getProviderIcon)(u.id),l[0]=u.id,l[1]=R):R=l[1];const D=R;let V;l[2]!==b||l[3]!==p.error||l[4]!==p.status?(V=b&&"error"===p.status&&"string"==typeof p.error&&p.error.trim().length>0?p.error.trim():null,l[2]=b,l[3]=p.error,l[4]=p.status,l[5]=V):V=l[5];const B=V,H=p.models?.length??0;let E;l[6]!==b||l[7]!==p.status||l[8]!==H||l[9]!==P?(E=L(p.status,b,H,P),l[6]=b,l[7]=p.status,l[8]=H,l[9]=P,l[10]=E):E=l[10];const U=E;let W;l[11]!==u.id||l[12]!==w?(W=()=>{w(u.id)},l[11]=u.id,l[12]=w,l[13]=W):W=l[13];const $=W;let A;l[14]!==u.id||l[15]!==C?(A=e=>{C(u.id,e)},l[14]=u.id,l[15]=C,l[16]=A):A=l[16];const q=A;let G;l[17]!==S?(G=e=>{const{pressed:t,hovered:n}=e;return[f.settingsStyles.row,!S&&f.settingsStyles.rowBorder,O.row,n&&O.rowHovered,t&&O.rowPressed]},l[17]=S,l[18]=G):G=l[18];const J=G;let K,N,Q;return l[19]!==u.label||l[20]!==P?(K=P("settings.providers.providerDetails",{name:u.label}),l[19]=u.label,l[20]=P,l[21]=K):K=l[21],l[22]!==D||l[23]!==y||l[24]!==u.id||l[25]!==u.label||l[26]!==b||l[27]!==q||l[28]!==x||l[29]!==h||l[30]!==j||l[31]!==B||l[32]!==U||l[33]!==P||l[34]!==z.colors.foreground||l[35]!==z.colors.foregroundMuted||l[36]!==z.colors.statusDanger||l[37]!==z.iconSize.md||l[38]!==z.iconSize.sm?(N=e=>{const{hovered:s}=e;return(0,M.jsxs)(M.Fragment,{children:[(0,M.jsxs)(t.View,{style:O.rowContent,children:[(0,M.jsx)(I.ChevronRight,{size:z.iconSize.sm,color:s?z.colors.foreground:z.colors.foregroundMuted}),(0,M.jsx)(D,{size:z.iconSize.md,color:z.colors.foreground}),(0,M.jsxs)(t.View,{style:O.textColumn,children:[(0,M.jsxs)(t.View,{style:O.titleRow,children:[(0,M.jsx)(n.Text,{style:f.settingsStyles.rowTitle,numberOfLines:1,children:u.label}),(0,M.jsx)(n.Text,{style:O.separator,children:"\xb7"}),(0,M.jsx)(F,{status:U})]}),B?(0,M.jsx)(n.Text,{style:O.errorText,numberOfLines:3,children:B}):null]})]}),(0,M.jsxs)(t.View,{style:O.trailingControls,children:[(0,M.jsx)(T.Switch,{value:b,onValueChange:q,disabled:h||x,accessibilityLabel:P("settings.providers.enableProvider",{name:u.label})}),y?(0,M.jsx)(k,{providerId:u.id,providerLabel:u.label,isRemoving:x,iconSize:z.iconSize.sm,foregroundColor:z.colors.foreground,foregroundMutedColor:z.colors.foregroundMuted,dangerColor:z.colors.statusDanger,onRemove:j}):null]})]})},l[22]=D,l[23]=y,l[24]=u.id,l[25]=u.label,l[26]=b,l[27]=q,l[28]=x,l[29]=h,l[30]=j,l[31]=B,l[32]=U,l[33]=P,l[34]=z.colors.foreground,l[35]=z.colors.foregroundMuted,l[36]=z.colors.statusDanger,l[37]=z.iconSize.md,l[38]=z.iconSize.sm,l[39]=N):N=l[39],l[40]!==$||l[41]!==J||l[42]!==K||l[43]!==N?(Q=(0,M.jsx)(s.Pressable,{style:J,onPress:$,accessibilityRole:"button",accessibilityLabel:K,children:N}),l[40]=$,l[41]=J,l[42]=K,l[43]=N,l[44]=Q):Q=l[44],Q}function E(e,t){switch(e){case"success":return t.colors.statusSuccess;case"warning":return t.colors.statusWarning;case"danger":return t.colors.statusDanger;default:return t.colors.foregroundMuted}}function F(e){const s=(0,o.c)(18),{status:l}=e,{t:u}=(0,c.useTranslation)(),{theme:p}=(0,v.useUnistyles)();let f,b;s[0]!==l.tone||s[1]!==p?(f=E(l.tone,p),s[0]=l.tone,s[1]=p,s[2]=f):f=s[2],s[3]!==f?(b=[O.statusDot,{backgroundColor:f}],s[3]=f,s[4]=b):b=s[4];const h=b;let x,y,S,w;return s[5]!==h||s[6]!==l.tone||s[7]!==p?(x="loading"===l.tone?(0,M.jsx)(j.LoadingSpinner,{size:10,color:p.colors.foregroundMuted}):(0,M.jsx)(t.View,{style:h}),s[5]=h,s[6]=l.tone,s[7]=p,s[8]=x):x=s[8],s[9]!==l.label?(y=(0,M.jsx)(n.Text,{style:O.statusLabel,children:l.label}),s[9]=l.label,s[10]=y):y=s[10],s[11]!==l.modelCount||s[12]!==u?(S=null!==l.modelCount?(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(n.Text,{style:O.separator,children:"\xb7"}),(0,M.jsx)(n.Text,{style:O.statusLabel,children:1===l.modelCount?u("settings.providers.models.one"):u("settings.providers.models.many",{count:l.modelCount})})]}):null,s[11]=l.modelCount,s[12]=u,s[13]=S):S=s[13],s[14]!==x||s[15]!==y||s[16]!==S?(w=(0,M.jsxs)(t.View,{style:O.statusRow,children:[x,y,S]}),s[14]=x,s[15]=y,s[16]=S,s[17]=w):w=s[17],w}const O=v.StyleSheet.create(e=>({sectionSpacing:{marginBottom:e.spacing[4],uni__dependencies:[0]},addProviderSection:{marginTop:e.spacing[4],uni__dependencies:[0]},emptyCard:{padding:e.spacing[4],alignItems:"center",uni__dependencies:[0]},emptyText:{color:e.colors.foregroundMuted,fontSize:e.fontSize.sm,uni__dependencies:[0]},row:{gap:e.spacing[3],minHeight:56,uni__dependencies:[0]},rowHovered:{backgroundColor:e.colors.surface2,uni__dependencies:[0]},rowPressed:{backgroundColor:e.colors.surface3,uni__dependencies:[0]},rowContent:{flex:1,flexDirection:"row",alignItems:"center",gap:e.spacing[2],uni__dependencies:[0]},textColumn:{flex:1,minWidth:0},titleRow:{flexDirection:"row",alignItems:"center",gap:e.spacing[2],uni__dependencies:[0]},statusRow:{flexDirection:"row",alignItems:"center",gap:e.spacing[1.5],uni__dependencies:[0]},statusDot:{width:8,height:8,borderRadius:4},statusLabel:{color:e.colors.foregroundMuted,fontSize:e.fontSize.sm,uni__dependencies:[0]},separator:{color:e.colors.foregroundMuted,fontSize:e.fontSize.sm,uni__dependencies:[0]},errorText:{color:e.colors.palette.red[300],fontSize:e.fontSize.xs,marginTop:e.spacing[1],uni__dependencies:[0]},trailingControls:{flexDirection:"row",alignItems:"center",gap:e.spacing[1],uni__dependencies:[0]},menuButton:{width:32,height:32,borderRadius:e.borderRadius.lg,alignItems:"center",justifyContent:"center",uni__dependencies:[0]},menuButtonHovered:{backgroundColor:e.colors.surface2,uni__dependencies:[0]},menuButtonPressed:{backgroundColor:e.colors.surface3,uni__dependencies:[0]}}))},4522,[348,711,1562,349,36,1563,1389,1308,234,146,56,3975,3367,3542,3974,3973,3976,4523,4524,3996,3573,4470,3621,4497,3978,3715,1590,279]);
16281
+ __d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.ProvidersSection=function({serverId:e}){const{t:s}=(0,c.useTranslation)(),o=(0,b.useHostRuntimeIsConnected)(e),u=(0,x.useHostFeature)(e,"providerRemoval"),{entries:v,isLoading:f,refresh:_}=(0,y.useProvidersSnapshot)(e),{patchConfig:T}=(0,S.useDaemonConfig)(e),P=(0,R.useProviderSettingsStore)(e=>e.open),[z,M]=(0,l.useState)(null),[V,k]=(0,l.useState)(null),F=(0,l.useRef)(null),[B,E]=(0,l.useState)(null),O=(0,l.useMemo)(()=>(0,w.buildProviderDefinitions)(v),[v]),W=e.length>0,$=(0,l.useCallback)(t=>{P({serverId:e,provider:t})},[P,e]),A=(0,l.useCallback)(async(e,t)=>{M(e);try{await T({providers:{[e]:{enabled:t}}})}catch(e){p.default.alert(s("settings.providers.updateErrorTitle"),e instanceof Error?e.message:String(e))}finally{M(t=>t===e?null:t)}},[T,s]),q=(0,l.useCallback)(async(e,t)=>{if(!F.current){F.current=e,k(e);try{if(!await(0,D.confirmDialog)({title:s("settings.providers.remove.confirmTitle",{name:t}),message:s("settings.providers.remove.confirmMessage"),confirmLabel:s("settings.providers.remove.confirm"),destructive:!0}))return;await T({removeProviders:[e]})}catch(e){p.default.alert(s("settings.providers.remove.errorTitle"),e instanceof Error?e.message:String(e))}finally{F.current===e&&(F.current=null),k(t=>t===e?null:t)}}},[T,s]),G=(0,l.useCallback)(async e=>{if(!B){E(e.id);try{await T((0,C.buildAcpProviderConfigPatch)(e)),await _([e.id])}catch(e){p.default.alert(s("settings.providers.addErrorTitle"),e instanceof Error?e.message:String(e))}finally{E(t=>t===e.id?null:t)}}},[B,T,_,s]);return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(I.SettingsSection,{title:s("settings.providers.title"),testID:"host-page-providers-card",style:U.sectionSpacing,children:[W&&o?null:(0,L.jsx)(t.View,{style:[h.settingsStyles.card,U.emptyCard],children:(0,L.jsx)(n.Text,{style:U.emptyText,children:s("settings.providers.unavailable")})}),W&&o&&f?(0,L.jsx)(t.View,{style:[h.settingsStyles.card,U.emptyCard],children:(0,L.jsx)(n.Text,{style:U.emptyText,children:s("settings.providers.loading")})}):null,W&&o&&!f&&O.length>0?(0,L.jsx)(t.View,{style:h.settingsStyles.card,children:O.map((e,t)=>{const n=v?.find(t=>t.provider===e.id);return n?(0,L.jsx)(H,{def:e,entry:n,enabled:n.enabled??!0,isToggling:z===e.id,isRemoving:V===e.id,canRemove:u&&"custom"===n.source,isFirst:0===t,onPress:$,onToggleEnabled:A,onRemove:q},e.id):null})}):null]}),W&&o?(0,L.jsx)(I.SettingsSection,{title:s("settings.providers.addProvider"),testID:"host-page-add-provider-card",style:U.addProviderSection,children:(0,L.jsx)(j.ProviderCatalogList,{serverId:e,installingProviderId:B,onInstall:G})}):null]})};var e,t=r(d[0]),n=r(d[1]),s=r(d[2]),o=r(d[3]),l=r(d[4]),c=r(d[5]),u=r(d[6]),p=(e=u)&&e.__esModule?e:{default:e};r(d[7]),r(d[8]),r(d[9]);var v=r(d[10]),f=r(d[11]),h=r(d[12]),b=r(d[13]),x=r(d[14]),y=r(d[15]),S=r(d[16]),w=r(d[17]),C=r(d[18]),j=r(d[19]),_=r(d[20]),T=r(d[21]),P=r(d[22]),z=r(d[23]),I=r(d[24]),R=r(d[25]),D=r(d[26]),M=r(d[27]),L=r(d[28]);function V(e,t,n,s){return t?"loading"===e?{tone:"loading",label:s("settings.providers.statuses.loading"),modelCount:null}:"error"===e?{tone:"danger",label:s("settings.providers.statuses.error"),modelCount:null}:"ready"===e?{tone:"success",label:s("settings.providers.statuses.available"),modelCount:n>0?n:null}:{tone:"warning",label:s("settings.providers.statuses.notInstalled"),modelCount:null}:{tone:"muted",label:s("settings.providers.statuses.disabled"),modelCount:null}}function k(e){e.stopPropagation()}function F(e){const t=(0,o.c)(32),{providerId:n,providerLabel:s,isRemoving:l,iconSize:u,foregroundColor:p,foregroundMutedColor:v,dangerColor:f,onRemove:h}=e,{t:b}=(0,c.useTranslation)();let x;t[0]!==h||t[1]!==n||t[2]!==s?(x=()=>{h(n,s)},t[0]=h,t[1]=n,t[2]=s,t[3]=x):x=t[3];const y=x,S=B;let w;t[4]!==f?(w=(0,L.jsx)(M.Trash2,{size:16,color:f}),t[4]=f,t[5]=w):w=t[5];const C=w;let j;t[6]!==s||t[7]!==b?(j=b("settings.providers.actions.menu",{name:s}),t[6]=s,t[7]=b,t[8]=j):j=t[8];const _=`provider-actions-${n}`;let T,P;t[9]!==p||t[10]!==v||t[11]!==u?(T=e=>{const{hovered:t,open:n}=e;return(0,L.jsx)(M.MoreHorizontal,{size:u,color:t||n?p:v})},t[9]=p,t[10]=v,t[11]=u,t[12]=T):T=t[12],t[13]!==l||t[14]!==j||t[15]!==_||t[16]!==T?(P=(0,L.jsx)(z.DropdownMenuTrigger,{disabled:l,hitSlop:8,onPressIn:k,style:S,accessibilityRole:"button",accessibilityLabel:j,testID:_,children:T}),t[13]=l,t[14]=j,t[15]=_,t[16]=T,t[17]=P):P=t[17];const I=l?"pending":"idle";let R;t[18]!==b?(R=b("settings.providers.actions.removing"),t[18]=b,t[19]=R):R=t[19];const D=`provider-remove-${n}`;let V,F,H;return t[20]!==b?(V=b("settings.providers.actions.remove"),t[20]=b,t[21]=V):V=t[21],t[22]!==y||t[23]!==V||t[24]!==I||t[25]!==R||t[26]!==D||t[27]!==C?(F=(0,L.jsx)(z.DropdownMenuContent,{align:"end",width:220,children:(0,L.jsx)(z.DropdownMenuItem,{destructive:!0,leading:C,onSelect:y,status:I,pendingLabel:R,testID:D,children:V})}),t[22]=y,t[23]=V,t[24]=I,t[25]=R,t[26]=D,t[27]=C,t[28]=F):F=t[28],t[29]!==F||t[30]!==P?(H=(0,L.jsxs)(z.DropdownMenu,{children:[P,F]}),t[29]=F,t[30]=P,t[31]=H):H=t[31],H}function B(e){const{pressed:t,hovered:n,open:s}=e;return[U.menuButton,(n||s)&&U.menuButtonHovered,t&&U.menuButtonPressed]}function H(e){const l=(0,o.c)(46),{def:u,entry:p,enabled:b,isToggling:x,isRemoving:y,canRemove:S,isFirst:w,onPress:C,onToggleEnabled:j,onRemove:T}=e,{t:z}=(0,c.useTranslation)(),{theme:I}=(0,v.useUnistyles)(),R=(0,f.useIsCompactFormFactor)();let D;l[0]!==u.id?(D=(0,_.getProviderIcon)(u.id),l[0]=u.id,l[1]=D):D=l[1];const k=D;let B;l[2]!==b||l[3]!==p.error||l[4]!==p.status?(B=b&&"error"===p.status&&"string"==typeof p.error&&p.error.trim().length>0?p.error.trim():null,l[2]=b,l[3]=p.error,l[4]=p.status,l[5]=B):B=l[5];const H=B,E=p.models?.length??0;let W;l[6]!==b||l[7]!==p.status||l[8]!==E||l[9]!==z?(W=V(p.status,b,E,z),l[6]=b,l[7]=p.status,l[8]=E,l[9]=z,l[10]=W):W=l[10];const $=W;let A;l[11]!==u.id||l[12]!==C?(A=()=>{C(u.id)},l[11]=u.id,l[12]=C,l[13]=A):A=l[13];const q=A;let G;l[14]!==u.id||l[15]!==j?(G=e=>{j(u.id,e)},l[14]=u.id,l[15]=j,l[16]=G):G=l[16];const J=G;let K;l[17]!==w?(K=e=>{const{pressed:t,hovered:n}=e;return[h.settingsStyles.row,!w&&h.settingsStyles.rowBorder,U.row,n&&U.rowHovered,t&&U.rowPressed]},l[17]=w,l[18]=K):K=l[18];const N=K;let Q,X,Y;return l[19]!==u.label||l[20]!==z?(Q=z("settings.providers.providerDetails",{name:u.label}),l[19]=u.label,l[20]=z,l[21]=Q):Q=l[21],l[22]!==k||l[23]!==S||l[24]!==u.id||l[25]!==u.label||l[26]!==b||l[27]!==J||l[28]!==R||l[29]!==y||l[30]!==x||l[31]!==T||l[32]!==H||l[33]!==$||l[34]!==z||l[35]!==I.colors.foreground||l[36]!==I.colors.foregroundMuted||l[37]!==I.colors.statusDanger||l[38]!==I.iconSize.md||l[39]!==I.iconSize.sm?(X=e=>{const{hovered:s}=e;return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(t.View,{style:U.rowContent,children:[(0,L.jsx)(M.ChevronRight,{size:I.iconSize.sm,color:s?I.colors.foreground:I.colors.foregroundMuted}),(0,L.jsx)(k,{size:I.iconSize.md,color:I.colors.foreground}),(0,L.jsxs)(t.View,{style:U.textColumn,children:[(0,L.jsxs)(t.View,{style:U.titleRow,children:[(0,L.jsx)(n.Text,{style:h.settingsStyles.rowTitle,numberOfLines:1,children:u.label}),R?null:(0,L.jsx)(n.Text,{style:U.separator,children:"\xb7"}),(0,L.jsx)(O,{status:$,compact:R})]}),H&&!R?(0,L.jsx)(n.Text,{style:U.errorText,numberOfLines:3,children:H}):null]})]}),(0,L.jsxs)(t.View,{style:U.trailingControls,children:[(0,L.jsx)(P.Switch,{value:b,onValueChange:J,disabled:x||y,accessibilityLabel:z("settings.providers.enableProvider",{name:u.label})}),(0,L.jsx)(t.View,{style:U.menuSlot,children:S?(0,L.jsx)(F,{providerId:u.id,providerLabel:u.label,isRemoving:y,iconSize:I.iconSize.sm,foregroundColor:I.colors.foreground,foregroundMutedColor:I.colors.foregroundMuted,dangerColor:I.colors.statusDanger,onRemove:T}):null})]})]})},l[22]=k,l[23]=S,l[24]=u.id,l[25]=u.label,l[26]=b,l[27]=J,l[28]=R,l[29]=y,l[30]=x,l[31]=T,l[32]=H,l[33]=$,l[34]=z,l[35]=I.colors.foreground,l[36]=I.colors.foregroundMuted,l[37]=I.colors.statusDanger,l[38]=I.iconSize.md,l[39]=I.iconSize.sm,l[40]=X):X=l[40],l[41]!==q||l[42]!==N||l[43]!==Q||l[44]!==X?(Y=(0,L.jsx)(s.Pressable,{style:N,onPress:q,accessibilityRole:"button",accessibilityLabel:Q,children:X}),l[41]=q,l[42]=N,l[43]=Q,l[44]=X,l[45]=Y):Y=l[45],Y}function E(e,t){switch(e){case"success":return t.colors.statusSuccess;case"warning":return t.colors.statusWarning;case"danger":return t.colors.statusDanger;default:return t.colors.foregroundMuted}}function O(e){const s=(0,o.c)(17),{status:l,compact:u}=e,{t:p}=(0,c.useTranslation)(),{theme:f}=(0,v.useUnistyles)();let h,b;s[0]!==l.tone||s[1]!==f?(h=E(l.tone,f),s[0]=l.tone,s[1]=f,s[2]=h):h=s[2],s[3]!==h?(b=[U.statusDot,{backgroundColor:h}],s[3]=h,s[4]=b):b=s[4];const x=b;let y,S,w;return s[5]!==x||s[6]!==l.tone||s[7]!==f?(y="loading"===l.tone?(0,L.jsx)(T.LoadingSpinner,{size:10,color:f.colors.foregroundMuted}):(0,L.jsx)(t.View,{style:x}),s[5]=x,s[6]=l.tone,s[7]=f,s[8]=y):y=s[8],s[9]!==u||s[10]!==l.label||s[11]!==l.modelCount||s[12]!==p?(S=u?null:(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(n.Text,{style:U.statusLabel,children:l.label}),null!==l.modelCount?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(n.Text,{style:U.separator,children:"\xb7"}),(0,L.jsx)(n.Text,{style:U.statusLabel,children:1===l.modelCount?p("settings.providers.models.one"):p("settings.providers.models.many",{count:l.modelCount})})]}):null]}),s[9]=u,s[10]=l.label,s[11]=l.modelCount,s[12]=p,s[13]=S):S=s[13],s[14]!==y||s[15]!==S?(w=(0,L.jsxs)(t.View,{style:U.statusRow,children:[y,S]}),s[14]=y,s[15]=S,s[16]=w):w=s[16],w}const U=v.StyleSheet.create(e=>({sectionSpacing:{marginBottom:e.spacing[4],uni__dependencies:[0]},addProviderSection:{marginTop:e.spacing[4],uni__dependencies:[0]},emptyCard:{padding:e.spacing[4],alignItems:"center",uni__dependencies:[0]},emptyText:{color:e.colors.foregroundMuted,fontSize:e.fontSize.sm,uni__dependencies:[0]},row:{gap:e.spacing[3],minHeight:56,uni__dependencies:[0]},rowHovered:{backgroundColor:e.colors.surface2,uni__dependencies:[0]},rowPressed:{backgroundColor:e.colors.surface3,uni__dependencies:[0]},rowContent:{flex:1,flexDirection:"row",alignItems:"center",gap:e.spacing[2],uni__dependencies:[0]},textColumn:{flex:1,minWidth:0},titleRow:{flexDirection:"row",alignItems:"center",gap:e.spacing[2],uni__dependencies:[0]},statusRow:{flexDirection:"row",alignItems:"center",gap:e.spacing[1.5],uni__dependencies:[0]},statusDot:{width:8,height:8,borderRadius:4},statusLabel:{color:e.colors.foregroundMuted,fontSize:e.fontSize.sm,uni__dependencies:[0]},separator:{color:e.colors.foregroundMuted,fontSize:e.fontSize.sm,uni__dependencies:[0]},errorText:{color:e.colors.palette.red[300],fontSize:e.fontSize.xs,marginTop:e.spacing[1],uni__dependencies:[0]},trailingControls:{flexDirection:"row",alignItems:"center",gap:e.spacing[1],uni__dependencies:[0]},menuButton:{width:32,height:32,borderRadius:e.borderRadius.lg,alignItems:"center",justifyContent:"center",uni__dependencies:[0]},menuSlot:{width:32,height:32},menuButtonHovered:{backgroundColor:e.colors.surface2,uni__dependencies:[0]},menuButtonPressed:{backgroundColor:e.colors.surface3,uni__dependencies:[0]}}))},4522,[348,711,1562,349,36,1563,1389,1308,234,146,56,3262,3975,3367,3542,3974,3973,3976,4523,4524,3996,3573,4470,3621,4497,3978,3715,1590,279]);
16282
16282
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.getAcpProviderCatalog=function(){return c.ACP_PROVIDER_CATALOG},e.buildAcpProviderConfigPatch=function(t){return{providers:{[t.id]:Object.assign({extends:"acp",label:t.title,description:t.description,command:[...t.command],env:t.env?Object.assign({},t.env):{}},t.params?{params:Object.assign({},t.params)}:{})}}},e.useAcpProviderCatalog=function(){const s=(0,t.c)(5),[o]=(0,n.useState)(c.ACP_PROVIDER_CATALOG);let u;s[0]!==o?(u=async()=>o,s[0]=o,s[1]=u):u=s[1];const l=u;let p;s[2]!==o||s[3]!==l?(p={entries:o,loading:!1,error:null,refetch:l},s[2]=o,s[3]=l,s[4]=p):p=s[4];return p};var t=r(d[0]),n=r(d[1]),c=r(d[2])},4523,[349,36,4004]);
16283
16283
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.ProviderCatalogList=function(t){const s=(0,l.c)(28),{serverId:p,installingProviderId:h,onInstall:f}=t,{t:x}=(0,u.useTranslation)(),{entries:v}=(0,_.useAcpProviderCatalog)(),{entries:C}=(0,y.useProvidersSnapshot)(p),[j,I]=(0,c.useState)("");let z;s[0]!==C?(z=new Set(C?.map(B)??[]),s[0]=C,s[1]=z):z=s[1];const L=z;let T;if(s[2]!==v||s[3]!==L||s[4]!==j){let n,t;s[6]!==L?(n=n=>!L.has(n.id),s[6]=L,s[7]=n):n=s[7],s[8]!==j?(t=n=>W(n,j),s[8]=j,s[9]=t):t=s[9],T=v.filter(n).filter(t),s[2]=v,s[3]=L,s[4]=j,s[5]=T}else T=s[5];const D=T;let U,F,O,E,H,A,X;s[10]===Symbol.for("react.memo_cache_sentinel")?(U=(0,S.jsx)(n.View,{style:M.searchIcon,children:(0,S.jsx)(k,{size:w,uniProps:R})}),s[10]=U):U=s[10];s[11]!==x?(F=x("providerCatalog.search"),s[11]=x,s[12]=F):F=s[12];s[13]!==x?(O=x("providerCatalog.search"),s[13]=x,s[14]=O):O=s[14];s[15]===Symbol.for("react.memo_cache_sentinel")?(E=[M.searchInput,b.isWeb&&{outlineStyle:"none"}],s[15]=E):E=s[15];s[16]!==j||s[17]!==F||s[18]!==O?(H=(0,S.jsxs)(n.View,{style:M.searchField,children:[U,(0,S.jsx)(P,{testID:"provider-catalog-search",value:j,onChangeText:I,accessibilityLabel:F,placeholder:O,style:E,autoCapitalize:"none",autoCorrect:!1})]}),s[16]=j,s[17]=F,s[18]=O,s[19]=H):H=s[19];s[20]!==D||s[21]!==h||s[22]!==f||s[23]!==x?(A=0===D.length?(0,S.jsx)(n.View,{style:M.stateBox,children:(0,S.jsx)(o.Text,{style:M.stateText,children:x("providerCatalog.noProviders")})}):(0,S.jsx)(n.View,{style:M.list,children:D.map(n=>(0,S.jsx)(V,{entry:n,installing:h===n.id,onInstall:f},n.id))}),s[20]=D,s[21]=h,s[22]=f,s[23]=x,s[24]=A):A=s[24];s[25]!==H||s[26]!==A?(X=(0,S.jsxs)(n.View,{children:[H,A]}),s[25]=H,s[26]=A,s[27]=X):X=s[27];return X};var n=r(d[0]),t=r(d[1]),o=r(d[2]),s=r(d[3]),l=r(d[4]),c=r(d[5]),u=r(d[6]);r(d[7]),r(d[8]),r(d[9]),r(d[10]);var p=r(d[11]),h=r(d[12]),f=r(d[13]),x=r(d[14]),b=r(d[15]),_=r(d[16]),y=r(d[17]),v=r(d[18]),S=r(d[19]);const w=16,C=20,j=24,I=(0,h.withUnistyles)(f.PackagePlus),z=(0,h.withUnistyles)(p.SvgXml),k=(0,h.withUnistyles)(f.Search),L=(0,h.withUnistyles)(f.ExternalLink),P=(0,h.withUnistyles)(t.TextInput,n=>({placeholderTextColor:n.colors.foregroundMuted})),T=n=>({color:n.colors.foreground}),R=n=>({color:n.colors.foregroundMuted});function W(n,t){const o=t.trim().toLowerCase();return!o||[n.title,n.id,n.description].some(n=>n.toLowerCase().includes(o))}function V(t){const c=(0,l.c)(44),{entry:p,installing:h,onInstall:f}=t,{t:b}=(0,u.useTranslation)();let _;c[0]!==h||c[1]!==b?(_=b(h?"providerCatalog.actions.adding":"providerCatalog.actions.add"),c[0]=h,c[1]=b,c[2]=_):_=c[2];const y=_;let w;c[3]!==p||c[4]!==f?(w=()=>{f(p)},c[3]=p,c[4]=f,c[5]=w):w=c[5];const k=w;let P;c[6]!==p.installLink?(P=()=>{(0,v.openExternalUrl)(p.installLink)},c[6]=p.installLink,c[7]=P):P=c[7];const W=P;let V,B,D,U;c[8]!==p.iconSvg?(V=(0,S.jsx)(n.View,{style:M.iconFrame,children:p.iconSvg?(0,S.jsx)(z,{xml:p.iconSvg,width:j,height:j,uniProps:T}):(0,S.jsx)(I,{size:C,uniProps:T})}),c[8]=p.iconSvg,c[9]=V):V=c[9],c[10]!==p.title?(B=(0,S.jsx)(o.Text,{style:M.name,numberOfLines:1,children:p.title}),c[10]=p.title,c[11]=B):B=c[11],c[12]!==p.version?(D=(0,S.jsx)(o.Text,{style:M.version,numberOfLines:1,children:p.version}),c[12]=p.version,c[13]=D):D=c[13],c[14]!==B||c[15]!==D?(U=(0,S.jsxs)(n.View,{style:M.titleRow,children:[B,D]}),c[14]=B,c[15]=D,c[16]=U):U=c[16];const F=p.description||p.id;let O,E,H,A,X,$,q;c[17]!==F?(O=(0,S.jsx)(o.Text,{style:M.description,numberOfLines:1,children:F}),c[17]=F,c[18]=O):O=c[18],c[19]!==p.title||c[20]!==b?(E=b("providerCatalog.actions.installInstructionsFor",{provider:p.title}),c[19]=p.title,c[20]=b,c[21]=E):E=c[21],c[22]!==b?(H=b("providerCatalog.actions.installInstructions"),c[22]=b,c[23]=H):H=c[23],c[24]!==H?(A=(0,S.jsx)(o.Text,{style:M.installLinkText,numberOfLines:1,children:H}),c[24]=H,c[25]=A):A=c[25],c[26]===Symbol.for("react.memo_cache_sentinel")?(X=(0,S.jsx)(L,{size:12,uniProps:R}),c[26]=X):X=c[26],c[27]!==W||c[28]!==E||c[29]!==A?($=(0,S.jsxs)(s.Pressable,{accessibilityRole:"link",accessibilityLabel:E,onPress:W,style:M.installLink,children:[A,X]}),c[27]=W,c[28]=E,c[29]=A,c[30]=$):$=c[30],c[31]!==$||c[32]!==U||c[33]!==O?(q=(0,S.jsxs)(n.View,{style:M.textColumn,children:[U,O,$]}),c[31]=$,c[32]=U,c[33]=O,c[34]=q):q=c[34];const G=`install-provider-${p.id}`;let J,K;return c[35]!==y||c[36]!==k||c[37]!==h||c[38]!==G?(J=(0,S.jsx)(x.Button,{size:"sm",variant:"default",disabled:h,loading:h,onPress:k,style:M.actionButton,testID:G,children:y}),c[35]=y,c[36]=k,c[37]=h,c[38]=G,c[39]=J):J=c[39],c[40]!==q||c[41]!==J||c[42]!==V?(K=(0,S.jsxs)(n.View,{style:M.row,children:[V,q,J]}),c[40]=q,c[41]=J,c[42]=V,c[43]=K):K=c[43],K}function B(n){return n.provider}const M=h.StyleSheet.create(n=>({searchField:{flexDirection:"row",alignItems:"center",gap:n.spacing[2],backgroundColor:n.colors.surface2,borderRadius:n.borderRadius.lg,borderWidth:1,borderColor:n.colors.border,paddingHorizontal:n.spacing[3],marginBottom:n.spacing[3],uni__dependencies:[0]},searchIcon:{width:18,alignItems:"center"},searchInput:{flex:1,minWidth:0,paddingVertical:n.spacing[3],color:n.colors.foreground,fontSize:n.fontSize.sm,uni__dependencies:[0]},list:{borderRadius:n.borderRadius.lg,borderWidth:1,borderColor:n.colors.border,overflow:"hidden",uni__dependencies:[0]},row:{flexDirection:"row",alignItems:"center",gap:n.spacing[3],padding:n.spacing[3],borderBottomWidth:1,borderBottomColor:n.colors.border,uni__dependencies:[0]},iconFrame:{width:36,height:36,borderRadius:n.borderRadius.md,backgroundColor:n.colors.surface2,alignItems:"center",justifyContent:"center",flexShrink:0,uni__dependencies:[0]},textColumn:{flex:1,minWidth:0,gap:n.spacing[1],uni__dependencies:[0]},titleRow:{flexDirection:"row",alignItems:"center",gap:n.spacing[2],minWidth:0,uni__dependencies:[0]},name:{color:n.colors.foreground,fontSize:n.fontSize.sm,fontWeight:n.fontWeight.medium,flexShrink:1,uni__dependencies:[0]},version:{color:n.colors.foregroundMuted,fontSize:n.fontSize.xs,flexShrink:0,uni__dependencies:[0]},description:{color:n.colors.foregroundMuted,fontSize:n.fontSize.xs,uni__dependencies:[0]},installLink:{alignSelf:"flex-start",flexDirection:"row",alignItems:"center",gap:n.spacing[1],maxWidth:"100%",uni__dependencies:[0]},installLinkText:{color:n.colors.foregroundMuted,fontSize:n.fontSize.xs,uni__dependencies:[0]},actionButton:{width:92,flexShrink:0},stateBox:{minHeight:96,borderRadius:n.borderRadius.lg,borderWidth:1,borderColor:n.colors.border,backgroundColor:n.colors.surface1,alignItems:"center",justifyContent:"center",gap:n.spacing[3],padding:n.spacing[4],uni__dependencies:[0]},stateText:{color:n.colors.foregroundMuted,fontSize:n.fontSize.sm,uni__dependencies:[0]}}))},4524,[348,714,711,1562,349,36,1563,1308,234,715,146,1594,56,1590,3672,3263,4523,3974,3571,279]);
16284
16284
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.ProviderUsageSettingsSection=function(t){const s=(0,n.c)(10),{view:l,onRefresh:c}=t,y="loading"===l.kind||"ready"===l.kind&&l.isRefreshing,h=y?f.providerUsageCopy.refreshing:f.providerUsageCopy.refresh;let C;s[0]!==y||s[1]!==c||s[2]!==h?(C=(0,u.jsx)(p.Button,{variant:"ghost",size:"sm",leftIcon:o.RefreshCw,loading:y,onPress:c,accessibilityLabel:f.providerUsageCopy.refresh,children:h}),s[0]=y,s[1]=c,s[2]=h,s[3]=C):C=s[3];const S=C;let _,j;s[4]!==c||s[5]!==l?(_=(0,u.jsx)(x,{view:l,onRefresh:c}),s[4]=c,s[5]=l,s[6]=_):_=s[6];s[7]!==S||s[8]!==_?(j=(0,u.jsx)(v.SettingsSection,{title:f.providerUsageCopy.title,testID:"provider-usage-card",trailing:S,children:_}),s[7]=S,s[8]=_,s[9]=j):j=s[9];return j};var t=r(d[0]),s=r(d[1]),n=r(d[2]),o=r(d[3]);r(d[4]),r(d[5]),r(d[6]);var l=r(d[7]),c=r(d[8]),p=r(d[9]),y=r(d[10]),v=r(d[11]),f=r(d[12]),h=r(d[13]),u=r(d[14]);function x(o){const l=(0,n.c)(9),{view:v,onRefresh:x}=o;if("loading"===v.kind){let n;return l[0]===Symbol.for("react.memo_cache_sentinel")?(n=(0,u.jsx)(t.View,{style:[y.settingsStyles.card,C.emptyCard],children:(0,u.jsx)(s.Text,{style:C.emptyText,children:f.providerUsageCopy.loading})}),l[0]=n):n=l[0],n}if("error"===v.kind){let t,s;return l[1]!==x?(t=(0,u.jsx)(p.Button,{variant:"outline",size:"sm",onPress:x,children:f.providerUsageCopy.retry}),l[1]=x,l[2]=t):t=l[2],l[3]!==t||l[4]!==v.message?(s=(0,u.jsx)(c.Alert,{variant:"error",title:f.providerUsageCopy.errorTitle,description:v.message,children:t}),l[3]=t,l[4]=v.message,l[5]=s):s=l[5],s}if(0===v.payload.providers.length){let n;return l[6]===Symbol.for("react.memo_cache_sentinel")?(n=(0,u.jsx)(t.View,{style:[y.settingsStyles.card,C.emptyCard],children:(0,u.jsx)(s.Text,{style:C.emptyText,children:f.providerUsageCopy.empty})}),l[6]=n):n=l[6],n}let S;return l[7]!==v.payload.providers?(S=(0,u.jsx)(h.ProviderUsageList,{providers:v.payload.providers}),l[7]=v.payload.providers,l[8]=S):S=l[8],S}const C=l.StyleSheet.create(t=>({emptyCard:{padding:t.spacing[4],alignItems:"center",uni__dependencies:[0]},emptyText:{color:t.colors.foregroundMuted,fontSize:t.fontSize.sm,uni__dependencies:[0]}}))},4525,[348,711,349,1590,36,234,146,56,4328,3672,3975,4497,4034,4526,279]);