ccdesk 0.2.3 → 0.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/README.md +1 -1
  3. package/dist/core/agent-edit.d.ts +1 -1
  4. package/dist/core/agent-edit.js +2 -2
  5. package/dist/core/backups.d.ts +1 -1
  6. package/dist/core/backups.js +29 -5
  7. package/dist/core/index.d.ts +6 -6
  8. package/dist/core/index.js +14 -14
  9. package/dist/core/mcp-edit.d.ts +1 -3
  10. package/dist/core/mcp-edit.js +15 -11
  11. package/dist/core/mutations.d.ts +1 -1
  12. package/dist/core/mutations.js +2 -2
  13. package/dist/core/open.d.ts +2 -5
  14. package/dist/core/open.js +6 -8
  15. package/dist/core/scan/data.d.ts +6 -0
  16. package/dist/core/scan/data.js +8 -0
  17. package/dist/core/scan/env.d.ts +2 -0
  18. package/dist/core/scan/env.js +8 -1
  19. package/dist/core/scan/files.js +2 -2
  20. package/dist/core/scan/git.d.ts +6 -0
  21. package/dist/core/scan/git.js +8 -0
  22. package/dist/core/scan/index.js +5 -2
  23. package/dist/core/scan/mcp.js +2 -1
  24. package/dist/core/scan/projects.js +2 -1
  25. package/dist/core/scan/settings.d.ts +2 -0
  26. package/dist/core/scan/settings.js +12 -3
  27. package/dist/core/scan/usage.d.ts +0 -6
  28. package/dist/core/scan/usage.js +7 -4
  29. package/dist/core/secrets.d.ts +3 -2
  30. package/dist/core/secrets.js +49 -29
  31. package/dist/core/settings-edit.d.ts +3 -3
  32. package/dist/core/settings-edit.js +4 -4
  33. package/dist/core/write.d.ts +0 -2
  34. package/dist/core/write.js +2 -4
  35. package/dist/shared/memory.d.ts +5 -1
  36. package/dist/shared/memory.js +18 -2
  37. package/dist/shared/types.d.ts +5 -0
  38. package/dist/ui/assets/{index-CH1HoC38.js → index-C9qqEI5Z.js} +2 -2
  39. package/dist/ui/index.html +1 -1
  40. package/package.json +1 -1
