@kaitranntt/ccs 7.73.0-dev.3 → 7.73.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/config/base-claude.settings.json +1 -1
- package/dist/ccs.js +13 -47
- package/dist/ccs.js.map +1 -1
- package/dist/cliproxy/account-safety.d.ts +0 -11
- package/dist/cliproxy/account-safety.d.ts.map +1 -1
- package/dist/cliproxy/account-safety.js +1 -114
- package/dist/cliproxy/account-safety.js.map +1 -1
- package/dist/cliproxy/binary-manager.d.ts +20 -0
- package/dist/cliproxy/binary-manager.d.ts.map +1 -1
- package/dist/cliproxy/binary-manager.js +95 -12
- package/dist/cliproxy/binary-manager.js.map +1 -1
- package/dist/cliproxy/executor/index.d.ts.map +1 -1
- package/dist/cliproxy/executor/index.js +25 -49
- package/dist/cliproxy/executor/index.js.map +1 -1
- package/dist/cliproxy/model-catalog.d.ts.map +1 -1
- package/dist/cliproxy/model-catalog.js +1 -15
- package/dist/cliproxy/model-catalog.js.map +1 -1
- package/dist/cliproxy/platform-detector.d.ts +10 -3
- package/dist/cliproxy/platform-detector.d.ts.map +1 -1
- package/dist/cliproxy/platform-detector.js +9 -2
- package/dist/cliproxy/platform-detector.js.map +1 -1
- package/dist/cliproxy/quota-manager.d.ts.map +1 -1
- package/dist/cliproxy/quota-manager.js +2 -25
- package/dist/cliproxy/quota-manager.js.map +1 -1
- package/dist/cliproxy/services/binary-service.d.ts.map +1 -1
- package/dist/cliproxy/services/binary-service.js +21 -7
- package/dist/cliproxy/services/binary-service.js.map +1 -1
- package/dist/cliproxy/services/variant-service.d.ts +2 -1
- package/dist/cliproxy/services/variant-service.d.ts.map +1 -1
- package/dist/cliproxy/services/variant-service.js +16 -18
- package/dist/cliproxy/services/variant-service.js.map +1 -1
- package/dist/cliproxy/types.d.ts +4 -2
- package/dist/cliproxy/types.d.ts.map +1 -1
- package/dist/cliproxy/types.js.map +1 -1
- package/dist/commands/browser-command.d.ts.map +1 -1
- package/dist/commands/browser-command.js +12 -243
- package/dist/commands/browser-command.js.map +1 -1
- package/dist/commands/cliproxy/help-subcommand.d.ts.map +1 -1
- package/dist/commands/cliproxy/help-subcommand.js +5 -1
- package/dist/commands/cliproxy/help-subcommand.js.map +1 -1
- package/dist/commands/cliproxy/index.d.ts.map +1 -1
- package/dist/commands/cliproxy/index.js +3 -7
- package/dist/commands/cliproxy/index.js.map +1 -1
- package/dist/commands/cliproxy/install-subcommand.js +1 -1
- package/dist/commands/cliproxy/install-subcommand.js.map +1 -1
- package/dist/commands/command-catalog.d.ts +1 -1
- package/dist/commands/command-catalog.d.ts.map +1 -1
- package/dist/commands/command-catalog.js +2 -4
- package/dist/commands/command-catalog.js.map +1 -1
- package/dist/commands/completion-backend.d.ts.map +1 -1
- package/dist/commands/completion-backend.js +0 -21
- package/dist/commands/completion-backend.js.map +1 -1
- package/dist/commands/proxy-command.d.ts +0 -1
- package/dist/commands/proxy-command.d.ts.map +1 -1
- package/dist/commands/proxy-command.js +23 -93
- package/dist/commands/proxy-command.js.map +1 -1
- package/dist/config/unified-config-loader.d.ts.map +1 -1
- package/dist/config/unified-config-loader.js +1 -10
- package/dist/config/unified-config-loader.js.map +1 -1
- package/dist/config/unified-config-types.d.ts +3 -13
- package/dist/config/unified-config-types.d.ts.map +1 -1
- package/dist/config/unified-config-types.js +3 -10
- package/dist/config/unified-config-types.js.map +1 -1
- package/dist/cursor/cursor-default-models.d.ts +1 -1
- package/dist/cursor/cursor-default-models.d.ts.map +1 -1
- package/dist/cursor/cursor-default-models.js +1 -11
- package/dist/cursor/cursor-default-models.js.map +1 -1
- package/dist/glmt/delta-accumulator.d.ts +0 -4
- package/dist/glmt/delta-accumulator.d.ts.map +1 -1
- package/dist/glmt/delta-accumulator.js +5 -17
- package/dist/glmt/delta-accumulator.js.map +1 -1
- package/dist/glmt/pipeline/stream-parser.d.ts +3 -0
- package/dist/glmt/pipeline/stream-parser.d.ts.map +1 -1
- package/dist/glmt/pipeline/stream-parser.js +27 -20
- package/dist/glmt/pipeline/stream-parser.js.map +1 -1
- package/dist/glmt/pipeline/tool-call-handler.d.ts +7 -0
- package/dist/glmt/pipeline/tool-call-handler.d.ts.map +1 -1
- package/dist/glmt/pipeline/tool-call-handler.js +24 -15
- package/dist/glmt/pipeline/tool-call-handler.js.map +1 -1
- package/dist/proxy/index.d.ts +0 -1
- package/dist/proxy/index.d.ts.map +1 -1
- package/dist/proxy/index.js +0 -1
- package/dist/proxy/index.js.map +1 -1
- package/dist/proxy/proxy-daemon-paths.d.ts +2 -5
- package/dist/proxy/proxy-daemon-paths.d.ts.map +1 -1
- package/dist/proxy/proxy-daemon-paths.js +5 -17
- package/dist/proxy/proxy-daemon-paths.js.map +1 -1
- package/dist/proxy/proxy-daemon-state.d.ts +5 -10
- package/dist/proxy/proxy-daemon-state.d.ts.map +1 -1
- package/dist/proxy/proxy-daemon-state.js +12 -81
- package/dist/proxy/proxy-daemon-state.js.map +1 -1
- package/dist/proxy/proxy-daemon.d.ts +3 -4
- package/dist/proxy/proxy-daemon.d.ts.map +1 -1
- package/dist/proxy/proxy-daemon.js +93 -351
- package/dist/proxy/proxy-daemon.js.map +1 -1
- package/dist/proxy/server/messages-route.d.ts.map +1 -1
- package/dist/proxy/server/messages-route.js +7 -2
- package/dist/proxy/server/messages-route.js.map +1 -1
- package/dist/proxy/server/proxy-server.d.ts.map +1 -1
- package/dist/proxy/server/proxy-server.js +23 -35
- package/dist/proxy/server/proxy-server.js.map +1 -1
- package/dist/proxy/transformers/request-transformer.d.ts.map +1 -1
- package/dist/proxy/transformers/request-transformer.js +16 -21
- package/dist/proxy/transformers/request-transformer.js.map +1 -1
- package/dist/targets/target-resolver.d.ts.map +1 -1
- package/dist/targets/target-resolver.js +0 -15
- package/dist/targets/target-resolver.js.map +1 -1
- package/dist/ui/assets/{accounts-DfkqFx14.js → accounts-BNSlujHd.js} +1 -1
- package/dist/ui/assets/{alert-dialog-BJ9GwHLZ.js → alert-dialog-DHK6l5WN.js} +1 -1
- package/dist/ui/assets/{api-BVo8Vm1B.js → api-Bixmu-o6.js} +1 -1
- package/dist/ui/assets/{auth-section-B-Ms1O_M.js → auth-section-BXHLEs4g.js} +1 -1
- package/dist/ui/assets/{backups-section-f8hvkPfH.js → backups-section-BWGX4IT_.js} +1 -1
- package/dist/ui/assets/{channels-Bgvry5fT.js → channels-Du6Q5wGz.js} +1 -1
- package/dist/ui/assets/{checkbox-CbI3Vbww.js → checkbox-CdduUSQP.js} +1 -1
- package/dist/ui/assets/{claude-extension-lDT7lp8C.js → claude-extension-D407M3LZ.js} +1 -1
- package/dist/ui/assets/{cliproxy-D50Owb9u.js → cliproxy-BcXcp3jL.js} +1 -1
- package/dist/ui/assets/{cliproxy-ai-providers-Cjrk90aJ.js → cliproxy-ai-providers-BRrCP6ap.js} +1 -1
- package/dist/ui/assets/{cliproxy-control-panel-DL8JoyKU.js → cliproxy-control-panel-_Yccw80J.js} +1 -1
- package/dist/ui/assets/{codex-B3bW7lzx.js → codex-C-Aq41_4.js} +1 -1
- package/dist/ui/assets/{confirm-dialog-Bm2Y3ArL.js → confirm-dialog-0poiyBAw.js} +1 -1
- package/dist/ui/assets/{copilot-CPLBRpFA.js → copilot-8xH7Nk9a.js} +1 -1
- package/dist/ui/assets/{cursor-D1xhqEEF.js → cursor-Dgg-ni59.js} +1 -1
- package/dist/ui/assets/{droid-DiFtSJkl.js → droid-CDpc1L0C.js} +1 -1
- package/dist/ui/assets/{globalenv-section-BadlR8mm.js → globalenv-section-CcdoEVNK.js} +1 -1
- package/dist/ui/assets/{health-Bxol1p1X.js → health-dj20C2Gn.js} +1 -1
- package/dist/ui/assets/{index-CXRoMyUA.js → index-B2ffORVS.js} +1 -1
- package/dist/ui/assets/index-BPjLIQ2v.js +1 -0
- package/dist/ui/assets/{index-BPCsEKJ8.js → index-CJgNAOTk.js} +1 -1
- package/dist/ui/assets/{index-CA4r5qY8.js → index-CQp8Tx8Q.js} +1 -1
- package/dist/ui/assets/{index-x07V45Iw.js → index-DJiXf8E8.js} +1 -1
- package/dist/ui/assets/{index-C2-J9AKi.js → index-DumrYfrM.js} +1 -1
- package/dist/ui/assets/{index-DM7Qb4kd.js → index-TR572mqL.js} +2 -2
- package/dist/ui/assets/{logs-kvpMF-pw.js → logs-qfToZXwm.js} +1 -1
- package/dist/ui/assets/{masked-input-CFQ05toP.js → masked-input-BMznu3pB.js} +1 -1
- package/dist/ui/assets/{proxy-status-widget-Df_-wCR0.js → proxy-status-widget-BaDK8Rtz.js} +1 -1
- package/dist/ui/assets/{raw-json-settings-editor-panel-DeWgWDSP.js → raw-json-settings-editor-panel-DgDt3Vlv.js} +1 -1
- package/dist/ui/assets/{searchable-select-CPbVBSoE.js → searchable-select-7ZDkhIXd.js} +1 -1
- package/dist/ui/assets/{separator--T-CzItG.js → separator-BjiPsa_I.js} +1 -1
- package/dist/ui/assets/{shared-Dx_5pa5N.js → shared-B-IiUz1s.js} +1 -1
- package/dist/ui/assets/{table-wE_LUUUQ.js → table-BrWMZ3pU.js} +1 -1
- package/dist/ui/assets/{updates-mWDqf-fm.js → updates-CxJ8al_e.js} +1 -1
- package/dist/ui/index.html +1 -1
- package/dist/utils/browser/browser-settings.d.ts +1 -9
- package/dist/utils/browser/browser-settings.d.ts.map +1 -1
- package/dist/utils/browser/browser-settings.js +37 -53
- package/dist/utils/browser/browser-settings.js.map +1 -1
- package/dist/utils/browser/browser-status.d.ts +5 -6
- package/dist/utils/browser/browser-status.d.ts.map +1 -1
- package/dist/utils/browser/browser-status.js +33 -83
- package/dist/utils/browser/browser-status.js.map +1 -1
- package/dist/utils/browser/index.d.ts +3 -7
- package/dist/utils/browser/index.d.ts.map +1 -1
- package/dist/utils/browser/index.js +1 -15
- package/dist/utils/browser/index.js.map +1 -1
- package/dist/utils/config-manager.d.ts +0 -5
- package/dist/utils/config-manager.d.ts.map +1 -1
- package/dist/utils/config-manager.js +3 -16
- package/dist/utils/config-manager.js.map +1 -1
- package/dist/web-server/model-pricing.d.ts.map +1 -1
- package/dist/web-server/model-pricing.js +0 -7
- package/dist/web-server/model-pricing.js.map +1 -1
- package/dist/web-server/routes/browser-routes.d.ts.map +1 -1
- package/dist/web-server/routes/browser-routes.js +10 -51
- package/dist/web-server/routes/browser-routes.js.map +1 -1
- package/dist/web-server/routes/cliproxy-stats-routes.d.ts +3 -5
- package/dist/web-server/routes/cliproxy-stats-routes.d.ts.map +1 -1
- package/dist/web-server/routes/cliproxy-stats-routes.js +3 -14
- package/dist/web-server/routes/cliproxy-stats-routes.js.map +1 -1
- package/dist/web-server/services/cliproxy-dashboard-install-service.d.ts.map +1 -1
- package/dist/web-server/services/cliproxy-dashboard-install-service.js +4 -2
- package/dist/web-server/services/cliproxy-dashboard-install-service.js.map +1 -1
- package/package.json +1 -1
- package/dist/proxy/proxy-port-resolver.d.ts +0 -7
- package/dist/proxy/proxy-port-resolver.d.ts.map +0 -1
- package/dist/proxy/proxy-port-resolver.js +0 -22
- package/dist/proxy/proxy-port-resolver.js.map +0 -1
- package/dist/ui/assets/index-BZYBDV6A.js +0 -1
- package/dist/utils/browser/browser-policy.d.ts +0 -22
- package/dist/utils/browser/browser-policy.d.ts.map +0 -1
- package/dist/utils/browser/browser-policy.js +0 -65
- package/dist/utils/browser/browser-policy.js.map +0 -1
- package/dist/utils/browser/browser-setup.d.ts +0 -21
- package/dist/utils/browser/browser-setup.d.ts.map +0 -1
- package/dist/utils/browser/browser-setup.js +0 -68
- package/dist/utils/browser/browser-setup.js.map +0 -1
- package/scripts/ensure-deps.sh +0 -18
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e}from"./radix-ui-Zb8sVEtn.js";import{L,r as c}from"./react-vendor-CNOkPC89.js";import{a as x,B as P,c as S,W as M,d as u,x as U,C,j as v,k as N,_ as w,b as j,n as b,I as B}from"./index-DM7Qb4kd.js";import{a1 as F,$ as z,b8 as W,x as H,E as Q,Q as G,aa as K,C as q,b9 as J,av as V}from"./icons-Dmi9qMuE.js";import"./tanstack-CrmUhA7Z.js";import"./notifications-B2HqRBj7.js";import"./utils-CzKF5WmX.js";import"./form-utils-Bcoyqxpq.js";import"./code-highlight-BRUf_pqB.js";const Y={new:"border-blue-200 bg-blue-50 text-blue-700 dark:border-blue-900/50 dark:bg-blue-900/20 dark:text-blue-300",stable:"border-green-200 bg-green-50 text-green-700 dark:border-green-900/50 dark:bg-green-900/20 dark:text-green-300",planned:"border-amber-200 bg-amber-50 text-amber-700 dark:border-amber-900/50 dark:bg-amber-900/20 dark:text-amber-300"};function Z({status:t,className:s}){const{t:r}=x(),i={new:r("updates.statusNew"),stable:r("updates.statusStable"),planned:r("updates.statusPlanned")};return e.jsx(P,{variant:"outline",className:S("font-medium",Y[t],s),children:i[t]})}const g={target:"Target CLI",cliproxy:"CLIProxy Provider","api-profiles":"API Profile",websearch:"WebSearch"},X=[{id:"codex-target-runtime-support",title:"Native Codex runtime support is live",summary:"Codex now participates as a first-class runtime target through ccs-codex, ccsx, ccsxp, or --target codex.",primaryAction:"Use Codex as a runtime target for native Codex sessions and Codex-routed CLIProxy flows.",publishedAt:"2026-03-28",status:"new",scopes:["target","cliproxy","api-profiles"],entryIds:["codex-target","codex-cliproxy"],highlights:["Use ccs-codex or ccsx for native Codex runs.","Use ccsxp for the built-in CCS Codex provider shortcut on native Codex.","Built-in Codex and Codex bridge profiles can run on native Codex with --target codex.","Saved default targets for API profiles and variants can now be claude, droid, or codex."],actions:[{id:"copy-codex-alias-command",label:"Open native Codex",description:"Launch Codex through the explicit CCS runtime alias.",type:"command",command:"ccs-codex"},{id:"copy-codex-provider-command",label:"Run built-in Codex on Codex",description:"Use the built-in Codex provider shortcut on native Codex.",type:"command",command:'ccsxp "your prompt"'},{id:"copy-codex-provider-command-explicit",label:"Run built-in Codex on Codex (explicit)",description:"Use the explicit built-in Codex provider route on native Codex.",type:"command",command:'ccs codex --target codex "your prompt"'},{id:"open-codex-dashboard",label:"Open Codex dashboard",description:"Review Codex runtime support, config layers, and dashboard setup flows.",type:"route",path:"/codex"}],routes:[{label:"Codex CLI",path:"/codex"}],commands:["ccs-codex","ccsx",'ccsxp "your prompt"','ccs codex --target codex "your prompt"']},{id:"droid-target-support",title:"Factory Droid support is live",summary:"API Profiles and CLIProxy variants now support Droid as a first-class execution target.",primaryAction:"Set Droid as your default execution target for non-Claude workflows.",publishedAt:"2026-02-25",status:"new",scopes:["target","api-profiles","cliproxy"],entryIds:["droid-target","custom-api-profiles","codex-cliproxy","agy-cliproxy"],highlights:["Set default target to Droid when creating or editing API Profiles.","Set default target to Droid for CLIProxy variants, including Codex and Antigravity flows.","Use ccs-droid as the explicit alias, with ccsd kept as the legacy shortcut."],actions:[{id:"open-api-profiles",label:"Set default target in API Profiles",description:"Open API Profiles and set Default Target to Droid for profiles you run often.",type:"route",path:"/providers"},{id:"open-cliproxy",label:"Set default target in CLIProxy variants",description:"Open CLIProxy variants and set target to Droid for Codex/Antigravity or custom variants.",type:"route",path:"/cliproxy"},{id:"copy-ccs-droid-command",label:"Run once with explicit Droid alias",description:"Use ccs-droid to force the Droid target with your current profile.",type:"command",command:"ccs-droid glm"},{id:"copy-target-override",label:"Run once with --target override",description:"Keep your default profile but force Droid for a single command.",type:"command",command:'ccs codex --target droid "your prompt"'}],routes:[{label:"API Profiles",path:"/providers"},{label:"CLIProxy",path:"/cliproxy"}],commands:["ccs-droid glm",'ccs codex --target droid "your prompt"',"ccs cliproxy create mycodex --provider codex --target droid"]},{id:"updates-center-launch",title:"Updates Center is available for rollout tasks",summary:"A focused Updates Center exists for setup tasks and rollout guidance when you need it.",primaryAction:"Use this page only when needed for rollout tasks, then return to your normal workflow.",publishedAt:"2026-02-25",status:"new",scopes:["target","cliproxy","api-profiles","websearch"],entryIds:["droid-target","codex-cliproxy","custom-api-profiles","opencode-websearch"],highlights:["Single data source powers update content and integration mapping.","Notices can be tracked as new, seen, done, or dismissed.","Catalog covers target CLI, CLIProxy providers, and WebSearch integrations."],actions:[{id:"open-updates-page",label:"Open Updates Center when needed",description:"Review rollout tasks only when you want guided setup changes.",type:"route",path:"/updates"},{id:"copy-open-dashboard",label:"Open dashboard from terminal",description:"Re-open config dashboard anytime from CLI.",type:"command",command:"ccs config"}],routes:[{label:"Updates Center",path:"/updates"}],commands:["ccs config"]}],ee=[{id:"claude-target",name:"Claude Code",scope:"target",status:"stable",summary:"Default runtime target for all CCS profile types.",pillars:{baseUrl:"From profile settings (ANTHROPIC_BASE_URL)",auth:"From profile settings (ANTHROPIC_AUTH_TOKEN)",model:"From profile settings (ANTHROPIC_MODEL)"},routes:[{label:"API Profiles",path:"/providers"},{label:"CLIProxy",path:"/cliproxy"}],commands:["ccs",'ccs glm "your prompt"']},{id:"droid-target",name:"Factory Droid",scope:"target",status:"new",summary:"First-class target for API Profiles and CLIProxy variants.",pillars:{baseUrl:"From profile or variant settings",auth:"From profile or variant settings",model:"From profile or variant settings"},routes:[{label:"API Profiles",path:"/providers"},{label:"CLIProxy",path:"/cliproxy"}],commands:["ccs-droid glm","ccs km --target droid","ccs codex --target droid"],notes:"Use ccs-droid as the explicit runtime alias. Legacy ccsd still works."},{id:"codex-target",name:"Codex CLI",scope:"target",status:"new",summary:"First-class runtime target for native Codex sessions and Codex-routed CLIProxy flows.",pillars:{baseUrl:"Native ~/.codex config for default mode, transient -c overrides for CCS-backed routes",auth:"Native Codex auth for default mode, env_key injection for CCS-backed routes",model:"Native Codex config or routed Codex model mapping from CLIProxy"},routes:[{label:"Codex CLI",path:"/codex"}],commands:["ccs-codex","ccsx","ccs codex --target codex","ccs codex-api --target codex"],notes:"Saved default targets for API profiles and CLIProxy variants can now be claude, droid, or codex."},{id:"codex-cliproxy",name:"Codex via CLIProxy",scope:"cliproxy",status:"stable",summary:"OAuth-backed provider with configurable variant model and a native Codex shortcut.",pillars:{baseUrl:"Managed by CLIProxy backend",auth:"OAuth account via CLIProxy auth flow",model:"Selectable per provider or variant"},routes:[{label:"CLIProxy",path:"/cliproxy"},{label:"Control Panel",path:"/cliproxy/control-panel"}],commands:['ccsxp "your prompt"',"ccs codex --target codex","ccs codex","ccs cliproxy create mycodex --provider codex","ccs api create codex-api --cliproxy-provider codex"],notes:"Use ccsxp when you want the built-in Codex provider on native Codex without retyping --target codex."},{id:"gemini-cliproxy",name:"Gemini via CLIProxy",scope:"cliproxy",status:"stable",summary:"OAuth-backed Gemini provider with multi-account management.",pillars:{baseUrl:"Managed by CLIProxy backend",auth:"OAuth account via CLIProxy auth flow",model:"Selectable per provider or variant"},routes:[{label:"CLIProxy",path:"/cliproxy"},{label:"Control Panel",path:"/cliproxy/control-panel"}],commands:["ccs gemini","ccs cliproxy create mygem --provider gemini"]},{id:"agy-cliproxy",name:"Antigravity via CLIProxy",scope:"cliproxy",status:"stable",summary:"OAuth-backed Antigravity provider with variant target controls.",pillars:{baseUrl:"Managed by CLIProxy backend",auth:"OAuth account via CLIProxy auth flow",model:"Selectable per provider or variant"},routes:[{label:"CLIProxy",path:"/cliproxy"},{label:"Control Panel",path:"/cliproxy/control-panel"}],commands:["ccs agy","ccs cliproxy create myagy --provider agy --target droid"]},{id:"custom-api-profiles",name:"Custom API Profiles",scope:"api-profiles",status:"stable",summary:"Any Anthropic-compatible endpoint with per-profile target and model mapping.",pillars:{baseUrl:"User-defined endpoint",auth:"User-defined token/key",model:"User-defined model identifier"},routes:[{label:"API Profiles",path:"/providers"}],commands:["ccs api create myprofile",'ccs myprofile "your prompt"']},{id:"opencode-websearch",name:"OpenCode WebSearch",scope:"websearch",status:"stable",summary:"WebSearch provider surfaced in Settings for third-party profile workflows.",pillars:{baseUrl:"Managed by OpenCode CLI integration",auth:"Provider-specific (managed externally)",model:"Configurable in WebSearch settings"},routes:[{label:"Settings",path:"/settings"}],commands:["ccs config",'ccs codex "your prompt"'],notes:"Enable OpenCode in Settings > WebSearch to activate fallback search."}];function l(t,s,r){return M.t(t,{defaultValue:s,...r})}function te(){return{target:l("supportCatalog.scope.target",g.target),cliproxy:l("supportCatalog.scope.cliproxy",g.cliproxy),"api-profiles":l("supportCatalog.scope.apiProfiles",g["api-profiles"]),websearch:l("supportCatalog.scope.websearch",g.websearch)}}function se(t){return{...t,title:l(`supportCatalog.notice.${t.id}.title`,t.title),summary:l(`supportCatalog.notice.${t.id}.summary`,t.summary),primaryAction:l(`supportCatalog.notice.${t.id}.primaryAction`,t.primaryAction),highlights:t.highlights.map((s,r)=>l(`supportCatalog.notice.${t.id}.highlight.${r}`,s)),actions:t.actions.map(s=>({...s,label:l(`supportCatalog.notice.${t.id}.action.${s.id}.label`,s.label),description:l(`supportCatalog.notice.${t.id}.action.${s.id}.description`,s.description)})),routes:t.routes.map((s,r)=>({...s,label:l(`supportCatalog.notice.${t.id}.route.${r}.label`,s.label)}))}}function re(t){return{...t,name:l(`supportCatalog.entry.${t.id}.name`,t.name),summary:l(`supportCatalog.entry.${t.id}.summary`,t.summary),pillars:{baseUrl:l(`supportCatalog.entry.${t.id}.pillar.baseUrl`,t.pillars.baseUrl),auth:l(`supportCatalog.entry.${t.id}.pillar.auth`,t.pillars.auth),model:l(`supportCatalog.entry.${t.id}.pillar.model`,t.pillars.model)},routes:t.routes.map((s,r)=>({...s,label:l(`supportCatalog.entry.${t.id}.route.${r}.label`,s.label)})),notes:t.notes?l(`supportCatalog.entry.${t.id}.notes`,t.notes):t.notes}}function ae(){return X.map(se)}function oe(){return ee.map(re)}function ie(t){const s=new Map(oe().map(r=>[r.id,r]));return t.entryIds.map(r=>s.get(r)).filter(r=>!!r)}function O(t){const s=new Date(`${t}T00:00:00Z`);return Number.isNaN(s.getTime())?t:new Intl.DateTimeFormat(void 0,{year:"numeric",month:"short",day:"numeric",timeZone:"UTC"}).format(s)}const $="ccs:updates:notice-progress:v1";function de(t){return t==="new"?"new":"seen"}function m(t,s){return s[t.id]??de(t.status)}function A(t){return t!=="done"&&t!=="dismissed"}function le(){if(typeof window>"u")return{};try{const t=window.localStorage.getItem($);if(!t)return{};const s=JSON.parse(t);if(!s||typeof s!="object"||Array.isArray(s))return{};const r={};for(const[i,d]of Object.entries(s))typeof i=="string"&&(d==="new"||d==="seen"||d==="done"||d==="dismissed")&&(r[i]=d);return r}catch{return{}}}function ne(t){typeof window>"u"||window.localStorage.setItem($,JSON.stringify(t))}function D({state:t,className:s}){const{t:r}=x(),i={new:{label:r("updates.progressNeedsAction"),className:"border-amber-300/70 bg-amber-100/70 text-amber-800 dark:border-amber-500/40 dark:bg-amber-500/15 dark:text-amber-300",showDot:!0},seen:{label:r("updates.progressInReview"),className:"border-blue-300/70 bg-blue-100/70 text-blue-800 dark:border-blue-500/40 dark:bg-blue-500/15 dark:text-blue-300"},done:{label:r("updates.progressDone"),className:"border-emerald-300/70 bg-emerald-100/70 text-emerald-800 dark:border-emerald-500/40 dark:bg-emerald-500/15 dark:text-emerald-300"},dismissed:{label:r("updates.progressDismissed"),className:"border-muted-foreground/20 bg-muted text-muted-foreground dark:border-muted-foreground/30"}}[t];return e.jsxs(P,{variant:"outline",className:S("gap-1.5 border text-[10px] font-medium",i.className,s),children:[i.showDot&&e.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-current"}),i.label]})}function ce({action:t}){const{t:s}=x();return e.jsxs("div",{className:"rounded-md border bg-muted/20 p-3",children:[e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{className:"min-w-0 space-y-0.5",children:[e.jsx("p",{className:"text-sm font-medium",children:t.label}),e.jsx("p",{className:"text-xs text-muted-foreground",children:t.description})]}),t.type==="route"&&t.path&&e.jsx(u,{size:"sm",asChild:!0,children:e.jsxs(L,{to:t.path,children:[s("updates.open"),e.jsx(F,{className:"h-3.5 w-3.5"})]})})]}),t.type==="command"&&t.command&&e.jsxs("div",{className:"mt-2 flex items-center gap-2 rounded-md border bg-background px-2 py-1.5",children:[e.jsx(z,{className:"h-3.5 w-3.5 text-muted-foreground"}),e.jsx("code",{className:"min-w-0 flex-1 truncate text-[11px]",children:t.command}),e.jsx(U,{value:t.command})]})]})}function pe({notice:t,progress:s,relatedEntries:r,onUpdateProgress:i}){const{t:d}=x(),f=te();return t?e.jsxs("div",{className:"flex-1 min-w-0 bg-background grid grid-rows-[auto_minmax(0,1fr)] overflow-hidden",children:[e.jsxs("div",{className:"border-b bg-background px-4 py-3",children:[e.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[e.jsxs("div",{className:"min-w-0 space-y-1",children:[e.jsx("h2",{className:"text-base font-semibold leading-tight",children:t.title}),e.jsx("p",{className:"text-sm text-muted-foreground",children:t.summary})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[s&&e.jsx(D,{state:s}),e.jsx(Z,{status:t.status})]})]}),e.jsxs("div",{className:"mt-2 flex flex-wrap items-center gap-2 text-xs text-muted-foreground",children:[e.jsx(W,{className:"h-3.5 w-3.5"}),e.jsx("span",{children:d("updates.published",{date:O(t.publishedAt)})})]}),e.jsxs("div",{className:"mt-3 flex flex-wrap gap-2",children:[e.jsxs(u,{size:"sm",onClick:()=>i("done"),children:[e.jsx(H,{className:"h-4 w-4"}),d("updates.markDone")]}),e.jsxs(u,{size:"sm",variant:"outline",onClick:()=>i("dismissed"),children:[e.jsx(Q,{className:"h-4 w-4"}),d("updates.dismiss")]}),e.jsxs(u,{size:"sm",variant:"ghost",onClick:()=>i("new"),children:[e.jsx(G,{className:"h-4 w-4"}),d("updates.reopen")]})]})]}),e.jsx("div",{className:"min-h-0 p-4",children:e.jsxs("div",{className:"grid h-full gap-4 xl:grid-cols-[minmax(0,1.5fr)_minmax(320px,1fr)] overflow-hidden",children:[e.jsxs(C,{className:"h-full overflow-hidden",children:[e.jsxs(v,{className:"pb-3",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(K,{className:"h-4 w-4 text-primary"}),e.jsx(N,{className:"text-base",children:d("updates.doNext")})]}),e.jsx(w,{children:t.primaryAction})]}),e.jsx(j,{className:"min-h-0",children:e.jsx(b,{className:"h-full pr-2",children:e.jsx("div",{className:"space-y-3",children:t.actions.map(o=>e.jsx(ce,{action:o},`${t.id}-${o.id}`))})})})]}),e.jsxs("div",{className:"grid h-full grid-rows-[minmax(0,1fr)_minmax(0,1fr)] gap-4 overflow-hidden",children:[e.jsxs(C,{className:"overflow-hidden",children:[e.jsxs(v,{className:"pb-3",children:[e.jsx(N,{className:"text-base",children:d("updates.impactedIntegrations")}),e.jsx(w,{children:d("updates.impactedDesc")})]}),e.jsx(j,{className:"min-h-0",children:e.jsx(b,{className:"h-full pr-2",children:e.jsx("div",{className:"space-y-2",children:r.map(o=>e.jsxs("div",{className:"rounded-md border bg-muted/20 p-2.5",children:[e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsx("p",{className:"min-w-0 truncate text-sm font-medium",children:o.name}),e.jsx(P,{variant:"outline",className:"h-5 px-1.5 text-[10px]",children:f[o.scope]})]}),e.jsxs("div",{className:"mt-2 flex items-center gap-2",children:[o.routes[0]&&e.jsx(u,{size:"sm",variant:"outline",asChild:!0,children:e.jsx(L,{to:o.routes[0].path,children:o.routes[0].label})}),o.commands[0]&&e.jsxs("div",{className:"ml-auto flex min-w-0 items-center gap-1.5",children:[e.jsx("code",{className:"truncate rounded bg-background px-1.5 py-0.5 text-[11px]",children:o.commands[0]}),e.jsx(U,{value:o.commands[0]})]})]})]},o.id))})})})]}),e.jsxs(C,{className:"overflow-hidden",children:[e.jsxs(v,{className:"pb-3",children:[e.jsx(N,{className:"text-base",children:d("updates.whyMatters")}),e.jsx(w,{children:d("updates.whyMattersDesc")})]}),e.jsx(j,{className:"min-h-0",children:e.jsx(b,{className:"h-full pr-2",children:e.jsx("ul",{className:"space-y-2 text-sm text-muted-foreground",children:t.highlights.map(o=>e.jsxs("li",{children:["- ",o]},`${t.id}-${o}`))})})})]})]})]})})]}):e.jsx("div",{className:"flex h-full items-center justify-center rounded-lg border border-dashed bg-muted/20 p-6",children:e.jsx("p",{className:"text-sm text-muted-foreground",children:d("updates.noUpdates")})})}function me({notice:t,progress:s,selected:r,onSelect:i}){return e.jsxs("button",{type:"button",onClick:i,className:S("w-full rounded-lg border px-3 py-3 text-left transition-colors",r?"border-primary/30 bg-primary/10":"border-transparent bg-background/40 hover:border-border hover:bg-muted/70"),children:[e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsxs("div",{className:"min-w-0 space-y-1",children:[e.jsx("p",{className:"truncate text-sm font-medium",children:t.title}),e.jsx("p",{className:"line-clamp-2 text-xs text-muted-foreground",children:t.primaryAction})]}),e.jsx(q,{className:"mt-0.5 h-4 w-4 shrink-0 text-muted-foreground"})]}),e.jsxs("div",{className:"mt-2 flex items-center justify-between gap-2",children:[e.jsx("span",{className:"text-[11px] text-muted-foreground",children:O(t.publishedAt)}),e.jsx(D,{state:s})]})]})}function ue(t,s){return s?[t.title,t.summary,t.primaryAction,...t.highlights,...t.commands,...t.actions.map(i=>`${i.label} ${i.description} ${i.command||""}`),...t.routes.map(i=>i.label)].join(" ").toLowerCase().includes(s):!0}function je(){const{t}=x(),s=[...ae()].sort((a,n)=>n.publishedAt.localeCompare(a.publishedAt)),[r,i]=c.useState("inbox"),[d,f]=c.useState(""),[o,I]=c.useState(()=>le()),[k,E]=c.useState(null);c.useEffect(()=>{ne(o)},[o]);const h=c.useMemo(()=>{const a=d.trim().toLowerCase();return s.filter(n=>{const y=m(n,o);return ue(n,a)?r==="done"?y==="done":r==="inbox"?A(y):!0:!1})},[s,o,d,r]),p=c.useMemo(()=>{const a=r==="all"?s:h;return a.find(n=>n.id===k)??a[0]??null},[s,k,r,h]),R=a=>{E(a.id),I(n=>m(a,n)!=="new"?n:{...n,[a.id]:"seen"})},T=c.useMemo(()=>s.filter(a=>A(m(a,o))).length,[s,o]),_=c.useMemo(()=>s.filter(a=>m(a,o)==="done").length,[s,o]);return e.jsxs("div",{className:"flex h-full min-h-0 overflow-hidden",children:[e.jsxs("div",{className:"w-80 border-r bg-muted/30 flex flex-col overflow-hidden",children:[e.jsxs("div",{className:"p-4 border-b bg-background space-y-3",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(J,{className:"h-5 w-5 text-primary"}),e.jsx("h1",{className:"font-semibold",children:t("updates.inboxTitle")})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:t("updates.inboxSubtitle")})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-2 text-xs",children:[e.jsxs("div",{className:"rounded-md border bg-background px-2 py-1.5",children:[e.jsx("p",{className:"text-muted-foreground",children:t("updates.needsAction")}),e.jsx("p",{className:"text-base font-semibold",children:T})]}),e.jsxs("div",{className:"rounded-md border bg-background px-2 py-1.5",children:[e.jsx("p",{className:"text-muted-foreground",children:t("updates.doneCount")}),e.jsx("p",{className:"text-base font-semibold",children:_})]})]}),e.jsxs("div",{className:"relative",children:[e.jsx(V,{className:"absolute left-2.5 top-2.5 h-4 w-4 text-muted-foreground"}),e.jsx(B,{value:d,onChange:a=>f(a.target.value),placeholder:t("updates.searchPlaceholder"),className:"h-9 pl-8"})]}),e.jsx("div",{className:"flex flex-wrap gap-1.5",children:[{id:"inbox",label:t("updates.actionRequired")},{id:"done",label:t("updates.done")},{id:"all",label:t("updates.all")}].map(a=>e.jsx(u,{size:"sm",variant:r===a.id?"default":"outline",onClick:()=>i(a.id),children:a.label},a.id))})]}),e.jsx(b,{className:"flex-1",children:e.jsx("div",{className:"space-y-2 p-2",children:h.length===0?e.jsx("div",{className:"rounded-md border border-dashed p-3 text-xs text-muted-foreground",children:t("updates.noNotices")}):h.map(a=>e.jsx(me,{notice:a,progress:m(a,o),selected:p?.id===a.id,onSelect:()=>R(a)},a.id))})})]}),e.jsx(pe,{notice:p,progress:p?m(p,o):null,relatedEntries:p?ie(p):[],onUpdateProgress:a=>{p&&I(n=>({...n,[p.id]:a}))}})]})}export{je as UpdatesPage};
|
|
1
|
+
import{j as e}from"./radix-ui-Zb8sVEtn.js";import{L,r as c}from"./react-vendor-CNOkPC89.js";import{a as x,B as P,c as S,W as M,d as u,x as U,C,j as v,k as N,_ as w,b as j,n as b,I as B}from"./index-TR572mqL.js";import{a1 as F,$ as z,b8 as W,x as H,E as Q,Q as G,aa as K,C as q,b9 as J,av as V}from"./icons-Dmi9qMuE.js";import"./tanstack-CrmUhA7Z.js";import"./notifications-B2HqRBj7.js";import"./utils-CzKF5WmX.js";import"./form-utils-Bcoyqxpq.js";import"./code-highlight-BRUf_pqB.js";const Y={new:"border-blue-200 bg-blue-50 text-blue-700 dark:border-blue-900/50 dark:bg-blue-900/20 dark:text-blue-300",stable:"border-green-200 bg-green-50 text-green-700 dark:border-green-900/50 dark:bg-green-900/20 dark:text-green-300",planned:"border-amber-200 bg-amber-50 text-amber-700 dark:border-amber-900/50 dark:bg-amber-900/20 dark:text-amber-300"};function Z({status:t,className:s}){const{t:r}=x(),i={new:r("updates.statusNew"),stable:r("updates.statusStable"),planned:r("updates.statusPlanned")};return e.jsx(P,{variant:"outline",className:S("font-medium",Y[t],s),children:i[t]})}const g={target:"Target CLI",cliproxy:"CLIProxy Provider","api-profiles":"API Profile",websearch:"WebSearch"},X=[{id:"codex-target-runtime-support",title:"Native Codex runtime support is live",summary:"Codex now participates as a first-class runtime target through ccs-codex, ccsx, ccsxp, or --target codex.",primaryAction:"Use Codex as a runtime target for native Codex sessions and Codex-routed CLIProxy flows.",publishedAt:"2026-03-28",status:"new",scopes:["target","cliproxy","api-profiles"],entryIds:["codex-target","codex-cliproxy"],highlights:["Use ccs-codex or ccsx for native Codex runs.","Use ccsxp for the built-in CCS Codex provider shortcut on native Codex.","Built-in Codex and Codex bridge profiles can run on native Codex with --target codex.","Saved default targets for API profiles and variants can now be claude, droid, or codex."],actions:[{id:"copy-codex-alias-command",label:"Open native Codex",description:"Launch Codex through the explicit CCS runtime alias.",type:"command",command:"ccs-codex"},{id:"copy-codex-provider-command",label:"Run built-in Codex on Codex",description:"Use the built-in Codex provider shortcut on native Codex.",type:"command",command:'ccsxp "your prompt"'},{id:"copy-codex-provider-command-explicit",label:"Run built-in Codex on Codex (explicit)",description:"Use the explicit built-in Codex provider route on native Codex.",type:"command",command:'ccs codex --target codex "your prompt"'},{id:"open-codex-dashboard",label:"Open Codex dashboard",description:"Review Codex runtime support, config layers, and dashboard setup flows.",type:"route",path:"/codex"}],routes:[{label:"Codex CLI",path:"/codex"}],commands:["ccs-codex","ccsx",'ccsxp "your prompt"','ccs codex --target codex "your prompt"']},{id:"droid-target-support",title:"Factory Droid support is live",summary:"API Profiles and CLIProxy variants now support Droid as a first-class execution target.",primaryAction:"Set Droid as your default execution target for non-Claude workflows.",publishedAt:"2026-02-25",status:"new",scopes:["target","api-profiles","cliproxy"],entryIds:["droid-target","custom-api-profiles","codex-cliproxy","agy-cliproxy"],highlights:["Set default target to Droid when creating or editing API Profiles.","Set default target to Droid for CLIProxy variants, including Codex and Antigravity flows.","Use ccs-droid as the explicit alias, with ccsd kept as the legacy shortcut."],actions:[{id:"open-api-profiles",label:"Set default target in API Profiles",description:"Open API Profiles and set Default Target to Droid for profiles you run often.",type:"route",path:"/providers"},{id:"open-cliproxy",label:"Set default target in CLIProxy variants",description:"Open CLIProxy variants and set target to Droid for Codex/Antigravity or custom variants.",type:"route",path:"/cliproxy"},{id:"copy-ccs-droid-command",label:"Run once with explicit Droid alias",description:"Use ccs-droid to force the Droid target with your current profile.",type:"command",command:"ccs-droid glm"},{id:"copy-target-override",label:"Run once with --target override",description:"Keep your default profile but force Droid for a single command.",type:"command",command:'ccs codex --target droid "your prompt"'}],routes:[{label:"API Profiles",path:"/providers"},{label:"CLIProxy",path:"/cliproxy"}],commands:["ccs-droid glm",'ccs codex --target droid "your prompt"',"ccs cliproxy create mycodex --provider codex --target droid"]},{id:"updates-center-launch",title:"Updates Center is available for rollout tasks",summary:"A focused Updates Center exists for setup tasks and rollout guidance when you need it.",primaryAction:"Use this page only when needed for rollout tasks, then return to your normal workflow.",publishedAt:"2026-02-25",status:"new",scopes:["target","cliproxy","api-profiles","websearch"],entryIds:["droid-target","codex-cliproxy","custom-api-profiles","opencode-websearch"],highlights:["Single data source powers update content and integration mapping.","Notices can be tracked as new, seen, done, or dismissed.","Catalog covers target CLI, CLIProxy providers, and WebSearch integrations."],actions:[{id:"open-updates-page",label:"Open Updates Center when needed",description:"Review rollout tasks only when you want guided setup changes.",type:"route",path:"/updates"},{id:"copy-open-dashboard",label:"Open dashboard from terminal",description:"Re-open config dashboard anytime from CLI.",type:"command",command:"ccs config"}],routes:[{label:"Updates Center",path:"/updates"}],commands:["ccs config"]}],ee=[{id:"claude-target",name:"Claude Code",scope:"target",status:"stable",summary:"Default runtime target for all CCS profile types.",pillars:{baseUrl:"From profile settings (ANTHROPIC_BASE_URL)",auth:"From profile settings (ANTHROPIC_AUTH_TOKEN)",model:"From profile settings (ANTHROPIC_MODEL)"},routes:[{label:"API Profiles",path:"/providers"},{label:"CLIProxy",path:"/cliproxy"}],commands:["ccs",'ccs glm "your prompt"']},{id:"droid-target",name:"Factory Droid",scope:"target",status:"new",summary:"First-class target for API Profiles and CLIProxy variants.",pillars:{baseUrl:"From profile or variant settings",auth:"From profile or variant settings",model:"From profile or variant settings"},routes:[{label:"API Profiles",path:"/providers"},{label:"CLIProxy",path:"/cliproxy"}],commands:["ccs-droid glm","ccs km --target droid","ccs codex --target droid"],notes:"Use ccs-droid as the explicit runtime alias. Legacy ccsd still works."},{id:"codex-target",name:"Codex CLI",scope:"target",status:"new",summary:"First-class runtime target for native Codex sessions and Codex-routed CLIProxy flows.",pillars:{baseUrl:"Native ~/.codex config for default mode, transient -c overrides for CCS-backed routes",auth:"Native Codex auth for default mode, env_key injection for CCS-backed routes",model:"Native Codex config or routed Codex model mapping from CLIProxy"},routes:[{label:"Codex CLI",path:"/codex"}],commands:["ccs-codex","ccsx","ccs codex --target codex","ccs codex-api --target codex"],notes:"Saved default targets for API profiles and CLIProxy variants can now be claude, droid, or codex."},{id:"codex-cliproxy",name:"Codex via CLIProxy",scope:"cliproxy",status:"stable",summary:"OAuth-backed provider with configurable variant model and a native Codex shortcut.",pillars:{baseUrl:"Managed by CLIProxy backend",auth:"OAuth account via CLIProxy auth flow",model:"Selectable per provider or variant"},routes:[{label:"CLIProxy",path:"/cliproxy"},{label:"Control Panel",path:"/cliproxy/control-panel"}],commands:['ccsxp "your prompt"',"ccs codex --target codex","ccs codex","ccs cliproxy create mycodex --provider codex","ccs api create codex-api --cliproxy-provider codex"],notes:"Use ccsxp when you want the built-in Codex provider on native Codex without retyping --target codex."},{id:"gemini-cliproxy",name:"Gemini via CLIProxy",scope:"cliproxy",status:"stable",summary:"OAuth-backed Gemini provider with multi-account management.",pillars:{baseUrl:"Managed by CLIProxy backend",auth:"OAuth account via CLIProxy auth flow",model:"Selectable per provider or variant"},routes:[{label:"CLIProxy",path:"/cliproxy"},{label:"Control Panel",path:"/cliproxy/control-panel"}],commands:["ccs gemini","ccs cliproxy create mygem --provider gemini"]},{id:"agy-cliproxy",name:"Antigravity via CLIProxy",scope:"cliproxy",status:"stable",summary:"OAuth-backed Antigravity provider with variant target controls.",pillars:{baseUrl:"Managed by CLIProxy backend",auth:"OAuth account via CLIProxy auth flow",model:"Selectable per provider or variant"},routes:[{label:"CLIProxy",path:"/cliproxy"},{label:"Control Panel",path:"/cliproxy/control-panel"}],commands:["ccs agy","ccs cliproxy create myagy --provider agy --target droid"]},{id:"custom-api-profiles",name:"Custom API Profiles",scope:"api-profiles",status:"stable",summary:"Any Anthropic-compatible endpoint with per-profile target and model mapping.",pillars:{baseUrl:"User-defined endpoint",auth:"User-defined token/key",model:"User-defined model identifier"},routes:[{label:"API Profiles",path:"/providers"}],commands:["ccs api create myprofile",'ccs myprofile "your prompt"']},{id:"opencode-websearch",name:"OpenCode WebSearch",scope:"websearch",status:"stable",summary:"WebSearch provider surfaced in Settings for third-party profile workflows.",pillars:{baseUrl:"Managed by OpenCode CLI integration",auth:"Provider-specific (managed externally)",model:"Configurable in WebSearch settings"},routes:[{label:"Settings",path:"/settings"}],commands:["ccs config",'ccs codex "your prompt"'],notes:"Enable OpenCode in Settings > WebSearch to activate fallback search."}];function l(t,s,r){return M.t(t,{defaultValue:s,...r})}function te(){return{target:l("supportCatalog.scope.target",g.target),cliproxy:l("supportCatalog.scope.cliproxy",g.cliproxy),"api-profiles":l("supportCatalog.scope.apiProfiles",g["api-profiles"]),websearch:l("supportCatalog.scope.websearch",g.websearch)}}function se(t){return{...t,title:l(`supportCatalog.notice.${t.id}.title`,t.title),summary:l(`supportCatalog.notice.${t.id}.summary`,t.summary),primaryAction:l(`supportCatalog.notice.${t.id}.primaryAction`,t.primaryAction),highlights:t.highlights.map((s,r)=>l(`supportCatalog.notice.${t.id}.highlight.${r}`,s)),actions:t.actions.map(s=>({...s,label:l(`supportCatalog.notice.${t.id}.action.${s.id}.label`,s.label),description:l(`supportCatalog.notice.${t.id}.action.${s.id}.description`,s.description)})),routes:t.routes.map((s,r)=>({...s,label:l(`supportCatalog.notice.${t.id}.route.${r}.label`,s.label)}))}}function re(t){return{...t,name:l(`supportCatalog.entry.${t.id}.name`,t.name),summary:l(`supportCatalog.entry.${t.id}.summary`,t.summary),pillars:{baseUrl:l(`supportCatalog.entry.${t.id}.pillar.baseUrl`,t.pillars.baseUrl),auth:l(`supportCatalog.entry.${t.id}.pillar.auth`,t.pillars.auth),model:l(`supportCatalog.entry.${t.id}.pillar.model`,t.pillars.model)},routes:t.routes.map((s,r)=>({...s,label:l(`supportCatalog.entry.${t.id}.route.${r}.label`,s.label)})),notes:t.notes?l(`supportCatalog.entry.${t.id}.notes`,t.notes):t.notes}}function ae(){return X.map(se)}function oe(){return ee.map(re)}function ie(t){const s=new Map(oe().map(r=>[r.id,r]));return t.entryIds.map(r=>s.get(r)).filter(r=>!!r)}function O(t){const s=new Date(`${t}T00:00:00Z`);return Number.isNaN(s.getTime())?t:new Intl.DateTimeFormat(void 0,{year:"numeric",month:"short",day:"numeric",timeZone:"UTC"}).format(s)}const $="ccs:updates:notice-progress:v1";function de(t){return t==="new"?"new":"seen"}function m(t,s){return s[t.id]??de(t.status)}function A(t){return t!=="done"&&t!=="dismissed"}function le(){if(typeof window>"u")return{};try{const t=window.localStorage.getItem($);if(!t)return{};const s=JSON.parse(t);if(!s||typeof s!="object"||Array.isArray(s))return{};const r={};for(const[i,d]of Object.entries(s))typeof i=="string"&&(d==="new"||d==="seen"||d==="done"||d==="dismissed")&&(r[i]=d);return r}catch{return{}}}function ne(t){typeof window>"u"||window.localStorage.setItem($,JSON.stringify(t))}function D({state:t,className:s}){const{t:r}=x(),i={new:{label:r("updates.progressNeedsAction"),className:"border-amber-300/70 bg-amber-100/70 text-amber-800 dark:border-amber-500/40 dark:bg-amber-500/15 dark:text-amber-300",showDot:!0},seen:{label:r("updates.progressInReview"),className:"border-blue-300/70 bg-blue-100/70 text-blue-800 dark:border-blue-500/40 dark:bg-blue-500/15 dark:text-blue-300"},done:{label:r("updates.progressDone"),className:"border-emerald-300/70 bg-emerald-100/70 text-emerald-800 dark:border-emerald-500/40 dark:bg-emerald-500/15 dark:text-emerald-300"},dismissed:{label:r("updates.progressDismissed"),className:"border-muted-foreground/20 bg-muted text-muted-foreground dark:border-muted-foreground/30"}}[t];return e.jsxs(P,{variant:"outline",className:S("gap-1.5 border text-[10px] font-medium",i.className,s),children:[i.showDot&&e.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-current"}),i.label]})}function ce({action:t}){const{t:s}=x();return e.jsxs("div",{className:"rounded-md border bg-muted/20 p-3",children:[e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{className:"min-w-0 space-y-0.5",children:[e.jsx("p",{className:"text-sm font-medium",children:t.label}),e.jsx("p",{className:"text-xs text-muted-foreground",children:t.description})]}),t.type==="route"&&t.path&&e.jsx(u,{size:"sm",asChild:!0,children:e.jsxs(L,{to:t.path,children:[s("updates.open"),e.jsx(F,{className:"h-3.5 w-3.5"})]})})]}),t.type==="command"&&t.command&&e.jsxs("div",{className:"mt-2 flex items-center gap-2 rounded-md border bg-background px-2 py-1.5",children:[e.jsx(z,{className:"h-3.5 w-3.5 text-muted-foreground"}),e.jsx("code",{className:"min-w-0 flex-1 truncate text-[11px]",children:t.command}),e.jsx(U,{value:t.command})]})]})}function pe({notice:t,progress:s,relatedEntries:r,onUpdateProgress:i}){const{t:d}=x(),f=te();return t?e.jsxs("div",{className:"flex-1 min-w-0 bg-background grid grid-rows-[auto_minmax(0,1fr)] overflow-hidden",children:[e.jsxs("div",{className:"border-b bg-background px-4 py-3",children:[e.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[e.jsxs("div",{className:"min-w-0 space-y-1",children:[e.jsx("h2",{className:"text-base font-semibold leading-tight",children:t.title}),e.jsx("p",{className:"text-sm text-muted-foreground",children:t.summary})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[s&&e.jsx(D,{state:s}),e.jsx(Z,{status:t.status})]})]}),e.jsxs("div",{className:"mt-2 flex flex-wrap items-center gap-2 text-xs text-muted-foreground",children:[e.jsx(W,{className:"h-3.5 w-3.5"}),e.jsx("span",{children:d("updates.published",{date:O(t.publishedAt)})})]}),e.jsxs("div",{className:"mt-3 flex flex-wrap gap-2",children:[e.jsxs(u,{size:"sm",onClick:()=>i("done"),children:[e.jsx(H,{className:"h-4 w-4"}),d("updates.markDone")]}),e.jsxs(u,{size:"sm",variant:"outline",onClick:()=>i("dismissed"),children:[e.jsx(Q,{className:"h-4 w-4"}),d("updates.dismiss")]}),e.jsxs(u,{size:"sm",variant:"ghost",onClick:()=>i("new"),children:[e.jsx(G,{className:"h-4 w-4"}),d("updates.reopen")]})]})]}),e.jsx("div",{className:"min-h-0 p-4",children:e.jsxs("div",{className:"grid h-full gap-4 xl:grid-cols-[minmax(0,1.5fr)_minmax(320px,1fr)] overflow-hidden",children:[e.jsxs(C,{className:"h-full overflow-hidden",children:[e.jsxs(v,{className:"pb-3",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(K,{className:"h-4 w-4 text-primary"}),e.jsx(N,{className:"text-base",children:d("updates.doNext")})]}),e.jsx(w,{children:t.primaryAction})]}),e.jsx(j,{className:"min-h-0",children:e.jsx(b,{className:"h-full pr-2",children:e.jsx("div",{className:"space-y-3",children:t.actions.map(o=>e.jsx(ce,{action:o},`${t.id}-${o.id}`))})})})]}),e.jsxs("div",{className:"grid h-full grid-rows-[minmax(0,1fr)_minmax(0,1fr)] gap-4 overflow-hidden",children:[e.jsxs(C,{className:"overflow-hidden",children:[e.jsxs(v,{className:"pb-3",children:[e.jsx(N,{className:"text-base",children:d("updates.impactedIntegrations")}),e.jsx(w,{children:d("updates.impactedDesc")})]}),e.jsx(j,{className:"min-h-0",children:e.jsx(b,{className:"h-full pr-2",children:e.jsx("div",{className:"space-y-2",children:r.map(o=>e.jsxs("div",{className:"rounded-md border bg-muted/20 p-2.5",children:[e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsx("p",{className:"min-w-0 truncate text-sm font-medium",children:o.name}),e.jsx(P,{variant:"outline",className:"h-5 px-1.5 text-[10px]",children:f[o.scope]})]}),e.jsxs("div",{className:"mt-2 flex items-center gap-2",children:[o.routes[0]&&e.jsx(u,{size:"sm",variant:"outline",asChild:!0,children:e.jsx(L,{to:o.routes[0].path,children:o.routes[0].label})}),o.commands[0]&&e.jsxs("div",{className:"ml-auto flex min-w-0 items-center gap-1.5",children:[e.jsx("code",{className:"truncate rounded bg-background px-1.5 py-0.5 text-[11px]",children:o.commands[0]}),e.jsx(U,{value:o.commands[0]})]})]})]},o.id))})})})]}),e.jsxs(C,{className:"overflow-hidden",children:[e.jsxs(v,{className:"pb-3",children:[e.jsx(N,{className:"text-base",children:d("updates.whyMatters")}),e.jsx(w,{children:d("updates.whyMattersDesc")})]}),e.jsx(j,{className:"min-h-0",children:e.jsx(b,{className:"h-full pr-2",children:e.jsx("ul",{className:"space-y-2 text-sm text-muted-foreground",children:t.highlights.map(o=>e.jsxs("li",{children:["- ",o]},`${t.id}-${o}`))})})})]})]})]})})]}):e.jsx("div",{className:"flex h-full items-center justify-center rounded-lg border border-dashed bg-muted/20 p-6",children:e.jsx("p",{className:"text-sm text-muted-foreground",children:d("updates.noUpdates")})})}function me({notice:t,progress:s,selected:r,onSelect:i}){return e.jsxs("button",{type:"button",onClick:i,className:S("w-full rounded-lg border px-3 py-3 text-left transition-colors",r?"border-primary/30 bg-primary/10":"border-transparent bg-background/40 hover:border-border hover:bg-muted/70"),children:[e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsxs("div",{className:"min-w-0 space-y-1",children:[e.jsx("p",{className:"truncate text-sm font-medium",children:t.title}),e.jsx("p",{className:"line-clamp-2 text-xs text-muted-foreground",children:t.primaryAction})]}),e.jsx(q,{className:"mt-0.5 h-4 w-4 shrink-0 text-muted-foreground"})]}),e.jsxs("div",{className:"mt-2 flex items-center justify-between gap-2",children:[e.jsx("span",{className:"text-[11px] text-muted-foreground",children:O(t.publishedAt)}),e.jsx(D,{state:s})]})]})}function ue(t,s){return s?[t.title,t.summary,t.primaryAction,...t.highlights,...t.commands,...t.actions.map(i=>`${i.label} ${i.description} ${i.command||""}`),...t.routes.map(i=>i.label)].join(" ").toLowerCase().includes(s):!0}function je(){const{t}=x(),s=[...ae()].sort((a,n)=>n.publishedAt.localeCompare(a.publishedAt)),[r,i]=c.useState("inbox"),[d,f]=c.useState(""),[o,I]=c.useState(()=>le()),[k,E]=c.useState(null);c.useEffect(()=>{ne(o)},[o]);const h=c.useMemo(()=>{const a=d.trim().toLowerCase();return s.filter(n=>{const y=m(n,o);return ue(n,a)?r==="done"?y==="done":r==="inbox"?A(y):!0:!1})},[s,o,d,r]),p=c.useMemo(()=>{const a=r==="all"?s:h;return a.find(n=>n.id===k)??a[0]??null},[s,k,r,h]),R=a=>{E(a.id),I(n=>m(a,n)!=="new"?n:{...n,[a.id]:"seen"})},T=c.useMemo(()=>s.filter(a=>A(m(a,o))).length,[s,o]),_=c.useMemo(()=>s.filter(a=>m(a,o)==="done").length,[s,o]);return e.jsxs("div",{className:"flex h-full min-h-0 overflow-hidden",children:[e.jsxs("div",{className:"w-80 border-r bg-muted/30 flex flex-col overflow-hidden",children:[e.jsxs("div",{className:"p-4 border-b bg-background space-y-3",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(J,{className:"h-5 w-5 text-primary"}),e.jsx("h1",{className:"font-semibold",children:t("updates.inboxTitle")})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:t("updates.inboxSubtitle")})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-2 text-xs",children:[e.jsxs("div",{className:"rounded-md border bg-background px-2 py-1.5",children:[e.jsx("p",{className:"text-muted-foreground",children:t("updates.needsAction")}),e.jsx("p",{className:"text-base font-semibold",children:T})]}),e.jsxs("div",{className:"rounded-md border bg-background px-2 py-1.5",children:[e.jsx("p",{className:"text-muted-foreground",children:t("updates.doneCount")}),e.jsx("p",{className:"text-base font-semibold",children:_})]})]}),e.jsxs("div",{className:"relative",children:[e.jsx(V,{className:"absolute left-2.5 top-2.5 h-4 w-4 text-muted-foreground"}),e.jsx(B,{value:d,onChange:a=>f(a.target.value),placeholder:t("updates.searchPlaceholder"),className:"h-9 pl-8"})]}),e.jsx("div",{className:"flex flex-wrap gap-1.5",children:[{id:"inbox",label:t("updates.actionRequired")},{id:"done",label:t("updates.done")},{id:"all",label:t("updates.all")}].map(a=>e.jsx(u,{size:"sm",variant:r===a.id?"default":"outline",onClick:()=>i(a.id),children:a.label},a.id))})]}),e.jsx(b,{className:"flex-1",children:e.jsx("div",{className:"space-y-2 p-2",children:h.length===0?e.jsx("div",{className:"rounded-md border border-dashed p-3 text-xs text-muted-foreground",children:t("updates.noNotices")}):h.map(a=>e.jsx(me,{notice:a,progress:m(a,o),selected:p?.id===a.id,onSelect:()=>R(a)},a.id))})})]}),e.jsx(pe,{notice:p,progress:p?m(p,o):null,relatedEntries:p?ie(p):[],onUpdateProgress:a=>{p&&I(n=>({...n,[p.id]:a}))}})]})}export{je as UpdatesPage};
|
package/dist/ui/index.html
CHANGED
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
href="https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600;700&display=swap"
|
|
25
25
|
rel="stylesheet"
|
|
26
26
|
/>
|
|
27
|
-
<script type="module" crossorigin src="/assets/index-
|
|
27
|
+
<script type="module" crossorigin src="/assets/index-TR572mqL.js"></script>
|
|
28
28
|
<link rel="modulepreload" crossorigin href="/assets/react-vendor-CNOkPC89.js">
|
|
29
29
|
<link rel="modulepreload" crossorigin href="/assets/radix-ui-Zb8sVEtn.js">
|
|
30
30
|
<link rel="modulepreload" crossorigin href="/assets/tanstack-CrmUhA7Z.js">
|
|
@@ -11,11 +11,7 @@ export interface EffectiveClaudeBrowserAttachConfig {
|
|
|
11
11
|
devtoolsPort: number;
|
|
12
12
|
hasExplicitDevtoolsPort: boolean;
|
|
13
13
|
}
|
|
14
|
-
export
|
|
15
|
-
darwin: string;
|
|
16
|
-
linux: string;
|
|
17
|
-
win32: string;
|
|
18
|
-
}
|
|
14
|
+
export declare function getRecommendedBrowserUserDataDir(): string;
|
|
19
15
|
export interface BrowserAttachRuntimeResolution {
|
|
20
16
|
runtimeEnv?: BrowserRuntimeEnv;
|
|
21
17
|
warning?: string;
|
|
@@ -31,11 +27,7 @@ export interface ManagedBrowserAttachNotReadyMessage {
|
|
|
31
27
|
nextStep: string;
|
|
32
28
|
warning: string;
|
|
33
29
|
}
|
|
34
|
-
export declare function getRecommendedBrowserUserDataDir(): string;
|
|
35
30
|
export declare function resolveBrowserUserDataDir(value?: string): string | undefined;
|
|
36
|
-
export declare function buildBrowserLaunchCommands(userDataDir: string, devtoolsPort: number): BrowserLaunchCommands;
|
|
37
|
-
export declare function isManagedClaudeBrowserAttachConfig(config: EffectiveClaudeBrowserAttachConfig): boolean;
|
|
38
|
-
export declare function buildManagedBrowserAttachSetupOptions(_config: EffectiveClaudeBrowserAttachConfig): string[];
|
|
39
31
|
export declare function ensureManagedBrowserUserDataDir(config: EffectiveClaudeBrowserAttachConfig): ManagedBrowserAttachBootstrap;
|
|
40
32
|
export declare function describeManagedBrowserAttachNotReady(config: EffectiveClaudeBrowserAttachConfig, errorMessage: string, options?: {
|
|
41
33
|
createdProfileDir?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browser-settings.d.ts","sourceRoot":"","sources":["../../../src/utils/browser/browser-settings.ts"],"names":[],"mappings":";;AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;
|
|
1
|
+
{"version":3,"file":"browser-settings.d.ts","sourceRoot":"","sources":["../../../src/utils/browser/browser-settings.ts"],"names":[],"mappings":";;AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAIvE,OAAO,EAAE,KAAK,iBAAiB,EAA4B,MAAM,gBAAgB,CAAC;AAElF,MAAM,MAAM,qBAAqB,GAAG,2BAA2B,GAAG,yBAAyB,CAAC;AAE5F,MAAM,WAAW,kCAAkC;IACjD,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,QAAQ,GAAG,qBAAqB,CAAC;IACzC,cAAc,EAAE,OAAO,CAAC;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,uBAAuB,EAAE,OAAO,CAAC;CAClC;AAED,wBAAgB,gCAAgC,IAAI,MAAM,CAEzD;AAED,MAAM,WAAW,8BAA8B;IAC7C,UAAU,CAAC,EAAE,iBAAiB,CAAC;IAC/B,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,6BAA6B;IAC5C,qBAAqB,EAAE,OAAO,CAAC;IAC/B,iBAAiB,EAAE,OAAO,CAAC;CAC5B;AAED,MAAM,WAAW,mCAAmC;IAClD,KAAK,EAAE,cAAc,GAAG,qBAAqB,GAAG,sBAAsB,CAAC;IACvE,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;CACjB;AAqBD,wBAAgB,yBAAyB,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAE5E;AAED,wBAAgB,+BAA+B,CAC7C,MAAM,EAAE,kCAAkC,GACzC,6BAA6B,CAoC/B;AAED,wBAAgB,oCAAoC,CAClD,MAAM,EAAE,kCAAkC,EAC1C,YAAY,EAAE,MAAM,EACpB,OAAO,GAAE;IACP,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,aAAa,CAAC,EAAE,MAAM,CAAC;CACnB,GACL,mCAAmC,GAAG,SAAS,CAkDjD;AAED,wBAAgB,wBAAwB,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG;IAC9E,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,qBAAqB,CAAC;CAChC,CAoBA;AAED,wBAAgB,qCAAqC,CACnD,MAAM,EAAE,aAAa,EACrB,GAAG,GAAE,MAAM,CAAC,UAAwB,GACnC,kCAAkC,CA4BpC;AAED,wBAAsB,mCAAmC,CACvD,MAAM,EAAE,kCAAkC,GACzC,OAAO,CAAC,8BAA8B,CAAC,CAoCzC"}
|
|
@@ -23,59 +23,38 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.resolveOptionalBrowserAttachRuntime = exports.getEffectiveClaudeBrowserAttachConfig = exports.getBrowserAttachOverride = exports.describeManagedBrowserAttachNotReady = exports.ensureManagedBrowserUserDataDir = exports.
|
|
26
|
+
exports.resolveOptionalBrowserAttachRuntime = exports.getEffectiveClaudeBrowserAttachConfig = exports.getBrowserAttachOverride = exports.describeManagedBrowserAttachNotReady = exports.ensureManagedBrowserUserDataDir = exports.resolveBrowserUserDataDir = exports.getRecommendedBrowserUserDataDir = void 0;
|
|
27
27
|
const fs = __importStar(require("fs"));
|
|
28
28
|
const path = __importStar(require("path"));
|
|
29
29
|
const config_manager_1 = require("../config-manager");
|
|
30
30
|
const helpers_1 = require("../helpers");
|
|
31
|
-
const chrome_reuse_1 = require("./chrome-reuse");
|
|
32
31
|
const platform_1 = require("./platform");
|
|
32
|
+
const chrome_reuse_1 = require("./chrome-reuse");
|
|
33
33
|
function getRecommendedBrowserUserDataDir() {
|
|
34
34
|
return path.join((0, config_manager_1.getCcsDir)(), 'browser', 'chrome-user-data');
|
|
35
35
|
}
|
|
36
36
|
exports.getRecommendedBrowserUserDataDir = getRecommendedBrowserUserDataDir;
|
|
37
|
-
function
|
|
38
|
-
return value?.trim() ? (0, helpers_1.expandPath)(value) : undefined;
|
|
39
|
-
}
|
|
40
|
-
exports.resolveBrowserUserDataDir = resolveBrowserUserDataDir;
|
|
41
|
-
function buildBrowserLaunchCommands(userDataDir, devtoolsPort) {
|
|
42
|
-
const quotedPath = JSON.stringify(userDataDir);
|
|
43
|
-
return {
|
|
44
|
-
darwin: `open -na "Google Chrome" --args --remote-debugging-port=${devtoolsPort} --user-data-dir=${quotedPath}`,
|
|
45
|
-
linux: `google-chrome --remote-debugging-port=${devtoolsPort} --user-data-dir=${quotedPath}`,
|
|
46
|
-
win32: `chrome.exe --remote-debugging-port=${devtoolsPort} --user-data-dir=${quotedPath}`,
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
exports.buildBrowserLaunchCommands = buildBrowserLaunchCommands;
|
|
50
|
-
function isManagedClaudeBrowserAttachConfig(config) {
|
|
37
|
+
function isManagedDefaultBrowserAttach(config) {
|
|
51
38
|
return (config.source === 'config' &&
|
|
52
39
|
path.resolve(config.userDataDir) === path.resolve(getRecommendedBrowserUserDataDir()));
|
|
53
40
|
}
|
|
54
|
-
exports.isManagedClaudeBrowserAttachConfig = isManagedClaudeBrowserAttachConfig;
|
|
55
41
|
function buildCurrentPlatformLaunchCommand(userDataDir, devtoolsPort) {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
return buildManagedBrowserActionLines();
|
|
42
|
+
const quotedPath = JSON.stringify(userDataDir);
|
|
43
|
+
switch ((0, platform_1.getNodePlatformKey)()) {
|
|
44
|
+
case 'darwin':
|
|
45
|
+
return `open -na "Google Chrome" --args --remote-debugging-port=${devtoolsPort} --user-data-dir=${quotedPath}`;
|
|
46
|
+
case 'win32':
|
|
47
|
+
return `chrome.exe --remote-debugging-port=${devtoolsPort} --user-data-dir=${quotedPath}`;
|
|
48
|
+
default:
|
|
49
|
+
return `google-chrome --remote-debugging-port=${devtoolsPort} --user-data-dir=${quotedPath}`;
|
|
50
|
+
}
|
|
66
51
|
}
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
return [
|
|
70
|
-
'Claude Browser Attach is not ready yet.',
|
|
71
|
-
` Managed user-data dir: ${(0, config_manager_1.getCcsPathDisplay)('browser', 'chrome-user-data')}`,
|
|
72
|
-
' CCS will continue without browser tools for this launch.',
|
|
73
|
-
'',
|
|
74
|
-
...buildManagedBrowserActionLines().map((line) => ` ${line}`),
|
|
75
|
-
].join('\n');
|
|
52
|
+
function resolveBrowserUserDataDir(value) {
|
|
53
|
+
return value?.trim() ? (0, helpers_1.expandPath)(value) : undefined;
|
|
76
54
|
}
|
|
55
|
+
exports.resolveBrowserUserDataDir = resolveBrowserUserDataDir;
|
|
77
56
|
function ensureManagedBrowserUserDataDir(config) {
|
|
78
|
-
if (!
|
|
57
|
+
if (!isManagedDefaultBrowserAttach(config)) {
|
|
79
58
|
return {
|
|
80
59
|
usesManagedDefaultDir: false,
|
|
81
60
|
createdProfileDir: false,
|
|
@@ -113,43 +92,45 @@ function ensureManagedBrowserUserDataDir(config) {
|
|
|
113
92
|
}
|
|
114
93
|
exports.ensureManagedBrowserUserDataDir = ensureManagedBrowserUserDataDir;
|
|
115
94
|
function describeManagedBrowserAttachNotReady(config, errorMessage, options = {}) {
|
|
116
|
-
if (!
|
|
95
|
+
if (!isManagedDefaultBrowserAttach(config)) {
|
|
117
96
|
return undefined;
|
|
118
97
|
}
|
|
119
98
|
const launchCommand = options.launchCommand ??
|
|
120
|
-
buildCurrentPlatformLaunchCommand(
|
|
121
|
-
const
|
|
122
|
-
...buildManagedBrowserActionLines(),
|
|
123
|
-
`Manual launch (${(0, platform_1.getNodePlatformKey)()}): ${launchCommand}`,
|
|
124
|
-
].join('\n');
|
|
99
|
+
buildCurrentPlatformLaunchCommand(config.userDataDir, config.devtoolsPort);
|
|
100
|
+
const continueWithoutTools = 'CCS will continue without browser tools until the attach session is ready.';
|
|
125
101
|
if (errorMessage.includes('Chrome reuse metadata')) {
|
|
126
102
|
const summary = options.createdProfileDir
|
|
127
|
-
?
|
|
128
|
-
:
|
|
103
|
+
? `CCS created the managed browser profile at ${config.userDataDir}, but no running attach-mode Chrome session is using it yet`
|
|
104
|
+
: `No running attach-mode Chrome session is using the managed browser profile at ${config.userDataDir}`;
|
|
105
|
+
const nextStep = `Start Chrome with remote debugging and the managed user-data dir. Example: ${launchCommand}`;
|
|
129
106
|
return {
|
|
130
107
|
state: 'browser_not_running',
|
|
131
|
-
title: 'Claude Browser Attach is
|
|
132
|
-
detail: `${summary} Diagnostic: ${errorMessage}`,
|
|
108
|
+
title: 'Claude Browser Attach is waiting for a managed Chrome session.',
|
|
109
|
+
detail: `${summary}. Diagnostic: ${errorMessage}`,
|
|
133
110
|
nextStep,
|
|
134
|
-
warning:
|
|
111
|
+
warning: `${summary}. ${nextStep} ${continueWithoutTools}`,
|
|
135
112
|
};
|
|
136
113
|
}
|
|
137
114
|
if (errorMessage.includes('Chrome DevTools endpoint')) {
|
|
115
|
+
const summary = `CCS could not reach the attach-mode DevTools endpoint for the managed browser profile at ${config.userDataDir}`;
|
|
116
|
+
const nextStep = `Restart Chrome in attach mode and retry. Example: ${launchCommand}`;
|
|
138
117
|
return {
|
|
139
118
|
state: 'endpoint_unreachable',
|
|
140
119
|
title: 'Claude Browser Attach could not reach the managed Chrome session.',
|
|
141
|
-
detail:
|
|
120
|
+
detail: `${summary}. Diagnostic: ${errorMessage}`,
|
|
142
121
|
nextStep,
|
|
143
|
-
warning:
|
|
122
|
+
warning: `${summary}. ${nextStep} ${continueWithoutTools}`,
|
|
144
123
|
};
|
|
145
124
|
}
|
|
146
125
|
if (errorMessage.includes('Chrome profile directory is invalid')) {
|
|
126
|
+
const summary = `CCS could not initialize the managed browser profile at ${config.userDataDir}`;
|
|
127
|
+
const nextStep = `Confirm the path is writable or reset it to the CCS-managed default, then launch Chrome in attach mode. Example: ${launchCommand}`;
|
|
147
128
|
return {
|
|
148
129
|
state: 'path_missing',
|
|
149
130
|
title: 'Claude Browser Attach could not initialize the managed profile.',
|
|
150
|
-
detail:
|
|
131
|
+
detail: `${summary}. Diagnostic: ${errorMessage}`,
|
|
151
132
|
nextStep,
|
|
152
|
-
warning:
|
|
133
|
+
warning: `${summary}. ${nextStep} ${continueWithoutTools}`,
|
|
153
134
|
};
|
|
154
135
|
}
|
|
155
136
|
return undefined;
|
|
@@ -195,6 +176,9 @@ function getEffectiveClaudeBrowserAttachConfig(config, env = process.env) {
|
|
|
195
176
|
overrideActive: false,
|
|
196
177
|
userDataDir: configUserDataDir,
|
|
197
178
|
devtoolsPort: configPort,
|
|
179
|
+
// Config-backed browser attach always keeps an explicit port so launches
|
|
180
|
+
// stay aligned with Settings > Browser, even when the effective value is
|
|
181
|
+
// the default 9222.
|
|
198
182
|
hasExplicitDevtoolsPort: true,
|
|
199
183
|
};
|
|
200
184
|
}
|
|
@@ -206,7 +190,7 @@ async function resolveOptionalBrowserAttachRuntime(config) {
|
|
|
206
190
|
const bootstrap = ensureManagedBrowserUserDataDir(config);
|
|
207
191
|
if (bootstrap.createdProfileDir) {
|
|
208
192
|
return {
|
|
209
|
-
warning:
|
|
193
|
+
warning: describeManagedBrowserAttachNotReady(config, `Chrome reuse metadata not found: ${path.join(config.userDataDir, 'DevToolsActivePort')}`, { createdProfileDir: true })?.warning,
|
|
210
194
|
};
|
|
211
195
|
}
|
|
212
196
|
try {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browser-settings.js","sourceRoot":"","sources":["../../../src/utils/browser/browser-settings.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAyB;AACzB,2CAA6B;AAE7B,
|
|
1
|
+
{"version":3,"file":"browser-settings.js","sourceRoot":"","sources":["../../../src/utils/browser/browser-settings.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import type { BrowserConfig, BrowserToolPolicy } from '../../config/unified-config-types';
|
|
2
1
|
import { type BrowserRuntimeEnv } from './chrome-reuse';
|
|
3
|
-
|
|
2
|
+
export interface BrowserLaunchCommands {
|
|
3
|
+
darwin: string;
|
|
4
|
+
linux: string;
|
|
5
|
+
win32: string;
|
|
6
|
+
}
|
|
4
7
|
export interface ClaudeBrowserStatus {
|
|
5
8
|
enabled: boolean;
|
|
6
|
-
policy: BrowserToolPolicy;
|
|
7
9
|
source: 'config' | 'CCS_BROWSER_USER_DATA_DIR' | 'CCS_BROWSER_PROFILE_DIR';
|
|
8
10
|
overrideActive: boolean;
|
|
9
11
|
state: 'disabled' | 'path_missing' | 'browser_not_running' | 'endpoint_unreachable' | 'ready';
|
|
@@ -20,7 +22,6 @@ export interface ClaudeBrowserStatus {
|
|
|
20
22
|
}
|
|
21
23
|
export interface CodexBrowserStatus {
|
|
22
24
|
enabled: boolean;
|
|
23
|
-
policy: BrowserToolPolicy;
|
|
24
25
|
state: 'disabled' | 'enabled' | 'unsupported_build';
|
|
25
26
|
title: string;
|
|
26
27
|
detail: string;
|
|
@@ -35,6 +36,4 @@ export interface BrowserStatusPayload {
|
|
|
35
36
|
codex: CodexBrowserStatus;
|
|
36
37
|
}
|
|
37
38
|
export declare function getBrowserStatus(): Promise<BrowserStatusPayload>;
|
|
38
|
-
export declare function getUserFacingBrowserConfig(): BrowserConfig;
|
|
39
|
-
export declare function getManagedBrowserSetupHint(): string;
|
|
40
39
|
//# sourceMappingURL=browser-status.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browser-status.d.ts","sourceRoot":"","sources":["../../../src/utils/browser/browser-status.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"browser-status.d.ts","sourceRoot":"","sources":["../../../src/utils/browser/browser-status.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,iBAAiB,EAA4B,MAAM,gBAAgB,CAAC;AAUlF,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,QAAQ,GAAG,2BAA2B,GAAG,yBAAyB,CAAC;IAC3E,cAAc,EAAE,OAAO,CAAC;IACxB,KAAK,EAAE,UAAU,GAAG,cAAc,GAAG,qBAAqB,GAAG,sBAAsB,GAAG,OAAO,CAAC;IAC9F,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,sBAAsB,EAAE,MAAM,CAAC;IAC/B,YAAY,EAAE,MAAM,CAAC;IACrB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,oBAAoB,EAAE,MAAM,CAAC;IAC7B,cAAc,EAAE,qBAAqB,CAAC;IACtC,UAAU,CAAC,EAAE,iBAAiB,CAAC;CAChC;AAED,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,UAAU,GAAG,SAAS,GAAG,mBAAmB,CAAC;IACpD,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,uBAAuB,EAAE,OAAO,CAAC;IACjC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,mBAAmB,CAAC;IAC5B,KAAK,EAAE,kBAAkB,CAAC;CAC3B;AAED,wBAAsB,gBAAgB,IAAI,OAAO,CAAC,oBAAoB,CAAC,CAMtE"}
|
|
@@ -23,63 +23,28 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.
|
|
26
|
+
exports.getBrowserStatus = void 0;
|
|
27
27
|
const path = __importStar(require("path"));
|
|
28
28
|
const unified_config_loader_1 = require("../../config/unified-config-loader");
|
|
29
|
-
const config_manager_1 = require("../config-manager");
|
|
30
29
|
const codex_detector_1 = require("../../targets/codex-detector");
|
|
31
30
|
const chrome_reuse_1 = require("./chrome-reuse");
|
|
32
31
|
const mcp_installer_1 = require("./mcp-installer");
|
|
33
32
|
const platform_1 = require("./platform");
|
|
34
33
|
const browser_settings_1 = require("./browser-settings");
|
|
35
34
|
async function getBrowserStatus() {
|
|
36
|
-
const browserConfig =
|
|
35
|
+
const browserConfig = (0, unified_config_loader_1.getBrowserConfig)();
|
|
37
36
|
return {
|
|
38
37
|
claude: await buildClaudeBrowserStatus(browserConfig),
|
|
39
38
|
codex: buildCodexBrowserStatus(browserConfig),
|
|
40
39
|
};
|
|
41
40
|
}
|
|
42
41
|
exports.getBrowserStatus = getBrowserStatus;
|
|
43
|
-
function
|
|
44
|
-
return policy === 'auto' || policy === 'manual' ? policy : 'manual';
|
|
45
|
-
}
|
|
46
|
-
function getUserFacingBrowserConfig() {
|
|
47
|
-
const canonical = (0, unified_config_loader_1.getBrowserConfig)();
|
|
48
|
-
const persisted = (0, unified_config_loader_1.loadUnifiedConfig)()?.browser;
|
|
49
|
-
if (!persisted) {
|
|
50
|
-
return {
|
|
51
|
-
claude: {
|
|
52
|
-
...canonical.claude,
|
|
53
|
-
enabled: false,
|
|
54
|
-
policy: 'manual',
|
|
55
|
-
},
|
|
56
|
-
codex: {
|
|
57
|
-
...canonical.codex,
|
|
58
|
-
enabled: false,
|
|
59
|
-
policy: 'manual',
|
|
60
|
-
},
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
return {
|
|
64
|
-
claude: {
|
|
65
|
-
...canonical.claude,
|
|
66
|
-
enabled: persisted.claude?.enabled ?? false,
|
|
67
|
-
policy: resolveSafeBrowserPolicy(persisted.claude?.policy),
|
|
68
|
-
},
|
|
69
|
-
codex: {
|
|
70
|
-
...canonical.codex,
|
|
71
|
-
enabled: persisted.codex?.enabled ?? false,
|
|
72
|
-
policy: resolveSafeBrowserPolicy(persisted.codex?.policy),
|
|
73
|
-
},
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
|
-
exports.getUserFacingBrowserConfig = getUserFacingBrowserConfig;
|
|
77
|
-
async function buildClaudeBrowserStatus(browserConfig = getUserFacingBrowserConfig()) {
|
|
42
|
+
async function buildClaudeBrowserStatus(browserConfig = (0, unified_config_loader_1.getBrowserConfig)()) {
|
|
78
43
|
const effective = (0, browser_settings_1.getEffectiveClaudeBrowserAttachConfig)(browserConfig);
|
|
79
|
-
const launchCommands = (
|
|
44
|
+
const launchCommands = buildLaunchCommands(effective.userDataDir, effective.devtoolsPort);
|
|
45
|
+
const managedBootstrap = (0, browser_settings_1.ensureManagedBrowserUserDataDir)(effective);
|
|
80
46
|
const base = {
|
|
81
47
|
enabled: effective.enabled,
|
|
82
|
-
policy: browserConfig.claude.policy,
|
|
83
48
|
source: effective.source,
|
|
84
49
|
overrideActive: effective.overrideActive,
|
|
85
50
|
effectiveUserDataDir: effective.userDataDir,
|
|
@@ -94,23 +59,22 @@ async function buildClaudeBrowserStatus(browserConfig = getUserFacingBrowserConf
|
|
|
94
59
|
...base,
|
|
95
60
|
state: 'disabled',
|
|
96
61
|
title: 'Claude Browser Attach is disabled.',
|
|
97
|
-
detail: 'CCS
|
|
98
|
-
nextStep:
|
|
62
|
+
detail: 'CCS will not provision the managed browser MCP runtime for Claude launches until this lane is enabled.',
|
|
63
|
+
nextStep: 'Enable Claude Browser Attach in Settings > Browser or in ~/.ccs/config.yaml, then rerun `ccs browser doctor`.',
|
|
99
64
|
};
|
|
100
65
|
}
|
|
101
|
-
const managedBootstrap = (0, browser_settings_1.ensureManagedBrowserUserDataDir)(effective);
|
|
102
66
|
if (managedBootstrap.createdProfileDir) {
|
|
103
|
-
const
|
|
67
|
+
const managedDefaultMessage = (0, browser_settings_1.describeManagedBrowserAttachNotReady)(effective, `Chrome reuse metadata not found: ${path.join(effective.userDataDir, 'DevToolsActivePort')}`, {
|
|
104
68
|
createdProfileDir: true,
|
|
105
69
|
launchCommand: launchCommands[(0, platform_1.getNodePlatformKey)()],
|
|
106
70
|
});
|
|
107
|
-
if (
|
|
71
|
+
if (managedDefaultMessage) {
|
|
108
72
|
return {
|
|
109
73
|
...base,
|
|
110
|
-
state:
|
|
111
|
-
title:
|
|
112
|
-
detail:
|
|
113
|
-
nextStep:
|
|
74
|
+
state: managedDefaultMessage.state,
|
|
75
|
+
title: managedDefaultMessage.title,
|
|
76
|
+
detail: managedDefaultMessage.detail,
|
|
77
|
+
nextStep: managedDefaultMessage.nextStep,
|
|
114
78
|
};
|
|
115
79
|
}
|
|
116
80
|
}
|
|
@@ -123,28 +87,24 @@ async function buildClaudeBrowserStatus(browserConfig = getUserFacingBrowserConf
|
|
|
123
87
|
...base,
|
|
124
88
|
state: 'ready',
|
|
125
89
|
title: 'Claude Browser Attach is ready.',
|
|
126
|
-
detail:
|
|
127
|
-
|
|
128
|
-
: 'CCS can reach the configured Chrome DevTools endpoint for the current attach session.',
|
|
129
|
-
nextStep: browserConfig.claude.policy === 'manual'
|
|
130
|
-
? 'Launch a Claude-target CCS session with `--browser` to use the managed browser MCP runtime.'
|
|
131
|
-
: 'Launch a Claude-target CCS session to use the managed browser MCP runtime.',
|
|
90
|
+
detail: 'CCS can reach the configured Chrome DevTools endpoint for the current attach session.',
|
|
91
|
+
nextStep: 'Launch a Claude-target CCS session to use the managed browser MCP runtime.',
|
|
132
92
|
runtimeEnv,
|
|
133
93
|
};
|
|
134
94
|
}
|
|
135
95
|
catch (error) {
|
|
136
96
|
const message = error.message;
|
|
137
|
-
const
|
|
97
|
+
const managedDefaultMessage = (0, browser_settings_1.describeManagedBrowserAttachNotReady)(effective, message, {
|
|
138
98
|
createdProfileDir: managedBootstrap.createdProfileDir,
|
|
139
99
|
launchCommand: launchCommands[(0, platform_1.getNodePlatformKey)()],
|
|
140
100
|
});
|
|
141
|
-
if (
|
|
101
|
+
if (managedDefaultMessage) {
|
|
142
102
|
return {
|
|
143
103
|
...base,
|
|
144
|
-
state:
|
|
145
|
-
title:
|
|
146
|
-
detail:
|
|
147
|
-
nextStep:
|
|
104
|
+
state: managedDefaultMessage.state,
|
|
105
|
+
title: managedDefaultMessage.title,
|
|
106
|
+
detail: managedDefaultMessage.detail,
|
|
107
|
+
nextStep: managedDefaultMessage.nextStep,
|
|
148
108
|
};
|
|
149
109
|
}
|
|
150
110
|
if (message.includes('Chrome profile directory is invalid')) {
|
|
@@ -174,15 +134,14 @@ async function buildClaudeBrowserStatus(browserConfig = getUserFacingBrowserConf
|
|
|
174
134
|
};
|
|
175
135
|
}
|
|
176
136
|
}
|
|
177
|
-
function buildCodexBrowserStatus(browserConfig =
|
|
137
|
+
function buildCodexBrowserStatus(browserConfig = (0, unified_config_loader_1.getBrowserConfig)()) {
|
|
178
138
|
if (!browserConfig.codex.enabled) {
|
|
179
139
|
return {
|
|
180
140
|
enabled: false,
|
|
181
|
-
policy: browserConfig.codex.policy,
|
|
182
141
|
state: 'disabled',
|
|
183
142
|
title: 'Codex Browser Tools are disabled.',
|
|
184
|
-
detail: 'CCS
|
|
185
|
-
nextStep: 'Enable Codex Browser Tools in Settings > Browser
|
|
143
|
+
detail: 'CCS will not inject Playwright MCP browser tooling into Codex-target launches.',
|
|
144
|
+
nextStep: 'Enable Codex Browser Tools in Settings > Browser to restore the managed Codex browser path.',
|
|
186
145
|
serverName: 'ccs_browser',
|
|
187
146
|
supportsConfigOverrides: false,
|
|
188
147
|
binaryPath: null,
|
|
@@ -193,7 +152,6 @@ function buildCodexBrowserStatus(browserConfig = getUserFacingBrowserConfig()) {
|
|
|
193
152
|
if (!binaryInfo || !supportsConfigOverrides) {
|
|
194
153
|
return {
|
|
195
154
|
enabled: true,
|
|
196
|
-
policy: browserConfig.codex.policy,
|
|
197
155
|
state: 'unsupported_build',
|
|
198
156
|
title: 'Codex Browser Tools need a Codex build with --config override support.',
|
|
199
157
|
detail: binaryInfo
|
|
@@ -208,30 +166,22 @@ function buildCodexBrowserStatus(browserConfig = getUserFacingBrowserConfig()) {
|
|
|
208
166
|
}
|
|
209
167
|
return {
|
|
210
168
|
enabled: true,
|
|
211
|
-
policy: browserConfig.codex.policy,
|
|
212
169
|
state: 'enabled',
|
|
213
170
|
title: 'Codex Browser Tools are enabled.',
|
|
214
|
-
detail:
|
|
215
|
-
|
|
216
|
-
: 'CCS can inject the managed Playwright MCP overrides into Codex-target launches.',
|
|
217
|
-
nextStep: browserConfig.codex.policy === 'manual'
|
|
218
|
-
? 'Use `--browser` on a Codex-target CCS launch to access browser tools.'
|
|
219
|
-
: 'Use a Codex-target CCS launch to access browser tools.',
|
|
171
|
+
detail: 'CCS can inject the managed Playwright MCP overrides into Codex-target launches.',
|
|
172
|
+
nextStep: 'Use a Codex-target CCS launch to access browser tools.',
|
|
220
173
|
serverName: 'ccs_browser',
|
|
221
174
|
supportsConfigOverrides,
|
|
222
175
|
binaryPath: binaryInfo.path,
|
|
223
176
|
version: binaryInfo.version,
|
|
224
177
|
};
|
|
225
178
|
}
|
|
226
|
-
function
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
hasExplicitDevtoolsPort: true,
|
|
234
|
-
}).join('\n');
|
|
179
|
+
function buildLaunchCommands(userDataDir, devtoolsPort) {
|
|
180
|
+
const quotedPath = JSON.stringify(userDataDir);
|
|
181
|
+
return {
|
|
182
|
+
darwin: `open -na "Google Chrome" --args --remote-debugging-port=${devtoolsPort} --user-data-dir=${quotedPath}`,
|
|
183
|
+
linux: `google-chrome --remote-debugging-port=${devtoolsPort} --user-data-dir=${quotedPath}`,
|
|
184
|
+
win32: `chrome.exe --remote-debugging-port=${devtoolsPort} --user-data-dir=${quotedPath}`,
|
|
185
|
+
};
|
|
235
186
|
}
|
|
236
|
-
exports.getManagedBrowserSetupHint = getManagedBrowserSetupHint;
|
|
237
187
|
//# sourceMappingURL=browser-status.js.map
|