@@ -56,5 +56,5 @@ You are …
56
56
  `,...a.current()}),u=l.charCodeAt(0);return(u===9||u===32)&&(l=Xl(u)+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}$l.peek=eu;function $l(e){return e.value||``}function eu(){return`<`}tu.peek=nu;function tu(e,t,n,r){let i=Wl(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`image`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`![`);return l+=c.move(n.safe(e.alt,{before:l,after:`]`,...c.current()})),l+=c.move(`](`),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),l+=c.move(`)`),o(),l}function nu(){return`!`}ru.peek=iu;function ru(e,t,n,r){let i=e.referenceType,a=n.enter(`imageReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`![`),l=n.safe(e.alt,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=u.filter(function(e){return e!==`phrasing`}),o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function iu(){return`!`}G.peek=au;function G(e,t,n){let r=e.value||``,i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^\n\r ]/.test(r)&&(/^[\n\r ]/.test(r)&&/[\n\r ]$/.test(r)||/^`|`$/.test(r))&&(r=` `+r+` `);++a<n.unsafe.length;){let e=n.unsafe[a],t=n.compilePattern(e);if(!e.atBreak)continue;let i;for(;i=t.exec(r);){let e=i.index;r.charCodeAt(e)===10&&r.charCodeAt(e-1)===13&&e--,r=r.slice(0,e)+` `+r.slice(i.index+1)}}return i+r+i}function au(){return"`"}function ou(e,t){let n=Fr(e);return!(t.options.resourceLink||!e.url||e.title||!e.children||e.children.length!==1||e.children[0].type!==`text`||n!==e.url&&`mailto:`+n!==e.url||!/^[a-z][+\-.a-z]+:/i.test(e.url)||/[\0- <>\u007F]/.test(e.url))}su.peek=cu;function su(e,t,n,r){let i=Wl(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r);if(ou(e,n)){let t=n.stack;n.stack=t.filter(function(e){return e!==`phrasing`});let r=n.enter(`autolink`),i=o.move(`<`);return i+=o.move(n.containerPhrasing(e,{before:i,after:`>`,...o.current()})),i+=o.move(`>`),r(),n.stack=t,i}let s=n.enter(`link`),c=n.enter(`label`),l=o.move(`[`);return l+=o.move(n.containerPhrasing(e,{before:l,after:`](`,...o.current()})),l+=o.move(`](`),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter(`destinationLiteral`),l+=o.move(`<`),l+=o.move(n.safe(e.url,{before:l,after:`>`,...o.current()})),l+=o.move(`>`)):(c=n.enter(`destinationRaw`),l+=o.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...o.current()}))),c(),e.title&&(c=n.enter(`title${a}`),l+=o.move(` `+i),l+=o.move(n.safe(e.title,{before:l,after:i,...o.current()})),l+=o.move(i),c()),l+=o.move(`)`),s(),l}function cu(e,t,n){return ou(e,n)?`<`:`[`}lu.peek=uu;function lu(e,t,n,r){let i=e.referenceType,a=n.enter(`linkReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`[`),l=n.containerPhrasing(e,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=u.filter(function(e){return e!==`phrasing`}),o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function uu(){return`[`}function du(e){let t=e.options.bullet||`*`;if(t!==`*`&&t!==`+`&&t!==`-`)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function fu(e){let t=du(e),n=e.options.bulletOther;if(!n)return t===`*`?`-`:`*`;if(n!==`*`&&n!==`+`&&n!==`-`)throw Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function pu(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function mu(e){let t=e.options.rule||`*`;if(t!==`*`&&t!==`-`&&t!==`_`)throw Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function hu(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?pu(n):du(n),s=e.ordered?o===`.`?`)`:`.`:fu(n),c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){let t=e.children?e.children[0]:void 0;if((o===`*`||o===`-`)&&t&&(!t.children||!t.children[0])&&n.stack[n.stack.length-1]===`list`&&n.stack[n.stack.length-2]===`listItem`&&n.stack[n.stack.length-3]===`list`&&n.stack[n.stack.length-4]===`listItem`&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(c=!0),mu(n)===o&&t){let t=-1;for(;++t<e.children.length;){let n=e.children[t];if(n&&n.type===`listItem`&&n.children&&n.children[0]&&n.children[0].type===`thematicBreak`){c=!0;break}}}}c&&(o=s),n.bulletCurrent=o;let l=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),l}function gu(e){let t=e.options.listItemIndent||`one`;if(t!==`tab`&&t!==`one`&&t!==`mixed`)throw Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function _u(e,t,n,r){let i=gu(n),a=n.bulletCurrent||du(n);t&&t.type===`list`&&t.ordered&&(a=(typeof t.start==`number`&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i===`tab`||i===`mixed`&&(t&&t.type===`list`&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);let s=n.createTracker(r);s.move(a+` `.repeat(o-a.length)),s.shift(o);let c=n.enter(`listItem`),l=n.indentLines(n.containerFlow(e,s.current()),u);return c(),l;function u(e,t,n){return t?(n?``:` `.repeat(o))+e:(n?a:a+` `.repeat(o-a.length))+e}}function vu(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}function yu(e,t,n,r){if(!e.children.some(function(e){return Nl(e)}))return n.containerFlow(e,r);let i=n.enter(`phrasing`),a=n.containerPhrasing(e,r);return i(),a}function bu(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}xu.attention=Su,xu.peek=Cu;function xu(e,t,n,r){let i=n.enter(`phrasing`),a=n.containerPhrasing({type:`root`,children:[e]},r);return i(),a}function Su(e,t){return{construct:`strong`,markers:bu(t)===`*`?[`*`,`_`]:[`_`,`*`],sizes:[2]}}function Cu(e,t,n){return n.options.strong||`*`}function wu(e,t,n,r){let i=t?t.children:[],a=i.indexOf(e);return n.safe(e.value,{...r,afterNode:i[a+1],beforeNode:i[a-1]})}function Tu(e){let t=e.options.ruleRepetition||3;if(t<3)throw Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function Eu(e,t,n){let r=(mu(n)+(n.options.ruleSpaces?` `:``)).repeat(Tu(n));return n.options.ruleSpaces?r.slice(0,-1):r}var Du={blockquote:Pl,break:Rl,code:Hl,definition:Gl,emphasis:ql,hardBreak:Rl,heading:Ql,html:$l,image:tu,imageReference:ru,inlineCode:G,link:su,linkReference:lu,list:hu,listItem:_u,paragraph:vu,root:yu,strong:xu,text:wu,thematicBreak:Eu};function Ou(){return{enter:{table:ku,tableData:Nu,tableHeader:Nu,tableRow:ju},exit:{codeText:Pu,table:Au,tableData:Mu,tableHeader:Mu,tableRow:Mu}}}function ku(e){let t=e._align;this.enter({type:`table`,align:t.map(function(e){return e===`none`?null:e}),children:[]},e),this.data.inTable=!0}function Au(e){this.exit(e),this.data.inTable=void 0}function ju(e){this.enter({type:`tableRow`,children:[]},e)}function Mu(e){this.exit(e)}function Nu(e){this.enter({type:`tableCell`,children:[]},e)}function Pu(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Fu));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Fu(e,t){return t===`|`?t:e}function Iu(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?` `:`|`;return{unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:`
57
57
  `,inConstruct:`tableCell`},{atBreak:!0,character:`|`,after:`[ :-]`},{character:`|`,inConstruct:`tableCell`},{atBreak:!0,character:`:`,after:`-`},{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{inlineCode:f,table:o,tableCell:c,tableRow:s}};function o(e,t,n,r){return l(u(e,n,r),e.align)}function s(e,t,n,r){let i=l([d(e,n,r)]);return i.slice(0,i.indexOf(`
58
58
  `))}function c(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function l(e,t){return Al(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function u(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`table`);for(;++i<r.length;)a[i]=d(r[i],t,n);return o(),a}function d(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`tableRow`);for(;++i<r.length;)a[i]=c(r[i],e,t,n);return o(),a}function f(e,t,n){let r=Du.inlineCode(e,t,n);return n.stack.includes(`tableCell`)&&(r=r.replace(/\|/g,`\\$&`)),r}}function Lu(){return{exit:{taskListCheckValueChecked:zu,taskListCheckValueUnchecked:zu,paragraph:Bu}}}function Ru(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:Vu}}}function zu(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function Bu(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i<r.length;){let e=r[i];if(e.type===`paragraph`){a=e;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset==`number`&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function Vu(e,t,n,r){let i=e.children[0],a=typeof e.checked==`boolean`&&i&&i.type===`paragraph`,o=`[`+(e.checked?`x`:` `)+`] `,s=n.createTracker(r);a&&s.move(o);let c=Du.listItem(e,t,n,{...r,...s.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(e){return e+o}}function Hu(){return[qc(),_l(),Sl(),Ou(),Lu()]}function Uu(e){return{extensions:[Jc(),vl(e),Cl(),Iu(e),Ru()]}}var Wu={tokenize:Y,partial:!0},Gu={tokenize:td,partial:!0},Ku={tokenize:nd,partial:!0},qu={tokenize:rd,partial:!0},Ju={tokenize:id,partial:!0},Yu={name:`wwwAutolink`,tokenize:q,previous:ad},Xu={name:`protocolAutolink`,tokenize:J,previous:od},Zu={name:`emailAutolink`,tokenize:ed,previous:sd},Qu={};function $u(){return{text:Qu}}for(var K=48;K<123;)Qu[K]=Zu,K++,K===58?K=65:K===91&&(K=97);Qu[43]=Zu,Qu[45]=Zu,Qu[46]=Zu,Qu[95]=Zu,Qu[72]=[Zu,Xu],Qu[104]=[Zu,Xu],Qu[87]=[Zu,Yu],Qu[119]=[Zu,Yu];function ed(e,t,n){let r=this,i,a;return o;function o(t){return!cd(t)||!sd.call(r,r.previous)||ld(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return cd(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(Ju,u,l)(t):t===45||t===95||Xr(t)?(a=!0,e.consume(t),c):u(t)}function l(t){return e.consume(t),i=!0,c}function u(o){return a&&i&&Yr(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function q(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!ad.call(r,r.previous)||ld(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(Wu,e.attempt(Gu,e.attempt(Ku,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function J(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&od.call(r,r.previous)&&!ld(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(Yr(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(t===58){let n=i.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),c}return n(t)}function c(t){return t===47?(e.consume(t),a?l:(a=!0,c)):n(t)}function l(t){return t===null||Qr(t)||R(t)||ri(t)||ni(t)?n(t):e.attempt(Gu,e.attempt(Ku,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function Y(e,t,n){let r=0;return i;function i(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),i):t===46&&r===3?(e.consume(t),a):n(t)}function a(e){return e===null?n(e):t(e)}}function td(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(qu,c,s)(t):t===null||R(t)||ri(t)||t!==45&&ni(t)?c(t):(a=!0,e.consume(t),o)}function s(t){return t===95?r=!0:(i=r,r=void 0),e.consume(t),o}function c(e){return i||r||!a?n(e):t(e)}}function nd(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(qu,t,a)(o):o===null||R(o)||ri(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function rd(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||R(o)||ri(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||R(e)||ri(e)?t(e):r(e)}function a(e){return Yr(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):Yr(t)?(e.consume(t),o):n(t)}}function id(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return Xr(e)?n(e):t(e)}}function ad(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||R(e)}function od(e){return!Yr(e)}function sd(e){return!(e===47||cd(e))}function cd(e){return e===43||e===45||e===46||e===95||Xr(e)}function ld(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if((r.type===`labelLink`||r.type===`labelImage`)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}var ud={tokenize:vd,partial:!0};function dd(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:hd,continuation:{tokenize:gd},exit:_d}},text:{91:{name:`gfmFootnoteCall`,tokenize:md},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:fd,resolveTo:pd}}}}function fd(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=Jr(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function pd(e,t){let n=e.length;for(;n--;)if(e[n][1].type===`labelImage`&&e[n][0]===`enter`){e[n][1];break}e[n+1][1].type=`data`,e[n+3][1].type=`gfmFootnoteCallLabelMarker`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function md(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||R(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(Jr(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return R(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function hd(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||R(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=Jr(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return R(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),B(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function gd(e,t,n){return e.check(Ci,t,e.attempt(ud,t,n))}function _d(e){e.exit(`gfmFootnoteDefinition`)}function vd(e,t,n){let r=this;return B(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function yd(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&Vr(o,o.length,0,gi(s,e.slice(r+1,n),t)),Vr(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),Vr(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=`data`);return e}function i(e,n,r){let i=this.previous,a=this.events,o=0;return s;function s(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),c(t))}function c(a){let s=hi(i);if(a===126)return o>1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=hi(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var bd=class{constructor(){this.map=[],this.index=new Map}add(e,t,n){xd(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0,this.index.clear()}};function xd(e,t,n,r){if(n===0&&r.length===0)return;let i=e.index.get(t);if(i){i[1]+=n,i[2].push(...r);return}let a=[t,n,r];e.map.push(a),e.index.set(t,a)}function Sd(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if(i[0]===`enter`)i[1].type===`tableContent`&&r.push(e[t+1][1].type===`tableDelimiterMarker`?`left`:`none`);else if(i[1].type===`tableContent`){if(e[t-1][1].type===`tableDelimiterMarker`){let e=r.length-1;r[e]=r[e]===`left`?`center`:`right`}}else if(i[1].type===`tableDelimiterRow`)break}else i[0]===`enter`&&i[1].type===`tableDelimiterRow`&&(n=!0);t+=1}return r}function Cd(){return{flow:{null:{name:`table`,tokenize:wd,resolveAll:Td}}}}function wd(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let{type:e}=r.events[t][1];if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?ee:c;return a===ee&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124||(o=!0,a+=1),u(e)}function u(t){return t===null?n(t):L(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):z(t)?B(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||R(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,z(t)?B(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return z(t)?B(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||L(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return z(t)?B(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||L(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function ee(t){return e.enter(`tableRow`),te(t)}function te(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),te):n===null||L(n)?(e.exit(`tableRow`),t(n)):z(n)?B(e,te,`whitespace`)(n):(e.enter(`data`),S(n))}function S(t){return t===null||t===124||R(t)?(e.exit(`data`),te(t)):(e.consume(t),t===92?C:S)}function C(t){return t===92||t===124?(e.consume(t),S):S(t)}}function Td(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new bd;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(Dd(f,t,c,l,u),u=void 0,c=0),l={type:`table`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,l,t]])):m.type===`tableRow`||m.type===`tableDelimiterRow`?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:`tableBody`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,u,t]])),i=m.type===`tableDelimiterRow`?2:u?3:1):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=Ed(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type===`tableCellDivider`&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=Ed(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type===`tableHead`?(s=!0,c=n):m.type===`tableRow`||m.type===`tableDelimiterRow`?(c=n,a[1]===0?o[1]!==0&&(d=Ed(f,t,o,i,n,d)):(o[0]=o[1],d=Ed(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&Dd(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){let e=t.events[n];e[0]===`enter`&&e[1].type===`table`&&(e[1]._align=Sd(t.events,n))}return e}function Ed(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},Od(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=Od(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[[`enter`,a,t]]),n[2]!==0){let i=Od(t.events,n[2]),a=Od(t.events,n[3]),o={type:`tableContent`,start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[[`enter`,o,t]]),r!==2){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type=`chunkText`,r[1].contentType=`text`,n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},Od(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function Dd(e,t,n,r,i){let a=[],o=Od(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function Od(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var kd={name:`tasklistCheck`,tokenize:jd};function Ad(){return{text:{91:kd}}}function jd(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return R(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return L(r)?t(r):z(r)?e.check({tokenize:Md},t,n)(r):n(r)}}function Md(e,t,n){return B(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function Nd(e){return Wr([$u(),dd(),yd(e),Cd(),Ad()])}var Pd={};function Fd(e){let t=this,n=e||Pd,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(Nd(n)),a.push(Hu()),o.push(Uu(n))}function Id({children:e,onClick:t,current:n}){return(0,A.jsx)(`button`,{type:`button`,className:`row-name`,"aria-current":n?`true`:void 0,onClick:e=>{e.stopPropagation(),t()},children:e})}function Ld({realPath:e}){return e?Qe(e)?(0,A.jsxs)(`span`,{className:`flag via-agents`,title:`Links to ${j(e)}; other agents read ~/.agents too`,children:[(0,A.jsx)(M,{name:`link`}),` ~/.agents`]}):(0,A.jsx)(`span`,{className:`via`,title:`Links to ${j(e)}`,children:(0,A.jsx)(M,{name:`link`})}):null}var Rd={tracked:`tracked in git`,untracked:`untracked`,ignored:`git-ignored`,"no-git":`outside git`};function zd({value:e,scope:t}){return t===`managed`?(0,A.jsx)(`span`,{className:`vis vis-personal`,children:`organisation`}):e?(0,A.jsx)(`span`,{className:`vis vis-${e}`,children:Rd[e]}):(0,A.jsx)(`span`,{className:`vis vis-personal`,children:`only you`})}function X({label:e,children:t}){return(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`dt`,{children:e}),(0,A.jsx)(`dd`,{children:t})]})}function Bd({path:e}){let[t,n]=(0,v.useState)(null),r=(e,t)=>{n(e),setTimeout(()=>n(null),t)};return(0,A.jsxs)(`span`,{className:`path`,children:[(0,A.jsx)(`span`,{className:`mono`,children:j(e)}),(0,A.jsx)(`button`,{type:`button`,className:`icon-button small`,"aria-label":`Copy path`,onClick:()=>{navigator.clipboard.writeText(e).then(()=>r(`copied`,1200),()=>r(`could not copy`,2400))},children:(0,A.jsx)(M,{name:`copy`})}),(0,A.jsx)(`button`,{type:`button`,className:`icon-button small`,"aria-label":`Open in editor`,title:`Open in editor`,onClick:()=>{Re.open(e).then(({editor:e})=>r(`opened with ${e}`,2400),e=>r(Ie(e),6e3))},children:(0,A.jsx)(M,{name:`open`})}),t&&(0,A.jsx)(`span`,{className:`copied`,role:`status`,children:t})]})}function Vd({text:e,markdown:t=!0}){let[n,r]=(0,v.useState)(!t);return(0,A.jsxs)(`section`,{className:`contents`,children:[(0,A.jsxs)(`div`,{className:`contents-bar`,children:[(0,A.jsx)(`span`,{children:`Contents`}),t&&(0,A.jsxs)(`fieldset`,{className:`segmented small`,"aria-label":`Contents view`,children:[(0,A.jsxs)(`button`,{type:`button`,"aria-pressed":!n,onClick:()=>r(!1),children:[(0,A.jsx)(M,{name:`eye`}),` Read`]}),(0,A.jsxs)(`button`,{type:`button`,"aria-pressed":n,onClick:()=>r(!0),children:[(0,A.jsx)(M,{name:`code`}),` Raw`]})]})]}),n?(0,A.jsx)(`pre`,{className:`raw`,children:e}):(0,A.jsx)(`div`,{className:`prose`,children:(0,A.jsx)(Pc,{remarkPlugins:[Fd],children:e})})]})}function Hd(e){return e.replace(/^---\r?\n[\s\S]*?\r?\n---\r?\n?/,``)}function Ud({text:e}){return(0,A.jsx)(`div`,{className:`prose docs-text`,children:(0,A.jsx)(Pc,{components:{a:({href:e,children:t})=>(0,A.jsx)(`a`,{href:e,target:`_blank`,rel:`noreferrer`,children:t})},children:e})})}function Wd(e){return e.length===0?`~/.claude.json only`:e.length===4?`any settings file`:e.map(e=>x(e).toLowerCase()).join(`, `)}function Gd({setting:e,set:t,actions:n}){let[r=e.key,i]=e.key.split(`.`,2),a=e.scopes.filter(e=>we.includes(e));if(e.scopes.length===0)return(0,A.jsxs)(`p`,{className:`muted small`,children:[`Claude Code keeps this in ~/.claude.json, which ccdesk never changes. Use`,` `,(0,A.jsx)(`code`,{children:`/config`}),` in Claude Code.`]});if(a.length===0)return(0,A.jsx)(`p`,{className:`muted small`,children:`Only managed settings can set this.`});if(i)return(0,A.jsxs)(`p`,{className:`muted small`,children:[`It is a field of `,(0,A.jsx)(`code`,{children:r}),`; edit that setting to change it.`]});if(Jt(r)===void 0)return(0,A.jsx)(`p`,{className:`muted small`,children:`This key is not in the settings schema ccdesk ships, so it cannot be edited here.`});let o=a.includes(`user`)?`user`:a[0]??`user`;return(0,A.jsx)(Zt,{view:n.view,settingKey:e.key,defaultScope:[...t?.from??[]].reverse().find(e=>a.includes(e))??o,onSaved:n.onSaved},e.key)}var Kd={cells:(e,{view:t},n)=>{let r=e.item,{value:i}=re(t,r.key);return(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`td`,{children:e.line&&(0,A.jsx)(N,{line:e.line})}),(0,A.jsx)(`td`,{className:`mono`,children:(0,A.jsx)(Id,{onClick:n,children:r.key})}),(0,A.jsx)(`td`,{className:`desc`,children:ie(r.summary)}),(0,A.jsx)(`td`,{className:`catalog-files`,children:r.scopes.length===0?(0,A.jsx)(`span`,{className:`muted small`,children:`~/.claude.json`}):O.filter(e=>r.scopes.includes(e)).map(e=>(0,A.jsx)(N,{line:e,hollow:!0},e))}),(0,A.jsx)(`td`,{className:`mono value`,children:i===void 0?(0,A.jsx)(`span`,{className:`muted`,children:`default`}):Ze(w(i))})]})},Head:()=>(0,A.jsx)(`span`,{className:`tt-note`,children:`Every setting in Claude Code's settings reference; the ones set here show their value`}),Details:({row:e,actions:t})=>{let n=e.item,{view:r}=t,{set:i,value:a}=re(r,n.key);return(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`div`,{className:`verdict`,children:(0,A.jsx)(Ud,{text:n.summary})}),(0,A.jsxs)(`dl`,{className:`fields`,children:[(0,A.jsx)(X,{label:`Area`,children:n.category}),(0,A.jsx)(X,{label:`Read from`,children:Wd(n.scopes)}),(0,A.jsx)(X,{label:`Here`,children:a===void 0?`not set, so the default applies`:(0,A.jsxs)(`span`,{className:`mono`,children:[Ze(w(a)),i&&` (${i.from.map(e=>x(e).toLowerCase()).join(`, `)})`]})})]}),n.about&&n.about!==n.summary&&(0,A.jsx)(Ud,{text:n.about}),n.type&&(0,A.jsxs)(`section`,{className:`sub`,children:[(0,A.jsx)(`h3`,{children:`Values`}),(0,A.jsx)(Ud,{text:n.type})]}),n.default&&(0,A.jsxs)(`section`,{className:`sub`,children:[(0,A.jsx)(`h3`,{children:`Default`}),(0,A.jsx)(Ud,{text:n.default})]}),(0,A.jsxs)(`section`,{className:`sub`,children:[(0,A.jsx)(`h3`,{children:a===void 0?`Set it`:`Change it`}),(0,A.jsx)(Gd,{setting:n,set:i,actions:t})]}),(0,A.jsx)(`p`,{className:`muted small`,children:(0,A.jsxs)(`a`,{className:`docs-link`,href:n.docs,target:`_blank`,rel:`noreferrer`,children:[`Read it in the settings reference `,(0,A.jsx)(M,{name:`open`})]})})]})}};function qd(e){return e.skipped?`skipped by Claude Code: ${e.skipped}`:e.shadowedBy?`not used: ${j(e.shadowedBy)} defines this name with higher priority`:e.override===`off`?`hidden by skillOverrides`:e.override===`user-invocable-only`?`only when you call it: skillOverrides hides it from Claude`:e.override===`name-only`?`listed to Claude by name only (skillOverrides)`:null}var Jd={cells:(e,t,n)=>{if(e.kind===`plugin`){let t=e.item;return(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`td`,{children:(0,A.jsx)(N,{line:`plugin`,hollow:!t.enabled})}),(0,A.jsx)(`td`,{children:`plugin`}),(0,A.jsx)(`td`,{className:`mono`,children:(0,A.jsx)(Id,{onClick:n,children:t.id})}),(0,A.jsxs)(`td`,{className:`desc`,children:[`v`,t.version,` · `,t.note]})]})}let r=e.item;return(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`td`,{children:(0,A.jsx)(N,{line:e.line})}),(0,A.jsx)(`td`,{children:e.kind}),(0,A.jsxs)(`td`,{className:`mono`,children:[(0,A.jsx)(Id,{onClick:n,children:r.id??r.name}),(0,A.jsx)(Ld,{realPath:r.realPath})]}),(0,A.jsxs)(`td`,{className:`desc`,children:[qd(r)&&(0,A.jsx)(`span`,{className:`flag warn`,children:qd(r)}),` `,r.description]})]})},Head:({actions:e})=>(0,A.jsxs)(`button`,{type:`button`,className:`head-action`,onClick:()=>e.onAdd(`agent`),children:[(0,A.jsx)(M,{name:`plus`}),` Create agent`]}),Details:({row:e,actions:t})=>{if(e.kind===`plugin`){let t=e.item;return(0,A.jsxs)(`dl`,{className:`fields`,children:[(0,A.jsx)(X,{label:`Version`,children:t.version}),(0,A.jsx)(X,{label:`Status`,children:t.note}),(0,A.jsx)(X,{label:`Installed for`,children:t.scope}),(0,A.jsx)(X,{label:`Updated`,children:S(t.updated)}),(0,A.jsx)(X,{label:`Folder`,children:(0,A.jsx)(Bd,{path:t.installPath})})]})}let n=e.item;return(0,A.jsxs)(A.Fragment,{children:[n.description&&(0,A.jsx)(`p`,{className:`verdict`,children:n.description}),(0,A.jsxs)(`dl`,{className:`fields`,children:[(0,A.jsx)(X,{label:`Kind`,children:e.kind}),(0,A.jsx)(X,{label:`Path`,children:(0,A.jsx)(Bd,{path:n.path})}),n.realPath&&(0,A.jsx)(X,{label:`Links to`,children:(0,A.jsx)(Bd,{path:n.realPath})}),qd(n)?(0,A.jsx)(X,{label:`Offered`,children:qd(n)}):n.listed===!1&&(0,A.jsx)(X,{label:`Invoked`,children:`only when you call it; Claude does not pick it on its own`}),n.paths&&(0,A.jsx)(X,{label:`Applies to`,children:(0,A.jsx)(`span`,{className:`mono`,children:n.paths.join(`, `)})}),n.model&&(0,A.jsx)(X,{label:`Model`,children:n.model}),n.plugin&&(0,A.jsx)(X,{label:`Plugin`,children:n.plugin})]}),e.kind===`agent`&&(n.scope===`user`||n.scope===`project`)?(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`h3`,{className:`sub-title`,children:`Change this agent`}),(0,A.jsx)(At,{view:t.view,agent:n,onSaved:t.onSaved},e.id)]}):(0,A.jsx)(Vd,{text:Hd(n.text)})]})}},Yd={cells:(e,t,n)=>{let r=e.item;return(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`td`,{children:(0,A.jsx)(N,{line:e.line})}),(0,A.jsx)(`td`,{children:(0,A.jsx)(Id,{onClick:n,children:r.event})}),(0,A.jsx)(`td`,{className:`mono`,children:r.matcher??(0,A.jsx)(`span`,{className:`muted`,children:`any`})}),(0,A.jsxs)(`td`,{className:`mono value`,children:[Ze(r.command),!r.active&&(0,A.jsx)(`span`,{className:`flag warn`,title:r.note,children:`off`})]})]})},Head:({actions:e})=>(0,A.jsxs)(`button`,{type:`button`,className:`head-action`,onClick:()=>e.onAdd(`hook`),children:[(0,A.jsx)(M,{name:`plus`}),` Add hook`]}),Details:({row:e,actions:t})=>{let n=e.item;return(0,A.jsxs)(A.Fragment,{children:[!n.active&&(0,A.jsx)(`p`,{className:`verdict off`,children:n.note}),(0,A.jsxs)(`dl`,{className:`fields`,children:[(0,A.jsx)(X,{label:`Event`,children:n.event}),(0,A.jsx)(X,{label:`Matcher`,children:(0,A.jsx)(`span`,{className:`mono`,children:n.matcher??`any`})}),(0,A.jsx)(X,{label:`Type`,children:n.type}),(0,A.jsx)(X,{label:`Runs`,children:(0,A.jsx)(`span`,{className:`mono wrap`,children:Ze(n.command)})}),(0,A.jsx)(X,{label:`Defined in`,children:(0,A.jsx)(Bd,{path:n.sourcePath})}),n.plugin&&(0,A.jsx)(X,{label:`Plugin`,children:n.plugin})]}),(0,A.jsx)(`h3`,{className:`sub-title`,children:`Change this hook`}),(0,A.jsx)(Ft,{view:t.view,hook:n,onSaved:t.onSaved},e.id)]})}},Xd={loaded:`ok`,"on-match":``,skipped:`off`},Zd={cells:(e,{view:t},n)=>{let r=e.item;return(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`td`,{className:`num`,children:e.order}),(0,A.jsx)(`td`,{children:(0,A.jsx)(N,{line:e.line,hollow:r.status!==`loaded`})}),(0,A.jsxs)(`td`,{className:`mono`,children:[(0,A.jsx)(Id,{onClick:n,children:Xe(r.path,t.path)}),(0,A.jsx)(Ld,{realPath:r.realPath}),r.checks.length>0&&(0,A.jsxs)(`span`,{className:`flag warn`,title:r.checks.join(`
59
- `),children:[(0,A.jsx)(M,{name:`warn`}),` `,r.checks.length]})]}),(0,A.jsx)(`td`,{children:(0,A.jsx)(`span`,{className:`status status-${r.status}`,children:le[r.status]})}),(0,A.jsx)(`td`,{className:`why`,children:r.reason}),(0,A.jsx)(`td`,{className:`num`,children:r.lines}),(0,A.jsx)(`td`,{children:(0,A.jsx)(zd,{value:r.visibility,scope:r.scope})})]})},Details:({row:e})=>{let t=e.item;return(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`p`,{className:`verdict ${Xd[t.status]}`,children:t.reason}),t.checks.length>0&&(0,A.jsx)(`ul`,{className:`plain checks-list`,children:t.checks.map(e=>(0,A.jsxs)(`li`,{className:`flag warn`,children:[(0,A.jsx)(M,{name:`warn`}),` `,e]},e))}),(0,A.jsxs)(`dl`,{className:`fields`,children:[(0,A.jsx)(X,{label:`File`,children:(0,A.jsx)(Bd,{path:t.path})}),t.realPath&&(0,A.jsx)(X,{label:`Links to`,children:(0,A.jsx)(Bd,{path:t.realPath})}),Qe(t.realPath)&&(0,A.jsx)(X,{label:`Shared with`,children:`other coding agents that read ~/.agents`}),(0,A.jsx)(X,{label:`Visibility`,children:(0,A.jsx)(zd,{value:t.visibility,scope:t.scope})}),(0,A.jsxs)(X,{label:`Size`,children:[t.lines,` lines · `,(t.bytes/1024).toFixed(1),` KB`]}),t.mtime&&(0,A.jsx)(X,{label:`Changed`,children:S(t.mtime)}),t.paths&&(0,A.jsx)(X,{label:`Applies to`,children:(0,A.jsx)(`span`,{className:`mono`,children:t.paths.join(`, `)})})]}),t.imports.length>0&&(0,A.jsxs)(`section`,{className:`sub`,children:[(0,A.jsx)(`h3`,{children:`Imports`}),(0,A.jsx)(`ul`,{className:`plain`,children:t.imports.map(e=>(0,A.jsxs)(`li`,{className:`mono`,children:[`@`,e.raw,e.via!==t.path&&(0,A.jsxs)(`span`,{className:`muted`,children:[` via `,e.via.split(/[/\\]/).pop()]}),!e.exists&&(0,A.jsx)(`span`,{className:`flag bad`,children:`missing`}),e.tooLarge&&(0,A.jsx)(`span`,{className:`flag warn`,children:`over 4 MiB, not loaded`}),e.external&&(0,A.jsx)(`span`,{className:`flag`,children:`outside this project`}),e.pending&&(0,A.jsx)(`span`,{className:`flag warn`,title:`Claude Code asks before loading imports from outside the project`,children:`waits for your approval`})]},`${e.via}:${e.resolved}`))})]}),(0,A.jsx)(Vd,{text:t.text})]})}},Qd={cells:(e,t,n)=>{let r=e.item;return(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`td`,{children:(0,A.jsx)(N,{line:e.line})}),(0,A.jsx)(`td`,{className:`mono`,children:(0,A.jsx)(Id,{onClick:n,children:r.name})}),(0,A.jsx)(`td`,{children:r.transport}),(0,A.jsx)(`td`,{className:`mono value`,children:Ze(r.target)}),(0,A.jsx)(`td`,{children:(0,A.jsx)(`span`,{className:r.status===`active`?`muted`:`flag warn`,title:r.note,children:de[r.status]})})]})},Head:({actions:e})=>(0,A.jsxs)(`button`,{type:`button`,className:`head-action`,onClick:()=>e.onAdd(`mcp`),children:[(0,A.jsx)(M,{name:`plus`}),` Add server`]}),Details:({row:e,actions:t})=>{let n=e.item;return(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`p`,{className:`verdict ${n.status===`active`?`ok`:`off`}`,children:n.note??`Configured and allowed here, so Claude Code starts it with each session. ccdesk does not connect, so it cannot tell whether the server works.`}),(0,A.jsxs)(`dl`,{className:`fields`,children:[(0,A.jsx)(X,{label:`Defined for`,children:n.scope}),n.plugin&&(0,A.jsx)(X,{label:`Plugin`,children:n.plugin}),(0,A.jsx)(X,{label:`Transport`,children:n.transport}),(0,A.jsx)(X,{label:`Target`,children:(0,A.jsx)(`span`,{className:`mono wrap`,children:Ze(n.target)})}),(0,A.jsx)(X,{label:`Defined in`,children:(0,A.jsx)(Bd,{path:n.sourcePath})}),n.approvals&&(0,A.jsx)(X,{label:`Approval`,children:(0,A.jsx)(`ul`,{className:`plain`,children:n.approvals.map(e=>(0,A.jsxs)(`li`,{children:[(0,A.jsx)(`span`,{className:`mono`,children:e.key}),` `,e.source===`claude-json`?`from your answer to Claude Code's prompt`:`in ${e.source} settings`,!e.counts&&`, which counts once you trust this folder`,(0,A.jsx)(`br`,{}),(0,A.jsx)(Bd,{path:e.path})]},`${e.key}:${e.path}`))})})]}),(0,A.jsx)(`p`,{className:`muted small`,children:`Environment variables and headers are hidden.`}),(0,A.jsx)(`h3`,{className:`sub-title`,children:`Change this server`}),(0,A.jsx)(Bt,{view:t.view,server:n,onSaved:t.onSaved},e.id)]})}};function $d(e){return e.replace(/[^a-zA-Z0-9]/g,`-`)}function ef({type:e}){return(0,A.jsxs)(`span`,{className:`type`,children:[(0,A.jsx)(`span`,{className:`type-dot type-${e}`,"aria-hidden":`true`}),e]})}var tf={cells:(e,{sharedNames:t},n)=>{let r=e.item;return(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`td`,{children:(0,A.jsx)(N,{line:`memory`})}),(0,A.jsx)(`td`,{className:`mono`,children:(0,A.jsx)(Id,{onClick:n,children:r.name})}),(0,A.jsx)(`td`,{children:(0,A.jsx)(ef,{type:r.type})}),(0,A.jsx)(`td`,{className:`desc`,children:r.description}),(0,A.jsxs)(`td`,{className:`checks`,children:[!r.inIndex&&(0,A.jsx)(`span`,{className:`flag bad`,title:`MEMORY.md does not mention it`,children:`not in index`}),r.brokenLinks.length>0&&(0,A.jsxs)(`span`,{className:`flag warn`,children:[r.brokenLinks.length,` broken link`,r.brokenLinks.length===1?``:`s`]}),t.has(r.name)&&(0,A.jsx)(`span`,{className:`flag`,children:`also elsewhere`})]}),(0,A.jsx)(`td`,{className:`num`,title:new Date(r.mtime).toLocaleString(),children:S(r.mtime)})]})},renderFacet:e=>(0,A.jsx)(ef,{type:e}),Head:nf,Details:sf};function nf({actions:e}){let t=e.view.memory,n=t.index,[r,i]=(0,v.useState)(!1);return(0,A.jsxs)(A.Fragment,{children:[t.note&&(0,A.jsxs)(`span`,{className:`flag${t.loaded?``:` warn`}`,title:j(t.dir),children:[!t.loaded&&(0,A.jsx)(M,{name:`warn`}),` `,t.note]}),n?.truncated&&(0,A.jsxs)(`span`,{className:`flag warn`,title:`Claude Code reads only the first 200 lines or 25KB of MEMORY.md`,children:[(0,A.jsx)(M,{name:`warn`}),` MEMORY.md: lines past `,n.loadedLines,` are not loaded`]}),n&&n.missingFiles.length>0&&(0,A.jsxs)(`span`,{className:`fix`,children:[(0,A.jsxs)(`span`,{className:`flag warn`,title:n.missingFiles.join(`, `),children:[(0,A.jsx)(M,{name:`warn`}),` `,n.missingFiles.length,` index`,` `,n.missingFiles.length===1?`line points`:`lines point`,` at missing files`]}),!t.custom&&!r&&(0,A.jsxs)(`button`,{type:`button`,className:`head-action`,onClick:()=>i(!0),children:[(0,A.jsx)(M,{name:`trash`}),` Remove `,n.missingFiles.length===1?`line`:`lines`,`…`]})]}),n&&r&&(0,A.jsx)(af,{action:`remove-dead`,path:n.path,verb:`Remove lines`,busyVerb:`Removing…`,message:`Removed ${n.missingFiles.length===1?`the dead line`:`dead lines`} from MEMORY.md`,actions:e,onClose:()=>i(!1)})]})}function rf(e){return e.split(/[/\\]/).at(-1)??e}function af({action:e,path:t,verb:n,busyVerb:r,message:i,danger:a=!1,select:o,actions:s,onClose:c}){let[l,u]=(0,v.useState)(null),[d,f]=(0,v.useState)(null),[p,m]=(0,v.useState)(!1);return(0,v.useEffect)(()=>{Re.previewMemory(e,t).then(u,e=>f(Ie(e)))},[e,t]),(0,A.jsxs)(`section`,{className:`review memory-review`,"aria-label":`Review memory change`,children:[(0,A.jsx)(of,{preview:l,problem:d}),(0,A.jsxs)(`div`,{className:`editor-buttons`,children:[l&&!d&&(0,A.jsx)(`button`,{type:`button`,className:a?`danger`:`primary`,disabled:p,onClick:()=>{m(!0),s.onChange(()=>Re.changeMemory(e,t,l.revision),i,o).finally(c)},children:p?r:n}),(0,A.jsx)(`button`,{type:`button`,onClick:c,disabled:p,children:`Cancel`})]})]})}function of({preview:e,problem:t}){return t?(0,A.jsx)(`p`,{className:`flag bad`,role:`alert`,children:t}):e?e.files.map(e=>(0,A.jsxs)(`div`,{className:`memory-review-file`,children:[(0,A.jsxs)(`p`,{className:`sub-title small`,title:j(e.path),children:[(0,A.jsx)(`span`,{className:`mono`,children:rf(e.path)}),e.after===null&&(0,A.jsx)(`span`,{className:`muted`,children:` is deleted; a backup is kept and you can undo it`})]}),(0,A.jsx)(Ke,{before:e.before??``,after:e.after??``})]},e.path)):(0,A.jsx)(`p`,{className:`muted small`,children:`Reading the files…`})}function sf({row:e,actions:t}){let n=e.item,r=t.view.memory.custom===!0,[i,a]=(0,v.useState)(!1),[o,s]=(0,v.useState)(!1),c=t.overview?.sharedMemories.find(e=>e.name===n.name)?.stores??[],l=n.path.split(/[/\\]/).at(-3),u=c.filter(e=>$d(e.projectPath)!==l);return(0,A.jsxs)(A.Fragment,{children:[n.description&&(0,A.jsx)(`p`,{className:`verdict`,children:n.description}),(0,A.jsxs)(`dl`,{className:`fields`,children:[(0,A.jsx)(X,{label:`Type`,children:(0,A.jsx)(ef,{type:n.type})}),(0,A.jsx)(X,{label:`File`,children:(0,A.jsx)(Bd,{path:n.path})}),(0,A.jsx)(X,{label:`Changed`,children:S(n.mtime)}),(0,A.jsx)(X,{label:`In MEMORY.md`,children:n.inIndex?`yes`:(0,A.jsxs)(`span`,{className:`fix`,children:[(0,A.jsx)(`span`,{className:`flag bad`,children:`no, so Claude won't see it at session start`}),!r&&!o&&(0,A.jsxs)(`button`,{type:`button`,className:`head-action`,onClick:()=>s(!0),children:[(0,A.jsx)(M,{name:`plus`}),` Add to MEMORY.md…`]})]})}),n.linkedFrom.length>0&&(0,A.jsx)(X,{label:`Linked from`,children:(0,A.jsx)(`span`,{className:`mono`,children:n.linkedFrom.join(`, `)})}),n.brokenLinks.length>0&&(0,A.jsx)(X,{label:`Broken links`,children:(0,A.jsx)(`span`,{className:`mono`,children:n.brokenLinks.map(e=>`[[${e}]]`).join(`, `)})})]}),o&&(0,A.jsx)(af,{action:`add`,path:n.path,verb:`Add to MEMORY.md`,busyVerb:`Adding…`,message:`Added ${n.name} to MEMORY.md`,actions:t,onClose:()=>s(!1)}),u.length>0&&(0,A.jsxs)(`section`,{className:`sub`,children:[(0,A.jsx)(`h3`,{children:`Also saved in`}),(0,A.jsx)(`ul`,{className:`plain`,children:u.map(e=>(0,A.jsxs)(`li`,{children:[(0,A.jsx)(`button`,{type:`button`,className:`link`,onClick:()=>t.onOpenDirectory(e.projectPath),children:j(e.projectPath)}),(0,A.jsx)(`span`,{className:`flag ${e.hash===n.hash?``:`warn`}`,children:e.hash===n.hash?`identical`:`different text`})]},e.projectPath))}),u.some(e=>e.hash===n.hash)&&(0,A.jsx)(`p`,{className:`muted small`,children:`Deleting this copy keeps the identical one saved elsewhere.`})]}),!r&&(0,A.jsx)(`div`,{className:`actions`,children:i?(0,A.jsxs)(`section`,{className:`confirm`,"aria-label":`Confirm delete`,children:[(0,A.jsxs)(`p`,{children:[`Delete `,(0,A.jsx)(`strong`,{children:n.file}),n.inIndex?` and its line in MEMORY.md`:``,`?`,n.linkedFrom.length>0&&` ${n.linkedFrom.length} other ${n.linkedFrom.length===1?`memory links`:`memories link`} here and will have a broken link.`]}),(0,A.jsx)(af,{action:`delete`,path:n.path,verb:`Delete memory`,busyVerb:`Deleting…`,message:`Deleted ${n.file}`,danger:!0,select:null,actions:t,onClose:()=>a(!1)})]}):(0,A.jsxs)(`button`,{type:`button`,className:`quiet-danger`,onClick:()=>a(!0),children:[(0,A.jsx)(M,{name:`trash`}),` Delete memory…`]})}),(0,A.jsx)(Vd,{text:n.body})]})}var cf={allow:`runs without asking`,ask:`asks you first`,deny:`blocked`},lf={cells:(e,t,n)=>{if(_e(e))return(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`td`,{}),(0,A.jsx)(`td`,{children:(0,A.jsx)(`span`,{className:`muted`,children:`suggested`})}),(0,A.jsx)(`td`,{className:`mono value`,children:(0,A.jsx)(Id,{onClick:n,children:e.item.rule})}),(0,A.jsxs)(`td`,{className:`desc`,children:[`you allowed it `,E(e.item.approved,`time`),(0,A.jsxs)(`span`,{className:`muted`,children:[` · `,S(e.item.last)]})]})]});let r=e.item;return(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`td`,{children:(0,A.jsx)(N,{line:e.line})}),(0,A.jsx)(`td`,{children:r.kind===`rule`?(0,A.jsx)(`span`,{className:`perm perm-${r.list}`,children:r.list}):(0,A.jsx)(`span`,{className:`muted`,children:r.kind===`defaultMode`?`default mode`:`extra folder`})}),(0,A.jsx)(`td`,{className:`mono value`,children:(0,A.jsx)(Id,{onClick:n,children:r.kind===`rule`?r.rule:Ze(r.value)})}),(0,A.jsx)(`td`,{className:`desc`,children:(0,A.jsx)(df,{p:r,usage:t.view.usage})})]})},Head:({actions:e})=>(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`span`,{className:`tt-note`,children:`Checked deny, then ask, then allow, across every file`}),(0,A.jsxs)(`button`,{type:`button`,className:`head-action`,onClick:()=>e.onAdd(`permission`),children:[(0,A.jsx)(M,{name:`plus`}),` Add rule`]})]}),Details:({row:e,actions:t})=>{if(_e(e))return(0,A.jsx)(Z,{row:e,actions:t},e.id);let n=e.item,{view:r}=t,i=n.kind===`rule`?n.path:r.settings.find(e=>e.scope===n.scope&&!e.legacy)?.path;return(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(ff,{p:n}),(0,A.jsxs)(`dl`,{className:`fields`,children:[n.kind===`rule`&&(0,A.jsx)(X,{label:`List`,children:n.list}),(0,A.jsx)(X,{label:n.kind===`rule`?`Rule`:`Value`,children:(0,A.jsx)(`span`,{className:`mono wrap`,children:n.kind===`rule`?n.rule:Ze(n.value)})}),(0,A.jsxs)(X,{label:`Set in`,children:[x(n.scope),` settings`]}),n.kind===`rule`&&n.list!==`deny`&&n.inEffect&&(0,A.jsx)(X,{label:`Covered here`,children:(0,A.jsx)(pf,{rule:n,usage:r.usage})}),i&&(0,A.jsx)(X,{label:`File`,children:(0,A.jsx)(Bd,{path:i})})]}),(0,A.jsxs)(`section`,{className:`sub`,children:[(0,A.jsx)(`h3`,{children:`How Claude Code decides`}),(0,A.jsx)(`p`,{className:`muted small`,children:`Rules from every settings file are pooled and checked in order: deny, then ask, then allow. The first match decides, so a deny in any file beats an allow in any other.`})]}),n.kind===`rule`?(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`h3`,{className:`sub-title`,children:`Change this rule`}),(0,A.jsx)(Ht,{view:r,rule:n,onSaved:t.onSaved},e.id)]}):(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`h3`,{className:`sub-title`,children:`Change permissions`}),(0,A.jsx)(Zt,{view:r,settingKey:`permissions`,defaultScope:we.includes(n.scope)?n.scope:`user`,onSaved:t.onSaved},n.scope)]})]})}},uf={allow:`Claude uses matching tools without asking, unless a deny or ask rule matches first.`,ask:`Claude asks before using matching tools, unless a deny rule matches first.`,deny:`Claude may not use matching tools. No allow rule in any file can undo this.`};function df({p:e,usage:t}){return e.inEffect?e.kind===`defaultMode`?`how sessions start`:e.kind===`rule`?e.decidedBy?(0,A.jsxs)(`span`,{className:`flag warn`,children:[e.decidedBy.list===`deny`?`denied`:`asks first`,`: same rule in `,e.decidedBy.list,` (`,e.decidedBy.scope,`)`]}):(0,A.jsxs)(A.Fragment,{children:[cf[e.list],ve(e,t)&&(0,A.jsx)(`span`,{className:`flag`,children:`covered no call here`})]}):`Claude may read and edit here`:(0,A.jsx)(`span`,{className:`flag warn`,children:e.note??`not in effect`})}function ff({p:e}){return e.inEffect?e.kind===`defaultMode`?(0,A.jsx)(`p`,{className:`verdict`,children:`Sessions here start in ${e.value} mode.`}):e.kind===`rule`?e.decidedBy?(0,A.jsx)(`p`,{className:`verdict off`,children:`This ${e.list} rule never applies: the same rule is in ${e.decidedBy.list} (${e.decidedBy.scope} settings), which is checked first.`}):(0,A.jsx)(`p`,{className:`verdict ${e.list===`deny`?``:`ok`}`,children:uf[e.list]}):(0,A.jsx)(`p`,{className:`verdict`,children:`Claude may read and edit files in this folder as well as the project.`}):(0,A.jsx)(`p`,{className:`verdict off`,children:e.note})}function pf({rule:e,usage:t}){if(t===void 0)return(0,A.jsx)(`span`,{className:`muted`,children:`counting…`});if(t===null)return(0,A.jsx)(`span`,{className:`muted`,children:`ccdesk could not finish counting the transcripts`});let n=t.matches[e.rule];return n===void 0?(0,A.jsx)(`span`,{className:`muted`,children:`counting…`}):n===null?(0,A.jsx)(`span`,{className:`muted`,children:`not counted: ccdesk matches tool, command and domain rules`}):t.sessions===0?(0,A.jsx)(`span`,{className:`muted`,children:`no sessions here yet`}):(0,A.jsxs)(A.Fragment,{children:[E(n,`call`),` in `,he(t),n===0&&e.list===`allow`&&(0,A.jsxs)(`span`,{className:`muted small`,children:[` `,e.scope===`user`?`Your user settings apply in every directory, so others may still use it.`:`If Claude no longer needs it here, removing it narrows what runs without asking.`]})]})}function Z({row:e,actions:t}){let{view:n}=t,r=Vt(n,t.onSaved),[i,a]=(0,v.useState)(`local`),o=xt(n,i),{rule:s,approved:c,last:l}=e.item,u=/^Bash\((.+) \*\)$/.exec(s)?.[1];return(0,A.jsxs)(A.Fragment,{children:[(0,A.jsxs)(`p`,{className:`verdict`,children:[`Claude Code asked you `,E(c,`time`),` about calls this rule covers, and you allowed each one, refusing none of the calls it covers. An allow rule lets Claude make them without asking, unless a deny or ask rule matches first.`]}),(0,A.jsxs)(`dl`,{className:`fields`,children:[(0,A.jsx)(X,{label:`Rule`,children:(0,A.jsx)(`span`,{className:`mono wrap`,children:s})}),(0,A.jsx)(X,{label:`You allowed`,children:E(c,`call`)}),(0,A.jsx)(X,{label:`Last asked`,children:S(l)})]}),u&&(0,A.jsxs)(`p`,{className:`muted small`,children:[`It allows every command that starts with `,(0,A.jsx)(`code`,{children:u}),`, with any arguments.`]}),(0,A.jsxs)(`section`,{className:`sub editor`,"aria-label":`Allow this rule`,children:[(0,A.jsx)(`h3`,{children:`Allow it`}),(0,A.jsx)(`p`,{className:`muted small`,children:`In local settings it applies only for you here; in project settings, for everyone working in this repository; in your user settings, in every project.`}),(0,A.jsx)(Tt,{view:n,scope:i,onPick:e=>{a(e),r.cancel()}}),(0,A.jsx)(`p`,{className:`muted small mono wrap`,children:o?j(o):``}),!r.reviewing&&(0,A.jsx)(`div`,{className:`editor-buttons`,children:(0,A.jsx)(`button`,{type:`button`,className:`primary`,disabled:r.busy||!o,onClick:()=>o&&void r.start(o,void 0,{list:`allow`,rule:s},`Allowed ${s} in ${x(i).toLowerCase()} settings`),children:`Review change`})}),r.shown]}),(0,A.jsxs)(`p`,{className:`muted small`,children:[`Counted from Claude Code's transcripts for`,` `,n.usage?he(n.usage):`this directory`,`. ccdesk reads each call's tool, command or address and whether you allowed it, and shows only counts and rule patterns, never what was in a session.`]})]})}function mf(e){return e.from.length===0?`Claude Code ignores this value: ${e.ignored[0]?.reason??``}.`:e.merged?`Lists and objects from these files are combined.`:`${x(e.from[0]??`user`)} settings decide this value.`}function hf(e,t,n){return n===void 0?`unset`:e.from.includes(t)?`wins`:`lost`}function gf(e,t,n){return e===void 0?t?`not set`:`no file`:`${w(e)}${n?` (ignored)`:``}`}var _f={cells:(e,t,n)=>{let r=e.item;return(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`td`,{className:`bullets`,children:e.lines.map(e=>(0,A.jsx)(N,{line:e},e))}),(0,A.jsx)(`td`,{className:`mono`,children:(0,A.jsx)(Id,{onClick:n,children:r.key})}),(0,A.jsx)(`td`,{className:`mono value`,children:r.from.length===0?(0,A.jsx)(`span`,{className:`muted`,children:`ignored`}):Ze(w(r.value))}),(0,A.jsxs)(`td`,{className:`beat`,children:[r.merged?(0,A.jsx)(`span`,{className:`muted`,children:`merged`}):r.overridden.map(e=>(0,A.jsxs)(`span`,{className:`beaten`,children:[(0,A.jsx)(N,{line:e.scope,hollow:!0}),` `,(0,A.jsx)(`s`,{children:Ze(w(e.value))})]},e.scope)),r.ignored.map(e=>(0,A.jsxs)(`span`,{className:`beaten`,title:e.reason,children:[(0,A.jsx)(N,{line:e.scope,hollow:!0}),` `,(0,A.jsx)(`s`,{children:Ze(w(e.value))}),` `,(0,A.jsx)(`span`,{className:`flag warn`,children:`ignored`})]},`ignored-${e.scope}`))]})]})},Head:({actions:e})=>(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`button`,{type:`button`,className:`head-action`,onClick:e.onCompare,children:`Compare with…`}),(0,A.jsxs)(`button`,{type:`button`,className:`head-action`,onClick:()=>e.onAdd(`setting`),children:[(0,A.jsx)(M,{name:`plus`}),` Add setting`]})]}),Details:({row:e,actions:t})=>{let n=e.item,{view:r}=t,i=e=>{let t=r.settings.filter(t=>t.scope===e);return t.find(e=>e.data?.[n.key]!==void 0)??t.find(e=>!e.legacy)};return(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`p`,{className:`verdict ${n.from.length===0?`off`:`ok`}`,children:mf(n)}),(0,A.jsx)(`h3`,{className:`sub-title`,children:`Every file that sets it`}),(0,A.jsx)(`table`,{className:`layers`,children:(0,A.jsx)(`tbody`,{children:O.map(e=>{let t=i(e),r=t?.data?.[n.key],a=n.ignored.find(t=>t.scope===e);return(0,A.jsxs)(`tr`,{className:hf(n,e,r),title:a?.reason,children:[(0,A.jsx)(`th`,{scope:`row`,children:(0,A.jsx)(N,{line:e,hollow:r===void 0})}),(0,A.jsx)(`td`,{className:`mono`,children:gf(r,t?.exists===!0,a!==void 0)})]},e)})})}),(0,A.jsx)(`h3`,{className:`sub-title`,children:`Value Claude Code uses`}),n.note&&(0,A.jsx)(`p`,{className:`muted small`,children:n.note}),(0,A.jsx)(`pre`,{className:`raw`,children:JSON.stringify(n.value,null,2)}),(0,A.jsx)(`h3`,{className:`sub-title`,children:`Change it`}),(0,A.jsx)(Zt,{view:r,settingKey:n.key,defaultScope:[...n.from].reverse().find(e=>we.includes(e))??`user`,onSaved:t.onSaved},n.key),(0,A.jsx)(`dl`,{className:`fields`,children:n.from.map(e=>{let t=i(e);return t?(0,A.jsx)(X,{label:`${x(e)} file`,children:(0,A.jsx)(Bd,{path:t.path})},e):null})})]})}};function vf(e,t){if(e===void 0)return`counting…`;if(e===null)return`ccdesk could not finish counting the transcripts`;if(e.sessions===0)return`no sessions here yet`;let n=e.tools.find(e=>e.tool===t);if(!n)return`not called in ${he(e)}`;let r=n.approved+n.refused;return`${E(n.calls,`call`)} in ${he(e)}${r>0?`; asked you ${E(r,`time`)}, you refused ${n.refused}`:``}`}function yf(e){return e.verdict==="default"?e.asks?`asks`:`free`:e.verdict}function bf(e){return e.verdict===`denied`?`off`:e.verdict===`allowed`||!e.asks&&e.verdict==="default"?`ok`:``}function xf({calls:e}){return e===void 0?`…`:e===null?(0,A.jsx)(`span`,{className:`muted`,title:`ccdesk could not finish counting the transcripts`,children:`?`}):e}function Sf(e){let t=e.decidedBy,n=t?`${t.rule} in ${x(t.scope).toLowerCase()} settings`:``;switch(e.verdict){case`denied`:return`Denied by ${n}, so Claude Code removes the tool from Claude's context.`;case`asks`:return`Claude asks you every time it wants this tool, because of ${n}.`;case`allowed`:return`Claude uses it without asking, because of ${n}, unless a rule below for some uses denies or asks first.`;case`default`:return e.name===`EndConversation`?`No permission rule or PreToolUse hook applies to this tool while Claude has any other tool, so it is never blocked and never asks.`:e.asks?`No rule names the whole tool, so Claude asks before using it.`:`No rule names the whole tool, and it needs no approval. File tools still ask for paths outside the working directories.`}}function Cf(e){let t=e.permissions.find(e=>e.kind===`defaultMode`&&e.inEffect);return t?.kind===`defaultMode`?t.value:`default`}function wf(e,t){return e.permissions.filter(e=>e.kind===`rule`&&e.inEffect&&(t.removedBy??[]).some(t=>t.list===e.list&&t.rule===e.rule&&t.scope===e.scope))}function Tf({tool:e,actions:t}){let{view:n}=t,r=Vt(n,t.onSaved),[i,a]=(0,v.useState)(!1),[o,s]=(0,v.useState)(`user`);if(e.name===`EndConversation`)return null;let c=wf(n,e);if(e.verdict===`denied`&&c.length>0){let e=c.filter(e=>!we.includes(e.scope));return(0,A.jsxs)(`section`,{className:`sub editor`,"aria-label":`Turn back on`,children:[(0,A.jsx)(`h3`,{children:`Turn back on`}),e.length>0?(0,A.jsx)(`p`,{className:`muted small`,children:`Managed settings turn it off, so it stays off whatever your files say.`}):(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`p`,{className:`muted small`,children:c.length===1?`Removing this rule gives Claude the tool again.`:`Each of these rules turns it off; remove all of them to give Claude the tool again.`}),(0,A.jsx)(`ul`,{className:`plain`,children:c.map(e=>(0,A.jsxs)(`li`,{className:`tool-switch-rule`,children:[(0,A.jsx)(N,{line:e.scope}),` `,(0,A.jsx)(`span`,{className:`mono`,children:e.rule}),(0,A.jsxs)(`span`,{className:`muted small`,children:[` `,`in `,x(e.scope).toLowerCase(),` settings`]}),!e.rule.includes(`(`)&&e.rule.includes(`*`)&&(0,A.jsx)(`span`,{className:`flag warn`,children:`also turns off every other tool it matches`}),(0,A.jsx)(`button`,{type:`button`,className:`head-action`,disabled:r.busy||r.reviewing,onClick:()=>void r.start(e.path,{list:`deny`,rule:e.rule},void 0,`Removed ${e.rule} from deny`),children:`Remove…`})]},`${e.path}:${e.rule}`))})]}),r.shown]})}let l=xt(n,o);return(0,A.jsx)(`section`,{className:`sub editor`,"aria-label":`Turn off for Claude`,children:i?(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`h3`,{children:`Turn off for Claude`}),(0,A.jsx)(`p`,{className:`muted small`,children:`A deny rule naming the whole tool removes it from Claude's context. In your user settings it applies in every project; in project settings, for everyone working in this repository; in local settings, only for you here.`}),(0,A.jsx)(Tt,{view:n,scope:o,onPick:e=>{s(e),r.cancel()}}),(0,A.jsx)(`p`,{className:`muted small mono wrap`,children:l?j(l):``}),!r.reviewing&&(0,A.jsxs)(`div`,{className:`editor-buttons`,children:[(0,A.jsx)(`button`,{type:`button`,className:`primary`,disabled:r.busy||!l,onClick:()=>l&&void r.start(l,void 0,{list:`deny`,rule:e.name},`Turned off ${e.name} in ${x(o).toLowerCase()} settings`),children:`Review change`}),(0,A.jsx)(`button`,{type:`button`,onClick:()=>a(!1),children:`Cancel`})]}),r.shown]}):(0,A.jsxs)(`button`,{type:`button`,className:`quiet-danger`,onClick:()=>a(!0),children:[(0,A.jsx)(M,{name:`block`}),` Turn off for Claude…`]})})}function Ef({text:e}){return e.split(/`([^`]+)`/).map((e,t)=>t%2==1?(0,A.jsx)(`code`,{children:e},t):e)}var Df={instructions:Zd,settings:_f,permissions:lf,tools:{cells:(e,t,n)=>{let r=e.item,i=r.scoped.filter(e=>!e.unchecked);return(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`td`,{children:e.line&&(0,A.jsx)(N,{line:e.line})}),(0,A.jsx)(`td`,{className:`mono`,children:(0,A.jsx)(Id,{onClick:n,children:r.name})}),(0,A.jsx)(`td`,{children:(0,A.jsx)(`span`,{className:`tool-outcome tool-${yf(r)}`,children:ke(r)})}),(0,A.jsxs)(`td`,{className:`checks`,children:[i.length>0&&(0,A.jsxs)(`span`,{className:`flag`,title:i.map(e=>`${e.list} ${e.rule}`).join(`
60
- `),children:[E(i.length,`rule`),` for some uses`]}),i.length<r.scoped.length&&(0,A.jsx)(`span`,{className:`flag warn`,title:`Claude Code never checks a path rule on this tool`,children:E(r.scoped.length-i.length,`unchecked rule`)}),r.hooks>0&&(0,A.jsx)(`span`,{className:`flag`,children:E(r.hooks,`hook`)})]}),(0,A.jsx)(`td`,{className:`num${e.calls?` used`:``}`,children:(0,A.jsx)(xf,{calls:e.calls})}),(0,A.jsx)(`td`,{className:`desc`,children:(0,A.jsx)(Ef,{text:r.description.split(/(?<=\.)\s/)[0]??``})})]})},Head:({actions:e})=>(0,A.jsxs)(`span`,{className:`tt-note`,children:[`As in Manual mode; sessions here start in `,Cf(e.view),` mode`]}),Details:({row:e,actions:t})=>{let n=e.item;return(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`p`,{className:`verdict ${bf(n)}`,children:Sf(n)}),(0,A.jsx)(`p`,{children:(0,A.jsx)(Ef,{text:n.description})}),n.scoped.length>0&&(0,A.jsxs)(`section`,{className:`sub`,children:[(0,A.jsx)(`h3`,{children:`Rules for some uses`}),(0,A.jsx)(`ul`,{className:`plain`,children:n.scoped.map(e=>(0,A.jsxs)(`li`,{children:[(0,A.jsx)(N,{line:e.scope}),` `,(0,A.jsx)(`span`,{className:`perm perm-${e.list}`,children:e.list}),` `,(0,A.jsx)(`span`,{className:`mono`,children:e.rule}),e.unchecked&&(0,A.jsx)(`span`,{className:`flag warn`,children:`never checked: Claude Code checks paths against Edit and Read rules only`})]},`${e.scope}:${e.list}:${e.rule}`))}),(0,A.jsx)(`p`,{className:`muted small`,children:`Checked deny, then ask, then allow, before the rule for the whole tool applies.`})]}),(0,A.jsxs)(`dl`,{className:`fields`,children:[(0,A.jsx)(X,{label:`Manual mode`,children:n.asks?`asks before using it`:`no approval needed`}),(0,A.jsx)(X,{label:`Used here`,children:vf(t.view.usage,n.name)}),(0,A.jsx)(X,{label:`PreToolUse hooks`,children:n.hooks===0?`none`:`${E(n.hooks,`hook`)} run before each use`})]}),(0,A.jsx)(Tf,{tool:n,actions:t},`${n.name}:${n.verdict}`),(0,A.jsx)(`p`,{className:`muted small`,children:`Permission modes other than Manual change which uses ask. Tool names and descriptions come from Claude Code's tools reference.`})]})}},memory:tf,hooks:Yd,mcp:Qd,extensions:Jd,catalog:Kd},Of=Ae.map(e=>({...e,...Df[e.id]}));function kf(e){let t=Of.find(t=>t.id===e);if(!t)throw Error(`Unknown section ${e}`);return t}function Af(){return{format:Ye(),reference:Nt()}}var jf={setting:`Add a setting`,permission:`Add a permission rule`,hook:`Add a hook`,mcp:`Add an MCP server`,agent:`Create an agent`};function Mf({row:e,adding:t,actions:n,onClose:r}){let i=(0,v.useRef)(null),a=t??e?.id??null;if((0,v.useEffect)(()=>{a&&matchMedia(`(max-width: 1180px)`).matches&&i.current?.focus()},[a]),t){let e=jf[t];return(0,A.jsxs)(`aside`,{className:`inspector`,"aria-label":e,children:[(0,A.jsxs)(`header`,{className:`insp-head`,children:[(0,A.jsx)(M,{name:`plus`}),(0,A.jsx)(`h2`,{ref:i,tabIndex:-1,children:e}),(0,A.jsx)(`button`,{type:`button`,className:`icon-button`,onClick:r,"aria-label":`Close`,children:(0,A.jsx)(M,{name:`close`})})]}),(0,A.jsxs)(`div`,{className:`insp-body`,children:[t===`setting`&&(0,A.jsx)(Zt,{view:n.view,settingKey:null,defaultScope:`user`,onSaved:n.onSaved}),t===`permission`&&(0,A.jsx)(Ht,{view:n.view,rule:null,onSaved:n.onSaved}),t===`agent`&&(0,A.jsx)(At,{view:n.view,agent:null,onSaved:n.onSaved}),t===`mcp`&&(0,A.jsx)(Bt,{view:n.view,server:null,onSaved:n.onSaved}),t===`hook`&&(0,A.jsx)(Ft,{view:n.view,hook:null,onSaved:n.onSaved})]})]})}if(!e)return null;let o=kf(e.section),{Details:s}=o;return(0,A.jsxs)(`aside`,{className:`inspector`,"aria-label":`Details`,children:[(0,A.jsxs)(`header`,{className:`insp-head`,children:[e.line?(0,A.jsx)(N,{line:e.line}):(0,A.jsx)(M,{name:`command`}),(0,A.jsx)(`h2`,{ref:i,tabIndex:-1,children:o.heading(e,Af())}),(0,A.jsx)(`button`,{type:`button`,className:`icon-button`,onClick:r,"aria-label":`Close details`,children:(0,A.jsx)(M,{name:`close`})})]}),(0,A.jsx)(`div`,{className:`insp-body`,children:(0,A.jsx)(s,{row:e,actions:n},e.id)})]})}var Nf={query:``,line:null,sort:{},only:{}};function Pf(){let e=new URLSearchParams(location.search);if(e.has(`changes`))return{kind:`changes`};if(e.has(`all`))return{kind:`all`};let t=e.get(`dir`),n=e.get(`compare`);return t&&n?{kind:`compare`,dir:t,other:n}:{kind:`directory`,dir:t??void 0,profile:e.get(`profile`)===`print`?`print`:`interactive`}}function Ff(){let e=new URLSearchParams(location.search),t={...Nf,sort:{},only:{}};t.query=e.get(`q`)??``;let n=e.get(`line`);t.line=b.find(e=>e.line===n)?.line??null;for(let[n,r]of e){let[e,i]=n.split(`.`);if(i){if(e===`sort`){let e=/^(\d+)(d?)$/.exec(r);e&&(t.sort[i]={column:Number(e[1]),descending:e[2]===`d`})}else e===`only`&&(t.only[i]=r)}}return t}function If(e){if(e.kind===`changes`)return new URLSearchParams(`changes`);if(e.kind===`all`)return new URLSearchParams(`all`);if(e.kind===`compare`)return new URLSearchParams({dir:e.dir,compare:e.other});let t=new URLSearchParams(e.dir?{dir:e.dir}:{});return e.profile!==`interactive`&&t.set(`profile`,e.profile),t}function Lf(e,t){let n=e.toString().replace(/^(changes|all)=(&|$)/,`$1$2`),r=n?`?${n}`:location.pathname;t?history.pushState(null,``,r):history.replaceState(null,``,r)}function Rf(e){Lf(If(e),!0)}function zf(e,t){let n=If(e);t.query&&n.set(`q`,t.query),t.line&&n.set(`line`,t.line);for(let[e,r]of Object.entries(t.sort))r&&n.set(`sort.${e}`,`${r.column}${r.descending?`d`:``}`);for(let[e,r]of Object.entries(t.only))r&&n.set(`only.${e}`,r);Lf(n,!1)}function Bf(e,t){return typeof e==`number`&&typeof t==`number`?e-t:String(e).localeCompare(String(t),void 0,{numeric:!0,sensitivity:`base`})}function Vf(e,t,n,r){let i=n.query.trim().toLowerCase();return e.map(e=>{let a=t.filter(t=>t.section===e.id),o=n.only[e.id],s=a.filter(t=>(!n.line||t.line===n.line||t.section===`settings`&&t.lines.includes(n.line))&&(!o||e.facet?.of(t)===o)&&(!i||e.text(t).toLowerCase().includes(i))),c=n.sort[e.id],l=c?e.columns[c.column]?.sort:void 0;return c&&l&&s.sort((e,t)=>Bf(l(e),l(t))*(c.descending?-1:1)),{section:e,all:a,matching:s,shown:s.slice(0,r[e.id]??50)}})}function Q(e){return!!(e.query.trim()||e.line||Object.values(e.only).some(Boolean))}function Hf(e){let t=e.inventory;return b.filter(e=>e.line!==`plugin`||t.plugins.some(e=>e.enabled)).map(({line:n,name:r})=>{let i=[];if(n===`memory`){let t=e.memory.memories.length;return t&&i.push(E(t,`memory`,`memories`)),{line:n,name:r,facts:i,active:t>0}}if(n===`plugin`){let e=t.plugins.filter(e=>e.enabled).length;return e&&i.push(E(e,`plugin`)),{line:n,name:r,facts:i,active:e>0}}let a=e.instructions.filter(e=>e.scope===n),o=a.filter(e=>e.status!==`skipped`).length,s=a.length-o;o&&i.push(E(o,`file`)),s&&i.push(`${s} skipped`);let c=e.effective.filter(e=>e.from.includes(n)).length;c&&i.push(E(c,`setting`));let l=t.hooks.filter(e=>e.source===n).length;l&&i.push(E(l,`hook`));let u=t.mcpServers.filter(e=>e.scope===n).length;u&&i.push(`${u} MCP`);let d=[...t.agents,...t.skills,...t.commands,...t.outputStyles].filter(e=>e.scope===n).length;d&&i.push(E(d,`extension`));let f=l+u+d;return{line:n,name:r,facts:i,active:o>0||c>0||f>0}})}function Uf({view:e,lit:t,filter:n,onFilter:r}){let i=Hf(e);return(0,A.jsx)(`nav`,{className:`route`,"aria-label":`Load order for this directory`,children:(0,A.jsx)(`ol`,{className:`route-stops`,children:i.map(e=>{let i=n===e.line;return(0,A.jsx)(`li`,{className:`stop${e.active?``:` idle`}${t===e.line?` lit`:``}`,children:(0,A.jsxs)(`button`,{type:`button`,"aria-pressed":i,className:i?`on`:``,onClick:()=>r(i?null:e.line),title:i?`Show every scope`:`Show only ${e.name.toLowerCase()} items`,children:[(0,A.jsx)(`span`,{className:`stop-node`,children:(0,A.jsx)(N,{line:e.line,hollow:!e.active})}),(0,A.jsx)(`span`,{className:`stop-name`,children:e.name}),(0,A.jsx)(`span`,{className:`stop-facts`,children:e.facts.length?e.facts.join(` · `):`not used`})]})},e.line)})})})}function Wf({view:e}){let t=e.sharing;if(!t)return null;let n=[[`tracked`,`Tracked in git: everyone who clones gets these`,t.tracked],[`untracked`,`Not tracked yet`,t.untracked],[`ignored`,`Git-ignored: only you`,t.ignored]];return n.every(([,,e])=>e.length===0)?null:(0,A.jsx)(`dl`,{className:`sharing`,"aria-label":`What this repository shares`,children:n.filter(([,,e])=>e.length>0).map(([e,t,n])=>(0,A.jsxs)(`div`,{className:`sharing-group vis-${e}`,children:[(0,A.jsx)(`dt`,{children:t}),(0,A.jsx)(`dd`,{className:`mono`,children:n.map(e=>(0,A.jsx)(`span`,{children:e},e))})]},e))})}function Gf(e,t){return e?.column===t?e.descending?void 0:{column:t,descending:!0}:{column:t,descending:!1}}function Kf(e){return e.descending?`descending`:`ascending`}function qf(e){return e.descending?`↓`:`↑`}function Jf({columns:e,sort:t,onSort:n}){return(0,A.jsx)(`thead`,{children:(0,A.jsx)(`tr`,{children:e.map((e,r)=>{let i=t?.column===r;return(0,A.jsx)(`th`,{scope:`col`,"aria-sort":i?Kf(t):void 0,children:e.sort?(0,A.jsxs)(`button`,{type:`button`,className:`sort`,onClick:()=>n(Gf(t,r)),children:[e.label||(0,A.jsx)(`span`,{className:`visually-hidden`,children:`Scope`}),(0,A.jsx)(`span`,{className:`sort-mark${i?` on`:``}`,"aria-hidden":`true`,children:i?qf(t):`↕`})]}):e.label},e.label||`scope`)})})})}function Yf({shown:e,total:t,page:n,onMore:r}){return e>=t?null:(0,A.jsxs)(`button`,{type:`button`,className:`show-more`,onClick:r,children:[`Show `,Math.min(n,t-e),` more`,(0,A.jsxs)(`span`,{className:`muted`,children:[` `,`· `,e,` of `,t,` shown`]})]})}function Xf({groups:e,actions:t,state:n,selected:r,onSelect:i,onSort:a,onOnly:o,onShowMore:s,filtered:c}){return(0,A.jsx)(`div`,{className:`timetable`,children:e.map(({section:e,all:l,matching:u,shown:d})=>{if(c&&u.length===0)return null;let f=n.sort[e.id],{Head:p}=e;return(0,A.jsxs)(`section`,{id:`section-${e.id}`,className:`tt-section`,"aria-labelledby":`h-${e.id}`,children:[(0,A.jsxs)(`header`,{className:`tt-head`,children:[(0,A.jsx)(`h2`,{id:`h-${e.id}`,children:e.title}),(0,A.jsx)(`span`,{className:`tt-count`,children:u.length===l.length?l.length:`${u.length} of ${l.length}`}),e.facet&&(0,A.jsx)($f,{label:e.facet.label,values:Zf(l,e.facet.of,e.facet.order?.(Af())),current:n.only[e.id],render:e.renderFacet,onPick:t=>o(e.id,t)}),p&&(0,A.jsx)(p,{actions:t})]}),l.length===0?(0,A.jsx)(`p`,{className:`tt-empty`,children:e.empty(t.view)}):(0,A.jsxs)(A.Fragment,{children:[(0,A.jsxs)(`table`,{className:`tt tt-${e.id} ${e.tableClass?.(l)??``}`,children:[(0,A.jsx)(Jf,{columns:e.columns,sort:f,onSort:t=>a(e.id,t)}),(0,A.jsx)(`tbody`,{children:d.map(n=>(0,A.jsx)(`tr`,{id:`row-${n.id}`,className:`${n.id===r?`selected`:``}${e.dimmed?.(n)?` dim`:``}`,onClick:()=>i(n.id),children:e.cells(n,t,()=>i(n.id))},n.id))})]}),(0,A.jsx)(Yf,{shown:d.length,total:u.length,page:50,onMore:()=>s(e.id)})]})]},e.id)})})}function Zf(e,t,n=[]){let r=new Map;for(let n of e)r.set(t(n),(r.get(t(n))??0)+1);let i=e=>n.includes(e)?n.indexOf(e):n.length;return[...r].sort(([e],[t])=>i(e)-i(t)||e.localeCompare(t))}var Qf=8;function $f({label:e,values:t,current:n,render:r,onPick:i}){return t.length<2&&!n?null:t.length>Qf?(0,A.jsxs)(`select`,{className:`facet-select`,"aria-label":e,value:n??``,onChange:e=>i(e.target.value||void 0),children:[(0,A.jsxs)(`option`,{value:``,children:[`All (`,t.reduce((e,[,t])=>e+t,0),`)`]}),n&&!t.some(([e])=>e===n)&&(0,A.jsxs)(`option`,{value:n,children:[n,` (0)`]}),t.map(([e,t])=>(0,A.jsxs)(`option`,{value:e,children:[e,` (`,t,`)`]},e))]}):(0,A.jsxs)(`fieldset`,{className:`segmented`,"aria-label":e,children:[(0,A.jsx)(`button`,{type:`button`,"aria-pressed":!n,onClick:()=>i(void 0),children:`All`}),t.map(([e,t])=>(0,A.jsxs)(`button`,{type:`button`,"aria-pressed":n===e,onClick:()=>i(n===e?void 0:e),children:[r?r(e):e,` `,(0,A.jsx)(`span`,{className:`seg-count`,children:t})]},e))]})}function ep({toast:e,onDone:t}){let[n,r]=(0,v.useState)(null);return(0,v.useEffect)(()=>{if(!e)return;let n=setTimeout(t,e.undo?12e3:4e3);return()=>clearTimeout(n)},[e,t]),(0,A.jsx)(`div`,{className:`toast-region`,role:`status`,"aria-live":`polite`,children:e&&(0,A.jsxs)(`div`,{className:`toast`,children:[(0,A.jsx)(`span`,{children:e.text}),e.undo&&(0,A.jsxs)(`button`,{type:`button`,disabled:n===e,onClick:()=>{r(e),e.undo?.()},children:[(0,A.jsx)(M,{name:`undo`}),` Undo`]})]})})}function $(e){return e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement||e instanceof HTMLSelectElement||e instanceof HTMLElement&&e.isContentEditable}function tp({view:e,overview:t,rows:n,jump:r,onJumped:i,reload:a,onToast:o,onOpenDirectory:s,onOpenPalette:c,onProfile:l,onCompare:u}){let[d,f]=(0,v.useState)(null),[p,m]=(0,v.useState)(null),[h,g]=(0,v.useState)(!1),[_,y]=(0,v.useState)(Ff),[b,x]=(0,v.useState)({}),ee=(0,v.useRef)(null);(0,v.useEffect)(()=>zf({kind:`directory`,dir:e.path,profile:e.profile},_),[_,e.path,e.profile]);let te=e=>{y(e),x({})},S=(0,v.useMemo)(()=>Vf(Of,n,_,b),[n,_,b]),C=(0,v.useMemo)(()=>S.flatMap(e=>e.shown),[S]),w=Q(_),T=n.find(e=>e.id===d)??null,E=(0,v.useCallback)((e,t=!1)=>{m(null),f(e),requestAnimationFrame(()=>{let n=document.getElementById(`row-${e}`);n?.scrollIntoView({block:`nearest`}),t&&n?.querySelector(`button`)?.focus({preventScroll:!0})})},[]);(0,v.useEffect)(()=>{if(r||!matchMedia(`(min-width: 1181px)`).matches)return;let t=e.instructions.find(e=>e.status===`loaded`);t&&f(`ins:${t.path}`)},[]),(0,v.useEffect)(()=>{if(!r)return;let e=n.find(e=>e.id===r.id);if(!e)return;i(),g(!1);let t=S.find(t=>t.section.id===e.section);t&&!t.matching.includes(e)?te(Nf):t&&!t.shown.includes(e)&&x(n=>({...n,[e.section]:t.matching.indexOf(e)+50})),requestAnimationFrame(()=>E(r.id))},[r]),ap({visible:C,selected:d,select:E,seeing:h,setSeeing:g,setSelected:f,setAdding:m,filterInput:ee});let ne=np({view:e,overview:t,onOpenDirectory:s,onCompare:u,onToast:o,reload:a,setSelected:f,setAdding:m});return(0,A.jsxs)(`div`,{className:`workspace${T||p?``:` no-details`}`,children:[(0,A.jsxs)(`div`,{className:`work-main`,children:[(0,A.jsxs)(`header`,{className:`dir-head`,children:[(0,A.jsx)(rp,{view:e}),(0,A.jsx)(ip,{seeing:h,onSeeing:g,query:_.query,onQuery:e=>te({..._,query:e}),filterInput:ee,onOpenPalette:c}),(0,A.jsx)(cp,{groups:S,hidden:h})]}),(0,A.jsx)(lp,{profile:e.profile,onProfile:l}),(0,A.jsx)(up,{problems:e.problems}),h?(0,A.jsx)(vt,{view:e}):(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(Uf,{view:e,lit:T?.line??null,filter:_.line,onFilter:e=>te({..._,line:e})}),(0,A.jsx)(Wf,{view:e}),(0,A.jsx)(Xf,{groups:S,actions:ne,state:_,selected:d,onSelect:E,onSort:(e,t)=>y({..._,sort:{..._.sort,[e]:t}}),onOnly:(e,t)=>te({..._,only:{..._.only,[e]:t}}),onShowMore:e=>x(t=>({...t,[e]:(t[e]??50)+50})),filtered:w}),w&&C.length===0&&(0,A.jsxs)(`p`,{className:`tt-empty`,children:[`Nothing matches.`,` `,(0,A.jsx)(`button`,{type:`button`,className:`link`,onClick:()=>te(Nf),children:`Clear filters`})]})]})]}),(0,A.jsx)(Mf,{row:T,adding:p,actions:ne,onClose:()=>{f(null),m(null)}})]})}function np({view:e,overview:t,onOpenDirectory:n,onCompare:r,onToast:i,reload:a,setSelected:o,setAdding:s}){let c=(0,v.useCallback)(async e=>{try{await Re.restore(e.id,e.revision);let t=e.target.split(/[/\\]/).pop();i({text:e.created?`Removed ${t}`:`Put ${t} back`})}catch(e){i({text:`Could not undo: ${Ie(e)}. Recent changes keeps the backup.`})}a()},[i,a]),l=(0,v.useCallback)(({change:e,message:t,select:n})=>{s(null),n!==void 0&&o(n),i({text:t,...e?{undo:()=>c(e)}:{}}),a()},[i,a,c,s,o]);return(0,v.useMemo)(()=>({view:e,overview:t,sharedNames:new Set(t?.sharedMemories.map(e=>e.name)??[]),onOpenDirectory:n,onCompare:()=>r(e.path),onAdd:e=>{o(null),s(e)},onSaved:l,onChange:async(e,t,n)=>{try{l({change:await e(),message:t,...n===void 0?{}:{select:n}})}catch(e){i({text:`Could not do that: ${Ie(e)}`}),a()}}}),[e,t,n,r,l,i,a,o,s])}function rp({view:e}){return(0,A.jsxs)(`div`,{className:`dir-title`,children:[(0,A.jsx)(`h1`,{className:`mono`,title:j(e.path),children:j(e.path)}),!e.exists&&(0,A.jsx)(`span`,{className:`flag bad`,children:`folder no longer exists`}),e.gitRoot&&e.gitRoot!==e.path&&(0,A.jsxs)(`span`,{className:`flag`,children:[`inside `,j(e.gitRoot)]}),(0,A.jsx)(sp,{view:e})]})}function ip({seeing:e,onSeeing:t,query:n,onQuery:r,filterInput:i,onOpenPalette:a}){return(0,A.jsxs)(`div`,{className:`toolbar`,children:[(0,A.jsxs)(`fieldset`,{className:`segmented view-switch`,"aria-label":`View`,children:[(0,A.jsx)(`button`,{type:`button`,"aria-pressed":!e,onClick:()=>t(!1),children:`Config`}),(0,A.jsxs)(`button`,{type:`button`,"aria-pressed":e,onClick:()=>t(!0),children:[(0,A.jsx)(M,{name:`eye`}),` What Claude sees`]})]}),(0,A.jsxs)(`label`,{className:`filter${e?` hidden`:``}`,children:[(0,A.jsx)(M,{name:`search`}),(0,A.jsx)(`input`,{ref:i,value:n,onChange:e=>r(e.target.value),onKeyDown:e=>{e.key===`Escape`&&(r(``),e.currentTarget.blur())},placeholder:`Filter rows`,"aria-label":`Filter rows`}),(0,A.jsx)(`kbd`,{children:`/`})]}),(0,A.jsxs)(`button`,{type:`button`,className:`palette-button`,"aria-label":`Jump to`,onClick:a,children:[(0,A.jsx)(`span`,{className:`palette-label`,children:`Jump to`}),` `,(0,A.jsx)(`kbd`,{children:`Ctrl K`})]})]})}function ap({visible:e,selected:t,select:n,seeing:r,setSeeing:i,setSelected:a,setAdding:o,filterInput:s}){(0,v.useEffect)(()=>{let c=c=>{$(c.target)||c.altKey||c.ctrlKey||c.metaKey||(c.key===`Escape`?(a(null),o(null)):c.key===`/`?(c.preventDefault(),i(!1),requestAnimationFrame(()=>s.current?.focus())):r||op(c.key,e,t,n))};return addEventListener(`keydown`,c),()=>removeEventListener(`keydown`,c)},[e,t,n,r,i,a,o,s])}function op(e,t,n,r){if(e===`j`||e===`k`){let i=t.findIndex(e=>e.id===n),a=t[e===`j`?i+1:Math.max(i-1,0)]??t[0];a&&r(a.id,!0)}else if(/^[1-9]$/.test(e)){let t=Of[Number(e)-1]?.id;t&&document.getElementById(`section-${t}`)?.scrollIntoView({block:`start`})}}function sp({view:e}){let{trust:t}=e;if(t.sessionOnly)return(0,A.jsx)(`span`,{className:`flag`,title:`In your home directory Claude Code asks for trust each session and saves no answer.`,children:`trust asked each session`});if(t.trusted)return null;let n=t.inheritedFrom?`its allow rules, extra folders and .mcp.json approvals wait. You trusted ${j(t.inheritedFrom)}, which covers hooks but not those grants.`:`hooks from every settings file, its allow rules, extra folders and .mcp.json approvals wait.`;return(0,A.jsx)(`span`,{className:`flag warn`,title:e.profile===`print`?`claude -p and the SDK never show the trust dialog. Until you accept it for ${j(t.root)} in an interactive session, they leave out allow rules and extra folders from repository settings.`:`Until you accept Claude Code's trust dialog for ${j(t.root)}, ${n}`,children:`not trusted yet`})}function cp({groups:e,hidden:t}){return(0,A.jsx)(`nav`,{className:`section-index${t?` hidden`:``}`,"aria-label":`Sections`,children:e.map(({section:e,all:t},n)=>(0,A.jsxs)(`a`,{href:`#section-${e.id}`,className:t.length===0?`empty`:``,onClick:t=>{t.preventDefault(),document.getElementById(`section-${e.id}`)?.scrollIntoView({block:`start`})},children:[(0,A.jsx)(`kbd`,{children:n+1}),` `,e.short??e.title,(0,A.jsx)(`span`,{className:`seg-count`,children:t.length})]},e.id))})}function lp({profile:e,onProfile:t}){return(0,A.jsxs)(`div`,{className:`session-line`,children:[(0,A.jsx)(`span`,{children:`Describes`}),(0,A.jsx)(`fieldset`,{className:`segmented small profile-switch`,"aria-label":`Session`,title:`Interactive claude asks for workspace trust and .mcp.json approval. claude -p and the SDK never show the trust dialog: they run settings-file hooks and connect .mcp.json servers without asking.`,children:[`interactive`,`print`].map(n=>(0,A.jsx)(`button`,{type:`button`,"aria-pressed":e===n,onClick:()=>t(n),children:n===`print`?`claude -p / SDK`:`interactive session`},n))})]})}function up({problems:e}){return e.length===0?null:(0,A.jsxs)(`section`,{className:`problems`,role:`alert`,"aria-label":`Files ccdesk could not read`,children:[(0,A.jsx)(M,{name:`warn`}),(0,A.jsx)(`ul`,{className:`plain`,children:e.map(e=>(0,A.jsxs)(`li`,{children:[(0,A.jsx)(`span`,{className:`mono`,children:j(e.path)}),`: `,e.error,`.`,` `,e.blocksStart?`Claude Code refuses to start until your organisation's settings are fixed, so nothing below applies yet.`:`Claude Code may skip this file.`]},e.path))})]})}var dp=[{label:`Directory`,sort:e=>e.path},{label:`Sessions`,sort:e=>e.sessions},{label:`Memories`,sort:e=>e.memories},{label:`Last used`,sort:e=>e.lastActive??``}];function fp({overview:e,onOpen:t}){let n=(0,v.useMemo)(()=>e.projects.filter(e=>!e.ephemeral),[e]),r=n.reduce((e,t)=>e+t.memories,0),[i,a]=(0,v.useState)(()=>Ff().query),[o,s]=(0,v.useState)(()=>Ff().sort.dirs),[c,l]=(0,v.useState)(50);(0,v.useEffect)(()=>zf({kind:`all`},{...Nf,query:i,sort:o?{dirs:o}:{}}),[i,o]);let u=(0,v.useMemo)(()=>{let e=i.trim().toLowerCase(),t=n.filter(t=>!e||t.path.toLowerCase().includes(e)),r=o&&dp[o.column]?.sort;return o&&r&&t.sort((e,t)=>Bf(r(e),r(t))*(o.descending?-1:1)),t},[n,i,o]);return(0,A.jsxs)(`div`,{className:`page`,children:[(0,A.jsxs)(`header`,{className:`page-head`,children:[(0,A.jsx)(`h1`,{children:`All directories`}),(0,A.jsxs)(`p`,{className:`lede`,children:[n.length,` directories used with Claude Code, `,r,` memories, config from`,` `,(0,A.jsx)(`span`,{className:`mono`,children:j(e.claudeDir)}),`.`]})]}),(0,A.jsxs)(`section`,{className:`tt-section`,"aria-labelledby":`h-dirs`,children:[(0,A.jsxs)(`header`,{className:`tt-head`,children:[(0,A.jsx)(`h2`,{id:`h-dirs`,children:`Directories`}),(0,A.jsx)(`span`,{className:`tt-count`,children:u.length===n.length?n.length:`${u.length} of ${n.length}`}),(0,A.jsxs)(`label`,{className:`filter`,children:[(0,A.jsx)(M,{name:`search`}),(0,A.jsx)(`input`,{value:i,onChange:e=>{a(e.target.value),l(50)},placeholder:`Filter directories`,"aria-label":`Filter directories`})]})]}),(0,A.jsxs)(`table`,{className:`tt tt-dirs`,children:[(0,A.jsx)(Jf,{columns:dp,sort:o,onSort:s}),(0,A.jsx)(`tbody`,{children:u.slice(0,c).map(e=>(0,A.jsxs)(`tr`,{onClick:()=>t(e.path),className:e.exists?``:`dim`,children:[(0,A.jsxs)(`td`,{className:`mono`,children:[(0,A.jsx)(`button`,{type:`button`,className:`row-name`,onClick:n=>{n.stopPropagation(),t(e.path)},children:j(e.path)}),!e.exists&&(0,A.jsx)(`span`,{className:`flag`,children:`folder gone`})]}),(0,A.jsx)(`td`,{className:`num`,children:e.sessions||`—`}),(0,A.jsx)(`td`,{className:`num`,children:e.memories||`—`}),(0,A.jsx)(`td`,{className:`num`,children:S(e.lastActive)})]},e.path))})]}),u.length===0&&(0,A.jsx)(`p`,{className:`tt-empty`,children:n.length===0?`No directories yet. Temporary and test directories are listed in the sidebar.`:`No directory matches.`}),(0,A.jsx)(Yf,{shown:Math.min(c,u.length),total:u.length,page:50,onMore:()=>l(c+50)})]}),(0,A.jsxs)(`section`,{className:`tt-section`,"aria-labelledby":`h-shared`,children:[(0,A.jsxs)(`header`,{className:`tt-head`,children:[(0,A.jsx)(`h2`,{id:`h-shared`,children:`Memory saved in more than one directory`}),(0,A.jsx)(`span`,{className:`tt-count`,children:e.sharedMemories.length})]}),e.sharedMemories.length===0?(0,A.jsx)(`p`,{className:`tt-empty`,children:`Every memory lives in exactly one directory.`}):(0,A.jsxs)(`table`,{className:`tt tt-shared`,children:[(0,A.jsx)(`thead`,{children:(0,A.jsxs)(`tr`,{children:[(0,A.jsx)(`th`,{scope:`col`}),(0,A.jsx)(`th`,{scope:`col`,children:`Memory`}),(0,A.jsx)(`th`,{scope:`col`,children:`Copies`}),(0,A.jsx)(`th`,{scope:`col`,children:`Saved in`})]})}),(0,A.jsx)(`tbody`,{children:e.sharedMemories.map(e=>{let n=new Set(e.stores.map(e=>e.hash)).size===1;return(0,A.jsxs)(`tr`,{children:[(0,A.jsx)(`td`,{children:(0,A.jsx)(N,{line:`memory`})}),(0,A.jsx)(`td`,{className:`mono`,children:e.name}),(0,A.jsx)(`td`,{children:(0,A.jsx)(`span`,{className:`flag ${n?``:`warn`}`,children:n?`identical`:`drifted apart`})}),(0,A.jsx)(`td`,{className:`stores`,children:e.stores.map(e=>(0,A.jsx)(`button`,{type:`button`,className:`link mono`,onClick:()=>t(e.projectPath),children:j(e.projectPath)},e.projectPath))})]},e.name)})})]})]})]})}function pp(e,t){let n=e.trim();return t&&(n===`~`||n.startsWith(`~/`))?t+n.slice(1):n.startsWith(`/`)||/^[A-Za-z]:[\\/]/.test(n)?n:null}function mp(e,t,n,r){let i=e.trim().toLowerCase(),a=(t?.projects??[]).filter(e=>!e.ephemeral&&e.path!==r&&(!i||e.path.toLowerCase().includes(i))).map(e=>({kind:`dir`,key:`dir:${e.path}`,label:j(e.path),path:e.path}));if(r!==void 0){let n=pp(e,t?.home),r=a.some(e=>e.kind===`dir`&&e.path===n);return[...n&&!r?[{kind:`dir`,key:`typed:${n}`,label:j(n),path:n}]:[],...a].slice(0,40)}let o=n.filter(e=>i&&kf(e.section).text(e).toLowerCase().includes(i)).map(e=>({kind:`row`,key:e.id,label:kf(e.section).label(e,Af()),row:e})),s=new Set(n.map(e=>e.id)),c=(t?.memoryCatalog??[]).filter(e=>i&&!s.has(`mem:${e.path}`)&&`${e.name} ${e.description} ${e.type}`.toLowerCase().includes(i)).map(e=>({kind:`memory`,key:`cat:${e.path}`,label:`memory ${e.name} · ${j(e.projectPath)}`,projectPath:e.projectPath,path:e.path}));return[...o,...c,...a].slice(0,40)}function hp(e,t){return e.trim()?`Nothing matches “${e}”.`:t===void 0?`Type to search directories, files, settings and memories.`:`No other directories yet. Type a full path.`}function gp({result:e}){return e.kind===`memory`?(0,A.jsx)(N,{line:`memory`}):e.kind===`dir`?(0,A.jsx)(M,{name:`folder`}):e.row.line?(0,A.jsx)(N,{line:e.row.line}):(0,A.jsx)(M,{name:`command`})}function _p({overview:e,rows:t,compareFrom:n,onClose:r,onOpenDirectory:i,onSelectRow:a,onOpenMemory:o,onCompare:s}){let[c,l]=(0,v.useState)(``),[u,d]=(0,v.useState)(0),f=(0,v.useRef)(null);(0,v.useEffect)(()=>f.current?.focus(),[]),(0,v.useEffect)(()=>{document.getElementById(`pal-${u}`)?.scrollIntoView({block:`nearest`})},[u]);let p=(0,v.useMemo)(()=>mp(c,e,t,n),[c,e,t,n]),m=e=>{e&&(e.kind===`dir`&&n!==void 0?s(n,e.path):e.kind===`dir`?i(e.path):e.kind===`memory`?o(e.projectPath,e.path):a(e.row.id),r())};return(0,A.jsx)(`div`,{className:`palette-backdrop`,onMouseDown:r,children:(0,A.jsxs)(`div`,{className:`palette`,role:`dialog`,"aria-modal":`true`,"aria-label":n===void 0?`Jump to`:`Compare settings with`,onMouseDown:e=>e.stopPropagation(),children:[(0,A.jsxs)(`label`,{className:`palette-input`,children:[(0,A.jsx)(M,{name:`search`}),(0,A.jsx)(`input`,{ref:f,role:`combobox`,"aria-expanded":`true`,value:c,onChange:e=>{l(e.target.value),d(0)},placeholder:n===void 0?`Jump to a directory, file, setting or memory`:`Compare settings with a directory, or type its path`,"aria-controls":`palette-results`,"aria-activedescendant":p[u]?`pal-${u}`:void 0,onKeyDown:e=>{e.key===`ArrowDown`?(e.preventDefault(),d(e=>Math.min(e+1,p.length-1))):e.key===`ArrowUp`?(e.preventDefault(),d(e=>Math.max(e-1,0))):e.key===`Enter`?(e.preventDefault(),m(p[u])):e.key===`Escape`?r():e.key===`Tab`&&e.preventDefault()}})]}),(0,A.jsxs)(`div`,{id:`palette-results`,className:`palette-results`,role:`listbox`,"aria-label":`Results`,children:[p.length===0&&(0,A.jsx)(`div`,{className:`palette-empty`,children:hp(c,n)}),p.map((e,t)=>(0,A.jsxs)(`div`,{id:`pal-${t}`,role:`option`,tabIndex:-1,"aria-selected":t===u,className:t===u?`active`:``,onMouseEnter:()=>d(t),onClick:()=>m(e),children:[(0,A.jsx)(gp,{result:e}),(0,A.jsx)(`span`,{className:e.kind===`dir`?`mono`:``,children:e.label})]},e.key))]})]})})}var vp=`https://ayagmar.github.io/ccdesk/`,yp=[{size:`smaller`,label:`Smaller text`},{size:`default`,label:`Default text size`},{size:`larger`,label:`Larger text`}];function bp(e,t){return e===t?`~ (home)`:j(e)}function xp({overview:e,current:t,changesOpen:n,dark:r,onOpen:i,onChanges:a,onToggleTheme:o,textSize:s,onTextSize:c}){let[l,u]=(0,v.useState)(``),[d,f]=(0,v.useState)(!1),p=e?.projects??[],m=e=>!l||e.path.toLowerCase().includes(l.toLowerCase()),h=p.find(t=>t.path===e?.launchDir),g=p.filter(e=>!e.ephemeral&&e!==h&&m(e)),_=p.filter(e=>e.ephemeral&&e!==h&&m(e)),y=n=>(0,A.jsx)(`li`,{children:(0,A.jsxs)(`button`,{type:`button`,className:`rail-item${t===n.path?` current`:``}${n.exists?``:` gone`}`,"aria-current":t===n.path?`page`:void 0,onClick:()=>i(n.path),title:n.exists?j(n.path):`${j(n.path)} (folder no longer exists)`,children:[(0,A.jsx)(`span`,{className:`rail-label`,children:bp(n.path,e?.home??``)}),n.memories>0&&(0,A.jsx)(`span`,{className:`rail-count`,children:n.memories})]})},n.path);return(0,A.jsxs)(`nav`,{className:`rail`,"aria-label":`Directories`,children:[(0,A.jsxs)(`div`,{className:`brand`,children:[(0,A.jsxs)(`a`,{className:`brand-link`,href:vp,target:`_blank`,rel:`noreferrer`,title:`ccdesk docs`,children:[(0,A.jsx)(`img`,{src:`/logo.png`,width:`26`,height:`26`,alt:``}),(0,A.jsx)(`span`,{children:`ccdesk`})]}),(0,A.jsx)(`fieldset`,{className:`segmented small text-size`,"aria-label":`Text size`,children:yp.map(({size:e,label:t})=>(0,A.jsx)(`button`,{type:`button`,className:e,"aria-label":t,title:t,"aria-pressed":s===e,onClick:()=>c(e),children:`A`},e))}),(0,A.jsx)(`button`,{type:`button`,className:`icon-button`,onClick:o,"aria-label":`Dark theme`,"aria-pressed":r,children:(0,A.jsx)(M,{name:`sun`})})]}),(0,A.jsxs)(`button`,{type:`button`,className:`rail-item overview-link${t===null?` current`:``}`,"aria-current":t===null?`page`:void 0,onClick:()=>i(null),children:[(0,A.jsx)(M,{name:`folder`}),` `,(0,A.jsx)(`span`,{className:`rail-label`,children:`All directories`})]}),(0,A.jsxs)(`button`,{type:`button`,className:`rail-item overview-link${n?` current`:``}`,"aria-current":n?`page`:void 0,onClick:a,children:[(0,A.jsx)(M,{name:`undo`}),` `,(0,A.jsx)(`span`,{className:`rail-label`,children:`Recent changes`})]}),h&&(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`h2`,{className:`rail-group`,children:`Opened from`}),(0,A.jsx)(`ul`,{className:`rail-list`,children:y(h)})]}),(0,A.jsxs)(`label`,{className:`rail-filter`,children:[(0,A.jsx)(M,{name:`search`}),(0,A.jsx)(`input`,{value:l,onChange:e=>u(e.target.value),placeholder:`Find a directory`,"aria-label":`Find a directory`})]}),(0,A.jsx)(`h2`,{className:`rail-group`,children:`Used with Claude`}),g.length>0?(0,A.jsx)(`ul`,{className:`rail-list`,children:g.map(y)}):(0,A.jsx)(`p`,{className:`rail-empty`,children:l?`No directory matches.`:`No other directories yet.`}),_.length>0&&(0,A.jsxs)(A.Fragment,{children:[(0,A.jsxs)(`button`,{type:`button`,className:`rail-group toggle`,"aria-expanded":d,onClick:()=>f(!d),children:[`Temporary and test dirs `,(0,A.jsx)(`span`,{className:`rail-count`,children:_.length})]}),d&&(0,A.jsx)(`ul`,{className:`rail-list`,children:_.map(y)})]}),typeof t==`string`&&(0,A.jsxs)(`ul`,{className:`rail-keys`,"aria-label":`Keyboard shortcuts`,children:[(0,A.jsxs)(`li`,{children:[(0,A.jsx)(`kbd`,{children:`j`}),` `,(0,A.jsx)(`kbd`,{children:`k`}),` rows`]}),(0,A.jsxs)(`li`,{children:[(0,A.jsx)(`kbd`,{children:`1`}),`–`,(0,A.jsx)(`kbd`,{children:Of.length}),` sections`]}),(0,A.jsxs)(`li`,{children:[(0,A.jsx)(`kbd`,{children:`/`}),` filter`]}),(0,A.jsxs)(`li`,{children:[(0,A.jsx)(`kbd`,{children:`Ctrl`}),` `,(0,A.jsx)(`kbd`,{children:`K`}),` jump anywhere`]})]})]})}function Sp(e,t){let[n,r]=(0,v.useState)({state:`loading`}),[i,a]=(0,v.useState)({state:`loading`}),[o,s]=(0,v.useState)(null),c=n.state===`ready`?n.data.launchDir:null,l=e===void 0?c:e,u=(0,v.useCallback)(()=>{Re.overview().then(e=>{Je(te(e.home)),r({state:`ready`,data:e})},e=>r({state:`error`,message:Ie(e)}))},[]);(0,v.useEffect)(u,[u]);let[d,f]=(0,v.useState)({state:`loading`});(0,v.useEffect)(()=>{Re.reference().then(e=>{Mt(e),f({state:`ready`,data:e})},e=>f({state:`error`,message:Ie(e)}))},[]);let p=(0,v.useRef)(0),m=(0,v.useCallback)((e,t,n)=>{let r=++p.current;n||a({state:`loading`}),Re.directory(e,t).then(t=>{r===p.current&&(a({state:`ready`,data:t}),s(e))},e=>{r===p.current&&a({state:`error`,message:Ie(e)})})},[]);(0,v.useEffect)(()=>{l!==null&&m(l,t,!1)},[l,t,m]);let h=(0,v.useRef)(l);h.current=l;let g=(0,v.useRef)(t);g.current=t;let _=(0,v.useCallback)(()=>{h.current!==null&&m(h.current,g.current,!0),u()},[m,u]);(0,v.useEffect)(()=>{if(l===null)return;let e=new AbortController;return(async()=>{let t=Date.now();for(;!e.signal.aborted;)try{let{changed:n,at:r}=await Re.watch(l,t,e.signal);t=Math.max(t,r),n&&!e.signal.aborted&&_()}catch{await new Promise(e=>setTimeout(e,5e3))}})(),()=>e.abort()},[l,_]),(0,v.useEffect)(()=>{let e=Date.now(),t=()=>{document.visibilityState!==`visible`||Date.now()-e<1500||(e=Date.now(),_())};return addEventListener(`focus`,t),document.addEventListener(`visibilitychange`,t),()=>{removeEventListener(`focus`,t),document.removeEventListener(`visibilitychange`,t)}},[_]);let y=d.state===`ready`&&i.state===`ready`&&o===l&&i.data.profile===t?i.data:null,[b,x]=(0,v.useState)(null);(0,v.useEffect)(()=>{if(!y)return;let e=new AbortController,t=y.permissions.flatMap(e=>e.kind===`rule`&&e.inEffect?[{list:e.list,rule:e.rule}]:[]);return Re.usage(y.path,t,e.signal).then(t=>!e.signal.aborted&&x({path:y.path,data:t}),()=>!e.signal.aborted&&x({path:y.path,data:null})),()=>e.abort()},[y]);let ee=(0,v.useMemo)(()=>y&&b?.path===y.path?{...y,usage:b.data}:y,[y,b]);return{overview:n,view:d.state===`error`?d:i,data:ee,dir:l,reload:_}}function Cp(){let e=document.documentElement.dataset.theme;return e?e===`dark`:matchMedia(`(prefers-color-scheme: dark)`).matches}function wp(){let[e,t]=(0,v.useState)(Pf),[n,r]=(0,v.useState)(null),[i,a]=(0,v.useState)(null),[o,s]=(0,v.useState)(null),c=Ep(),[l,u]=(0,v.useState)(0),d=e.kind===`directory`?e.profile:`interactive`,f=Sp(e.kind===`directory`?e.dir:null,d),{data:p,dir:m}=f,h=f.overview.state===`ready`?f.overview.data:null,g=(0,v.useMemo)(()=>p?je(p,Af()):[],[p]),_=(0,v.useCallback)(e=>{t(e),u(e=>e+1),Rf(e)},[]),y=(0,v.useCallback)(e=>_(e===null?{kind:`all`}:{kind:`directory`,dir:e,profile:d}),[_,d]),b=(0,v.useCallback)(e=>t(t=>t.kind===`directory`?{...t,profile:e}:t),[]);(0,v.useEffect)(()=>{let e=()=>{t(Pf()),u(e=>e+1)};return addEventListener(`popstate`,e),()=>removeEventListener(`popstate`,e)},[]),(0,v.useEffect)(()=>{let e=e=>{(e.ctrlKey||e.metaKey)&&e.key.toLowerCase()===`k`&&(e.preventDefault(),r(e=>e?null:{}))};return addEventListener(`keydown`,e),()=>removeEventListener(`keydown`,e)},[]);let x=(0,v.useCallback)(()=>a(null),[]),ee=(0,v.useCallback)(e=>r({compareFrom:e}),[]);return(0,A.jsxs)(`div`,{className:`app`,children:[(0,A.jsx)(xp,{overview:h,current:Tp(e,p?.path??m),changesOpen:e.kind===`changes`,dark:c.dark,onOpen:y,onChanges:()=>_({kind:`changes`}),onToggleTheme:c.toggleTheme,textSize:c.textSize,onTextSize:c.changeTextSize}),(0,A.jsx)(`main`,{className:`main`,children:(0,A.jsx)(Dp,{page:e,visit:l,config:f,overview:h,rows:g,jump:o,onJumped:()=>s(null),onToast:a,onOpenDirectory:y,onOpenPalette:()=>r({}),onProfile:b,onCompare:ee})}),n&&(0,A.jsx)(_p,{overview:h,rows:g,compareFrom:n.compareFrom,onClose:()=>r(null),onCompare:(e,t)=>_({kind:`compare`,dir:e,other:t}),onOpenDirectory:y,onSelectRow:e=>s({id:e}),onOpenMemory:(e,t)=>{e!==m&&y(e),s({id:`mem:${t}`})}}),(0,A.jsx)(ep,{toast:i,onDone:x})]})}function Tp(e,t){return e.kind===`directory`?t:e.kind===`all`?null:void 0}function Ep(){let[e,t]=(0,v.useState)(Cp),[n,r]=(0,v.useState)(()=>document.documentElement.dataset.textSize??`default`);return{dark:e,toggleTheme:()=>{let e=Cp()?`light`:`dark`;document.documentElement.dataset.theme=e,t(e===`dark`);try{localStorage.setItem(`ccdesk-theme`,e)}catch{}},textSize:n,changeTextSize:e=>{e==="default"?delete document.documentElement.dataset.textSize:document.documentElement.dataset.textSize=e,r(e);try{localStorage.setItem(`ccdesk-text-size`,e)}catch{}}}}function Dp({page:e,visit:t,config:n,overview:r,rows:i,jump:a,onJumped:o,onToast:s,onOpenDirectory:c,onOpenPalette:l,onProfile:u,onCompare:d}){let{view:f,data:p,reload:m}=n;return n.overview.state===`error`?(0,A.jsx)(kp,{message:n.overview.message}):e.kind===`changes`?(0,A.jsx)(rt,{onRestored:e=>{s({text:e}),m()}}):e.kind===`compare`?(0,A.jsx)(ut,{dir:e.dir,other:e.other,onOpen:c,onPickOther:()=>d(e.dir)},t):e.kind===`all`?r?(0,A.jsx)(fp,{overview:r,onOpen:c},t):(0,A.jsx)(Op,{}):f.state===`error`?(0,A.jsx)(kp,{message:f.message}):p?(0,A.jsx)(tp,{view:p,overview:r,rows:i,jump:a,onJumped:o,reload:m,onToast:s,onOpenDirectory:c,onOpenPalette:l,onProfile:u,onCompare:d},`${p.path}:${t}`):(0,A.jsx)(Op,{})}function Op(){return(0,A.jsxs)(`div`,{className:`loading`,role:`status`,children:[(0,A.jsx)(`span`,{className:`loading-line`,"aria-hidden":`true`}),`Reading your config…`]})}function kp({message:e}){return(0,A.jsxs)(`div`,{className:`problem`,role:`alert`,children:[(0,A.jsx)(`h1`,{children:`Something went wrong`}),(0,A.jsx)(`p`,{children:e})]})}try{let e=localStorage.getItem(`ccdesk-theme`);(e===`light`||e===`dark`)&&(document.documentElement.dataset.theme=e);let t=localStorage.getItem(`ccdesk-text-size`);(t===`smaller`||t===`larger`)&&(document.documentElement.dataset.textSize=t)}catch{}var Ap=document.getElementById(`root`);Ap&&(0,y.createRoot)(Ap).render((0,A.jsx)(v.StrictMode,{children:(0,A.jsx)(wp,{})}));
59
+ `),children:[(0,A.jsx)(M,{name:`warn`}),` `,r.checks.length]})]}),(0,A.jsx)(`td`,{children:(0,A.jsx)(`span`,{className:`status status-${r.status}`,children:le[r.status]})}),(0,A.jsx)(`td`,{className:`why`,children:r.reason}),(0,A.jsx)(`td`,{className:`num`,children:r.lines}),(0,A.jsx)(`td`,{children:(0,A.jsx)(zd,{value:r.visibility,scope:r.scope})})]})},Details:({row:e})=>{let t=e.item;return(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`p`,{className:`verdict ${Xd[t.status]}`,children:t.reason}),t.checks.length>0&&(0,A.jsx)(`ul`,{className:`plain checks-list`,children:t.checks.map(e=>(0,A.jsxs)(`li`,{className:`flag warn`,children:[(0,A.jsx)(M,{name:`warn`}),` `,e]},e))}),(0,A.jsxs)(`dl`,{className:`fields`,children:[(0,A.jsx)(X,{label:`File`,children:(0,A.jsx)(Bd,{path:t.path})}),t.realPath&&(0,A.jsx)(X,{label:`Links to`,children:(0,A.jsx)(Bd,{path:t.realPath})}),Qe(t.realPath)&&(0,A.jsx)(X,{label:`Shared with`,children:`other coding agents that read ~/.agents`}),(0,A.jsx)(X,{label:`Visibility`,children:(0,A.jsx)(zd,{value:t.visibility,scope:t.scope})}),(0,A.jsxs)(X,{label:`Size`,children:[t.lines,` lines · `,(t.bytes/1024).toFixed(1),` KB`]}),t.mtime&&(0,A.jsx)(X,{label:`Changed`,children:S(t.mtime)}),t.paths&&(0,A.jsx)(X,{label:`Applies to`,children:(0,A.jsx)(`span`,{className:`mono`,children:t.paths.join(`, `)})})]}),t.imports.length>0&&(0,A.jsxs)(`section`,{className:`sub`,children:[(0,A.jsx)(`h3`,{children:`Imports`}),(0,A.jsx)(`ul`,{className:`plain`,children:t.imports.map(e=>(0,A.jsxs)(`li`,{className:`mono`,children:[`@`,e.raw,e.via!==t.path&&(0,A.jsxs)(`span`,{className:`muted`,children:[` via `,e.via.split(/[/\\]/).pop()]}),!e.exists&&(0,A.jsx)(`span`,{className:`flag bad`,children:`missing`}),e.tooLarge&&(0,A.jsx)(`span`,{className:`flag warn`,children:`over 4 MiB, not loaded`}),e.external&&(0,A.jsx)(`span`,{className:`flag`,children:`outside this project`}),e.pending&&(0,A.jsx)(`span`,{className:`flag warn`,title:`Claude Code asks before loading imports from outside the project`,children:`waits for your approval`})]},`${e.via}:${e.resolved}`))})]}),(0,A.jsx)(Vd,{text:t.text})]})}},Qd={cells:(e,t,n)=>{let r=e.item;return(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`td`,{children:(0,A.jsx)(N,{line:e.line})}),(0,A.jsx)(`td`,{className:`mono`,children:(0,A.jsx)(Id,{onClick:n,children:r.name})}),(0,A.jsx)(`td`,{children:r.transport}),(0,A.jsx)(`td`,{className:`mono value`,children:Ze(r.target)}),(0,A.jsx)(`td`,{children:(0,A.jsx)(`span`,{className:r.status===`active`?`muted`:`flag warn`,title:r.note,children:de[r.status]})})]})},Head:({actions:e})=>(0,A.jsxs)(`button`,{type:`button`,className:`head-action`,onClick:()=>e.onAdd(`mcp`),children:[(0,A.jsx)(M,{name:`plus`}),` Add server`]}),Details:({row:e,actions:t})=>{let n=e.item;return(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`p`,{className:`verdict ${n.status===`active`?`ok`:`off`}`,children:n.note??`Configured and allowed here, so Claude Code starts it with each session. ccdesk does not connect, so it cannot tell whether the server works.`}),(0,A.jsxs)(`dl`,{className:`fields`,children:[(0,A.jsx)(X,{label:`Defined for`,children:n.scope}),n.plugin&&(0,A.jsx)(X,{label:`Plugin`,children:n.plugin}),(0,A.jsx)(X,{label:`Transport`,children:n.transport}),(0,A.jsx)(X,{label:`Target`,children:(0,A.jsx)(`span`,{className:`mono wrap`,children:Ze(n.target)})}),(0,A.jsx)(X,{label:`Defined in`,children:(0,A.jsx)(Bd,{path:n.sourcePath})}),n.approvals&&(0,A.jsx)(X,{label:`Approval`,children:(0,A.jsx)(`ul`,{className:`plain`,children:n.approvals.map(e=>(0,A.jsxs)(`li`,{children:[(0,A.jsx)(`span`,{className:`mono`,children:e.key}),` `,e.source===`claude-json`?`from your answer to Claude Code's prompt`:`in ${e.source} settings`,!e.counts&&`, which counts once you trust this folder`,(0,A.jsx)(`br`,{}),(0,A.jsx)(Bd,{path:e.path})]},`${e.key}:${e.path}`))})})]}),(0,A.jsx)(`p`,{className:`muted small`,children:`Environment variables and headers are hidden.`}),(0,A.jsx)(`h3`,{className:`sub-title`,children:`Change this server`}),(0,A.jsx)(Bt,{view:t.view,server:n,onSaved:t.onSaved},e.id)]})}},$d=200;function ef(e){let t=e.replace(/[^a-zA-Z0-9]/g,`-`);return t.length<=$d?t:`${t.slice(0,$d)}-${Math.abs(tf(e)).toString(36)}`}function tf(e){let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n)|0;return t}function nf({type:e}){return(0,A.jsxs)(`span`,{className:`type`,children:[(0,A.jsx)(`span`,{className:`type-dot type-${e}`,"aria-hidden":`true`}),e]})}var rf={cells:(e,{sharedNames:t},n)=>{let r=e.item;return(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`td`,{children:(0,A.jsx)(N,{line:`memory`})}),(0,A.jsx)(`td`,{className:`mono`,children:(0,A.jsx)(Id,{onClick:n,children:r.name})}),(0,A.jsx)(`td`,{children:(0,A.jsx)(nf,{type:r.type})}),(0,A.jsx)(`td`,{className:`desc`,children:r.description}),(0,A.jsxs)(`td`,{className:`checks`,children:[!r.inIndex&&(0,A.jsx)(`span`,{className:`flag bad`,title:`MEMORY.md does not mention it`,children:`not in index`}),r.brokenLinks.length>0&&(0,A.jsxs)(`span`,{className:`flag warn`,children:[r.brokenLinks.length,` broken link`,r.brokenLinks.length===1?``:`s`]}),t.has(r.name)&&(0,A.jsx)(`span`,{className:`flag`,children:`also elsewhere`})]}),(0,A.jsx)(`td`,{className:`num`,title:new Date(r.mtime).toLocaleString(),children:S(r.mtime)})]})},renderFacet:e=>(0,A.jsx)(nf,{type:e}),Head:af,Details:lf};function af({actions:e}){let t=e.view.memory,n=t.index,[r,i]=(0,v.useState)(!1);return(0,A.jsxs)(A.Fragment,{children:[t.note&&(0,A.jsxs)(`span`,{className:`flag${t.loaded?``:` warn`}`,title:j(t.dir),children:[!t.loaded&&(0,A.jsx)(M,{name:`warn`}),` `,t.note]}),n?.truncated&&(0,A.jsxs)(`span`,{className:`flag warn`,title:`Claude Code reads only the first 200 lines or 25KB of MEMORY.md`,children:[(0,A.jsx)(M,{name:`warn`}),` MEMORY.md: lines past `,n.loadedLines,` are not loaded`]}),n&&n.missingFiles.length>0&&(0,A.jsxs)(`span`,{className:`fix`,children:[(0,A.jsxs)(`span`,{className:`flag warn`,title:n.missingFiles.join(`, `),children:[(0,A.jsx)(M,{name:`warn`}),` `,n.missingFiles.length,` index`,` `,n.missingFiles.length===1?`line points`:`lines point`,` at missing files`]}),!t.custom&&!r&&(0,A.jsxs)(`button`,{type:`button`,className:`head-action`,onClick:()=>i(!0),children:[(0,A.jsx)(M,{name:`trash`}),` Remove `,n.missingFiles.length===1?`line`:`lines`,`…`]})]}),n&&r&&(0,A.jsx)(sf,{action:`remove-dead`,path:n.path,verb:`Remove lines`,busyVerb:`Removing…`,message:`Removed ${n.missingFiles.length===1?`the dead line`:`dead lines`} from MEMORY.md`,actions:e,onClose:()=>i(!1)})]})}function of(e){return e.split(/[/\\]/).at(-1)??e}function sf({action:e,path:t,verb:n,busyVerb:r,message:i,danger:a=!1,select:o,actions:s,onClose:c}){let[l,u]=(0,v.useState)(null),[d,f]=(0,v.useState)(null),[p,m]=(0,v.useState)(!1);return(0,v.useEffect)(()=>{Re.previewMemory(e,t).then(u,e=>f(Ie(e)))},[e,t]),(0,A.jsxs)(`section`,{className:`review memory-review`,"aria-label":`Review memory change`,children:[(0,A.jsx)(cf,{preview:l,problem:d}),(0,A.jsxs)(`div`,{className:`editor-buttons`,children:[l&&!d&&(0,A.jsx)(`button`,{type:`button`,className:a?`danger`:`primary`,disabled:p,onClick:()=>{m(!0),s.onChange(()=>Re.changeMemory(e,t,l.revision),i,o).finally(c)},children:p?r:n}),(0,A.jsx)(`button`,{type:`button`,onClick:c,disabled:p,children:`Cancel`})]})]})}function cf({preview:e,problem:t}){return t?(0,A.jsx)(`p`,{className:`flag bad`,role:`alert`,children:t}):e?e.files.map(e=>(0,A.jsxs)(`div`,{className:`memory-review-file`,children:[(0,A.jsxs)(`p`,{className:`sub-title small`,title:j(e.path),children:[(0,A.jsx)(`span`,{className:`mono`,children:of(e.path)}),e.after===null&&(0,A.jsx)(`span`,{className:`muted`,children:` is deleted; a backup is kept and you can undo it`})]}),(0,A.jsx)(Ke,{before:e.before??``,after:e.after??``})]},e.path)):(0,A.jsx)(`p`,{className:`muted small`,children:`Reading the files…`})}function lf({row:e,actions:t}){let n=e.item,r=t.view.memory.custom===!0,[i,a]=(0,v.useState)(!1),[o,s]=(0,v.useState)(!1),c=t.overview?.sharedMemories.find(e=>e.name===n.name)?.stores??[],l=n.path.split(/[/\\]/).at(-3),u=c.filter(e=>ef(e.projectPath)!==l);return(0,A.jsxs)(A.Fragment,{children:[n.description&&(0,A.jsx)(`p`,{className:`verdict`,children:n.description}),(0,A.jsxs)(`dl`,{className:`fields`,children:[(0,A.jsx)(X,{label:`Type`,children:(0,A.jsx)(nf,{type:n.type})}),(0,A.jsx)(X,{label:`File`,children:(0,A.jsx)(Bd,{path:n.path})}),(0,A.jsx)(X,{label:`Changed`,children:S(n.mtime)}),(0,A.jsx)(X,{label:`In MEMORY.md`,children:n.inIndex?`yes`:(0,A.jsxs)(`span`,{className:`fix`,children:[(0,A.jsx)(`span`,{className:`flag bad`,children:`no, so Claude won't see it at session start`}),!r&&!o&&(0,A.jsxs)(`button`,{type:`button`,className:`head-action`,onClick:()=>s(!0),children:[(0,A.jsx)(M,{name:`plus`}),` Add to MEMORY.md…`]})]})}),n.linkedFrom.length>0&&(0,A.jsx)(X,{label:`Linked from`,children:(0,A.jsx)(`span`,{className:`mono`,children:n.linkedFrom.join(`, `)})}),n.brokenLinks.length>0&&(0,A.jsx)(X,{label:`Broken links`,children:(0,A.jsx)(`span`,{className:`mono`,children:n.brokenLinks.map(e=>`[[${e}]]`).join(`, `)})})]}),o&&(0,A.jsx)(sf,{action:`add`,path:n.path,verb:`Add to MEMORY.md`,busyVerb:`Adding…`,message:`Added ${n.name} to MEMORY.md`,actions:t,onClose:()=>s(!1)}),u.length>0&&(0,A.jsxs)(`section`,{className:`sub`,children:[(0,A.jsx)(`h3`,{children:`Also saved in`}),(0,A.jsx)(`ul`,{className:`plain`,children:u.map(e=>(0,A.jsxs)(`li`,{children:[(0,A.jsx)(`button`,{type:`button`,className:`link`,onClick:()=>t.onOpenDirectory(e.projectPath),children:j(e.projectPath)}),(0,A.jsx)(`span`,{className:`flag ${e.hash===n.hash?``:`warn`}`,children:e.hash===n.hash?`identical`:`different text`})]},e.projectPath))}),u.some(e=>e.hash===n.hash)&&(0,A.jsx)(`p`,{className:`muted small`,children:`Deleting this copy keeps the identical one saved elsewhere.`})]}),!r&&(0,A.jsx)(`div`,{className:`actions`,children:i?(0,A.jsxs)(`section`,{className:`confirm`,"aria-label":`Confirm delete`,children:[(0,A.jsxs)(`p`,{children:[`Delete `,(0,A.jsx)(`strong`,{children:n.file}),n.inIndex?` and its line in MEMORY.md`:``,`?`,n.linkedFrom.length>0&&` ${n.linkedFrom.length} other ${n.linkedFrom.length===1?`memory links`:`memories link`} here and will have a broken link.`]}),(0,A.jsx)(sf,{action:`delete`,path:n.path,verb:`Delete memory`,busyVerb:`Deleting…`,message:`Deleted ${n.file}`,danger:!0,select:null,actions:t,onClose:()=>a(!1)})]}):(0,A.jsxs)(`button`,{type:`button`,className:`quiet-danger`,onClick:()=>a(!0),children:[(0,A.jsx)(M,{name:`trash`}),` Delete memory…`]})}),(0,A.jsx)(Vd,{text:n.body})]})}var uf={allow:`runs without asking`,ask:`asks you first`,deny:`blocked`},df={cells:(e,t,n)=>{if(_e(e))return(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`td`,{}),(0,A.jsx)(`td`,{children:(0,A.jsx)(`span`,{className:`muted`,children:`suggested`})}),(0,A.jsx)(`td`,{className:`mono value`,children:(0,A.jsx)(Id,{onClick:n,children:e.item.rule})}),(0,A.jsxs)(`td`,{className:`desc`,children:[`you allowed it `,E(e.item.approved,`time`),(0,A.jsxs)(`span`,{className:`muted`,children:[` · `,S(e.item.last)]})]})]});let r=e.item;return(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`td`,{children:(0,A.jsx)(N,{line:e.line})}),(0,A.jsx)(`td`,{children:r.kind===`rule`?(0,A.jsx)(`span`,{className:`perm perm-${r.list}`,children:r.list}):(0,A.jsx)(`span`,{className:`muted`,children:r.kind===`defaultMode`?`default mode`:`extra folder`})}),(0,A.jsx)(`td`,{className:`mono value`,children:(0,A.jsx)(Id,{onClick:n,children:r.kind===`rule`?r.rule:Ze(r.value)})}),(0,A.jsx)(`td`,{className:`desc`,children:(0,A.jsx)(pf,{p:r,usage:t.view.usage})})]})},Head:({actions:e})=>(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`span`,{className:`tt-note`,children:`Checked deny, then ask, then allow, across every file`}),(0,A.jsxs)(`button`,{type:`button`,className:`head-action`,onClick:()=>e.onAdd(`permission`),children:[(0,A.jsx)(M,{name:`plus`}),` Add rule`]})]}),Details:({row:e,actions:t})=>{if(_e(e))return(0,A.jsx)(hf,{row:e,actions:t},e.id);let n=e.item,{view:r}=t,i=n.kind===`rule`?n.path:r.settings.find(e=>e.scope===n.scope&&!e.legacy)?.path;return(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(Z,{p:n}),(0,A.jsxs)(`dl`,{className:`fields`,children:[n.kind===`rule`&&(0,A.jsx)(X,{label:`List`,children:n.list}),(0,A.jsx)(X,{label:n.kind===`rule`?`Rule`:`Value`,children:(0,A.jsx)(`span`,{className:`mono wrap`,children:n.kind===`rule`?n.rule:Ze(n.value)})}),(0,A.jsxs)(X,{label:`Set in`,children:[x(n.scope),` settings`]}),n.kind===`rule`&&n.list!==`deny`&&n.inEffect&&(0,A.jsx)(X,{label:`Covered here`,children:(0,A.jsx)(mf,{rule:n,usage:r.usage})}),i&&(0,A.jsx)(X,{label:`File`,children:(0,A.jsx)(Bd,{path:i})})]}),(0,A.jsxs)(`section`,{className:`sub`,children:[(0,A.jsx)(`h3`,{children:`How Claude Code decides`}),(0,A.jsx)(`p`,{className:`muted small`,children:`Rules from every settings file are pooled and checked in order: deny, then ask, then allow. The first match decides, so a deny in any file beats an allow in any other.`})]}),n.kind===`rule`?(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`h3`,{className:`sub-title`,children:`Change this rule`}),(0,A.jsx)(Ht,{view:r,rule:n,onSaved:t.onSaved},e.id)]}):(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`h3`,{className:`sub-title`,children:`Change permissions`}),(0,A.jsx)(Zt,{view:r,settingKey:`permissions`,defaultScope:we.includes(n.scope)?n.scope:`user`,onSaved:t.onSaved},n.scope)]})]})}},ff={allow:`Claude uses matching tools without asking, unless a deny or ask rule matches first.`,ask:`Claude asks before using matching tools, unless a deny rule matches first.`,deny:`Claude may not use matching tools. No allow rule in any file can undo this.`};function pf({p:e,usage:t}){return e.inEffect?e.kind===`defaultMode`?`how sessions start`:e.kind===`rule`?e.decidedBy?(0,A.jsxs)(`span`,{className:`flag warn`,children:[e.decidedBy.list===`deny`?`denied`:`asks first`,`: same rule in `,e.decidedBy.list,` (`,e.decidedBy.scope,`)`]}):(0,A.jsxs)(A.Fragment,{children:[uf[e.list],ve(e,t)&&(0,A.jsx)(`span`,{className:`flag`,children:`covered no call here`})]}):`Claude may read and edit here`:(0,A.jsx)(`span`,{className:`flag warn`,children:e.note??`not in effect`})}function Z({p:e}){return e.inEffect?e.kind===`defaultMode`?(0,A.jsx)(`p`,{className:`verdict`,children:`Sessions here start in ${e.value} mode.`}):e.kind===`rule`?e.decidedBy?(0,A.jsx)(`p`,{className:`verdict off`,children:`This ${e.list} rule never applies: the same rule is in ${e.decidedBy.list} (${e.decidedBy.scope} settings), which is checked first.`}):(0,A.jsx)(`p`,{className:`verdict ${e.list===`deny`?``:`ok`}`,children:ff[e.list]}):(0,A.jsx)(`p`,{className:`verdict`,children:`Claude may read and edit files in this folder as well as the project.`}):(0,A.jsx)(`p`,{className:`verdict off`,children:e.note})}function mf({rule:e,usage:t}){if(t===void 0)return(0,A.jsx)(`span`,{className:`muted`,children:`counting…`});if(t===null)return(0,A.jsx)(`span`,{className:`muted`,children:`ccdesk could not finish counting the transcripts`});let n=t.matches[e.rule];return n===void 0?(0,A.jsx)(`span`,{className:`muted`,children:`counting…`}):n===null?(0,A.jsx)(`span`,{className:`muted`,children:`not counted: ccdesk matches tool, command and domain rules`}):t.sessions===0?(0,A.jsx)(`span`,{className:`muted`,children:`no sessions here yet`}):(0,A.jsxs)(A.Fragment,{children:[E(n,`call`),` in `,he(t),n===0&&e.list===`allow`&&(0,A.jsxs)(`span`,{className:`muted small`,children:[` `,e.scope===`user`?`Your user settings apply in every directory, so others may still use it.`:`If Claude no longer needs it here, removing it narrows what runs without asking.`]})]})}function hf({row:e,actions:t}){let{view:n}=t,r=Vt(n,t.onSaved),[i,a]=(0,v.useState)(`local`),o=xt(n,i),{rule:s,approved:c,last:l}=e.item,u=/^Bash\((.+) \*\)$/.exec(s)?.[1];return(0,A.jsxs)(A.Fragment,{children:[(0,A.jsxs)(`p`,{className:`verdict`,children:[`Claude Code asked you `,E(c,`time`),` about calls this rule covers, and you allowed each one, refusing none of the calls it covers. An allow rule lets Claude make them without asking, unless a deny or ask rule matches first.`]}),(0,A.jsxs)(`dl`,{className:`fields`,children:[(0,A.jsx)(X,{label:`Rule`,children:(0,A.jsx)(`span`,{className:`mono wrap`,children:s})}),(0,A.jsx)(X,{label:`You allowed`,children:E(c,`call`)}),(0,A.jsx)(X,{label:`Last asked`,children:S(l)})]}),u&&(0,A.jsxs)(`p`,{className:`muted small`,children:[`It allows every command that starts with `,(0,A.jsx)(`code`,{children:u}),`, with any arguments.`]}),(0,A.jsxs)(`section`,{className:`sub editor`,"aria-label":`Allow this rule`,children:[(0,A.jsx)(`h3`,{children:`Allow it`}),(0,A.jsx)(`p`,{className:`muted small`,children:`In local settings it applies only for you here; in project settings, for everyone working in this repository; in your user settings, in every project.`}),(0,A.jsx)(Tt,{view:n,scope:i,onPick:e=>{a(e),r.cancel()}}),(0,A.jsx)(`p`,{className:`muted small mono wrap`,children:o?j(o):``}),!r.reviewing&&(0,A.jsx)(`div`,{className:`editor-buttons`,children:(0,A.jsx)(`button`,{type:`button`,className:`primary`,disabled:r.busy||!o,onClick:()=>o&&void r.start(o,void 0,{list:`allow`,rule:s},`Allowed ${s} in ${x(i).toLowerCase()} settings`),children:`Review change`})}),r.shown]}),(0,A.jsxs)(`p`,{className:`muted small`,children:[`Counted from Claude Code's transcripts for`,` `,n.usage?he(n.usage):`this directory`,`. ccdesk reads each call's tool, command or address and whether you allowed it, and shows only counts and rule patterns, never what was in a session.`]})]})}function gf(e){return e.from.length===0?`Claude Code ignores this value: ${e.ignored[0]?.reason??``}.`:e.merged?`Lists and objects from these files are combined.`:`${x(e.from[0]??`user`)} settings decide this value.`}function _f(e,t,n){return n===void 0?`unset`:e.from.includes(t)?`wins`:`lost`}function vf(e,t,n){return e===void 0?t?`not set`:`no file`:`${w(e)}${n?` (ignored)`:``}`}var yf={cells:(e,t,n)=>{let r=e.item;return(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`td`,{className:`bullets`,children:e.lines.map(e=>(0,A.jsx)(N,{line:e},e))}),(0,A.jsx)(`td`,{className:`mono`,children:(0,A.jsx)(Id,{onClick:n,children:r.key})}),(0,A.jsx)(`td`,{className:`mono value`,children:r.from.length===0?(0,A.jsx)(`span`,{className:`muted`,children:`ignored`}):Ze(w(r.value))}),(0,A.jsxs)(`td`,{className:`beat`,children:[r.merged?(0,A.jsx)(`span`,{className:`muted`,children:`merged`}):r.overridden.map(e=>(0,A.jsxs)(`span`,{className:`beaten`,children:[(0,A.jsx)(N,{line:e.scope,hollow:!0}),` `,(0,A.jsx)(`s`,{children:Ze(w(e.value))})]},e.scope)),r.ignored.map(e=>(0,A.jsxs)(`span`,{className:`beaten`,title:e.reason,children:[(0,A.jsx)(N,{line:e.scope,hollow:!0}),` `,(0,A.jsx)(`s`,{children:Ze(w(e.value))}),` `,(0,A.jsx)(`span`,{className:`flag warn`,children:`ignored`})]},`ignored-${e.scope}`))]})]})},Head:({actions:e})=>(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`button`,{type:`button`,className:`head-action`,onClick:e.onCompare,children:`Compare with…`}),(0,A.jsxs)(`button`,{type:`button`,className:`head-action`,onClick:()=>e.onAdd(`setting`),children:[(0,A.jsx)(M,{name:`plus`}),` Add setting`]})]}),Details:({row:e,actions:t})=>{let n=e.item,{view:r}=t,i=e=>{let t=r.settings.filter(t=>t.scope===e);return t.find(e=>e.data?.[n.key]!==void 0)??t.find(e=>!e.legacy)};return(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`p`,{className:`verdict ${n.from.length===0?`off`:`ok`}`,children:gf(n)}),(0,A.jsx)(`h3`,{className:`sub-title`,children:`Every file that sets it`}),(0,A.jsx)(`table`,{className:`layers`,children:(0,A.jsx)(`tbody`,{children:O.map(e=>{let t=i(e),r=t?.data?.[n.key],a=n.ignored.find(t=>t.scope===e);return(0,A.jsxs)(`tr`,{className:_f(n,e,r),title:a?.reason,children:[(0,A.jsx)(`th`,{scope:`row`,children:(0,A.jsx)(N,{line:e,hollow:r===void 0})}),(0,A.jsx)(`td`,{className:`mono`,children:vf(r,t?.exists===!0,a!==void 0)})]},e)})})}),(0,A.jsx)(`h3`,{className:`sub-title`,children:`Value Claude Code uses`}),n.note&&(0,A.jsx)(`p`,{className:`muted small`,children:n.note}),(0,A.jsx)(`pre`,{className:`raw`,children:JSON.stringify(n.value,null,2)}),(0,A.jsx)(`h3`,{className:`sub-title`,children:`Change it`}),(0,A.jsx)(Zt,{view:r,settingKey:n.key,defaultScope:[...n.from].reverse().find(e=>we.includes(e))??`user`,onSaved:t.onSaved},n.key),(0,A.jsx)(`dl`,{className:`fields`,children:n.from.map(e=>{let t=i(e);return t?(0,A.jsx)(X,{label:`${x(e)} file`,children:(0,A.jsx)(Bd,{path:t.path})},e):null})})]})}};function bf(e,t){if(e===void 0)return`counting…`;if(e===null)return`ccdesk could not finish counting the transcripts`;if(e.sessions===0)return`no sessions here yet`;let n=e.tools.find(e=>e.tool===t);if(!n)return`not called in ${he(e)}`;let r=n.approved+n.refused;return`${E(n.calls,`call`)} in ${he(e)}${r>0?`; asked you ${E(r,`time`)}, you refused ${n.refused}`:``}`}function xf(e){return e.verdict==="default"?e.asks?`asks`:`free`:e.verdict}function Sf(e){return e.verdict===`denied`?`off`:e.verdict===`allowed`||!e.asks&&e.verdict==="default"?`ok`:``}function Cf({calls:e}){return e===void 0?`…`:e===null?(0,A.jsx)(`span`,{className:`muted`,title:`ccdesk could not finish counting the transcripts`,children:`?`}):e}function wf(e){let t=e.decidedBy,n=t?`${t.rule} in ${x(t.scope).toLowerCase()} settings`:``;switch(e.verdict){case`denied`:return`Denied by ${n}, so Claude Code removes the tool from Claude's context.`;case`asks`:return`Claude asks you every time it wants this tool, because of ${n}.`;case`allowed`:return`Claude uses it without asking, because of ${n}, unless a rule below for some uses denies or asks first.`;case`default`:return e.name===`EndConversation`?`No permission rule or PreToolUse hook applies to this tool while Claude has any other tool, so it is never blocked and never asks.`:e.asks?`No rule names the whole tool, so Claude asks before using it.`:`No rule names the whole tool, and it needs no approval. File tools still ask for paths outside the working directories.`}}function Tf(e){let t=e.permissions.find(e=>e.kind===`defaultMode`&&e.inEffect);return t?.kind===`defaultMode`?t.value:`default`}function Ef(e,t){return e.permissions.filter(e=>e.kind===`rule`&&e.inEffect&&(t.removedBy??[]).some(t=>t.list===e.list&&t.rule===e.rule&&t.scope===e.scope))}function Df({tool:e,actions:t}){let{view:n}=t,r=Vt(n,t.onSaved),[i,a]=(0,v.useState)(!1),[o,s]=(0,v.useState)(`user`);if(e.name===`EndConversation`)return null;let c=Ef(n,e);if(e.verdict===`denied`&&c.length>0){let e=c.filter(e=>!we.includes(e.scope));return(0,A.jsxs)(`section`,{className:`sub editor`,"aria-label":`Turn back on`,children:[(0,A.jsx)(`h3`,{children:`Turn back on`}),e.length>0?(0,A.jsx)(`p`,{className:`muted small`,children:`Managed settings turn it off, so it stays off whatever your files say.`}):(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`p`,{className:`muted small`,children:c.length===1?`Removing this rule gives Claude the tool again.`:`Each of these rules turns it off; remove all of them to give Claude the tool again.`}),(0,A.jsx)(`ul`,{className:`plain`,children:c.map(e=>(0,A.jsxs)(`li`,{className:`tool-switch-rule`,children:[(0,A.jsx)(N,{line:e.scope}),` `,(0,A.jsx)(`span`,{className:`mono`,children:e.rule}),(0,A.jsxs)(`span`,{className:`muted small`,children:[` `,`in `,x(e.scope).toLowerCase(),` settings`]}),!e.rule.includes(`(`)&&e.rule.includes(`*`)&&(0,A.jsx)(`span`,{className:`flag warn`,children:`also turns off every other tool it matches`}),(0,A.jsx)(`button`,{type:`button`,className:`head-action`,disabled:r.busy||r.reviewing,onClick:()=>void r.start(e.path,{list:`deny`,rule:e.rule},void 0,`Removed ${e.rule} from deny`),children:`Remove…`})]},`${e.path}:${e.rule}`))})]}),r.shown]})}let l=xt(n,o);return(0,A.jsx)(`section`,{className:`sub editor`,"aria-label":`Turn off for Claude`,children:i?(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`h3`,{children:`Turn off for Claude`}),(0,A.jsx)(`p`,{className:`muted small`,children:`A deny rule naming the whole tool removes it from Claude's context. In your user settings it applies in every project; in project settings, for everyone working in this repository; in local settings, only for you here.`}),(0,A.jsx)(Tt,{view:n,scope:o,onPick:e=>{s(e),r.cancel()}}),(0,A.jsx)(`p`,{className:`muted small mono wrap`,children:l?j(l):``}),!r.reviewing&&(0,A.jsxs)(`div`,{className:`editor-buttons`,children:[(0,A.jsx)(`button`,{type:`button`,className:`primary`,disabled:r.busy||!l,onClick:()=>l&&void r.start(l,void 0,{list:`deny`,rule:e.name},`Turned off ${e.name} in ${x(o).toLowerCase()} settings`),children:`Review change`}),(0,A.jsx)(`button`,{type:`button`,onClick:()=>a(!1),children:`Cancel`})]}),r.shown]}):(0,A.jsxs)(`button`,{type:`button`,className:`quiet-danger`,onClick:()=>a(!0),children:[(0,A.jsx)(M,{name:`block`}),` Turn off for Claude…`]})})}function Of({text:e}){return e.split(/`([^`]+)`/).map((e,t)=>t%2==1?(0,A.jsx)(`code`,{children:e},t):e)}var kf={instructions:Zd,settings:yf,permissions:df,tools:{cells:(e,t,n)=>{let r=e.item,i=r.scoped.filter(e=>!e.unchecked);return(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`td`,{children:e.line&&(0,A.jsx)(N,{line:e.line})}),(0,A.jsx)(`td`,{className:`mono`,children:(0,A.jsx)(Id,{onClick:n,children:r.name})}),(0,A.jsx)(`td`,{children:(0,A.jsx)(`span`,{className:`tool-outcome tool-${xf(r)}`,children:ke(r)})}),(0,A.jsxs)(`td`,{className:`checks`,children:[i.length>0&&(0,A.jsxs)(`span`,{className:`flag`,title:i.map(e=>`${e.list} ${e.rule}`).join(`
60
+ `),children:[E(i.length,`rule`),` for some uses`]}),i.length<r.scoped.length&&(0,A.jsx)(`span`,{className:`flag warn`,title:`Claude Code never checks a path rule on this tool`,children:E(r.scoped.length-i.length,`unchecked rule`)}),r.hooks>0&&(0,A.jsx)(`span`,{className:`flag`,children:E(r.hooks,`hook`)})]}),(0,A.jsx)(`td`,{className:`num${e.calls?` used`:``}`,children:(0,A.jsx)(Cf,{calls:e.calls})}),(0,A.jsx)(`td`,{className:`desc`,children:(0,A.jsx)(Of,{text:r.description.split(/(?<=\.)\s/)[0]??``})})]})},Head:({actions:e})=>(0,A.jsxs)(`span`,{className:`tt-note`,children:[`As in Manual mode; sessions here start in `,Tf(e.view),` mode`]}),Details:({row:e,actions:t})=>{let n=e.item;return(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`p`,{className:`verdict ${Sf(n)}`,children:wf(n)}),(0,A.jsx)(`p`,{children:(0,A.jsx)(Of,{text:n.description})}),n.scoped.length>0&&(0,A.jsxs)(`section`,{className:`sub`,children:[(0,A.jsx)(`h3`,{children:`Rules for some uses`}),(0,A.jsx)(`ul`,{className:`plain`,children:n.scoped.map(e=>(0,A.jsxs)(`li`,{children:[(0,A.jsx)(N,{line:e.scope}),` `,(0,A.jsx)(`span`,{className:`perm perm-${e.list}`,children:e.list}),` `,(0,A.jsx)(`span`,{className:`mono`,children:e.rule}),e.unchecked&&(0,A.jsx)(`span`,{className:`flag warn`,children:`never checked: Claude Code checks paths against Edit and Read rules only`})]},`${e.scope}:${e.list}:${e.rule}`))}),(0,A.jsx)(`p`,{className:`muted small`,children:`Checked deny, then ask, then allow, before the rule for the whole tool applies.`})]}),(0,A.jsxs)(`dl`,{className:`fields`,children:[(0,A.jsx)(X,{label:`Manual mode`,children:n.asks?`asks before using it`:`no approval needed`}),(0,A.jsx)(X,{label:`Used here`,children:bf(t.view.usage,n.name)}),(0,A.jsx)(X,{label:`PreToolUse hooks`,children:n.hooks===0?`none`:`${E(n.hooks,`hook`)} run before each use`})]}),(0,A.jsx)(Df,{tool:n,actions:t},`${n.name}:${n.verdict}`),(0,A.jsx)(`p`,{className:`muted small`,children:`Permission modes other than Manual change which uses ask. Tool names and descriptions come from Claude Code's tools reference.`})]})}},memory:rf,hooks:Yd,mcp:Qd,extensions:Jd,catalog:Kd},Af=Ae.map(e=>({...e,...kf[e.id]}));function jf(e){let t=Af.find(t=>t.id===e);if(!t)throw Error(`Unknown section ${e}`);return t}function Mf(){return{format:Ye(),reference:Nt()}}var Nf={setting:`Add a setting`,permission:`Add a permission rule`,hook:`Add a hook`,mcp:`Add an MCP server`,agent:`Create an agent`};function Pf({row:e,adding:t,actions:n,onClose:r}){let i=(0,v.useRef)(null),a=t??e?.id??null;if((0,v.useEffect)(()=>{a&&matchMedia(`(max-width: 1180px)`).matches&&i.current?.focus()},[a]),t){let e=Nf[t];return(0,A.jsxs)(`aside`,{className:`inspector`,"aria-label":e,children:[(0,A.jsxs)(`header`,{className:`insp-head`,children:[(0,A.jsx)(M,{name:`plus`}),(0,A.jsx)(`h2`,{ref:i,tabIndex:-1,children:e}),(0,A.jsx)(`button`,{type:`button`,className:`icon-button`,onClick:r,"aria-label":`Close`,children:(0,A.jsx)(M,{name:`close`})})]}),(0,A.jsxs)(`div`,{className:`insp-body`,children:[t===`setting`&&(0,A.jsx)(Zt,{view:n.view,settingKey:null,defaultScope:`user`,onSaved:n.onSaved}),t===`permission`&&(0,A.jsx)(Ht,{view:n.view,rule:null,onSaved:n.onSaved}),t===`agent`&&(0,A.jsx)(At,{view:n.view,agent:null,onSaved:n.onSaved}),t===`mcp`&&(0,A.jsx)(Bt,{view:n.view,server:null,onSaved:n.onSaved}),t===`hook`&&(0,A.jsx)(Ft,{view:n.view,hook:null,onSaved:n.onSaved})]})]})}if(!e)return null;let o=jf(e.section),{Details:s}=o;return(0,A.jsxs)(`aside`,{className:`inspector`,"aria-label":`Details`,children:[(0,A.jsxs)(`header`,{className:`insp-head`,children:[e.line?(0,A.jsx)(N,{line:e.line}):(0,A.jsx)(M,{name:`command`}),(0,A.jsx)(`h2`,{ref:i,tabIndex:-1,children:o.heading(e,Mf())}),(0,A.jsx)(`button`,{type:`button`,className:`icon-button`,onClick:r,"aria-label":`Close details`,children:(0,A.jsx)(M,{name:`close`})})]}),(0,A.jsx)(`div`,{className:`insp-body`,children:(0,A.jsx)(s,{row:e,actions:n},e.id)})]})}var Ff={query:``,line:null,sort:{},only:{}};function If(){let e=new URLSearchParams(location.search);if(e.has(`changes`))return{kind:`changes`};if(e.has(`all`))return{kind:`all`};let t=e.get(`dir`),n=e.get(`compare`);return t&&n?{kind:`compare`,dir:t,other:n}:{kind:`directory`,dir:t??void 0,profile:e.get(`profile`)===`print`?`print`:`interactive`}}function Lf(){let e=new URLSearchParams(location.search),t={...Ff,sort:{},only:{}};t.query=e.get(`q`)??``;let n=e.get(`line`);t.line=b.find(e=>e.line===n)?.line??null;for(let[n,r]of e){let[e,i]=n.split(`.`);if(i){if(e===`sort`){let e=/^(\d+)(d?)$/.exec(r);e&&(t.sort[i]={column:Number(e[1]),descending:e[2]===`d`})}else e===`only`&&(t.only[i]=r)}}return t}function Rf(e){if(e.kind===`changes`)return new URLSearchParams(`changes`);if(e.kind===`all`)return new URLSearchParams(`all`);if(e.kind===`compare`)return new URLSearchParams({dir:e.dir,compare:e.other});let t=new URLSearchParams(e.dir?{dir:e.dir}:{});return e.profile!==`interactive`&&t.set(`profile`,e.profile),t}function zf(e,t){let n=e.toString().replace(/^(changes|all)=(&|$)/,`$1$2`),r=n?`?${n}`:location.pathname;t?history.pushState(null,``,r):history.replaceState(null,``,r)}function Bf(e){zf(Rf(e),!0)}function Vf(e,t){let n=Rf(e);t.query&&n.set(`q`,t.query),t.line&&n.set(`line`,t.line);for(let[e,r]of Object.entries(t.sort))r&&n.set(`sort.${e}`,`${r.column}${r.descending?`d`:``}`);for(let[e,r]of Object.entries(t.only))r&&n.set(`only.${e}`,r);zf(n,!1)}function Q(e,t){return typeof e==`number`&&typeof t==`number`?e-t:String(e).localeCompare(String(t),void 0,{numeric:!0,sensitivity:`base`})}function Hf(e,t,n,r){let i=n.query.trim().toLowerCase();return e.map(e=>{let a=t.filter(t=>t.section===e.id),o=n.only[e.id],s=a.filter(t=>(!n.line||t.line===n.line||t.section===`settings`&&t.lines.includes(n.line))&&(!o||e.facet?.of(t)===o)&&(!i||e.text(t).toLowerCase().includes(i))),c=n.sort[e.id],l=c?e.columns[c.column]?.sort:void 0;return c&&l&&s.sort((e,t)=>Q(l(e),l(t))*(c.descending?-1:1)),{section:e,all:a,matching:s,shown:s.slice(0,r[e.id]??50)}})}function Uf(e){return!!(e.query.trim()||e.line||Object.values(e.only).some(Boolean))}function Wf(e){let t=e.inventory;return b.filter(e=>e.line!==`plugin`||t.plugins.some(e=>e.enabled)).map(({line:n,name:r})=>{let i=[];if(n===`memory`){let t=e.memory.memories.length;return t&&i.push(E(t,`memory`,`memories`)),{line:n,name:r,facts:i,active:t>0}}if(n===`plugin`){let e=t.plugins.filter(e=>e.enabled).length;return e&&i.push(E(e,`plugin`)),{line:n,name:r,facts:i,active:e>0}}let a=e.instructions.filter(e=>e.scope===n),o=a.filter(e=>e.status!==`skipped`).length,s=a.length-o;o&&i.push(E(o,`file`)),s&&i.push(`${s} skipped`);let c=e.effective.filter(e=>e.from.includes(n)).length;c&&i.push(E(c,`setting`));let l=t.hooks.filter(e=>e.source===n).length;l&&i.push(E(l,`hook`));let u=t.mcpServers.filter(e=>e.scope===n).length;u&&i.push(`${u} MCP`);let d=[...t.agents,...t.skills,...t.commands,...t.outputStyles].filter(e=>e.scope===n).length;d&&i.push(E(d,`extension`));let f=l+u+d;return{line:n,name:r,facts:i,active:o>0||c>0||f>0}})}function Gf({view:e,lit:t,filter:n,onFilter:r}){let i=Wf(e);return(0,A.jsx)(`nav`,{className:`route`,"aria-label":`Load order for this directory`,children:(0,A.jsx)(`ol`,{className:`route-stops`,children:i.map(e=>{let i=n===e.line;return(0,A.jsx)(`li`,{className:`stop${e.active?``:` idle`}${t===e.line?` lit`:``}`,children:(0,A.jsxs)(`button`,{type:`button`,"aria-pressed":i,className:i?`on`:``,onClick:()=>r(i?null:e.line),title:i?`Show every scope`:`Show only ${e.name.toLowerCase()} items`,children:[(0,A.jsx)(`span`,{className:`stop-node`,children:(0,A.jsx)(N,{line:e.line,hollow:!e.active})}),(0,A.jsx)(`span`,{className:`stop-name`,children:e.name}),(0,A.jsx)(`span`,{className:`stop-facts`,children:e.facts.length?e.facts.join(` · `):`not used`})]})},e.line)})})})}function Kf({view:e}){let t=e.sharing;if(!t)return null;let n=[[`tracked`,`Tracked in git: everyone who clones gets these`,t.tracked],[`untracked`,`Not tracked yet`,t.untracked],[`ignored`,`Git-ignored: only you`,t.ignored]];return n.every(([,,e])=>e.length===0)?null:(0,A.jsx)(`dl`,{className:`sharing`,"aria-label":`What this repository shares`,children:n.filter(([,,e])=>e.length>0).map(([e,t,n])=>(0,A.jsxs)(`div`,{className:`sharing-group vis-${e}`,children:[(0,A.jsx)(`dt`,{children:t}),(0,A.jsx)(`dd`,{className:`mono`,children:n.map(e=>(0,A.jsx)(`span`,{children:e},e))})]},e))})}function qf(e,t){return e?.column===t?e.descending?void 0:{column:t,descending:!0}:{column:t,descending:!1}}function Jf(e){return e.descending?`descending`:`ascending`}function Yf(e){return e.descending?`↓`:`↑`}function Xf({columns:e,sort:t,onSort:n}){return(0,A.jsx)(`thead`,{children:(0,A.jsx)(`tr`,{children:e.map((e,r)=>{let i=t?.column===r;return(0,A.jsx)(`th`,{scope:`col`,"aria-sort":i?Jf(t):void 0,children:e.sort?(0,A.jsxs)(`button`,{type:`button`,className:`sort`,onClick:()=>n(qf(t,r)),children:[e.label||(0,A.jsx)(`span`,{className:`visually-hidden`,children:`Scope`}),(0,A.jsx)(`span`,{className:`sort-mark${i?` on`:``}`,"aria-hidden":`true`,children:i?Yf(t):`↕`})]}):e.label},e.label||`scope`)})})})}function Zf({shown:e,total:t,page:n,onMore:r}){return e>=t?null:(0,A.jsxs)(`button`,{type:`button`,className:`show-more`,onClick:r,children:[`Show `,Math.min(n,t-e),` more`,(0,A.jsxs)(`span`,{className:`muted`,children:[` `,`· `,e,` of `,t,` shown`]})]})}function Qf({groups:e,actions:t,state:n,selected:r,onSelect:i,onSort:a,onOnly:o,onShowMore:s,filtered:c}){return(0,A.jsx)(`div`,{className:`timetable`,children:e.map(({section:e,all:l,matching:u,shown:d})=>{if(c&&u.length===0)return null;let f=n.sort[e.id],{Head:p}=e;return(0,A.jsxs)(`section`,{id:`section-${e.id}`,className:`tt-section`,"aria-labelledby":`h-${e.id}`,children:[(0,A.jsxs)(`header`,{className:`tt-head`,children:[(0,A.jsx)(`h2`,{id:`h-${e.id}`,children:e.title}),(0,A.jsx)(`span`,{className:`tt-count`,children:u.length===l.length?l.length:`${u.length} of ${l.length}`}),e.facet&&(0,A.jsx)($,{label:e.facet.label,values:$f(l,e.facet.of,e.facet.order?.(Mf())),current:n.only[e.id],render:e.renderFacet,onPick:t=>o(e.id,t)}),p&&(0,A.jsx)(p,{actions:t})]}),l.length===0?(0,A.jsx)(`p`,{className:`tt-empty`,children:e.empty(t.view)}):(0,A.jsxs)(A.Fragment,{children:[(0,A.jsxs)(`table`,{className:`tt tt-${e.id} ${e.tableClass?.(l)??``}`,children:[(0,A.jsx)(Xf,{columns:e.columns,sort:f,onSort:t=>a(e.id,t)}),(0,A.jsx)(`tbody`,{children:d.map(n=>(0,A.jsx)(`tr`,{id:`row-${n.id}`,className:`${n.id===r?`selected`:``}${e.dimmed?.(n)?` dim`:``}`,onClick:()=>i(n.id),children:e.cells(n,t,()=>i(n.id))},n.id))})]}),(0,A.jsx)(Zf,{shown:d.length,total:u.length,page:50,onMore:()=>s(e.id)})]})]},e.id)})})}function $f(e,t,n=[]){let r=new Map;for(let n of e)r.set(t(n),(r.get(t(n))??0)+1);let i=e=>n.includes(e)?n.indexOf(e):n.length;return[...r].sort(([e],[t])=>i(e)-i(t)||e.localeCompare(t))}var ep=8;function $({label:e,values:t,current:n,render:r,onPick:i}){return t.length<2&&!n?null:t.length>ep?(0,A.jsxs)(`select`,{className:`facet-select`,"aria-label":e,value:n??``,onChange:e=>i(e.target.value||void 0),children:[(0,A.jsxs)(`option`,{value:``,children:[`All (`,t.reduce((e,[,t])=>e+t,0),`)`]}),n&&!t.some(([e])=>e===n)&&(0,A.jsxs)(`option`,{value:n,children:[n,` (0)`]}),t.map(([e,t])=>(0,A.jsxs)(`option`,{value:e,children:[e,` (`,t,`)`]},e))]}):(0,A.jsxs)(`fieldset`,{className:`segmented`,"aria-label":e,children:[(0,A.jsx)(`button`,{type:`button`,"aria-pressed":!n,onClick:()=>i(void 0),children:`All`}),t.map(([e,t])=>(0,A.jsxs)(`button`,{type:`button`,"aria-pressed":n===e,onClick:()=>i(n===e?void 0:e),children:[r?r(e):e,` `,(0,A.jsx)(`span`,{className:`seg-count`,children:t})]},e))]})}function tp({toast:e,onDone:t}){let[n,r]=(0,v.useState)(null);return(0,v.useEffect)(()=>{if(!e)return;let n=setTimeout(t,e.undo?12e3:4e3);return()=>clearTimeout(n)},[e,t]),(0,A.jsx)(`div`,{className:`toast-region`,role:`status`,"aria-live":`polite`,children:e&&(0,A.jsxs)(`div`,{className:`toast`,children:[(0,A.jsx)(`span`,{children:e.text}),e.undo&&(0,A.jsxs)(`button`,{type:`button`,disabled:n===e,onClick:()=>{r(e),e.undo?.()},children:[(0,A.jsx)(M,{name:`undo`}),` Undo`]})]})})}function np(e){return e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement||e instanceof HTMLSelectElement||e instanceof HTMLElement&&e.isContentEditable}function rp({view:e,overview:t,rows:n,jump:r,onJumped:i,reload:a,onToast:o,onOpenDirectory:s,onOpenPalette:c,onProfile:l,onCompare:u}){let[d,f]=(0,v.useState)(null),[p,m]=(0,v.useState)(null),[h,g]=(0,v.useState)(!1),[_,y]=(0,v.useState)(Lf),[b,x]=(0,v.useState)({}),ee=(0,v.useRef)(null);(0,v.useEffect)(()=>Vf({kind:`directory`,dir:e.path,profile:e.profile},_),[_,e.path,e.profile]);let te=e=>{y(e),x({})},S=(0,v.useMemo)(()=>Hf(Af,n,_,b),[n,_,b]),C=(0,v.useMemo)(()=>S.flatMap(e=>e.shown),[S]),w=Uf(_),T=n.find(e=>e.id===d)??null,E=(0,v.useCallback)((e,t=!1)=>{m(null),f(e),requestAnimationFrame(()=>{let n=document.getElementById(`row-${e}`);n?.scrollIntoView({block:`nearest`}),t&&n?.querySelector(`button`)?.focus({preventScroll:!0})})},[]);(0,v.useEffect)(()=>{if(r||!matchMedia(`(min-width: 1181px)`).matches)return;let t=e.instructions.find(e=>e.status===`loaded`);t&&f(`ins:${t.path}`)},[]),(0,v.useEffect)(()=>{if(!r)return;let e=n.find(e=>e.id===r.id);if(!e)return;i(),g(!1);let t=S.find(t=>t.section.id===e.section);t&&!t.matching.includes(e)?te(Ff):t&&!t.shown.includes(e)&&x(n=>({...n,[e.section]:t.matching.indexOf(e)+50})),requestAnimationFrame(()=>E(r.id))},[r]),sp({visible:C,selected:d,select:E,seeing:h,setSeeing:g,setSelected:f,setAdding:m,filterInput:ee});let ne=ip({view:e,overview:t,onOpenDirectory:s,onCompare:u,onToast:o,reload:a,setSelected:f,setAdding:m});return(0,A.jsxs)(`div`,{className:`workspace${T||p?``:` no-details`}`,children:[(0,A.jsxs)(`div`,{className:`work-main`,children:[(0,A.jsxs)(`header`,{className:`dir-head`,children:[(0,A.jsx)(ap,{view:e}),(0,A.jsx)(op,{seeing:h,onSeeing:g,query:_.query,onQuery:e=>te({..._,query:e}),filterInput:ee,onOpenPalette:c}),(0,A.jsx)(up,{groups:S,hidden:h})]}),(0,A.jsx)(dp,{profile:e.profile,onProfile:l}),(0,A.jsx)(pp,{problems:e.problems}),(0,A.jsx)(fp,{view:e}),h?(0,A.jsx)(vt,{view:e}):(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(Gf,{view:e,lit:T?.line??null,filter:_.line,onFilter:e=>te({..._,line:e})}),(0,A.jsx)(Kf,{view:e}),(0,A.jsx)(Qf,{groups:S,actions:ne,state:_,selected:d,onSelect:E,onSort:(e,t)=>y({..._,sort:{..._.sort,[e]:t}}),onOnly:(e,t)=>te({..._,only:{..._.only,[e]:t}}),onShowMore:e=>x(t=>({...t,[e]:(t[e]??50)+50})),filtered:w}),w&&C.length===0&&(0,A.jsxs)(`p`,{className:`tt-empty`,children:[`Nothing matches.`,` `,(0,A.jsx)(`button`,{type:`button`,className:`link`,onClick:()=>te(Ff),children:`Clear filters`})]})]})]}),(0,A.jsx)(Pf,{row:T,adding:p,actions:ne,onClose:()=>{f(null),m(null)}})]})}function ip({view:e,overview:t,onOpenDirectory:n,onCompare:r,onToast:i,reload:a,setSelected:o,setAdding:s}){let c=(0,v.useCallback)(async e=>{try{await Re.restore(e.id,e.revision);let t=e.target.split(/[/\\]/).pop();i({text:e.created?`Removed ${t}`:`Put ${t} back`})}catch(e){i({text:`Could not undo: ${Ie(e)}. Recent changes keeps the backup.`})}a()},[i,a]),l=(0,v.useCallback)(({change:e,message:t,select:n})=>{s(null),n!==void 0&&o(n),i({text:t,...e?{undo:()=>c(e)}:{}}),a()},[i,a,c,s,o]);return(0,v.useMemo)(()=>({view:e,overview:t,sharedNames:new Set(t?.sharedMemories.map(e=>e.name)??[]),onOpenDirectory:n,onCompare:()=>r(e.path),onAdd:e=>{o(null),s(e)},onSaved:l,onChange:async(e,t,n)=>{try{l({change:await e(),message:t,...n===void 0?{}:{select:n}})}catch(e){i({text:`Could not do that: ${Ie(e)}`}),a()}}}),[e,t,n,r,l,i,a,o,s])}function ap({view:e}){return(0,A.jsxs)(`div`,{className:`dir-title`,children:[(0,A.jsx)(`h1`,{className:`mono`,title:j(e.path),children:j(e.path)}),!e.exists&&(0,A.jsx)(`span`,{className:`flag bad`,children:`folder no longer exists`}),e.gitRoot&&e.gitRoot!==e.path&&(0,A.jsxs)(`span`,{className:`flag`,children:[`inside `,j(e.gitRoot)]}),(0,A.jsx)(lp,{view:e})]})}function op({seeing:e,onSeeing:t,query:n,onQuery:r,filterInput:i,onOpenPalette:a}){return(0,A.jsxs)(`div`,{className:`toolbar`,children:[(0,A.jsxs)(`fieldset`,{className:`segmented view-switch`,"aria-label":`View`,children:[(0,A.jsx)(`button`,{type:`button`,"aria-pressed":!e,onClick:()=>t(!1),children:`Config`}),(0,A.jsxs)(`button`,{type:`button`,"aria-pressed":e,onClick:()=>t(!0),children:[(0,A.jsx)(M,{name:`eye`}),` What Claude sees`]})]}),(0,A.jsxs)(`label`,{className:`filter${e?` hidden`:``}`,children:[(0,A.jsx)(M,{name:`search`}),(0,A.jsx)(`input`,{ref:i,value:n,onChange:e=>r(e.target.value),onKeyDown:e=>{e.key===`Escape`&&(r(``),e.currentTarget.blur())},placeholder:`Filter rows`,"aria-label":`Filter rows`}),(0,A.jsx)(`kbd`,{children:`/`})]}),(0,A.jsxs)(`button`,{type:`button`,className:`palette-button`,"aria-label":`Jump to`,onClick:a,children:[(0,A.jsx)(`span`,{className:`palette-label`,children:`Jump to`}),` `,(0,A.jsx)(`kbd`,{children:`Ctrl K`})]})]})}function sp({visible:e,selected:t,select:n,seeing:r,setSeeing:i,setSelected:a,setAdding:o,filterInput:s}){(0,v.useEffect)(()=>{let c=c=>{np(c.target)||c.altKey||c.ctrlKey||c.metaKey||(c.key===`Escape`?(a(null),o(null)):c.key===`/`?(c.preventDefault(),i(!1),requestAnimationFrame(()=>s.current?.focus())):r||cp(c.key,e,t,n))};return addEventListener(`keydown`,c),()=>removeEventListener(`keydown`,c)},[e,t,n,r,i,a,o,s])}function cp(e,t,n,r){if(e===`j`||e===`k`){let i=t.findIndex(e=>e.id===n),a=t[e===`j`?i+1:Math.max(i-1,0)]??t[0];a&&r(a.id,!0)}else if(/^[1-9]$/.test(e)){let t=Af[Number(e)-1]?.id;t&&document.getElementById(`section-${t}`)?.scrollIntoView({block:`start`})}}function lp({view:e}){let{trust:t}=e;if(t.sessionOnly)return(0,A.jsx)(`span`,{className:`flag`,title:`In your home directory Claude Code asks for trust each session and saves no answer.`,children:`trust asked each session`});if(t.trusted)return null;let n=t.inheritedFrom?`its allow rules, extra folders and .mcp.json approvals wait. You trusted ${j(t.inheritedFrom)}, which covers hooks but not those grants.`:`hooks from every settings file, its allow rules, extra folders and .mcp.json approvals wait.`;return(0,A.jsx)(`span`,{className:`flag warn`,title:e.profile===`print`?`claude -p and the SDK never show the trust dialog. Until you accept it for ${j(t.root)} in an interactive session, they leave out allow rules and extra folders from repository settings.`:`Until you accept Claude Code's trust dialog for ${j(t.root)}, ${n}`,children:`not trusted yet`})}function up({groups:e,hidden:t}){return(0,A.jsx)(`nav`,{className:`section-index${t?` hidden`:``}`,"aria-label":`Sections`,children:e.map(({section:e,all:t},n)=>(0,A.jsxs)(`a`,{href:`#section-${e.id}`,className:t.length===0?`empty`:``,onClick:t=>{t.preventDefault(),document.getElementById(`section-${e.id}`)?.scrollIntoView({block:`start`})},children:[(0,A.jsx)(`kbd`,{children:n+1}),` `,e.short??e.title,(0,A.jsx)(`span`,{className:`seg-count`,children:t.length})]},e.id))})}function dp({profile:e,onProfile:t}){return(0,A.jsxs)(`div`,{className:`session-line`,children:[(0,A.jsx)(`span`,{children:`Describes`}),(0,A.jsx)(`fieldset`,{className:`segmented small profile-switch`,"aria-label":`Session`,title:`Interactive claude asks for workspace trust and .mcp.json approval. claude -p and the SDK never show the trust dialog: they run settings-file hooks and connect .mcp.json servers without asking.`,children:[`interactive`,`print`].map(n=>(0,A.jsx)(`button`,{type:`button`,"aria-pressed":e===n,onClick:()=>t(n),children:n===`print`?`claude -p / SDK`:`interactive session`},n))})]})}function fp({view:e}){let t=e.settings.find(e=>e.scope===`managed`)?.higherSources;return t?(0,A.jsxs)(`section`,{className:`problems`,"aria-label":`Managed settings ccdesk does not read`,children:[(0,A.jsx)(M,{name:`warn`}),(0,A.jsx)(`ul`,{className:`plain`,children:(0,A.jsxs)(`li`,{children:[`Your organisation may also set policy in`,` `,t.map((e,t)=>(0,A.jsxs)(`span`,{children:[t>0&&` and `,(0,A.jsx)(`span`,{className:`mono`,children:j(e)})]},e)),`, which ccdesk does not read. Claude Code uses the first managed source that sets a policy, and these come before the managed settings files, so the managed values shown here may not apply. `,(0,A.jsx)(`span`,{className:`mono`,children:`/status`}),` in Claude Code names the source it uses.`]})})]}):null}function pp({problems:e}){return e.length===0?null:(0,A.jsxs)(`section`,{className:`problems`,role:`alert`,"aria-label":`Files ccdesk could not read`,children:[(0,A.jsx)(M,{name:`warn`}),(0,A.jsx)(`ul`,{className:`plain`,children:e.map(e=>(0,A.jsxs)(`li`,{children:[(0,A.jsx)(`span`,{className:`mono`,children:j(e.path)}),`: `,e.error,`.`,` `,e.blocksStart?`Claude Code refuses to start until your organisation's settings are fixed, so nothing below applies yet.`:`Claude Code may skip this file.`]},e.path))})]})}var mp=[{label:`Directory`,sort:e=>e.path},{label:`Sessions`,sort:e=>e.sessions},{label:`Memories`,sort:e=>e.memories},{label:`Last used`,sort:e=>e.lastActive??``}];function hp({overview:e,onOpen:t}){let n=(0,v.useMemo)(()=>e.projects.filter(e=>!e.ephemeral),[e]),r=n.reduce((e,t)=>e+t.memories,0),[i,a]=(0,v.useState)(()=>Lf().query),[o,s]=(0,v.useState)(()=>Lf().sort.dirs),[c,l]=(0,v.useState)(50);(0,v.useEffect)(()=>Vf({kind:`all`},{...Ff,query:i,sort:o?{dirs:o}:{}}),[i,o]);let u=(0,v.useMemo)(()=>{let e=i.trim().toLowerCase(),t=n.filter(t=>!e||t.path.toLowerCase().includes(e)),r=o&&mp[o.column]?.sort;return o&&r&&t.sort((e,t)=>Q(r(e),r(t))*(o.descending?-1:1)),t},[n,i,o]);return(0,A.jsxs)(`div`,{className:`page`,children:[(0,A.jsxs)(`header`,{className:`page-head`,children:[(0,A.jsx)(`h1`,{children:`All directories`}),(0,A.jsxs)(`p`,{className:`lede`,children:[n.length,` directories used with Claude Code, `,r,` memories, config from`,` `,(0,A.jsx)(`span`,{className:`mono`,children:j(e.claudeDir)}),`.`]})]}),(0,A.jsxs)(`section`,{className:`tt-section`,"aria-labelledby":`h-dirs`,children:[(0,A.jsxs)(`header`,{className:`tt-head`,children:[(0,A.jsx)(`h2`,{id:`h-dirs`,children:`Directories`}),(0,A.jsx)(`span`,{className:`tt-count`,children:u.length===n.length?n.length:`${u.length} of ${n.length}`}),(0,A.jsxs)(`label`,{className:`filter`,children:[(0,A.jsx)(M,{name:`search`}),(0,A.jsx)(`input`,{value:i,onChange:e=>{a(e.target.value),l(50)},placeholder:`Filter directories`,"aria-label":`Filter directories`})]})]}),(0,A.jsxs)(`table`,{className:`tt tt-dirs`,children:[(0,A.jsx)(Xf,{columns:mp,sort:o,onSort:s}),(0,A.jsx)(`tbody`,{children:u.slice(0,c).map(e=>(0,A.jsxs)(`tr`,{onClick:()=>t(e.path),className:e.exists?``:`dim`,children:[(0,A.jsxs)(`td`,{className:`mono`,children:[(0,A.jsx)(`button`,{type:`button`,className:`row-name`,onClick:n=>{n.stopPropagation(),t(e.path)},children:j(e.path)}),!e.exists&&(0,A.jsx)(`span`,{className:`flag`,children:`folder gone`})]}),(0,A.jsx)(`td`,{className:`num`,children:e.sessions||`—`}),(0,A.jsx)(`td`,{className:`num`,children:e.memories||`—`}),(0,A.jsx)(`td`,{className:`num`,children:S(e.lastActive)})]},e.path))})]}),u.length===0&&(0,A.jsx)(`p`,{className:`tt-empty`,children:n.length===0?`No directories yet. Temporary and test directories are listed in the sidebar.`:`No directory matches.`}),(0,A.jsx)(Zf,{shown:Math.min(c,u.length),total:u.length,page:50,onMore:()=>l(c+50)})]}),(0,A.jsxs)(`section`,{className:`tt-section`,"aria-labelledby":`h-shared`,children:[(0,A.jsxs)(`header`,{className:`tt-head`,children:[(0,A.jsx)(`h2`,{id:`h-shared`,children:`Memory saved in more than one directory`}),(0,A.jsx)(`span`,{className:`tt-count`,children:e.sharedMemories.length})]}),e.sharedMemories.length===0?(0,A.jsx)(`p`,{className:`tt-empty`,children:`Every memory lives in exactly one directory.`}):(0,A.jsxs)(`table`,{className:`tt tt-shared`,children:[(0,A.jsx)(`thead`,{children:(0,A.jsxs)(`tr`,{children:[(0,A.jsx)(`th`,{scope:`col`}),(0,A.jsx)(`th`,{scope:`col`,children:`Memory`}),(0,A.jsx)(`th`,{scope:`col`,children:`Copies`}),(0,A.jsx)(`th`,{scope:`col`,children:`Saved in`})]})}),(0,A.jsx)(`tbody`,{children:e.sharedMemories.map(e=>{let n=new Set(e.stores.map(e=>e.hash)).size===1;return(0,A.jsxs)(`tr`,{children:[(0,A.jsx)(`td`,{children:(0,A.jsx)(N,{line:`memory`})}),(0,A.jsx)(`td`,{className:`mono`,children:e.name}),(0,A.jsx)(`td`,{children:(0,A.jsx)(`span`,{className:`flag ${n?``:`warn`}`,children:n?`identical`:`drifted apart`})}),(0,A.jsx)(`td`,{className:`stores`,children:e.stores.map(e=>(0,A.jsx)(`button`,{type:`button`,className:`link mono`,onClick:()=>t(e.projectPath),children:j(e.projectPath)},e.projectPath))})]},e.name)})})]})]})]})}function gp(e,t){let n=e.trim();return t&&(n===`~`||n.startsWith(`~/`))?t+n.slice(1):n.startsWith(`/`)||/^[A-Za-z]:[\\/]/.test(n)?n:null}function _p(e,t,n,r){let i=e.trim().toLowerCase(),a=(t?.projects??[]).filter(e=>!e.ephemeral&&e.path!==r&&(!i||e.path.toLowerCase().includes(i))).map(e=>({kind:`dir`,key:`dir:${e.path}`,label:j(e.path),path:e.path}));if(r!==void 0){let n=gp(e,t?.home),r=a.some(e=>e.kind===`dir`&&e.path===n);return[...n&&!r?[{kind:`dir`,key:`typed:${n}`,label:j(n),path:n}]:[],...a].slice(0,40)}let o=n.filter(e=>i&&jf(e.section).text(e).toLowerCase().includes(i)).map(e=>({kind:`row`,key:e.id,label:jf(e.section).label(e,Mf()),row:e})),s=new Set(n.map(e=>e.id)),c=(t?.memoryCatalog??[]).filter(e=>i&&!s.has(`mem:${e.path}`)&&`${e.name} ${e.description} ${e.type}`.toLowerCase().includes(i)).map(e=>({kind:`memory`,key:`cat:${e.path}`,label:`memory ${e.name} · ${j(e.projectPath)}`,projectPath:e.projectPath,path:e.path}));return[...o,...c,...a].slice(0,40)}function vp(e,t){return e.trim()?`Nothing matches “${e}”.`:t===void 0?`Type to search directories, files, settings and memories.`:`No other directories yet. Type a full path.`}function yp({result:e}){return e.kind===`memory`?(0,A.jsx)(N,{line:`memory`}):e.kind===`dir`?(0,A.jsx)(M,{name:`folder`}):e.row.line?(0,A.jsx)(N,{line:e.row.line}):(0,A.jsx)(M,{name:`command`})}function bp({overview:e,rows:t,compareFrom:n,onClose:r,onOpenDirectory:i,onSelectRow:a,onOpenMemory:o,onCompare:s}){let[c,l]=(0,v.useState)(``),[u,d]=(0,v.useState)(0),f=(0,v.useRef)(null);(0,v.useEffect)(()=>f.current?.focus(),[]),(0,v.useEffect)(()=>{document.getElementById(`pal-${u}`)?.scrollIntoView({block:`nearest`})},[u]);let p=(0,v.useMemo)(()=>_p(c,e,t,n),[c,e,t,n]),m=e=>{e&&(e.kind===`dir`&&n!==void 0?s(n,e.path):e.kind===`dir`?i(e.path):e.kind===`memory`?o(e.projectPath,e.path):a(e.row.id),r())};return(0,A.jsx)(`div`,{className:`palette-backdrop`,onMouseDown:r,children:(0,A.jsxs)(`div`,{className:`palette`,role:`dialog`,"aria-modal":`true`,"aria-label":n===void 0?`Jump to`:`Compare settings with`,onMouseDown:e=>e.stopPropagation(),children:[(0,A.jsxs)(`label`,{className:`palette-input`,children:[(0,A.jsx)(M,{name:`search`}),(0,A.jsx)(`input`,{ref:f,role:`combobox`,"aria-expanded":`true`,value:c,onChange:e=>{l(e.target.value),d(0)},placeholder:n===void 0?`Jump to a directory, file, setting or memory`:`Compare settings with a directory, or type its path`,"aria-controls":`palette-results`,"aria-activedescendant":p[u]?`pal-${u}`:void 0,onKeyDown:e=>{e.key===`ArrowDown`?(e.preventDefault(),d(e=>Math.min(e+1,p.length-1))):e.key===`ArrowUp`?(e.preventDefault(),d(e=>Math.max(e-1,0))):e.key===`Enter`?(e.preventDefault(),m(p[u])):e.key===`Escape`?r():e.key===`Tab`&&e.preventDefault()}})]}),(0,A.jsxs)(`div`,{id:`palette-results`,className:`palette-results`,role:`listbox`,"aria-label":`Results`,children:[p.length===0&&(0,A.jsx)(`div`,{className:`palette-empty`,children:vp(c,n)}),p.map((e,t)=>(0,A.jsxs)(`div`,{id:`pal-${t}`,role:`option`,tabIndex:-1,"aria-selected":t===u,className:t===u?`active`:``,onMouseEnter:()=>d(t),onClick:()=>m(e),children:[(0,A.jsx)(yp,{result:e}),(0,A.jsx)(`span`,{className:e.kind===`dir`?`mono`:``,children:e.label})]},e.key))]})]})})}var xp=`https://ayagmar.github.io/ccdesk/`,Sp=[{size:`smaller`,label:`Smaller text`},{size:`default`,label:`Default text size`},{size:`larger`,label:`Larger text`}];function Cp(e,t){return e===t?`~ (home)`:j(e)}function wp({overview:e,current:t,changesOpen:n,dark:r,onOpen:i,onChanges:a,onToggleTheme:o,textSize:s,onTextSize:c}){let[l,u]=(0,v.useState)(``),[d,f]=(0,v.useState)(!1),p=e?.projects??[],m=e=>!l||e.path.toLowerCase().includes(l.toLowerCase()),h=p.find(t=>t.path===e?.launchDir),g=p.filter(e=>!e.ephemeral&&e!==h&&m(e)),_=p.filter(e=>e.ephemeral&&e!==h&&m(e)),y=n=>(0,A.jsx)(`li`,{children:(0,A.jsxs)(`button`,{type:`button`,className:`rail-item${t===n.path?` current`:``}${n.exists?``:` gone`}`,"aria-current":t===n.path?`page`:void 0,onClick:()=>i(n.path),title:n.exists?j(n.path):`${j(n.path)} (folder no longer exists)`,children:[(0,A.jsx)(`span`,{className:`rail-label`,children:Cp(n.path,e?.home??``)}),n.memories>0&&(0,A.jsx)(`span`,{className:`rail-count`,children:n.memories})]})},n.path);return(0,A.jsxs)(`nav`,{className:`rail`,"aria-label":`Directories`,children:[(0,A.jsxs)(`div`,{className:`brand`,children:[(0,A.jsxs)(`a`,{className:`brand-link`,href:xp,target:`_blank`,rel:`noreferrer`,title:`ccdesk docs`,children:[(0,A.jsx)(`img`,{src:`/logo.png`,width:`26`,height:`26`,alt:``}),(0,A.jsx)(`span`,{children:`ccdesk`})]}),(0,A.jsx)(`fieldset`,{className:`segmented small text-size`,"aria-label":`Text size`,children:Sp.map(({size:e,label:t})=>(0,A.jsx)(`button`,{type:`button`,className:e,"aria-label":t,title:t,"aria-pressed":s===e,onClick:()=>c(e),children:`A`},e))}),(0,A.jsx)(`button`,{type:`button`,className:`icon-button`,onClick:o,"aria-label":`Dark theme`,"aria-pressed":r,children:(0,A.jsx)(M,{name:`sun`})})]}),(0,A.jsxs)(`button`,{type:`button`,className:`rail-item overview-link${t===null?` current`:``}`,"aria-current":t===null?`page`:void 0,onClick:()=>i(null),children:[(0,A.jsx)(M,{name:`folder`}),` `,(0,A.jsx)(`span`,{className:`rail-label`,children:`All directories`})]}),(0,A.jsxs)(`button`,{type:`button`,className:`rail-item overview-link${n?` current`:``}`,"aria-current":n?`page`:void 0,onClick:a,children:[(0,A.jsx)(M,{name:`undo`}),` `,(0,A.jsx)(`span`,{className:`rail-label`,children:`Recent changes`})]}),h&&(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`h2`,{className:`rail-group`,children:`Opened from`}),(0,A.jsx)(`ul`,{className:`rail-list`,children:y(h)})]}),(0,A.jsxs)(`label`,{className:`rail-filter`,children:[(0,A.jsx)(M,{name:`search`}),(0,A.jsx)(`input`,{value:l,onChange:e=>u(e.target.value),placeholder:`Find a directory`,"aria-label":`Find a directory`})]}),(0,A.jsx)(`h2`,{className:`rail-group`,children:`Used with Claude`}),g.length>0?(0,A.jsx)(`ul`,{className:`rail-list`,children:g.map(y)}):(0,A.jsx)(`p`,{className:`rail-empty`,children:l?`No directory matches.`:`No other directories yet.`}),_.length>0&&(0,A.jsxs)(A.Fragment,{children:[(0,A.jsxs)(`button`,{type:`button`,className:`rail-group toggle`,"aria-expanded":d,onClick:()=>f(!d),children:[`Temporary and test dirs `,(0,A.jsx)(`span`,{className:`rail-count`,children:_.length})]}),d&&(0,A.jsx)(`ul`,{className:`rail-list`,children:_.map(y)})]}),typeof t==`string`&&(0,A.jsxs)(`ul`,{className:`rail-keys`,"aria-label":`Keyboard shortcuts`,children:[(0,A.jsxs)(`li`,{children:[(0,A.jsx)(`kbd`,{children:`j`}),` `,(0,A.jsx)(`kbd`,{children:`k`}),` rows`]}),(0,A.jsxs)(`li`,{children:[(0,A.jsx)(`kbd`,{children:`1`}),`–`,(0,A.jsx)(`kbd`,{children:Af.length}),` sections`]}),(0,A.jsxs)(`li`,{children:[(0,A.jsx)(`kbd`,{children:`/`}),` filter`]}),(0,A.jsxs)(`li`,{children:[(0,A.jsx)(`kbd`,{children:`Ctrl`}),` `,(0,A.jsx)(`kbd`,{children:`K`}),` jump anywhere`]})]})]})}function Tp(e,t){let[n,r]=(0,v.useState)({state:`loading`}),[i,a]=(0,v.useState)({state:`loading`}),[o,s]=(0,v.useState)(null),c=n.state===`ready`?n.data.launchDir:null,l=e===void 0?c:e,u=(0,v.useCallback)(()=>{Re.overview().then(e=>{Je(te(e.home)),r({state:`ready`,data:e})},e=>r({state:`error`,message:Ie(e)}))},[]);(0,v.useEffect)(u,[u]);let[d,f]=(0,v.useState)({state:`loading`});(0,v.useEffect)(()=>{Re.reference().then(e=>{Mt(e),f({state:`ready`,data:e})},e=>f({state:`error`,message:Ie(e)}))},[]);let p=(0,v.useRef)(0),m=(0,v.useCallback)((e,t,n)=>{let r=++p.current;n||a({state:`loading`}),Re.directory(e,t).then(t=>{r===p.current&&(a({state:`ready`,data:t}),s(e))},e=>{r===p.current&&a({state:`error`,message:Ie(e)})})},[]);(0,v.useEffect)(()=>{l!==null&&m(l,t,!1)},[l,t,m]);let h=(0,v.useRef)(l);h.current=l;let g=(0,v.useRef)(t);g.current=t;let _=(0,v.useCallback)(()=>{h.current!==null&&m(h.current,g.current,!0)},[m]),y=(0,v.useCallback)(()=>{_(),u()},[_,u]);(0,v.useEffect)(()=>{if(l===null)return;let e=new AbortController;return(async()=>{let t=Date.now();for(;!e.signal.aborted;)try{let{changed:n,at:r}=await Re.watch(l,t,e.signal);t=Math.max(t,r),n&&!e.signal.aborted&&_()}catch{await new Promise(e=>setTimeout(e,5e3))}})(),()=>e.abort()},[l,_]),(0,v.useEffect)(()=>{let e=Date.now(),t=()=>{document.visibilityState!==`visible`||Date.now()-e<1500||(e=Date.now(),y())};return addEventListener(`focus`,t),document.addEventListener(`visibilitychange`,t),()=>{removeEventListener(`focus`,t),document.removeEventListener(`visibilitychange`,t)}},[y]);let b=d.state===`ready`&&i.state===`ready`&&o===l&&i.data.profile===t?i.data:null,[x,ee]=(0,v.useState)(null);(0,v.useEffect)(()=>{if(!b)return;let e=new AbortController,t=b.permissions.flatMap(e=>e.kind===`rule`&&e.inEffect?[{list:e.list,rule:e.rule}]:[]);return Re.usage(b.path,t,e.signal).then(t=>!e.signal.aborted&&ee({path:b.path,data:t}),()=>!e.signal.aborted&&ee({path:b.path,data:null})),()=>e.abort()},[b]);let S=(0,v.useMemo)(()=>b&&x?.path===b.path?{...b,usage:x.data}:b,[b,x]);return{overview:n,view:d.state===`error`?d:i,data:S,dir:l,reload:y}}function Ep(){let e=document.documentElement.dataset.theme;return e?e===`dark`:matchMedia(`(prefers-color-scheme: dark)`).matches}function Dp(){let[e,t]=(0,v.useState)(If),[n,r]=(0,v.useState)(null),[i,a]=(0,v.useState)(null),[o,s]=(0,v.useState)(null),c=kp(),[l,u]=(0,v.useState)(0),d=e.kind===`directory`?e.profile:`interactive`,f=Tp(e.kind===`directory`?e.dir:null,d),{data:p,dir:m}=f,h=f.overview.state===`ready`?f.overview.data:null,g=(0,v.useMemo)(()=>p?je(p,Mf()):[],[p]),_=(0,v.useCallback)(e=>{t(e),u(e=>e+1),Bf(e)},[]),y=(0,v.useCallback)(e=>_(e===null?{kind:`all`}:{kind:`directory`,dir:e,profile:d}),[_,d]),b=(0,v.useCallback)(e=>t(t=>t.kind===`directory`?{...t,profile:e}:t),[]);(0,v.useEffect)(()=>{let e=()=>{t(If()),u(e=>e+1)};return addEventListener(`popstate`,e),()=>removeEventListener(`popstate`,e)},[]),(0,v.useEffect)(()=>{let e=e=>{(e.ctrlKey||e.metaKey)&&e.key.toLowerCase()===`k`&&(e.preventDefault(),r(e=>e?null:{}))};return addEventListener(`keydown`,e),()=>removeEventListener(`keydown`,e)},[]);let x=(0,v.useCallback)(()=>a(null),[]),ee=(0,v.useCallback)(e=>r({compareFrom:e}),[]);return(0,A.jsxs)(`div`,{className:`app`,children:[(0,A.jsx)(wp,{overview:h,current:Op(e,p?.path??m),changesOpen:e.kind===`changes`,dark:c.dark,onOpen:y,onChanges:()=>_({kind:`changes`}),onToggleTheme:c.toggleTheme,textSize:c.textSize,onTextSize:c.changeTextSize}),(0,A.jsx)(`main`,{className:`main`,children:(0,A.jsx)(Ap,{page:e,visit:l,config:f,overview:h,rows:g,jump:o,onJumped:()=>s(null),onToast:a,onOpenDirectory:y,onOpenPalette:()=>r({}),onProfile:b,onCompare:ee})}),n&&(0,A.jsx)(bp,{overview:h,rows:g,compareFrom:n.compareFrom,onClose:()=>r(null),onCompare:(e,t)=>_({kind:`compare`,dir:e,other:t}),onOpenDirectory:y,onSelectRow:e=>s({id:e}),onOpenMemory:(e,t)=>{e!==m&&y(e),s({id:`mem:${t}`})}}),(0,A.jsx)(tp,{toast:i,onDone:x})]})}function Op(e,t){return e.kind===`directory`?t:e.kind===`all`?null:void 0}function kp(){let[e,t]=(0,v.useState)(Ep),[n,r]=(0,v.useState)(()=>document.documentElement.dataset.textSize??`default`);return{dark:e,toggleTheme:()=>{let e=Ep()?`light`:`dark`;document.documentElement.dataset.theme=e,t(e===`dark`);try{localStorage.setItem(`ccdesk-theme`,e)}catch{}},textSize:n,changeTextSize:e=>{e==="default"?delete document.documentElement.dataset.textSize:document.documentElement.dataset.textSize=e,r(e);try{localStorage.setItem(`ccdesk-text-size`,e)}catch{}}}}function Ap({page:e,visit:t,config:n,overview:r,rows:i,jump:a,onJumped:o,onToast:s,onOpenDirectory:c,onOpenPalette:l,onProfile:u,onCompare:d}){let{view:f,data:p,reload:m}=n;return n.overview.state===`error`?(0,A.jsx)(Mp,{message:n.overview.message}):e.kind===`changes`?(0,A.jsx)(rt,{onRestored:e=>{s({text:e}),m()}}):e.kind===`compare`?(0,A.jsx)(ut,{dir:e.dir,other:e.other,onOpen:c,onPickOther:()=>d(e.dir)},t):e.kind===`all`?r?(0,A.jsx)(hp,{overview:r,onOpen:c},t):(0,A.jsx)(jp,{}):f.state===`error`?(0,A.jsx)(Mp,{message:f.message}):p?(0,A.jsx)(rp,{view:p,overview:r,rows:i,jump:a,onJumped:o,reload:m,onToast:s,onOpenDirectory:c,onOpenPalette:l,onProfile:u,onCompare:d},`${p.path}:${t}`):(0,A.jsx)(jp,{})}function jp(){return(0,A.jsxs)(`div`,{className:`loading`,role:`status`,children:[(0,A.jsx)(`span`,{className:`loading-line`,"aria-hidden":`true`}),`Reading your config…`]})}function Mp({message:e}){return(0,A.jsxs)(`div`,{className:`problem`,role:`alert`,children:[(0,A.jsx)(`h1`,{children:`Something went wrong`}),(0,A.jsx)(`p`,{children:e})]})}try{let e=localStorage.getItem(`ccdesk-theme`);(e===`light`||e===`dark`)&&(document.documentElement.dataset.theme=e);let t=localStorage.getItem(`ccdesk-text-size`);(t===`smaller`||t===`larger`)&&(document.documentElement.dataset.textSize=t)}catch{}var Np=document.getElementById(`root`);Np&&(0,y.createRoot)(Np).render((0,A.jsx)(v.StrictMode,{children:(0,A.jsx)(Dp,{})}));
@@ -6,7 +6,7 @@
6
6
  <meta name="color-scheme" content="light dark" />
7
7
  <title>ccdesk</title>
8
8
  <link rel="icon" href="/logo.png" type="image/png" />
9
- <script type="module" crossorigin src="/assets/index-CH1HoC38.js"></script>
9
+ <script type="module" crossorigin src="/assets/index-C9qqEI5Z.js"></script>
10
10
  <link rel="stylesheet" crossorigin href="/assets/index-D5XqP5c_.css">
11
11
  </head>
12
12
  <body>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ccdesk",
3
- "version": "0.2.3",
3
+ "version": "0.2.4",
4
4
  "description": "See and change everything Claude Code loads on your machine: instruction files, settings, permissions, hooks, MCP servers, subagents, skills, plugins and auto memory",
5
5
  "keywords": [
6
6
  "claude-code",