auto-coder-web 0.1.85__py3-none-any.whl → 0.1.86__py3-none-any.whl

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.
@@ -517,9 +517,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
517
517
  `))+1))}const o="#".repeat(r),a=t.enter("headingAtx"),l=t.enter("phrasing");s.move(o+" ");let c=t.containerPhrasing(n,{before:"# ",after:`
518
518
  `,...s.current()});return/^[\t ]/.test(c)&&(c=TT(c.charCodeAt(0))+c.slice(1)),c=c?o+" "+c:o,t.options.closeAtx&&(c+=" "+o),l(),a(),c}C8e.peek=cOt;function C8e(n){return n.value||""}function cOt(){return"<"}w8e.peek=dOt;function w8e(n,e,t,i){const r=she(t),s=r==='"'?"Quote":"Apostrophe",o=t.enter("image");let a=t.enter("label");const l=t.createTracker(i);let c=l.move("![");return c+=l.move(t.safe(n.alt,{before:c,after:"]",...l.current()})),c+=l.move("]("),a(),!n.url&&n.title||/[\0- \u007F]/.test(n.url)?(a=t.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(t.safe(n.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(a=t.enter("destinationRaw"),c+=l.move(t.safe(n.url,{before:c,after:n.title?" ":")",...l.current()}))),a(),n.title&&(a=t.enter(`title${s}`),c+=l.move(" "+r),c+=l.move(t.safe(n.title,{before:c,after:r,...l.current()})),c+=l.move(r),a()),c+=l.move(")"),o(),c}function dOt(){return"!"}S8e.peek=uOt;function S8e(n,e,t,i){const r=n.referenceType,s=t.enter("imageReference");let o=t.enter("label");const a=t.createTracker(i);let l=a.move("![");const c=t.safe(n.alt,{before:l,after:"]",...a.current()});l+=a.move(c+"]["),o();const d=t.stack;t.stack=[],o=t.enter("reference");const u=t.safe(t.associationId(n),{before:l,after:"]",...a.current()});return o(),t.stack=d,s(),r==="full"||!c||c!==u?l+=a.move(u+"]"):r==="shortcut"?l=l.slice(0,-1):l+=a.move("]"),l}function uOt(){return"!"}x8e.peek=hOt;function x8e(n,e,t){let i=n.value||"",r="`",s=-1;for(;new RegExp("(^|[^`])"+r+"([^`]|$)").test(i);)r+="`";for(/[^ \r\n]/.test(i)&&(/^[ \r\n]/.test(i)&&/[ \r\n]$/.test(i)||/^`|`$/.test(i))&&(i=" "+i+" ");++s<t.unsafe.length;){const o=t.unsafe[s],a=t.compilePattern(o);let l;if(o.atBreak)for(;l=a.exec(i);){let c=l.index;i.charCodeAt(c)===10&&i.charCodeAt(c-1)===13&&c--,i=i.slice(0,c)+" "+i.slice(l.index+1)}}return r+i+r}function hOt(){return"`"}function E8e(n,e){const t=Yue(n);return!!(!e.options.resourceLink&&n.url&&!n.title&&n.children&&n.children.length===1&&n.children[0].type==="text"&&(t===n.url||"mailto:"+t===n.url)&&/^[a-z][a-z+.-]+:/i.test(n.url)&&!/[\0- <>\u007F]/.test(n.url))}k8e.peek=fOt;function k8e(n,e,t,i){const r=she(t),s=r==='"'?"Quote":"Apostrophe",o=t.createTracker(i);let a,l;if(E8e(n,t)){const d=t.stack;t.stack=[],a=t.enter("autolink");let u=o.move("<");return u+=o.move(t.containerPhrasing(n,{before:u,after:">",...o.current()})),u+=o.move(">"),a(),t.stack=d,u}a=t.enter("link"),l=t.enter("label");let c=o.move("[");return c+=o.move(t.containerPhrasing(n,{before:c,after:"](",...o.current()})),c+=o.move("]("),l(),!n.url&&n.title||/[\0- \u007F]/.test(n.url)?(l=t.enter("destinationLiteral"),c+=o.move("<"),c+=o.move(t.safe(n.url,{before:c,after:">",...o.current()})),c+=o.move(">")):(l=t.enter("destinationRaw"),c+=o.move(t.safe(n.url,{before:c,after:n.title?" ":")",...o.current()}))),l(),n.title&&(l=t.enter(`title${s}`),c+=o.move(" "+r),c+=o.move(t.safe(n.title,{before:c,after:r,...o.current()})),c+=o.move(r),l()),c+=o.move(")"),a(),c}function fOt(n,e,t){return E8e(n,t)?"<":"["}I8e.peek=gOt;function I8e(n,e,t,i){const r=n.referenceType,s=t.enter("linkReference");let o=t.enter("label");const a=t.createTracker(i);let l=a.move("[");const c=t.containerPhrasing(n,{before:l,after:"]",...a.current()});l+=a.move(c+"]["),o();const d=t.stack;t.stack=[],o=t.enter("reference");const u=t.safe(t.associationId(n),{before:l,after:"]",...a.current()});return o(),t.stack=d,s(),r==="full"||!c||c!==u?l+=a.move(u+"]"):r==="shortcut"?l=l.slice(0,-1):l+=a.move("]"),l}function gOt(){return"["}function ohe(n){const e=n.options.bullet||"*";if(e!=="*"&&e!=="+"&&e!=="-")throw new Error("Cannot serialize items with `"+e+"` for `options.bullet`, expected `*`, `+`, or `-`");return e}function pOt(n){const e=ohe(n),t=n.options.bulletOther;if(!t)return e==="*"?"-":"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(t===e)throw new Error("Expected `bullet` (`"+e+"`) and `bulletOther` (`"+t+"`) to be different");return t}function mOt(n){const e=n.options.bulletOrdered||".";if(e!=="."&&e!==")")throw new Error("Cannot serialize items with `"+e+"` for `options.bulletOrdered`, expected `.` or `)`");return e}function L8e(n){const e=n.options.rule||"*";if(e!=="*"&&e!=="-"&&e!=="_")throw new Error("Cannot serialize rules with `"+e+"` for `options.rule`, expected `*`, `-`, or `_`");return e}function AOt(n,e,t,i){const r=t.enter("list"),s=t.bulletCurrent;let o=n.ordered?mOt(t):ohe(t);const a=n.ordered?o==="."?")":".":pOt(t);let l=e&&t.bulletLastUsed?o===t.bulletLastUsed:!1;if(!n.ordered){const d=n.children?n.children[0]:void 0;if((o==="*"||o==="-")&&d&&(!d.children||!d.children[0])&&t.stack[t.stack.length-1]==="list"&&t.stack[t.stack.length-2]==="listItem"&&t.stack[t.stack.length-3]==="list"&&t.stack[t.stack.length-4]==="listItem"&&t.indexStack[t.indexStack.length-1]===0&&t.indexStack[t.indexStack.length-2]===0&&t.indexStack[t.indexStack.length-3]===0&&(l=!0),L8e(t)===o&&d){let u=-1;for(;++u<n.children.length;){const h=n.children[u];if(h&&h.type==="listItem"&&h.children&&h.children[0]&&h.children[0].type==="thematicBreak"){l=!0;break}}}}l&&(o=a),t.bulletCurrent=o;const c=t.containerFlow(n,i);return t.bulletLastUsed=o,t.bulletCurrent=s,r(),c}function vOt(n){const e=n.options.listItemIndent||"one";if(e!=="tab"&&e!=="one"&&e!=="mixed")throw new Error("Cannot serialize items with `"+e+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return e}function bOt(n,e,t,i){const r=vOt(t);let s=t.bulletCurrent||ohe(t);e&&e.type==="list"&&e.ordered&&(s=(typeof e.start=="number"&&e.start>-1?e.start:1)+(t.options.incrementListMarker===!1?0:e.children.indexOf(n))+s);let o=s.length+1;(r==="tab"||r==="mixed"&&(e&&e.type==="list"&&e.spread||n.spread))&&(o=Math.ceil(o/4)*4);const a=t.createTracker(i);a.move(s+" ".repeat(o-s.length)),a.shift(o);const l=t.enter("listItem"),c=t.indentLines(t.containerFlow(n,a.current()),d);return l(),c;function d(u,h,f){return h?(f?"":" ".repeat(o))+u:(f?s:s+" ".repeat(o-s.length))+u}}function _Ot(n,e,t,i){const r=t.enter("paragraph"),s=t.enter("phrasing"),o=t.containerPhrasing(n,i);return s(),r(),o}const yOt=j7(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function COt(n,e,t,i){return(n.children.some(function(o){return yOt(o)})?t.containerPhrasing:t.containerFlow).call(t,n,i)}function wOt(n){const e=n.options.strong||"*";if(e!=="*"&&e!=="_")throw new Error("Cannot serialize strong with `"+e+"` for `options.strong`, expected `*`, or `_`");return e}N8e.peek=SOt;function N8e(n,e,t,i){const r=wOt(t),s=t.enter("strong"),o=t.createTracker(i),a=o.move(r+r);let l=o.move(t.containerPhrasing(n,{after:r,before:a,...o.current()}));const c=l.charCodeAt(0),d=S3(i.before.charCodeAt(i.before.length-1),c,r);d.inside&&(l=TT(c)+l.slice(1));const u=l.charCodeAt(l.length-1),h=S3(i.after.charCodeAt(0),u,r);h.inside&&(l=l.slice(0,-1)+TT(u));const f=o.move(r+r);return s(),t.attentionEncodeSurroundingInfo={after:h.outside,before:d.outside},a+l+f}function SOt(n,e,t){return t.options.strong||"*"}function xOt(n,e,t,i){return t.safe(n.value,i)}function EOt(n){const e=n.options.ruleRepetition||3;if(e<3)throw new Error("Cannot serialize rules with repetition `"+e+"` for `options.ruleRepetition`, expected `3` or more");return e}function kOt(n,e,t){const i=(L8e(t)+(t.options.ruleSpaces?" ":"")).repeat(EOt(t));return t.options.ruleSpaces?i.slice(0,-1):i}const T8e={blockquote:YMt,break:hIe,code:nOt,definition:rOt,emphasis:y8e,hardBreak:hIe,heading:lOt,html:C8e,image:w8e,imageReference:S8e,inlineCode:x8e,link:k8e,linkReference:I8e,list:AOt,listItem:bOt,paragraph:_Ot,root:COt,strong:N8e,text:xOt,thematicBreak:kOt};function IOt(){return{enter:{table:LOt,tableData:fIe,tableHeader:fIe,tableRow:TOt},exit:{codeText:DOt,table:NOt,tableData:tX,tableHeader:tX,tableRow:tX}}}function LOt(n){const e=n._align;this.enter({type:"table",align:e.map(function(t){return t==="none"?null:t}),children:[]},n),this.data.inTable=!0}function NOt(n){this.exit(n),this.data.inTable=void 0}function TOt(n){this.enter({type:"tableRow",children:[]},n)}function tX(n){this.exit(n)}function fIe(n){this.enter({type:"tableCell",children:[]},n)}function DOt(n){let e=this.resume();this.data.inTable&&(e=e.replace(/\\([\\|])/g,ROt));const t=this.stack[this.stack.length-1];t.type,t.value=e,this.exit(n)}function ROt(n,e){return e==="|"?e:n}function MOt(n){const e=n||{},t=e.tableCellPadding,i=e.tablePipeAlign,r=e.stringLength,s=t?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
519
519
  `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:h,table:o,tableCell:l,tableRow:a}};function o(f,g,m,p){return c(d(f,m,p),f.align)}function a(f,g,m,p){const A=u(f,m,p),v=c([A]);return v.slice(0,v.indexOf(`
520
- `))}function l(f,g,m,p){const A=m.enter("tableCell"),v=m.enter("phrasing"),_=m.containerPhrasing(f,{...p,before:s,after:s});return v(),A(),_}function c(f,g){return QMt(f,{align:g,alignDelimiters:i,padding:t,stringLength:r})}function d(f,g,m){const p=f.children;let A=-1;const v=[],_=g.enter("table");for(;++A<p.length;)v[A]=u(p[A],g,m);return _(),v}function u(f,g,m){const p=f.children;let A=-1;const v=[],_=g.enter("tableRow");for(;++A<p.length;)v[A]=l(p[A],f,g,m);return _(),v}function h(f,g,m){let p=T8e.inlineCode(f,g,m);return m.stack.includes("tableCell")&&(p=p.replace(/\|/g,"\\$&")),p}}function OOt(){return{exit:{taskListCheckValueChecked:gIe,taskListCheckValueUnchecked:gIe,paragraph:POt}}}function BOt(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:FOt}}}function gIe(n){const e=this.stack[this.stack.length-2];e.type,e.checked=n.type==="taskListCheckValueChecked"}function POt(n){const e=this.stack[this.stack.length-2];if(e&&e.type==="listItem"&&typeof e.checked=="boolean"){const t=this.stack[this.stack.length-1];t.type;const i=t.children[0];if(i&&i.type==="text"){const r=e.children;let s=-1,o;for(;++s<r.length;){const a=r[s];if(a.type==="paragraph"){o=a;break}}o===t&&(i.value=i.value.slice(1),i.value.length===0?t.children.shift():t.position&&i.position&&typeof i.position.start.offset=="number"&&(i.position.start.column++,i.position.start.offset++,t.position.start=Object.assign({},i.position.start)))}}this.exit(n)}function FOt(n,e,t,i){const r=n.children[0],s=typeof n.checked=="boolean"&&r&&r.type==="paragraph",o="["+(n.checked?"x":" ")+"] ",a=t.createTracker(i);s&&a.move(o);let l=T8e.listItem(n,e,t,{...i,...a.current()});return s&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,c)),l;function c(d){return d+o}}function $Ot(){return[AMt(),FMt(),WMt(),IOt(),OOt()]}function HOt(n){return{extensions:[vMt(),$Mt(n),jMt(),MOt(n),BOt()]}}const UOt={tokenize:GOt,partial:!0},D8e={tokenize:QOt,partial:!0},R8e={tokenize:qOt,partial:!0},M8e={tokenize:YOt,partial:!0},WOt={tokenize:XOt,partial:!0},O8e={name:"wwwAutolink",tokenize:VOt,previous:P8e},B8e={name:"protocolAutolink",tokenize:KOt,previous:F8e},$A={name:"emailAutolink",tokenize:zOt,previous:$8e},Hp={};function jOt(){return{text:Hp}}let c0=48;for(;c0<123;)Hp[c0]=$A,c0++,c0===58?c0=65:c0===91&&(c0=97);Hp[43]=$A;Hp[45]=$A;Hp[46]=$A;Hp[95]=$A;Hp[72]=[$A,B8e];Hp[104]=[$A,B8e];Hp[87]=[$A,O8e];Hp[119]=[$A,O8e];function zOt(n,e,t){const i=this;let r,s;return o;function o(u){return!Vte(u)||!$8e.call(i,i.previous)||ahe(i.events)?t(u):(n.enter("literalAutolink"),n.enter("literalAutolinkEmail"),a(u))}function a(u){return Vte(u)?(n.consume(u),a):u===64?(n.consume(u),l):t(u)}function l(u){return u===46?n.check(WOt,d,c)(u):u===45||u===95||uc(u)?(s=!0,n.consume(u),l):d(u)}function c(u){return n.consume(u),r=!0,l}function d(u){return s&&r&&Wc(i.previous)?(n.exit("literalAutolinkEmail"),n.exit("literalAutolink"),e(u)):t(u)}}function VOt(n,e,t){const i=this;return r;function r(o){return o!==87&&o!==119||!P8e.call(i,i.previous)||ahe(i.events)?t(o):(n.enter("literalAutolink"),n.enter("literalAutolinkWww"),n.check(UOt,n.attempt(D8e,n.attempt(R8e,s),t),t)(o))}function s(o){return n.exit("literalAutolinkWww"),n.exit("literalAutolink"),e(o)}}function KOt(n,e,t){const i=this;let r="",s=!1;return o;function o(u){return(u===72||u===104)&&F8e.call(i,i.previous)&&!ahe(i.events)?(n.enter("literalAutolink"),n.enter("literalAutolinkHttp"),r+=String.fromCodePoint(u),n.consume(u),a):t(u)}function a(u){if(Wc(u)&&r.length<5)return r+=String.fromCodePoint(u),n.consume(u),a;if(u===58){const h=r.toLowerCase();if(h==="http"||h==="https")return n.consume(u),l}return t(u)}function l(u){return u===47?(n.consume(u),s?c:(s=!0,l)):t(u)}function c(u){return u===null||y3(u)||zs(u)||qC(u)||H7(u)?t(u):n.attempt(D8e,n.attempt(R8e,d),t)(u)}function d(u){return n.exit("literalAutolinkHttp"),n.exit("literalAutolink"),e(u)}}function GOt(n,e,t){let i=0;return r;function r(o){return(o===87||o===119)&&i<3?(i++,n.consume(o),r):o===46&&i===3?(n.consume(o),s):t(o)}function s(o){return o===null?t(o):e(o)}}function QOt(n,e,t){let i,r,s;return o;function o(c){return c===46||c===95?n.check(M8e,l,a)(c):c===null||zs(c)||qC(c)||c!==45&&H7(c)?l(c):(s=!0,n.consume(c),o)}function a(c){return c===95?i=!0:(r=i,i=void 0),n.consume(c),o}function l(c){return r||i||!s?t(c):e(c)}}function qOt(n,e){let t=0,i=0;return r;function r(o){return o===40?(t++,n.consume(o),r):o===41&&i<t?s(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?n.check(M8e,e,s)(o):o===null||zs(o)||qC(o)?e(o):(n.consume(o),r)}function s(o){return o===41&&i++,n.consume(o),r}}function YOt(n,e,t){return i;function i(a){return a===33||a===34||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===63||a===95||a===126?(n.consume(a),i):a===38?(n.consume(a),s):a===93?(n.consume(a),r):a===60||a===null||zs(a)||qC(a)?e(a):t(a)}function r(a){return a===null||a===40||a===91||zs(a)||qC(a)?e(a):i(a)}function s(a){return Wc(a)?o(a):t(a)}function o(a){return a===59?(n.consume(a),i):Wc(a)?(n.consume(a),o):t(a)}}function XOt(n,e,t){return i;function i(s){return n.consume(s),r}function r(s){return uc(s)?t(s):e(s)}}function P8e(n){return n===null||n===40||n===42||n===95||n===91||n===93||n===126||zs(n)}function F8e(n){return!Wc(n)}function $8e(n){return!(n===47||Vte(n))}function Vte(n){return n===43||n===45||n===46||n===95||uc(n)}function ahe(n){let e=n.length,t=!1;for(;e--;){const i=n[e][1];if((i.type==="labelLink"||i.type==="labelImage")&&!i._balanced){t=!0;break}if(i._gfmAutolinkLiteralWalkedInto){t=!1;break}}return n.length>0&&!t&&(n[n.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),t}const ZOt={tokenize:o4t,partial:!0};function JOt(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:i4t,continuation:{tokenize:r4t},exit:s4t}},text:{91:{name:"gfmFootnoteCall",tokenize:n4t},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:e4t,resolveTo:t4t}}}}function e4t(n,e,t){const i=this;let r=i.events.length;const s=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let o;for(;r--;){const l=i.events[r][1];if(l.type==="labelImage"){o=l;break}if(l.type==="gfmFootnoteCall"||l.type==="labelLink"||l.type==="label"||l.type==="image"||l.type==="link")break}return a;function a(l){if(!o||!o._balanced)return t(l);const c=jf(i.sliceSerialize({start:o.end,end:i.now()}));return c.codePointAt(0)!==94||!s.includes(c.slice(1))?t(l):(n.enter("gfmFootnoteCallLabelMarker"),n.consume(l),n.exit("gfmFootnoteCallLabelMarker"),e(l))}}function t4t(n,e){let t=n.length;for(;t--;)if(n[t][1].type==="labelImage"&&n[t][0]==="enter"){n[t][1];break}n[t+1][1].type="data",n[t+3][1].type="gfmFootnoteCallLabelMarker";const i={type:"gfmFootnoteCall",start:Object.assign({},n[t+3][1].start),end:Object.assign({},n[n.length-1][1].end)},r={type:"gfmFootnoteCallMarker",start:Object.assign({},n[t+3][1].end),end:Object.assign({},n[t+3][1].end)};r.end.column++,r.end.offset++,r.end._bufferIndex++;const s={type:"gfmFootnoteCallString",start:Object.assign({},r.end),end:Object.assign({},n[n.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},a=[n[t+1],n[t+2],["enter",i,e],n[t+3],n[t+4],["enter",r,e],["exit",r,e],["enter",s,e],["enter",o,e],["exit",o,e],["exit",s,e],n[n.length-2],n[n.length-1],["exit",i,e]];return n.splice(t,n.length-t+1,...a),n}function n4t(n,e,t){const i=this,r=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let s=0,o;return a;function a(u){return n.enter("gfmFootnoteCall"),n.enter("gfmFootnoteCallLabelMarker"),n.consume(u),n.exit("gfmFootnoteCallLabelMarker"),l}function l(u){return u!==94?t(u):(n.enter("gfmFootnoteCallMarker"),n.consume(u),n.exit("gfmFootnoteCallMarker"),n.enter("gfmFootnoteCallString"),n.enter("chunkString").contentType="string",c)}function c(u){if(s>999||u===93&&!o||u===null||u===91||zs(u))return t(u);if(u===93){n.exit("chunkString");const h=n.exit("gfmFootnoteCallString");return r.includes(jf(i.sliceSerialize(h)))?(n.enter("gfmFootnoteCallLabelMarker"),n.consume(u),n.exit("gfmFootnoteCallLabelMarker"),n.exit("gfmFootnoteCall"),e):t(u)}return zs(u)||(o=!0),s++,n.consume(u),u===92?d:c}function d(u){return u===91||u===92||u===93?(n.consume(u),s++,c):c(u)}}function i4t(n,e,t){const i=this,r=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let s,o=0,a;return l;function l(g){return n.enter("gfmFootnoteDefinition")._container=!0,n.enter("gfmFootnoteDefinitionLabel"),n.enter("gfmFootnoteDefinitionLabelMarker"),n.consume(g),n.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(g){return g===94?(n.enter("gfmFootnoteDefinitionMarker"),n.consume(g),n.exit("gfmFootnoteDefinitionMarker"),n.enter("gfmFootnoteDefinitionLabelString"),n.enter("chunkString").contentType="string",d):t(g)}function d(g){if(o>999||g===93&&!a||g===null||g===91||zs(g))return t(g);if(g===93){n.exit("chunkString");const m=n.exit("gfmFootnoteDefinitionLabelString");return s=jf(i.sliceSerialize(m)),n.enter("gfmFootnoteDefinitionLabelMarker"),n.consume(g),n.exit("gfmFootnoteDefinitionLabelMarker"),n.exit("gfmFootnoteDefinitionLabel"),h}return zs(g)||(a=!0),o++,n.consume(g),g===92?u:d}function u(g){return g===91||g===92||g===93?(n.consume(g),o++,d):d(g)}function h(g){return g===58?(n.enter("definitionMarker"),n.consume(g),n.exit("definitionMarker"),r.includes(s)||r.push(s),$r(n,f,"gfmFootnoteDefinitionWhitespace")):t(g)}function f(g){return e(g)}}function r4t(n,e,t){return n.check(JR,e,n.attempt(ZOt,e,t))}function s4t(n){n.exit("gfmFootnoteDefinition")}function o4t(n,e,t){const i=this;return $r(n,r,"gfmFootnoteDefinitionIndent",5);function r(s){const o=i.events[i.events.length-1];return o&&o[1].type==="gfmFootnoteDefinitionIndent"&&o[2].sliceSerialize(o[1],!0).length===4?e(s):t(s)}}function a4t(n){let t=(n||{}).singleTilde;const i={name:"strikethrough",tokenize:s,resolveAll:r};return t==null&&(t=!0),{text:{126:i},insideSpan:{null:[i]},attentionMarkers:{null:[126]}};function r(o,a){let l=-1;for(;++l<o.length;)if(o[l][0]==="enter"&&o[l][1].type==="strikethroughSequenceTemporary"&&o[l][1]._close){let c=l;for(;c--;)if(o[c][0]==="exit"&&o[c][1].type==="strikethroughSequenceTemporary"&&o[c][1]._open&&o[l][1].end.offset-o[l][1].start.offset===o[c][1].end.offset-o[c][1].start.offset){o[l][1].type="strikethroughSequence",o[c][1].type="strikethroughSequence";const d={type:"strikethrough",start:Object.assign({},o[c][1].start),end:Object.assign({},o[l][1].end)},u={type:"strikethroughText",start:Object.assign({},o[c][1].end),end:Object.assign({},o[l][1].start)},h=[["enter",d,a],["enter",o[c][1],a],["exit",o[c][1],a],["enter",u,a]],f=a.parser.constructs.insideSpan.null;f&&Nu(h,h.length,0,U7(f,o.slice(c+1,l),a)),Nu(h,h.length,0,[["exit",u,a],["enter",o[l][1],a],["exit",o[l][1],a],["exit",d,a]]),Nu(o,c-1,l-c+3,h),l=c+h.length-2;break}}for(l=-1;++l<o.length;)o[l][1].type==="strikethroughSequenceTemporary"&&(o[l][1].type="data");return o}function s(o,a,l){const c=this.previous,d=this.events;let u=0;return h;function h(g){return c===126&&d[d.length-1][1].type!=="characterEscape"?l(g):(o.enter("strikethroughSequenceTemporary"),f(g))}function f(g){const m=LE(c);if(g===126)return u>1?l(g):(o.consume(g),u++,f);if(u<2&&!t)return l(g);const p=o.exit("strikethroughSequenceTemporary"),A=LE(g);return p._open=!A||A===2&&!!m,p._close=!m||m===2&&!!A,a(g)}}}class l4t{constructor(){this.map=[]}add(e,t,i){c4t(this,e,t,i)}consume(e){if(this.map.sort(function(s,o){return s[0]-o[0]}),this.map.length===0)return;let t=this.map.length;const i=[];for(;t>0;)t-=1,i.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];i.push(e.slice()),e.length=0;let r=i.pop();for(;r;){for(const s of r)e.push(s);r=i.pop()}this.map.length=0}}function c4t(n,e,t,i){let r=0;if(!(t===0&&i.length===0)){for(;r<n.map.length;){if(n.map[r][0]===e){n.map[r][1]+=t,n.map[r][2].push(...i);return}r+=1}n.map.push([e,t,i])}}function d4t(n,e){let t=!1;const i=[];for(;e<n.length;){const r=n[e];if(t){if(r[0]==="enter")r[1].type==="tableContent"&&i.push(n[e+1][1].type==="tableDelimiterMarker"?"left":"none");else if(r[1].type==="tableContent"){if(n[e-1][1].type==="tableDelimiterMarker"){const s=i.length-1;i[s]=i[s]==="left"?"center":"right"}}else if(r[1].type==="tableDelimiterRow")break}else r[0]==="enter"&&r[1].type==="tableDelimiterRow"&&(t=!0);e+=1}return i}function u4t(){return{flow:{null:{name:"table",tokenize:h4t,resolveAll:f4t}}}}function h4t(n,e,t){const i=this;let r=0,s=0,o;return a;function a(T){let D=i.events.length-1;for(;D>-1;){const O=i.events[D][1].type;if(O==="lineEnding"||O==="linePrefix")D--;else break}const B=D>-1?i.events[D][1].type:null,R=B==="tableHead"||B==="tableRow"?S:l;return R===S&&i.parser.lazy[i.now().line]?t(T):R(T)}function l(T){return n.enter("tableHead"),n.enter("tableRow"),c(T)}function c(T){return T===124||(o=!0,s+=1),d(T)}function d(T){return T===null?t(T):Ei(T)?s>1?(s=0,i.interrupt=!0,n.exit("tableRow"),n.enter("lineEnding"),n.consume(T),n.exit("lineEnding"),f):t(T):_r(T)?$r(n,d,"whitespace")(T):(s+=1,o&&(o=!1,r+=1),T===124?(n.enter("tableCellDivider"),n.consume(T),n.exit("tableCellDivider"),o=!0,d):(n.enter("data"),u(T)))}function u(T){return T===null||T===124||zs(T)?(n.exit("data"),d(T)):(n.consume(T),T===92?h:u)}function h(T){return T===92||T===124?(n.consume(T),u):u(T)}function f(T){return i.interrupt=!1,i.parser.lazy[i.now().line]?t(T):(n.enter("tableDelimiterRow"),o=!1,_r(T)?$r(n,g,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(T):g(T))}function g(T){return T===45||T===58?p(T):T===124?(o=!0,n.enter("tableCellDivider"),n.consume(T),n.exit("tableCellDivider"),m):C(T)}function m(T){return _r(T)?$r(n,p,"whitespace")(T):p(T)}function p(T){return T===58?(s+=1,o=!0,n.enter("tableDelimiterMarker"),n.consume(T),n.exit("tableDelimiterMarker"),A):T===45?(s+=1,A(T)):T===null||Ei(T)?y(T):C(T)}function A(T){return T===45?(n.enter("tableDelimiterFiller"),v(T)):C(T)}function v(T){return T===45?(n.consume(T),v):T===58?(o=!0,n.exit("tableDelimiterFiller"),n.enter("tableDelimiterMarker"),n.consume(T),n.exit("tableDelimiterMarker"),_):(n.exit("tableDelimiterFiller"),_(T))}function _(T){return _r(T)?$r(n,y,"whitespace")(T):y(T)}function y(T){return T===124?g(T):T===null||Ei(T)?!o||r!==s?C(T):(n.exit("tableDelimiterRow"),n.exit("tableHead"),e(T)):C(T)}function C(T){return t(T)}function S(T){return n.enter("tableRow"),E(T)}function E(T){return T===124?(n.enter("tableCellDivider"),n.consume(T),n.exit("tableCellDivider"),E):T===null||Ei(T)?(n.exit("tableRow"),e(T)):_r(T)?$r(n,E,"whitespace")(T):(n.enter("data"),L(T))}function L(T){return T===null||T===124||zs(T)?(n.exit("data"),E(T)):(n.consume(T),T===92?I:L)}function I(T){return T===92||T===124?(n.consume(T),L):L(T)}}function f4t(n,e){let t=-1,i=!0,r=0,s=[0,0,0,0],o=[0,0,0,0],a=!1,l=0,c,d,u;const h=new l4t;for(;++t<n.length;){const f=n[t],g=f[1];f[0]==="enter"?g.type==="tableHead"?(a=!1,l!==0&&(pIe(h,e,l,c,d),d=void 0,l=0),c={type:"table",start:Object.assign({},g.start),end:Object.assign({},g.end)},h.add(t,0,[["enter",c,e]])):g.type==="tableRow"||g.type==="tableDelimiterRow"?(i=!0,u=void 0,s=[0,0,0,0],o=[0,t+1,0,0],a&&(a=!1,d={type:"tableBody",start:Object.assign({},g.start),end:Object.assign({},g.end)},h.add(t,0,[["enter",d,e]])),r=g.type==="tableDelimiterRow"?2:d?3:1):r&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")?(i=!1,o[2]===0&&(s[1]!==0&&(o[0]=o[1],u=L4(h,e,s,r,void 0,u),s=[0,0,0,0]),o[2]=t)):g.type==="tableCellDivider"&&(i?i=!1:(s[1]!==0&&(o[0]=o[1],u=L4(h,e,s,r,void 0,u)),s=o,o=[s[1],t,0,0])):g.type==="tableHead"?(a=!0,l=t):g.type==="tableRow"||g.type==="tableDelimiterRow"?(l=t,s[1]!==0?(o[0]=o[1],u=L4(h,e,s,r,t,u)):o[1]!==0&&(u=L4(h,e,o,r,t,u)),r=0):r&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")&&(o[3]=t)}for(l!==0&&pIe(h,e,l,c,d),h.consume(e.events),t=-1;++t<e.events.length;){const f=e.events[t];f[0]==="enter"&&f[1].type==="table"&&(f[1]._align=d4t(e.events,t))}return n}function L4(n,e,t,i,r,s){const o=i===1?"tableHeader":i===2?"tableDelimiter":"tableData",a="tableContent";t[0]!==0&&(s.end=Object.assign({},mS(e.events,t[0])),n.add(t[0],0,[["exit",s,e]]));const l=mS(e.events,t[1]);if(s={type:o,start:Object.assign({},l),end:Object.assign({},l)},n.add(t[1],0,[["enter",s,e]]),t[2]!==0){const c=mS(e.events,t[2]),d=mS(e.events,t[3]),u={type:a,start:Object.assign({},c),end:Object.assign({},d)};if(n.add(t[2],0,[["enter",u,e]]),i!==2){const h=e.events[t[2]],f=e.events[t[3]];if(h[1].end=Object.assign({},f[1].end),h[1].type="chunkText",h[1].contentType="text",t[3]>t[2]+1){const g=t[2]+1,m=t[3]-t[2]-1;n.add(g,m,[])}}n.add(t[3]+1,0,[["exit",u,e]])}return r!==void 0&&(s.end=Object.assign({},mS(e.events,r)),n.add(r,0,[["exit",s,e]]),s=void 0),s}function pIe(n,e,t,i,r){const s=[],o=mS(e.events,t);r&&(r.end=Object.assign({},o),s.push(["exit",r,e])),i.end=Object.assign({},o),s.push(["exit",i,e]),n.add(t+1,0,s)}function mS(n,e){const t=n[e],i=t[0]==="enter"?"start":"end";return t[1][i]}const g4t={name:"tasklistCheck",tokenize:m4t};function p4t(){return{text:{91:g4t}}}function m4t(n,e,t){const i=this;return r;function r(l){return i.previous!==null||!i._gfmTasklistFirstContentOfListItem?t(l):(n.enter("taskListCheck"),n.enter("taskListCheckMarker"),n.consume(l),n.exit("taskListCheckMarker"),s)}function s(l){return zs(l)?(n.enter("taskListCheckValueUnchecked"),n.consume(l),n.exit("taskListCheckValueUnchecked"),o):l===88||l===120?(n.enter("taskListCheckValueChecked"),n.consume(l),n.exit("taskListCheckValueChecked"),o):t(l)}function o(l){return l===93?(n.enter("taskListCheckMarker"),n.consume(l),n.exit("taskListCheckMarker"),n.exit("taskListCheck"),a):t(l)}function a(l){return Ei(l)?e(l):_r(l)?n.check({tokenize:A4t},e,t)(l):t(l)}}function A4t(n,e,t){return $r(n,i,"whitespace");function i(r){return r===null?t(r):e(r)}}function v4t(n){return Y6e([jOt(),JOt(),a4t(n),u4t(),p4t()])}const b4t={};function _4t(n){const e=this,t=n||b4t,i=e.data(),r=i.micromarkExtensions||(i.micromarkExtensions=[]),s=i.fromMarkdownExtensions||(i.fromMarkdownExtensions=[]),o=i.toMarkdownExtensions||(i.toMarkdownExtensions=[]);r.push(v4t(t)),s.push($Ot()),o.push(HOt(t))}const Qi={EDITOR:{TABS_CHANGED:"editor.tabs.changed",FOCUS:"editor.focus",MENTIONS_CHANGED:"editor.mentions.changed"},CODING:{TASK_COMPLETE:"coding.task.complete"},UI:{ACTIVATE_PANEL:"ui.panel.activate",TOGGLE_INPUT_FULLSCREEN:"input.area.toggle.fullscreen",SHOW_MODAL:"ui.modal.show"},FILE_GROUP_SELECT:{FOCUS:"file.group.select.focus"},CHAT:{REFRESH_FROM_MESSAGE:"chat.refresh.from.message",NEW_CHAT:"chat.new",NEW_MESSAGE:"chat.new.message"},RAG:{UPDATED:"rag.updated",ENABLED_CHANGED:"rag.enabled.changed"},MCPS:{ENABLED_CHANGED:"mcps.enabled.changed"},CONFIG:{CODE_MODEL_UPDATED:"config.code_model.updated",MODEL_LIST_UPDATED:"config.model_list.updated"},PROVIDER:{UPDATED:"provider.updated"}};let y4t=class{constructor(){this.events={}}subscribe(e,t){return this.events[e]||(this.events[e]=[]),this.events[e].push(t),()=>{this.events[e]=this.events[e].filter(i=>i!==t)}}publish(e,...t){this.events[e]&&this.events[e].forEach(i=>i(...t))}};const Ki=new y4t,C4t=Object.freeze(Object.defineProperty({__proto__:null,EVENTS:Qi,default:Ki},Symbol.toStringTag,{value:"Module"})),l2=({message:n})=>{const[e,t]=b.useState(!1),i=()=>{Ki.publish(Qi.UI.SHOW_MODAL,{content:n.content,format:"markdown",title:te("markdown")||"Markdown"})};return x.jsxs("div",{className:"message-font",children:[x.jsxs("div",{className:"message-title",children:[x.jsx("button",{onClick:()=>t(!e),className:"message-toggle-button",children:e?x.jsx("svg",{className:"message-toggle-icon text-blue-400",viewBox:"0 0 20 20",fill:"currentColor",children:x.jsx("path",{fillRule:"evenodd",d:"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z",clipRule:"evenodd"})}):x.jsx("svg",{className:"message-toggle-icon text-blue-400",viewBox:"0 0 20 20",fill:"currentColor",children:x.jsx("path",{fillRule:"evenodd",d:"M14.707 12.707a1 1 0 01-1.414 0L10 9.414l-3.293 3.293a1 1 0 01-1.414-1.414l4-4a1 1 0 011.414 0l4 4a1 1 0 010 1.414z",clipRule:"evenodd"})})}),x.jsx("span",{className:"message-title-icon",children:x.jsx("svg",{className:"w-4 h-4 text-blue-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:x.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})}),x.jsx("span",{className:"text-blue-400 message-title-text",children:te("markdown")||"Markdown"}),x.jsx("button",{onClick:()=>{navigator.clipboard.writeText(n.content)},className:"ml-auto message-copy-button text-gray-400 hover:text-blue-400",title:te("copy")||"Copy",children:x.jsx("svg",{className:"w-3.5 h-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:x.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M8 5H6a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2v-1M8 5a2 2 0 002 2h2a2 2 0 002-2M8 5a2 2 0 012-2h2a2 2 0 012 2m0 0h2a2 2 0 012 2v3m2 4H10m0 0l3-3m-3 3l3 3"})})}),x.jsx("button",{onClick:i,className:"ml-1 message-maximize-button text-gray-400 hover:text-blue-400",title:te("maximize")||"Maximize",children:x.jsx("svg",{className:"w-3.5 h-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:x.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M4 8V4m0 0h4M4 4l5 5m11-1V4m0 0h-4m4 0l-5 5M4 16v4m0 0h4m-4 0l5-5m11 5v-4m0 4h-4m4 0l-5-5"})})})]}),!e&&x.jsx("div",{className:"prose prose-invert prose-xs max-w-full break-words overflow-auto",style:{wordBreak:"break-word",overflowWrap:"break-word"},children:x.jsx($p,{className:"text-gray-200 break-words",remarkPlugins:[_4t],components:{code:({className:r,children:s,...o})=>{const a=/language-(\w+)/.exec(r||"");return!a?x.jsx("code",{className:r,...o,children:s}):x.jsx(zl,{language:a?a[1]:"",style:Cc,PreTag:"div",wrapLines:!0,wrapLongLines:!0,children:String(s).replace(/\n$/,"")})},table:({node:r,...s})=>x.jsx("div",{className:"overflow-auto",children:x.jsx("table",{className:"markdown-table",...s})}),th:({node:r,...s})=>x.jsx("th",{className:"markdown-th",...s}),td:({node:r,...s})=>x.jsx("td",{className:"markdown-td",...s})},children:n.content})})]})},w4t=({message:n})=>{var l,c,d;const e=((l=n.metadata)==null?void 0:l.max_context_window)||65536,t=(((c=n.metadata)==null?void 0:c.input_tokens)||0)+(((d=n.metadata)==null?void 0:d.output_tokens)||0),i=Math.min(100,t/e*100),r=b.useRef(null),[s,o]=b.useState(!0),a=()=>{r.current&&o(r.current.offsetWidth>500)};return b.useEffect(()=>{a();const u=new ResizeObserver(()=>{a()});return r.current&&u.observe(r.current),()=>{r.current&&u.unobserve(r.current)}},[]),x.jsx("div",{ref:r,className:"font-mono text-[11px] text-gray-400 flex flex-row items-center gap-2 flex-wrap",children:n.metadata&&x.jsxs(x.Fragment,{children:[x.jsxs("div",{className:"flex items-center",children:[x.jsxs("span",{children:[te("tokens"),": "]}),x.jsxs("span",{className:"text-green-500 ml-1",children:["↑ ",n.metadata.input_tokens]}),x.jsxs("span",{className:"text-red-500 ml-1",children:["↓ ",n.metadata.output_tokens]})]}),x.jsxs("div",{className:"flex items-center",children:[x.jsxs("span",{children:[te("cache"),": "]}),x.jsxs("span",{className:"text-white ml-1",children:["⊕ ",n.metadata.cache_hit||0]}),x.jsxs("span",{className:"text-white ml-1",children:["→ ",n.metadata.cache_miss||0]})]}),x.jsxs("div",{className:"flex items-center",children:[x.jsxs("span",{children:[te("contextWindow"),": "]}),s?x.jsxs("div",{className:"relative w-28 h-2 bg-gray-800 rounded ml-1 border border-gray-600",children:[x.jsx("div",{className:"h-full bg-blue-600 rounded-l",style:{width:`${i}%`}}),i>10&&x.jsxs("span",{className:"absolute inset-0 flex items-center justify-center text-[9px] text-white",children:[i.toFixed(1),"%"]})]}):x.jsxs("span",{className:"text-blue-400 ml-1",children:[i.toFixed(1),"%"]})]}),x.jsxs("div",{className:"flex items-center",children:[x.jsxs("span",{children:[te("apiCost"),": "]}),x.jsxs("span",{className:"text-white ml-1",children:["$",(n.metadata.input_cost+n.metadata.output_cost).toFixed(5)]})]})]})})};function H8e(n){if(!n)return[];const e=[],t=n.split(`
520
+ `))}function l(f,g,m,p){const A=m.enter("tableCell"),v=m.enter("phrasing"),_=m.containerPhrasing(f,{...p,before:s,after:s});return v(),A(),_}function c(f,g){return QMt(f,{align:g,alignDelimiters:i,padding:t,stringLength:r})}function d(f,g,m){const p=f.children;let A=-1;const v=[],_=g.enter("table");for(;++A<p.length;)v[A]=u(p[A],g,m);return _(),v}function u(f,g,m){const p=f.children;let A=-1;const v=[],_=g.enter("tableRow");for(;++A<p.length;)v[A]=l(p[A],f,g,m);return _(),v}function h(f,g,m){let p=T8e.inlineCode(f,g,m);return m.stack.includes("tableCell")&&(p=p.replace(/\|/g,"\\$&")),p}}function OOt(){return{exit:{taskListCheckValueChecked:gIe,taskListCheckValueUnchecked:gIe,paragraph:POt}}}function BOt(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:FOt}}}function gIe(n){const e=this.stack[this.stack.length-2];e.type,e.checked=n.type==="taskListCheckValueChecked"}function POt(n){const e=this.stack[this.stack.length-2];if(e&&e.type==="listItem"&&typeof e.checked=="boolean"){const t=this.stack[this.stack.length-1];t.type;const i=t.children[0];if(i&&i.type==="text"){const r=e.children;let s=-1,o;for(;++s<r.length;){const a=r[s];if(a.type==="paragraph"){o=a;break}}o===t&&(i.value=i.value.slice(1),i.value.length===0?t.children.shift():t.position&&i.position&&typeof i.position.start.offset=="number"&&(i.position.start.column++,i.position.start.offset++,t.position.start=Object.assign({},i.position.start)))}}this.exit(n)}function FOt(n,e,t,i){const r=n.children[0],s=typeof n.checked=="boolean"&&r&&r.type==="paragraph",o="["+(n.checked?"x":" ")+"] ",a=t.createTracker(i);s&&a.move(o);let l=T8e.listItem(n,e,t,{...i,...a.current()});return s&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,c)),l;function c(d){return d+o}}function $Ot(){return[AMt(),FMt(),WMt(),IOt(),OOt()]}function HOt(n){return{extensions:[vMt(),$Mt(n),jMt(),MOt(n),BOt()]}}const UOt={tokenize:GOt,partial:!0},D8e={tokenize:QOt,partial:!0},R8e={tokenize:qOt,partial:!0},M8e={tokenize:YOt,partial:!0},WOt={tokenize:XOt,partial:!0},O8e={name:"wwwAutolink",tokenize:VOt,previous:P8e},B8e={name:"protocolAutolink",tokenize:KOt,previous:F8e},$A={name:"emailAutolink",tokenize:zOt,previous:$8e},Hp={};function jOt(){return{text:Hp}}let c0=48;for(;c0<123;)Hp[c0]=$A,c0++,c0===58?c0=65:c0===91&&(c0=97);Hp[43]=$A;Hp[45]=$A;Hp[46]=$A;Hp[95]=$A;Hp[72]=[$A,B8e];Hp[104]=[$A,B8e];Hp[87]=[$A,O8e];Hp[119]=[$A,O8e];function zOt(n,e,t){const i=this;let r,s;return o;function o(u){return!Vte(u)||!$8e.call(i,i.previous)||ahe(i.events)?t(u):(n.enter("literalAutolink"),n.enter("literalAutolinkEmail"),a(u))}function a(u){return Vte(u)?(n.consume(u),a):u===64?(n.consume(u),l):t(u)}function l(u){return u===46?n.check(WOt,d,c)(u):u===45||u===95||uc(u)?(s=!0,n.consume(u),l):d(u)}function c(u){return n.consume(u),r=!0,l}function d(u){return s&&r&&Wc(i.previous)?(n.exit("literalAutolinkEmail"),n.exit("literalAutolink"),e(u)):t(u)}}function VOt(n,e,t){const i=this;return r;function r(o){return o!==87&&o!==119||!P8e.call(i,i.previous)||ahe(i.events)?t(o):(n.enter("literalAutolink"),n.enter("literalAutolinkWww"),n.check(UOt,n.attempt(D8e,n.attempt(R8e,s),t),t)(o))}function s(o){return n.exit("literalAutolinkWww"),n.exit("literalAutolink"),e(o)}}function KOt(n,e,t){const i=this;let r="",s=!1;return o;function o(u){return(u===72||u===104)&&F8e.call(i,i.previous)&&!ahe(i.events)?(n.enter("literalAutolink"),n.enter("literalAutolinkHttp"),r+=String.fromCodePoint(u),n.consume(u),a):t(u)}function a(u){if(Wc(u)&&r.length<5)return r+=String.fromCodePoint(u),n.consume(u),a;if(u===58){const h=r.toLowerCase();if(h==="http"||h==="https")return n.consume(u),l}return t(u)}function l(u){return u===47?(n.consume(u),s?c:(s=!0,l)):t(u)}function c(u){return u===null||y3(u)||zs(u)||qC(u)||H7(u)?t(u):n.attempt(D8e,n.attempt(R8e,d),t)(u)}function d(u){return n.exit("literalAutolinkHttp"),n.exit("literalAutolink"),e(u)}}function GOt(n,e,t){let i=0;return r;function r(o){return(o===87||o===119)&&i<3?(i++,n.consume(o),r):o===46&&i===3?(n.consume(o),s):t(o)}function s(o){return o===null?t(o):e(o)}}function QOt(n,e,t){let i,r,s;return o;function o(c){return c===46||c===95?n.check(M8e,l,a)(c):c===null||zs(c)||qC(c)||c!==45&&H7(c)?l(c):(s=!0,n.consume(c),o)}function a(c){return c===95?i=!0:(r=i,i=void 0),n.consume(c),o}function l(c){return r||i||!s?t(c):e(c)}}function qOt(n,e){let t=0,i=0;return r;function r(o){return o===40?(t++,n.consume(o),r):o===41&&i<t?s(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?n.check(M8e,e,s)(o):o===null||zs(o)||qC(o)?e(o):(n.consume(o),r)}function s(o){return o===41&&i++,n.consume(o),r}}function YOt(n,e,t){return i;function i(a){return a===33||a===34||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===63||a===95||a===126?(n.consume(a),i):a===38?(n.consume(a),s):a===93?(n.consume(a),r):a===60||a===null||zs(a)||qC(a)?e(a):t(a)}function r(a){return a===null||a===40||a===91||zs(a)||qC(a)?e(a):i(a)}function s(a){return Wc(a)?o(a):t(a)}function o(a){return a===59?(n.consume(a),i):Wc(a)?(n.consume(a),o):t(a)}}function XOt(n,e,t){return i;function i(s){return n.consume(s),r}function r(s){return uc(s)?t(s):e(s)}}function P8e(n){return n===null||n===40||n===42||n===95||n===91||n===93||n===126||zs(n)}function F8e(n){return!Wc(n)}function $8e(n){return!(n===47||Vte(n))}function Vte(n){return n===43||n===45||n===46||n===95||uc(n)}function ahe(n){let e=n.length,t=!1;for(;e--;){const i=n[e][1];if((i.type==="labelLink"||i.type==="labelImage")&&!i._balanced){t=!0;break}if(i._gfmAutolinkLiteralWalkedInto){t=!1;break}}return n.length>0&&!t&&(n[n.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),t}const ZOt={tokenize:o4t,partial:!0};function JOt(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:i4t,continuation:{tokenize:r4t},exit:s4t}},text:{91:{name:"gfmFootnoteCall",tokenize:n4t},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:e4t,resolveTo:t4t}}}}function e4t(n,e,t){const i=this;let r=i.events.length;const s=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let o;for(;r--;){const l=i.events[r][1];if(l.type==="labelImage"){o=l;break}if(l.type==="gfmFootnoteCall"||l.type==="labelLink"||l.type==="label"||l.type==="image"||l.type==="link")break}return a;function a(l){if(!o||!o._balanced)return t(l);const c=jf(i.sliceSerialize({start:o.end,end:i.now()}));return c.codePointAt(0)!==94||!s.includes(c.slice(1))?t(l):(n.enter("gfmFootnoteCallLabelMarker"),n.consume(l),n.exit("gfmFootnoteCallLabelMarker"),e(l))}}function t4t(n,e){let t=n.length;for(;t--;)if(n[t][1].type==="labelImage"&&n[t][0]==="enter"){n[t][1];break}n[t+1][1].type="data",n[t+3][1].type="gfmFootnoteCallLabelMarker";const i={type:"gfmFootnoteCall",start:Object.assign({},n[t+3][1].start),end:Object.assign({},n[n.length-1][1].end)},r={type:"gfmFootnoteCallMarker",start:Object.assign({},n[t+3][1].end),end:Object.assign({},n[t+3][1].end)};r.end.column++,r.end.offset++,r.end._bufferIndex++;const s={type:"gfmFootnoteCallString",start:Object.assign({},r.end),end:Object.assign({},n[n.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},a=[n[t+1],n[t+2],["enter",i,e],n[t+3],n[t+4],["enter",r,e],["exit",r,e],["enter",s,e],["enter",o,e],["exit",o,e],["exit",s,e],n[n.length-2],n[n.length-1],["exit",i,e]];return n.splice(t,n.length-t+1,...a),n}function n4t(n,e,t){const i=this,r=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let s=0,o;return a;function a(u){return n.enter("gfmFootnoteCall"),n.enter("gfmFootnoteCallLabelMarker"),n.consume(u),n.exit("gfmFootnoteCallLabelMarker"),l}function l(u){return u!==94?t(u):(n.enter("gfmFootnoteCallMarker"),n.consume(u),n.exit("gfmFootnoteCallMarker"),n.enter("gfmFootnoteCallString"),n.enter("chunkString").contentType="string",c)}function c(u){if(s>999||u===93&&!o||u===null||u===91||zs(u))return t(u);if(u===93){n.exit("chunkString");const h=n.exit("gfmFootnoteCallString");return r.includes(jf(i.sliceSerialize(h)))?(n.enter("gfmFootnoteCallLabelMarker"),n.consume(u),n.exit("gfmFootnoteCallLabelMarker"),n.exit("gfmFootnoteCall"),e):t(u)}return zs(u)||(o=!0),s++,n.consume(u),u===92?d:c}function d(u){return u===91||u===92||u===93?(n.consume(u),s++,c):c(u)}}function i4t(n,e,t){const i=this,r=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let s,o=0,a;return l;function l(g){return n.enter("gfmFootnoteDefinition")._container=!0,n.enter("gfmFootnoteDefinitionLabel"),n.enter("gfmFootnoteDefinitionLabelMarker"),n.consume(g),n.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(g){return g===94?(n.enter("gfmFootnoteDefinitionMarker"),n.consume(g),n.exit("gfmFootnoteDefinitionMarker"),n.enter("gfmFootnoteDefinitionLabelString"),n.enter("chunkString").contentType="string",d):t(g)}function d(g){if(o>999||g===93&&!a||g===null||g===91||zs(g))return t(g);if(g===93){n.exit("chunkString");const m=n.exit("gfmFootnoteDefinitionLabelString");return s=jf(i.sliceSerialize(m)),n.enter("gfmFootnoteDefinitionLabelMarker"),n.consume(g),n.exit("gfmFootnoteDefinitionLabelMarker"),n.exit("gfmFootnoteDefinitionLabel"),h}return zs(g)||(a=!0),o++,n.consume(g),g===92?u:d}function u(g){return g===91||g===92||g===93?(n.consume(g),o++,d):d(g)}function h(g){return g===58?(n.enter("definitionMarker"),n.consume(g),n.exit("definitionMarker"),r.includes(s)||r.push(s),$r(n,f,"gfmFootnoteDefinitionWhitespace")):t(g)}function f(g){return e(g)}}function r4t(n,e,t){return n.check(JR,e,n.attempt(ZOt,e,t))}function s4t(n){n.exit("gfmFootnoteDefinition")}function o4t(n,e,t){const i=this;return $r(n,r,"gfmFootnoteDefinitionIndent",5);function r(s){const o=i.events[i.events.length-1];return o&&o[1].type==="gfmFootnoteDefinitionIndent"&&o[2].sliceSerialize(o[1],!0).length===4?e(s):t(s)}}function a4t(n){let t=(n||{}).singleTilde;const i={name:"strikethrough",tokenize:s,resolveAll:r};return t==null&&(t=!0),{text:{126:i},insideSpan:{null:[i]},attentionMarkers:{null:[126]}};function r(o,a){let l=-1;for(;++l<o.length;)if(o[l][0]==="enter"&&o[l][1].type==="strikethroughSequenceTemporary"&&o[l][1]._close){let c=l;for(;c--;)if(o[c][0]==="exit"&&o[c][1].type==="strikethroughSequenceTemporary"&&o[c][1]._open&&o[l][1].end.offset-o[l][1].start.offset===o[c][1].end.offset-o[c][1].start.offset){o[l][1].type="strikethroughSequence",o[c][1].type="strikethroughSequence";const d={type:"strikethrough",start:Object.assign({},o[c][1].start),end:Object.assign({},o[l][1].end)},u={type:"strikethroughText",start:Object.assign({},o[c][1].end),end:Object.assign({},o[l][1].start)},h=[["enter",d,a],["enter",o[c][1],a],["exit",o[c][1],a],["enter",u,a]],f=a.parser.constructs.insideSpan.null;f&&Nu(h,h.length,0,U7(f,o.slice(c+1,l),a)),Nu(h,h.length,0,[["exit",u,a],["enter",o[l][1],a],["exit",o[l][1],a],["exit",d,a]]),Nu(o,c-1,l-c+3,h),l=c+h.length-2;break}}for(l=-1;++l<o.length;)o[l][1].type==="strikethroughSequenceTemporary"&&(o[l][1].type="data");return o}function s(o,a,l){const c=this.previous,d=this.events;let u=0;return h;function h(g){return c===126&&d[d.length-1][1].type!=="characterEscape"?l(g):(o.enter("strikethroughSequenceTemporary"),f(g))}function f(g){const m=LE(c);if(g===126)return u>1?l(g):(o.consume(g),u++,f);if(u<2&&!t)return l(g);const p=o.exit("strikethroughSequenceTemporary"),A=LE(g);return p._open=!A||A===2&&!!m,p._close=!m||m===2&&!!A,a(g)}}}class l4t{constructor(){this.map=[]}add(e,t,i){c4t(this,e,t,i)}consume(e){if(this.map.sort(function(s,o){return s[0]-o[0]}),this.map.length===0)return;let t=this.map.length;const i=[];for(;t>0;)t-=1,i.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];i.push(e.slice()),e.length=0;let r=i.pop();for(;r;){for(const s of r)e.push(s);r=i.pop()}this.map.length=0}}function c4t(n,e,t,i){let r=0;if(!(t===0&&i.length===0)){for(;r<n.map.length;){if(n.map[r][0]===e){n.map[r][1]+=t,n.map[r][2].push(...i);return}r+=1}n.map.push([e,t,i])}}function d4t(n,e){let t=!1;const i=[];for(;e<n.length;){const r=n[e];if(t){if(r[0]==="enter")r[1].type==="tableContent"&&i.push(n[e+1][1].type==="tableDelimiterMarker"?"left":"none");else if(r[1].type==="tableContent"){if(n[e-1][1].type==="tableDelimiterMarker"){const s=i.length-1;i[s]=i[s]==="left"?"center":"right"}}else if(r[1].type==="tableDelimiterRow")break}else r[0]==="enter"&&r[1].type==="tableDelimiterRow"&&(t=!0);e+=1}return i}function u4t(){return{flow:{null:{name:"table",tokenize:h4t,resolveAll:f4t}}}}function h4t(n,e,t){const i=this;let r=0,s=0,o;return a;function a(T){let D=i.events.length-1;for(;D>-1;){const O=i.events[D][1].type;if(O==="lineEnding"||O==="linePrefix")D--;else break}const B=D>-1?i.events[D][1].type:null,R=B==="tableHead"||B==="tableRow"?S:l;return R===S&&i.parser.lazy[i.now().line]?t(T):R(T)}function l(T){return n.enter("tableHead"),n.enter("tableRow"),c(T)}function c(T){return T===124||(o=!0,s+=1),d(T)}function d(T){return T===null?t(T):Ei(T)?s>1?(s=0,i.interrupt=!0,n.exit("tableRow"),n.enter("lineEnding"),n.consume(T),n.exit("lineEnding"),f):t(T):_r(T)?$r(n,d,"whitespace")(T):(s+=1,o&&(o=!1,r+=1),T===124?(n.enter("tableCellDivider"),n.consume(T),n.exit("tableCellDivider"),o=!0,d):(n.enter("data"),u(T)))}function u(T){return T===null||T===124||zs(T)?(n.exit("data"),d(T)):(n.consume(T),T===92?h:u)}function h(T){return T===92||T===124?(n.consume(T),u):u(T)}function f(T){return i.interrupt=!1,i.parser.lazy[i.now().line]?t(T):(n.enter("tableDelimiterRow"),o=!1,_r(T)?$r(n,g,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(T):g(T))}function g(T){return T===45||T===58?p(T):T===124?(o=!0,n.enter("tableCellDivider"),n.consume(T),n.exit("tableCellDivider"),m):C(T)}function m(T){return _r(T)?$r(n,p,"whitespace")(T):p(T)}function p(T){return T===58?(s+=1,o=!0,n.enter("tableDelimiterMarker"),n.consume(T),n.exit("tableDelimiterMarker"),A):T===45?(s+=1,A(T)):T===null||Ei(T)?y(T):C(T)}function A(T){return T===45?(n.enter("tableDelimiterFiller"),v(T)):C(T)}function v(T){return T===45?(n.consume(T),v):T===58?(o=!0,n.exit("tableDelimiterFiller"),n.enter("tableDelimiterMarker"),n.consume(T),n.exit("tableDelimiterMarker"),_):(n.exit("tableDelimiterFiller"),_(T))}function _(T){return _r(T)?$r(n,y,"whitespace")(T):y(T)}function y(T){return T===124?g(T):T===null||Ei(T)?!o||r!==s?C(T):(n.exit("tableDelimiterRow"),n.exit("tableHead"),e(T)):C(T)}function C(T){return t(T)}function S(T){return n.enter("tableRow"),E(T)}function E(T){return T===124?(n.enter("tableCellDivider"),n.consume(T),n.exit("tableCellDivider"),E):T===null||Ei(T)?(n.exit("tableRow"),e(T)):_r(T)?$r(n,E,"whitespace")(T):(n.enter("data"),L(T))}function L(T){return T===null||T===124||zs(T)?(n.exit("data"),E(T)):(n.consume(T),T===92?I:L)}function I(T){return T===92||T===124?(n.consume(T),L):L(T)}}function f4t(n,e){let t=-1,i=!0,r=0,s=[0,0,0,0],o=[0,0,0,0],a=!1,l=0,c,d,u;const h=new l4t;for(;++t<n.length;){const f=n[t],g=f[1];f[0]==="enter"?g.type==="tableHead"?(a=!1,l!==0&&(pIe(h,e,l,c,d),d=void 0,l=0),c={type:"table",start:Object.assign({},g.start),end:Object.assign({},g.end)},h.add(t,0,[["enter",c,e]])):g.type==="tableRow"||g.type==="tableDelimiterRow"?(i=!0,u=void 0,s=[0,0,0,0],o=[0,t+1,0,0],a&&(a=!1,d={type:"tableBody",start:Object.assign({},g.start),end:Object.assign({},g.end)},h.add(t,0,[["enter",d,e]])),r=g.type==="tableDelimiterRow"?2:d?3:1):r&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")?(i=!1,o[2]===0&&(s[1]!==0&&(o[0]=o[1],u=L4(h,e,s,r,void 0,u),s=[0,0,0,0]),o[2]=t)):g.type==="tableCellDivider"&&(i?i=!1:(s[1]!==0&&(o[0]=o[1],u=L4(h,e,s,r,void 0,u)),s=o,o=[s[1],t,0,0])):g.type==="tableHead"?(a=!0,l=t):g.type==="tableRow"||g.type==="tableDelimiterRow"?(l=t,s[1]!==0?(o[0]=o[1],u=L4(h,e,s,r,t,u)):o[1]!==0&&(u=L4(h,e,o,r,t,u)),r=0):r&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")&&(o[3]=t)}for(l!==0&&pIe(h,e,l,c,d),h.consume(e.events),t=-1;++t<e.events.length;){const f=e.events[t];f[0]==="enter"&&f[1].type==="table"&&(f[1]._align=d4t(e.events,t))}return n}function L4(n,e,t,i,r,s){const o=i===1?"tableHeader":i===2?"tableDelimiter":"tableData",a="tableContent";t[0]!==0&&(s.end=Object.assign({},mS(e.events,t[0])),n.add(t[0],0,[["exit",s,e]]));const l=mS(e.events,t[1]);if(s={type:o,start:Object.assign({},l),end:Object.assign({},l)},n.add(t[1],0,[["enter",s,e]]),t[2]!==0){const c=mS(e.events,t[2]),d=mS(e.events,t[3]),u={type:a,start:Object.assign({},c),end:Object.assign({},d)};if(n.add(t[2],0,[["enter",u,e]]),i!==2){const h=e.events[t[2]],f=e.events[t[3]];if(h[1].end=Object.assign({},f[1].end),h[1].type="chunkText",h[1].contentType="text",t[3]>t[2]+1){const g=t[2]+1,m=t[3]-t[2]-1;n.add(g,m,[])}}n.add(t[3]+1,0,[["exit",u,e]])}return r!==void 0&&(s.end=Object.assign({},mS(e.events,r)),n.add(r,0,[["exit",s,e]]),s=void 0),s}function pIe(n,e,t,i,r){const s=[],o=mS(e.events,t);r&&(r.end=Object.assign({},o),s.push(["exit",r,e])),i.end=Object.assign({},o),s.push(["exit",i,e]),n.add(t+1,0,s)}function mS(n,e){const t=n[e],i=t[0]==="enter"?"start":"end";return t[1][i]}const g4t={name:"tasklistCheck",tokenize:m4t};function p4t(){return{text:{91:g4t}}}function m4t(n,e,t){const i=this;return r;function r(l){return i.previous!==null||!i._gfmTasklistFirstContentOfListItem?t(l):(n.enter("taskListCheck"),n.enter("taskListCheckMarker"),n.consume(l),n.exit("taskListCheckMarker"),s)}function s(l){return zs(l)?(n.enter("taskListCheckValueUnchecked"),n.consume(l),n.exit("taskListCheckValueUnchecked"),o):l===88||l===120?(n.enter("taskListCheckValueChecked"),n.consume(l),n.exit("taskListCheckValueChecked"),o):t(l)}function o(l){return l===93?(n.enter("taskListCheckMarker"),n.consume(l),n.exit("taskListCheckMarker"),n.exit("taskListCheck"),a):t(l)}function a(l){return Ei(l)?e(l):_r(l)?n.check({tokenize:A4t},e,t)(l):t(l)}}function A4t(n,e,t){return $r(n,i,"whitespace");function i(r){return r===null?t(r):e(r)}}function v4t(n){return Y6e([jOt(),JOt(),a4t(n),u4t(),p4t()])}const b4t={};function _4t(n){const e=this,t=n||b4t,i=e.data(),r=i.micromarkExtensions||(i.micromarkExtensions=[]),s=i.fromMarkdownExtensions||(i.fromMarkdownExtensions=[]),o=i.toMarkdownExtensions||(i.toMarkdownExtensions=[]);r.push(v4t(t)),s.push($Ot()),o.push(HOt(t))}const Qi={EDITOR:{TABS_CHANGED:"editor.tabs.changed",FOCUS:"editor.focus",MENTIONS_CHANGED:"editor.mentions.changed"},CODING:{TASK_COMPLETE:"coding.task.complete"},UI:{ACTIVATE_PANEL:"ui.panel.activate",TOGGLE_INPUT_FULLSCREEN:"input.area.toggle.fullscreen",SHOW_MODAL:"ui.modal.show"},FILE_GROUP_SELECT:{FOCUS:"file.group.select.focus"},CHAT:{REFRESH_FROM_MESSAGE:"chat.refresh.from.message",NEW_CHAT:"chat.new",NEW_MESSAGE:"chat.new.message"},RAG:{UPDATED:"rag.updated",ENABLED_CHANGED:"rag.enabled.changed"},MCPS:{ENABLED_CHANGED:"mcps.enabled.changed"},CONFIG:{CODE_MODEL_UPDATED:"config.code_model.updated",MODEL_LIST_UPDATED:"config.model_list.updated"},PROVIDER:{UPDATED:"provider.updated"}};let y4t=class{constructor(){this.events={}}subscribe(e,t){return this.events[e]||(this.events[e]=[]),this.events[e].push(t),()=>{this.events[e]=this.events[e].filter(i=>i!==t)}}publish(e,...t){this.events[e]&&this.events[e].forEach(i=>i(...t))}};const Ki=new y4t,C4t=Object.freeze(Object.defineProperty({__proto__:null,EVENTS:Qi,default:Ki},Symbol.toStringTag,{value:"Module"})),l2=({message:n})=>{const[e,t]=b.useState(!1),i=()=>{Ki.publish(Qi.UI.SHOW_MODAL,{content:n.content,format:"markdown",title:te("markdown")||"Markdown"})};return x.jsxs("div",{className:"message-font",children:[x.jsxs("div",{className:"message-title",children:[x.jsx("button",{onClick:()=>t(!e),className:"message-toggle-button",children:e?x.jsx("svg",{className:"message-toggle-icon text-blue-400",viewBox:"0 0 20 20",fill:"currentColor",children:x.jsx("path",{fillRule:"evenodd",d:"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z",clipRule:"evenodd"})}):x.jsx("svg",{className:"message-toggle-icon text-blue-400",viewBox:"0 0 20 20",fill:"currentColor",children:x.jsx("path",{fillRule:"evenodd",d:"M14.707 12.707a1 1 0 01-1.414 0L10 9.414l-3.293 3.293a1 1 0 01-1.414-1.414l4-4a1 1 0 011.414 0l4 4a1 1 0 010 1.414z",clipRule:"evenodd"})})}),x.jsx("span",{className:"message-title-icon",children:x.jsx("svg",{className:"w-4 h-4 text-blue-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:x.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})}),x.jsx("span",{className:"text-blue-400 message-title-text",children:te("markdown")||"Markdown"}),x.jsx("button",{onClick:()=>{navigator.clipboard.writeText(n.content)},className:"ml-auto message-copy-button text-gray-400 hover:text-blue-400",title:te("copy")||"Copy",children:x.jsx("svg",{className:"w-3.5 h-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:x.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M8 5H6a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2v-1M8 5a2 2 0 002 2h2a2 2 0 002-2M8 5a2 2 0 012-2h2a2 2 0 012 2m0 0h2a2 2 0 012 2v3m2 4H10m0 0l3-3m-3 3l3 3"})})}),x.jsx("button",{onClick:i,className:"ml-1 message-maximize-button text-gray-400 hover:text-blue-400",title:te("maximize")||"Maximize",children:x.jsx("svg",{className:"w-3.5 h-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:x.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M4 8V4m0 0h4M4 4l5 5m11-1V4m0 0h-4m4 0l-5 5M4 16v4m0 0h4m-4 0l5-5m11 5v-4m0 4h-4m4 0l-5-5"})})})]}),!e&&x.jsx("div",{className:"markdown-content prose prose-invert prose-xs max-w-full break-words overflow-auto scrollbar-thin scrollbar-thumb-gray-600",style:{wordBreak:"break-word",overflowWrap:"break-word"},children:x.jsx($p,{className:"markdown-body text-gray-200 break-words",remarkPlugins:[_4t],components:{code:({className:r,children:s,inline:o,...a})=>{const l=/language-(\w+)/.exec(r||""),c=l?l[1]:"";return o?x.jsx("code",{className:`markdown-inline-code ${r||""}`,...a,children:s}):s&&String(s).trim()?x.jsxs("div",{className:"markdown-code-wrapper",children:[x.jsx(zl,{language:c,style:Cc,PreTag:"div",wrapLines:!0,wrapLongLines:!0,className:"markdown-code-block",customStyle:{margin:"0",borderRadius:"0 0 6px 6px",padding:"16px",backgroundColor:"rgba(30, 41, 59, 0.8)"},codeTagProps:{"data-language":c||"text"},children:String(s).replace(/\n$/,"")}),c&&x.jsx("div",{className:"code-language-tag",children:c})]}):null},table:({node:r,...s})=>x.jsx("div",{className:"markdown-table-container overflow-auto",children:x.jsx("table",{className:"markdown-table",...s})}),th:({node:r,...s})=>x.jsx("th",{className:"markdown-th",...s}),td:({node:r,...s})=>x.jsx("td",{className:"markdown-td",...s}),p:({node:r,...s})=>x.jsx("p",{className:"markdown-paragraph",...s}),a:({node:r,...s})=>x.jsx("a",{className:"markdown-link",target:"_blank",rel:"noopener noreferrer",...s}),blockquote:({node:r,...s})=>x.jsx("blockquote",{className:"markdown-blockquote",...s}),ul:({node:r,...s})=>x.jsx("ul",{className:"markdown-list markdown-ul",...s}),ol:({node:r,...s})=>x.jsx("ol",{className:"markdown-list markdown-ol",...s}),li:({node:r,...s})=>x.jsx("li",{className:"markdown-list-item",...s}),h1:({node:r,...s})=>x.jsx("h1",{className:"markdown-heading markdown-h1",...s}),h2:({node:r,...s})=>x.jsx("h2",{className:"markdown-heading markdown-h2",...s}),h3:({node:r,...s})=>x.jsx("h3",{className:"markdown-heading markdown-h3",...s}),h4:({node:r,...s})=>x.jsx("h4",{className:"markdown-heading markdown-h4",...s}),h5:({node:r,...s})=>x.jsx("h5",{className:"markdown-heading markdown-h5",...s}),h6:({node:r,...s})=>x.jsx("h6",{className:"markdown-heading markdown-h6",...s}),hr:({node:r,...s})=>x.jsx("hr",{className:"markdown-hr",...s}),img:({node:r,...s})=>x.jsx("img",{className:"markdown-img",...s})},children:n.content||""})})]})},w4t=({message:n})=>{var l,c,d;const e=((l=n.metadata)==null?void 0:l.max_context_window)||65536,t=(((c=n.metadata)==null?void 0:c.input_tokens)||0)+(((d=n.metadata)==null?void 0:d.output_tokens)||0),i=Math.min(100,t/e*100),r=b.useRef(null),[s,o]=b.useState(!0),a=()=>{r.current&&o(r.current.offsetWidth>500)};return b.useEffect(()=>{a();const u=new ResizeObserver(()=>{a()});return r.current&&u.observe(r.current),()=>{r.current&&u.unobserve(r.current)}},[]),x.jsx("div",{ref:r,className:"font-mono text-[11px] text-gray-400 flex flex-row items-center gap-2 flex-wrap",children:n.metadata&&x.jsxs(x.Fragment,{children:[x.jsxs("div",{className:"flex items-center",children:[x.jsxs("span",{children:[te("tokens"),": "]}),x.jsxs("span",{className:"text-green-500 ml-1",children:["↑ ",n.metadata.input_tokens]}),x.jsxs("span",{className:"text-red-500 ml-1",children:["↓ ",n.metadata.output_tokens]})]}),x.jsxs("div",{className:"flex items-center",children:[x.jsxs("span",{children:[te("cache"),": "]}),x.jsxs("span",{className:"text-white ml-1",children:["⊕ ",n.metadata.cache_hit||0]}),x.jsxs("span",{className:"text-white ml-1",children:["→ ",n.metadata.cache_miss||0]})]}),x.jsxs("div",{className:"flex items-center",children:[x.jsxs("span",{children:[te("contextWindow"),": "]}),s?x.jsxs("div",{className:"relative w-28 h-2 bg-gray-800 rounded ml-1 border border-gray-600",children:[x.jsx("div",{className:"h-full bg-blue-600 rounded-l",style:{width:`${i}%`}}),i>10&&x.jsxs("span",{className:"absolute inset-0 flex items-center justify-center text-[9px] text-white",children:[i.toFixed(1),"%"]})]}):x.jsxs("span",{className:"text-blue-400 ml-1",children:[i.toFixed(1),"%"]})]}),x.jsxs("div",{className:"flex items-center",children:[x.jsxs("span",{children:[te("apiCost"),": "]}),x.jsxs("span",{className:"text-white ml-1",children:["$",(n.metadata.input_cost+n.metadata.output_cost).toFixed(5)]})]})]})})};function H8e(n){if(!n)return[];const e=[],t=n.split(`
521
521
  `);let i=0,r="",s="",o=!1;for(let a=0;a<t.length;a++){const l=t[a];switch(i){case 0:l.startsWith("##File:")&&(i=1,r=l.substring(7).trim(),o=!1);break;case 1:l.trim()===""?(i=2,s="",o=!0):r+=" "+l.trim();break;case 2:l.startsWith("##File:")?(e.push({file:r,content:s.trim()}),i=1,r=l.substring(7).trim(),o=!1):!o&&l.trim()===""?o=!0:(s.length>0&&(s+=`
522
- `),s+=l);break}}return i===2&&r&&e.push({file:r,content:s.trim()}),e}const S4t=({message:n})=>{var g,m;const[e,t]=b.useState(!1),[i,r]=b.useState([]),[s,o]=b.useState(null),[a,l]=b.useState(""),c=()=>{var p;if(t(!e),!e&&((p=n.metadata)==null?void 0:p.command)==="read_files"&&n.content){const A=H8e(n.content);r(A)}},d=p=>{s===p?o(null):(o(p),l(i[p].content))},u=b.useCallback((p,A)=>{},[]),h=b.useCallback(p=>{p!==void 0&&l(p)},[]),f=b.useCallback(()=>{},[]);return x.jsxs("div",{className:"message-font message-content-container",children:[x.jsxs("div",{className:"bg-gradient-to-r from-gray-800 to-gray-750 px-4 py-3 border-b border-gray-700 flex items-center justify-between cursor-pointer",onClick:c,children:[x.jsxs("div",{className:"flex items-center",children:[x.jsx("span",{className:"message-title-icon",children:x.jsx("svg",{className:"w-5 h-5 text-indigo-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:x.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M8 9l3 3-3 3m5 0h3M5 20h14a2 2 0 002-2V6a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"})})}),x.jsx("span",{className:"text-indigo-400 message-title-text",children:te("commandExecution")})]}),x.jsx("div",{className:"text-gray-400",children:x.jsx("svg",{className:`w-5 h-5 transition-transform duration-200 ${e?"transform rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:x.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M19 9l-7 7-7-7"})})})]}),x.jsx("div",{className:"px-4 py-3 bg-gray-800/50 border-b border-gray-700",children:x.jsxs("div",{className:"flex items-center",children:[x.jsxs("span",{className:"text-gray-400 mr-2",children:[te("command"),":"]}),x.jsx("span",{className:"text-white font-semibold font-mono bg-gray-700/50 px-2 py-1 rounded",children:(g=n.metadata)==null?void 0:g.command})]})}),e&&x.jsx("div",{className:"p-4 bg-gray-800/30",children:((m=n.metadata)==null?void 0:m.command)==="read_files"?x.jsxs("div",{className:"text-gray-200",children:[x.jsxs("div",{className:"mb-4",children:[x.jsxs("h3",{className:"font-medium text-gray-300 mb-2",children:[te("files"),":"]}),x.jsx("div",{className:"space-y-1",children:i.map((p,A)=>x.jsxs("div",{className:`flex items-center p-2 rounded cursor-pointer hover:bg-gray-700/50 ${s===A?"bg-gray-700/70 border-l-2 border-indigo-500":""}`,onClick:()=>d(A),children:[x.jsx("svg",{className:"w-4 h-4 mr-2 text-indigo-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:x.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})}),x.jsx("span",{className:"truncate",children:p.file}),x.jsx("svg",{className:`w-4 h-4 ml-auto transition-transform duration-200 ${s===A?"transform rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:x.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M19 9l-7 7-7-7"})})]},A))})]}),s!==null&&x.jsx("div",{className:"border border-gray-700 rounded-lg overflow-hidden",style:{height:"400px"},children:x.jsx(Rue,{initialContent:i[s].content,onContentChange:h,onEditorReady:u,onSubmit:f})})]}):x.jsx("div",{className:"prose prose-invert prose-sm max-w-none",children:x.jsx($p,{className:"text-gray-200 break-words",components:{code:({className:p,children:A,...v})=>{const _=/language-(\w+)/.exec(p||"");return!_?x.jsx("code",{className:p,...v,children:A}):x.jsx(zl,{language:_?_[1]:"",style:Cc,PreTag:"div",wrapLines:!0,wrapLongLines:!0,customStyle:{borderRadius:"0.375rem",fontSize:"14px"},children:String(A).replace(/\n$/,"")})}},children:n.content})})})]})},x4t=({message:n})=>{var i,r,s;const[e,t]=b.useState(!1);return x.jsxs("div",{className:"message-font",children:[x.jsxs("div",{className:"message-title",children:[x.jsx("button",{onClick:()=>t(!e),className:"message-toggle-button",children:e?x.jsx("svg",{className:"message-toggle-icon text-blue-400",viewBox:"0 0 20 20",fill:"currentColor",children:x.jsx("path",{fillRule:"evenodd",d:"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z",clipRule:"evenodd"})}):x.jsx("svg",{className:"message-toggle-icon text-blue-400",viewBox:"0 0 20 20",fill:"currentColor",children:x.jsx("path",{fillRule:"evenodd",d:"M14.707 12.707a1 1 0 01-1.414 0L10 9.414l-3.293 3.293a1 1 0 01-1.414-1.414l4-4a1 1 0 011.414 0l4 4a1 1 0 010 1.414z",clipRule:"evenodd"})})}),x.jsx("span",{className:"message-title-icon",children:x.jsx("svg",{className:"w-3.5 h-3.5 text-blue-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:x.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})})}),x.jsx("span",{className:"text-blue-400 message-title-text text-xs",children:te("contextUsed")})]}),!e&&x.jsxs("div",{className:"message-content-container border border-gray-800",children:[((i=n.metadata)==null?void 0:i.title)&&x.jsx("div",{className:"px-2 py-1 bg-gray-800/50 border-b border-gray-800 text-sm",children:x.jsx("h3",{className:"text-white font-medium",children:(r=n.metadata)==null?void 0:r.title})}),((s=n.metadata)==null?void 0:s.files)&&n.metadata.files.length>0&&x.jsxs("div",{className:"px-2 py-1 bg-gray-800/30 border-b border-gray-800",children:[x.jsxs("div",{className:"text-gray-400 mb-0.5 text-xs",children:[te("filesReferenced"),":"]}),x.jsx("div",{className:"overflow-x-auto",style:{scrollbarWidth:"thin"},children:x.jsx("div",{className:"flex flex-col gap-0.5 max-h-[120px] overflow-y-auto",children:n.metadata.files.map((o,a)=>x.jsxs("div",{className:"flex items-center",children:[x.jsx("svg",{className:"w-2 h-2 mr-1 text-blue-400 flex-shrink-0",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:x.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})}),x.jsx("span",{className:"text-blue-300 font-mono whitespace-nowrap text-xs",children:o})]},a))})})]}),x.jsx("div",{className:"p-2 bg-gray-800/20",children:x.jsx("div",{className:"prose prose-invert prose-xs max-w-none",children:x.jsx($p,{className:"text-gray-200 break-words text-xs",components:{code:({className:o,children:a,...l})=>{const c=/language-(\w+)/.exec(o||"");return!c?x.jsx("code",{className:`${o} bg-gray-700/50 px-1 rounded`,...l,children:a}):x.jsx(zl,{language:c?c[1]:"",style:Cc,PreTag:"div",wrapLines:!0,wrapLongLines:!0,customStyle:{borderRadius:"0.25rem",marginTop:"0.375rem",marginBottom:"0.375rem",fontSize:"14px"},children:String(a).replace(/\n$/,"")})}},children:n.content})})})]})]})},E4t=({message:n})=>{var t;const e=()=>{Ki.publish(Qi.UI.ACTIVATE_PANEL,"history")};return x.jsxs("div",{className:"message-font",children:[x.jsxs("div",{className:"message-title",children:[x.jsx("span",{className:"message-title-icon",children:x.jsx("svg",{className:"w-4 h-4 text-green-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:x.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M5 13l4 4L19 7"})})}),x.jsx("span",{className:"text-green-400 message-title-text",children:te("completion")||"Completion"}),((t=n.metadata)==null?void 0:t.isWrite)&&x.jsx("button",{onClick:e,className:"ml-4 text-xs text-blue-400 hover:text-blue-300 underline focus:outline-none",children:te("viewChanges")||"View Changes"})]}),x.jsx("div",{className:"prose prose-invert prose-xs max-w-none",children:x.jsx($p,{className:"text-gray-200 break-words",components:{code:({className:i,children:r,...s})=>{const o=/language-(\w+)/.exec(i||"");return!o?x.jsx("code",{className:i,...s,children:r}):x.jsx(zl,{language:o?o[1]:"",style:Cc,PreTag:"div",wrapLines:!0,wrapLongLines:!0,children:String(r).replace(/\n$/,"")})}},children:n.content})})]})},mIe=({message:n})=>{const[e,t]=b.useState(!1);return b.useEffect(()=>{!n.isThinking&&!n.isStreaming&&t(!0)},[n.isThinking,n.isStreaming]),x.jsxs("div",{className:"message-font",children:[x.jsxs("div",{className:"message-title",children:[!n.isThinking&&!n.isStreaming&&x.jsx("button",{onClick:()=>t(!e),className:"message-toggle-button text-gray-400",children:e?x.jsx("svg",{className:"message-toggle-icon",viewBox:"0 0 20 20",fill:"currentColor",children:x.jsx("path",{fillRule:"evenodd",d:"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z",clipRule:"evenodd"})}):x.jsx("svg",{className:"message-toggle-icon",viewBox:"0 0 20 20",fill:"currentColor",children:x.jsx("path",{fillRule:"evenodd",d:"M14.707 12.707a1 1 0 01-1.414 0L10 9.414l-3.293 3.293a1 1 0 01-1.414-1.414l4-4a1 1 0 011.414 0l4 4a1 1 0 010 1.414z",clipRule:"evenodd"})})}),x.jsx("span",{className:"message-title-icon",children:x.jsx("svg",{className:"w-4 h-4 text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:x.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M9.663 17h4.673M12 3v1m6.364 1.636l-.707.707M21 12h-1M4 12H3m3.343-5.657l-.707-.707m2.828 9.9a5 5 0 117.072 0l-.548.547A3.374 3.374 0 0014 18.469V19a2 2 0 11-4 0v-.531c0-.895-.356-1.754-.988-2.386l-.548-.547z"})})}),x.jsx("span",{className:"text-gray-400 message-title-text",children:te("thinking")||"Thinking"})]}),(!e||n.isThinking||n.isStreaming)&&x.jsxs("div",{className:"prose prose-invert prose-xs max-w-none mt-1",children:[x.jsx($p,{className:`${n.isThinking?"italic text-gray-400":"text-gray-200"} break-words`,components:{code:({className:i,children:r,...s})=>{const o=/language-(\w+)/.exec(i||"");return!o?x.jsx("code",{className:i,...s,children:r}):x.jsx(zl,{language:o?o[1]:"",style:Cc,PreTag:"div",wrapLines:!0,wrapLongLines:!0,children:String(r).replace(/\n$/,"")})}},children:n.content}),(n.isThinking||n.isStreaming)&&x.jsxs("div",{className:"flex space-x-1 mt-1",children:[x.jsx("div",{className:"w-1.5 h-1.5 bg-gray-400 rounded-full animate-bounce",style:{animationDelay:"0ms"}}),x.jsx("div",{className:"w-1.5 h-1.5 bg-gray-400 rounded-full animate-bounce",style:{animationDelay:"150ms"}}),x.jsx("div",{className:"w-1.5 h-1.5 bg-gray-400 rounded-full animate-bounce",style:{animationDelay:"300ms"}})]})]})]})},k4t=({message:n})=>{var i;const e=n.type==="STREAM"&&((i=n.metadata)==null?void 0:i.stream_out_type)==="command_suggestion",t=e&&!n.isStreaming;return e?x.jsx(I4t,{message:n,isCompleted:t}):x.jsx(L4t,{message:n})},I4t=({message:n,isCompleted:e})=>{const[t,i]=b.useState(e),r=n.content||"",s=r.split(`
522
+ `),s+=l);break}}return i===2&&r&&e.push({file:r,content:s.trim()}),e}const S4t=({message:n})=>{var g,m;const[e,t]=b.useState(!1),[i,r]=b.useState([]),[s,o]=b.useState(null),[a,l]=b.useState(""),c=()=>{var p;if(t(!e),!e&&((p=n.metadata)==null?void 0:p.command)==="read_files"&&n.content){const A=H8e(n.content);r(A)}},d=p=>{s===p?o(null):(o(p),l(i[p].content))},u=b.useCallback((p,A)=>{},[]),h=b.useCallback(p=>{p!==void 0&&l(p)},[]),f=b.useCallback(()=>{},[]);return x.jsxs("div",{className:"message-font message-content-container",children:[x.jsxs("div",{className:"bg-gradient-to-r from-gray-800 to-gray-750 px-4 py-3 border-b border-gray-700 flex items-center justify-between cursor-pointer",onClick:c,children:[x.jsxs("div",{className:"flex items-center",children:[x.jsx("span",{className:"message-title-icon",children:x.jsx("svg",{className:"w-5 h-5 text-indigo-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:x.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M8 9l3 3-3 3m5 0h3M5 20h14a2 2 0 002-2V6a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"})})}),x.jsx("span",{className:"text-indigo-400 message-title-text",children:te("commandExecution")})]}),x.jsx("div",{className:"text-gray-400",children:x.jsx("svg",{className:`w-5 h-5 transition-transform duration-200 ${e?"transform rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:x.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M19 9l-7 7-7-7"})})})]}),x.jsx("div",{className:"px-4 py-3 bg-gray-800/50 border-b border-gray-700",children:x.jsxs("div",{className:"flex items-center",children:[x.jsxs("span",{className:"text-gray-400 mr-2",children:[te("command"),":"]}),x.jsx("span",{className:"text-white font-semibold font-mono bg-gray-700/50 px-2 py-1 rounded",children:(g=n.metadata)==null?void 0:g.command})]})}),e&&x.jsx("div",{className:"p-4 bg-gray-800/30",children:((m=n.metadata)==null?void 0:m.command)==="read_files"?x.jsxs("div",{className:"text-gray-200",children:[x.jsxs("div",{className:"mb-4",children:[x.jsxs("h3",{className:"font-medium text-gray-300 mb-2",children:[te("files"),":"]}),x.jsx("div",{className:"space-y-1",children:i.map((p,A)=>x.jsxs("div",{className:`flex items-center p-2 rounded cursor-pointer hover:bg-gray-700/50 ${s===A?"bg-gray-700/70 border-l-2 border-indigo-500":""}`,onClick:()=>d(A),children:[x.jsx("svg",{className:"w-4 h-4 mr-2 text-indigo-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:x.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})}),x.jsx("span",{className:"truncate",children:p.file}),x.jsx("svg",{className:`w-4 h-4 ml-auto transition-transform duration-200 ${s===A?"transform rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:x.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M19 9l-7 7-7-7"})})]},A))})]}),s!==null&&x.jsx("div",{className:"border border-gray-700 rounded-lg overflow-hidden",style:{height:"400px"},children:x.jsx(Rue,{initialContent:i[s].content,onContentChange:h,onEditorReady:u,onSubmit:f})})]}):x.jsx("div",{className:"prose prose-invert prose-sm max-w-none",children:x.jsx($p,{className:"text-gray-200 break-words",components:{code:({className:p,children:A,...v})=>{const _=/language-(\w+)/.exec(p||"");return!_?x.jsx("code",{className:p,...v,children:A}):x.jsx(zl,{language:_?_[1]:"",style:Cc,PreTag:"div",wrapLines:!0,wrapLongLines:!0,customStyle:{borderRadius:"0.375rem",fontSize:"14px"},children:String(A).replace(/\n$/,"")})}},children:n.content})})})]})},x4t=({message:n})=>{var i,r,s;const[e,t]=b.useState(!1);return x.jsxs("div",{className:"message-font",children:[x.jsxs("div",{className:"message-title",children:[x.jsx("button",{onClick:()=>t(!e),className:"message-toggle-button",children:e?x.jsx("svg",{className:"message-toggle-icon text-blue-400",viewBox:"0 0 20 20",fill:"currentColor",children:x.jsx("path",{fillRule:"evenodd",d:"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z",clipRule:"evenodd"})}):x.jsx("svg",{className:"message-toggle-icon text-blue-400",viewBox:"0 0 20 20",fill:"currentColor",children:x.jsx("path",{fillRule:"evenodd",d:"M14.707 12.707a1 1 0 01-1.414 0L10 9.414l-3.293 3.293a1 1 0 01-1.414-1.414l4-4a1 1 0 011.414 0l4 4a1 1 0 010 1.414z",clipRule:"evenodd"})})}),x.jsx("span",{className:"message-title-icon",children:x.jsx("svg",{className:"w-3.5 h-3.5 text-blue-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:x.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})})}),x.jsx("span",{className:"text-blue-400 message-title-text text-xs",children:te("contextUsed")})]}),!e&&x.jsxs("div",{className:"message-content-container border border-gray-800",children:[((i=n.metadata)==null?void 0:i.title)&&x.jsx("div",{className:"px-2 py-1 bg-gray-800/50 border-b border-gray-800 text-sm",children:x.jsx("h3",{className:"text-white font-medium",children:(r=n.metadata)==null?void 0:r.title})}),((s=n.metadata)==null?void 0:s.files)&&n.metadata.files.length>0&&x.jsxs("div",{className:"px-2 py-1 bg-gray-800/30 border-b border-gray-800",children:[x.jsxs("div",{className:"text-gray-400 mb-0.5 text-xs",children:[te("filesReferenced"),":"]}),x.jsx("div",{className:"overflow-x-auto",style:{scrollbarWidth:"thin"},children:x.jsx("div",{className:"flex flex-col gap-0.5 max-h-[120px] overflow-y-auto",children:n.metadata.files.map((o,a)=>x.jsxs("div",{className:"flex items-center",children:[x.jsx("svg",{className:"w-2 h-2 mr-1 text-blue-400 flex-shrink-0",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:x.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})}),x.jsx("span",{className:"text-blue-300 font-mono whitespace-nowrap text-xs",children:o})]},a))})})]}),x.jsx("div",{className:"p-2 bg-gray-800/20",children:x.jsx("div",{className:"prose prose-invert prose-xs max-w-none",children:x.jsx($p,{className:"text-gray-200 break-words text-xs",components:{code:({className:o,children:a,...l})=>{const c=/language-(\w+)/.exec(o||"");return!c?x.jsx("code",{className:`${o} bg-gray-700/50 px-1 rounded`,...l,children:a}):x.jsx(zl,{language:c?c[1]:"",style:Cc,PreTag:"div",wrapLines:!0,wrapLongLines:!0,customStyle:{borderRadius:"0.25rem",marginTop:"0.375rem",marginBottom:"0.375rem",fontSize:"14px"},children:String(a).replace(/\n$/,"")})}},children:n.content})})})]})]})},E4t=({message:n})=>{var t;const e=()=>{Ki.publish(Qi.UI.ACTIVATE_PANEL,"history")};return x.jsxs("div",{className:"message-font",children:[x.jsxs("div",{className:"message-title",children:[x.jsx("span",{className:"message-title-icon",children:x.jsx("svg",{className:"w-4 h-4 text-green-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:x.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M5 13l4 4L19 7"})})}),x.jsx("span",{className:"text-green-400 message-title-text",children:te("completion")||"Completion"}),((t=n.metadata)==null?void 0:t.isWrite)&&x.jsx("button",{onClick:e,className:"ml-4 text-xs text-blue-400 hover:text-blue-300 underline focus:outline-none",children:te("viewChanges")||"View Changes"})]}),x.jsx("div",{className:"prose prose-invert prose-xs max-w-none",children:x.jsx($p,{className:"text-gray-200 break-words",components:{code:({className:i,children:r,...s})=>{const o=/language-(\w+)/.exec(i||"");return!o?x.jsx("code",{className:i,...s,children:r}):x.jsx(zl,{language:o?o[1]:"",style:Cc,PreTag:"div",wrapLines:!0,wrapLongLines:!0,children:String(r).replace(/\n$/,"")})}},children:n.content})})]})},mIe=({message:n})=>{const[e,t]=b.useState(!1);return b.useEffect(()=>{n.isStreaming||t(!0)},[n.isThinking,n.isStreaming]),x.jsxs("div",{className:"message-font",children:[x.jsxs("div",{className:"message-title",children:[!n.isStreaming&&x.jsx("button",{onClick:()=>t(!e),className:"message-toggle-button text-gray-400",children:e?x.jsx("svg",{className:"message-toggle-icon",viewBox:"0 0 20 20",fill:"currentColor",children:x.jsx("path",{fillRule:"evenodd",d:"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z",clipRule:"evenodd"})}):x.jsx("svg",{className:"message-toggle-icon",viewBox:"0 0 20 20",fill:"currentColor",children:x.jsx("path",{fillRule:"evenodd",d:"M14.707 12.707a1 1 0 01-1.414 0L10 9.414l-3.293 3.293a1 1 0 01-1.414-1.414l4-4a1 1 0 011.414 0l4 4a1 1 0 010 1.414z",clipRule:"evenodd"})})}),x.jsx("span",{className:"message-title-icon",children:x.jsx("svg",{className:"w-4 h-4 text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:x.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M9.663 17h4.673M12 3v1m6.364 1.636l-.707.707M21 12h-1M4 12H3m3.343-5.657l-.707-.707m2.828 9.9a5 5 0 117.072 0l-.548.547A3.374 3.374 0 0014 18.469V19a2 2 0 11-4 0v-.531c0-.895-.356-1.754-.988-2.386l-.548-.547z"})})}),x.jsx("span",{className:"text-gray-400 message-title-text",children:te("thinking")||"Thinking"})]}),(!e||n.isThinking||n.isStreaming)&&x.jsxs("div",{className:"prose prose-invert prose-xs max-w-none mt-1",children:[x.jsx($p,{className:`${n.isThinking?"italic text-gray-400":"text-gray-200"} break-words`,components:{code:({className:i,children:r,...s})=>{const o=/language-(\w+)/.exec(i||"");return!o?x.jsx("code",{className:i,...s,children:r}):x.jsx(zl,{language:o?o[1]:"",style:Cc,PreTag:"div",wrapLines:!0,wrapLongLines:!0,children:String(r).replace(/\n$/,"")})}},children:n.content}),(n.isThinking||n.isStreaming)&&x.jsxs("div",{className:"flex space-x-1 mt-1",children:[x.jsx("div",{className:"w-1.5 h-1.5 bg-gray-400 rounded-full animate-bounce",style:{animationDelay:"0ms"}}),x.jsx("div",{className:"w-1.5 h-1.5 bg-gray-400 rounded-full animate-bounce",style:{animationDelay:"150ms"}}),x.jsx("div",{className:"w-1.5 h-1.5 bg-gray-400 rounded-full animate-bounce",style:{animationDelay:"300ms"}})]})]})]})},k4t=({message:n})=>{var i;const e=n.type==="STREAM"&&((i=n.metadata)==null?void 0:i.stream_out_type)==="command_suggestion",t=e&&!n.isStreaming;return e?x.jsx(I4t,{message:n,isCompleted:t}):x.jsx(L4t,{message:n})},I4t=({message:n,isCompleted:e})=>{const[t,i]=b.useState(e),r=n.content||"",s=r.split(`
523
523
  `),o=3,a=s.length>o?s.slice(0,o).join(`
524
524
  `)+"...":r;return x.jsxs("div",{className:"message-font",children:[x.jsxs("div",{className:"message-title",children:[x.jsx("button",{onClick:()=>i(!t),className:"message-toggle-button",children:t?x.jsx("svg",{className:"message-toggle-icon text-yellow-400",viewBox:"0 0 20 20",fill:"currentColor",children:x.jsx("path",{fillRule:"evenodd",d:"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z",clipRule:"evenodd"})}):x.jsx("svg",{className:"message-toggle-icon text-yellow-400",viewBox:"0 0 20 20",fill:"currentColor",children:x.jsx("path",{fillRule:"evenodd",d:"M14.707 12.707a1 1 0 01-1.414 0L10 9.414l-3.293 3.293a1 1 0 01-1.414-1.414l4-4a1 1 0 011.414 0l4 4a1 1 0 010 1.414z",clipRule:"evenodd"})})}),x.jsx("span",{className:"message-title-icon",children:x.jsx("svg",{className:"w-4 h-4 text-yellow-400",viewBox:"0 0 20 20",fill:"currentColor",children:x.jsx("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z",clipRule:"evenodd"})})}),x.jsx("span",{className:"text-yellow-400 message-title-text",children:n.isStreaming?te("processingStatus"):te("processingComplete")}),n.isStreaming&&x.jsx("span",{className:"ml-2",children:x.jsxs("svg",{className:"animate-spin h-4 w-4 text-yellow-400",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[x.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),x.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})})]}),x.jsx("div",{className:"message-content-container bg-gray-800/50 p-2 whitespace-pre-wrap text-white break-words",children:t?a:r})]})},L4t=({message:n})=>{const[e,t]=b.useState(!1);return x.jsxs("div",{className:"message-font",children:[x.jsxs("div",{className:"message-title",children:[x.jsx("button",{onClick:()=>t(!e),className:"message-toggle-button",children:e?x.jsx("svg",{className:"message-toggle-icon text-blue-400",viewBox:"0 0 20 20",fill:"currentColor",children:x.jsx("path",{fillRule:"evenodd",d:"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z",clipRule:"evenodd"})}):x.jsx("svg",{className:"message-toggle-icon text-blue-400",viewBox:"0 0 20 20",fill:"currentColor",children:x.jsx("path",{fillRule:"evenodd",d:"M14.707 12.707a1 1 0 01-1.414 0L10 9.414l-3.293 3.293a1 1 0 01-1.414-1.414l4-4a1 1 0 011.414 0l4 4a1 1 0 010 1.414z",clipRule:"evenodd"})})}),x.jsx("span",{className:"message-title-icon",children:x.jsx("svg",{className:"w-4 h-4 text-blue-400",viewBox:"0 0 20 20",fill:"currentColor",children:x.jsx("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z",clipRule:"evenodd"})})}),x.jsx("span",{className:"text-blue-400 message-title-text",children:te("commandSuggestionTitle")})]}),!e&&x.jsx("div",{className:"message-content-container bg-gray-800/50 p-2 whitespace-pre-wrap text-white break-words",children:n.content})]})},N4t=({message:n})=>x.jsxs("div",{className:"message-font",children:[x.jsxs("div",{className:"message-title",children:[x.jsx("span",{className:"message-title-icon",children:x.jsx("svg",{className:"w-4 h-4 text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:x.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M7 8h10M7 12h4m1 8l-4-4H5a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v8a2 2 0 01-2 2h-3l-4 4z"})})}),x.jsx("span",{className:"text-gray-400 message-title-text",children:te("message")||"Message"})]}),x.jsx("pre",{className:"whitespace-pre-wrap font-sans text-gray-200 break-words",children:n.content})]}),T4t=({message:n})=>x.jsxs("div",{className:"message-font message-content-container",children:[x.jsxs("div",{className:"bg-gradient-to-r from-purple-800 to-purple-700 px-4 py-3 border-b border-gray-700 flex items-center",children:[x.jsx("span",{className:"message-title-icon",children:x.jsx("svg",{className:"w-5 h-5 text-purple-300",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:x.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})}),x.jsx("span",{className:"text-purple-300 message-title-text",children:te("summary")})]}),x.jsx("div",{className:"p-4 bg-gray-800/30",children:x.jsx("div",{className:"prose prose-invert prose-sm max-w-none",children:x.jsx($p,{className:"text-gray-200 break-words",components:{code:({className:e,children:t,...i})=>{const r=/language-(\w+)/.exec(e||"");return!r?x.jsx("code",{className:`${e} bg-gray-700/50 px-1 rounded`,...i,children:t}):x.jsx(zl,{language:r?r[1]:"",style:Cc,PreTag:"div",wrapLines:!0,wrapLongLines:!0,customStyle:{borderRadius:"0.375rem",marginTop:"0.5rem",marginBottom:"0.5rem"},children:String(t).replace(/\n$/,"")})}},children:n.content})})})]}),D4t=({message:n})=>{var i;const e=n.type==="STREAM"&&((i=n.metadata)==null?void 0:i.stream_out_type)==="file_number_list",t=e&&!n.isStreaming;return e?x.jsx(R4t,{message:n,isCompleted:t}):x.jsx(M4t,{message:n})},R4t=({message:n,isCompleted:e})=>{const[t,i]=b.useState(!1),r=n.content||"",s=r.split(`
525
525
  `);return x.jsxs("div",{className:"font-mono text-[14px]",children:[x.jsxs("div",{className:`flex items-center ${n.isStreaming?"text-white":"text-blue-400"} font-semibold mb-2`,children:[e&&s.length>3&&x.jsx("button",{onClick:()=>i(!t),className:"mr-2 p-0.5 rounded hover:bg-gray-700 transition-colors",children:t?x.jsx("svg",{className:"w-3 h-3",viewBox:"0 0 20 20",fill:"currentColor",children:x.jsx("path",{fillRule:"evenodd",d:"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z",clipRule:"evenodd"})}):x.jsx("svg",{className:"w-3 h-3",viewBox:"0 0 20 20",fill:"currentColor",children:x.jsx("path",{fillRule:"evenodd",d:"M14.707 12.707a1 1 0 01-1.414 0L10 9.414l-3.293 3.293a1 1 0 01-1.414-1.414l4-4a1 1 0 011.414 0l4 4a1 1 0 010 1.414z",clipRule:"evenodd"})})}),x.jsx("span",{className:"mr-2",children:n.isStreaming?x.jsxs("svg",{className:"animate-spin h-3 w-3",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[x.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),x.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}):x.jsx("svg",{className:"h-3 w-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:x.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})})}),x.jsx("span",{children:n.isStreaming?te("analyzingContext"):te("contextAnalysisComplete")})]}),!t&&x.jsx("div",{className:`bg-gray-800/50 p-2 rounded-md border border-gray-700 whitespace-pre-wrap text-xs ${n.isStreaming?"text-white":"text-gray-200"}`,children:r})]})},M4t=({message:n})=>{var i,r;const[e,t]=b.useState(!0);return x.jsxs("div",{className:"font-mono text-[14px]",children:[x.jsxs("div",{className:"flex items-center",children:[x.jsx("button",{onClick:()=>t(!e),className:"mr-2 p-0.5 rounded hover:bg-gray-700 transition-colors",children:e?x.jsx("svg",{className:"w-3 h-3 text-blue-400",viewBox:"0 0 20 20",fill:"currentColor",children:x.jsx("path",{fillRule:"evenodd",d:"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z",clipRule:"evenodd"})}):x.jsx("svg",{className:"w-3 h-3 text-blue-400",viewBox:"0 0 20 20",fill:"currentColor",children:x.jsx("path",{fillRule:"evenodd",d:"M14.707 12.707a1 1 0 01-1.414 0L10 9.414l-3.293 3.293a1 1 0 01-1.414-1.414l4-4a1 1 0 011.414 0l4 4a1 1 0 010 1.414z",clipRule:"evenodd"})})}),x.jsx("span",{className:"mr-2",children:x.jsx("svg",{className:"w-4 h-4 text-blue-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:x.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})}),x.jsx("span",{className:"text-blue-400 font-semibold",children:te("contextAwareInfo")})]}),!e&&x.jsxs("div",{className:"mt-2 bg-gray-850 rounded-lg overflow-hidden border border-gray-700 shadow-md",children:[((i=n.metadata)==null?void 0:i.title)&&x.jsx("div",{className:"px-3 py-2 bg-gray-800/50 border-b border-gray-700",children:x.jsx("h3",{className:"text-white font-medium text-[14px]",children:n.metadata.title})}),((r=n.metadata)==null?void 0:r.contextItems)&&n.metadata.contextItems.length>0&&x.jsxs("div",{className:"px-3 py-2 bg-gray-800/30 border-b border-gray-700",children:[x.jsxs("div",{className:"text-gray-400 text-[14px] mb-1",children:[te("relevantContext"),":"]}),x.jsx("div",{className:"flex flex-col gap-0.5 max-h-[150px] overflow-y-auto",children:n.metadata.contextItems.map((s,o)=>x.jsxs("div",{className:"flex items-center text-[14px]",children:[x.jsx("svg",{className:"w-2.5 h-2.5 mr-1 text-blue-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:x.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),x.jsx("span",{className:"text-blue-300 font-mono truncate",children:s})]},o))})]}),x.jsx("div",{className:"p-3 bg-gray-800/20",children:x.jsx("div",{className:"prose prose-invert prose-xs max-w-none",children:x.jsx($p,{className:"text-gray-200 break-words text-[14px]",components:{code:({className:s,children:o,...a})=>{const l=/language-(\w+)/.exec(s||"");return!l?x.jsx("code",{className:`${s} bg-gray-700/50 px-1 rounded text-[14px]`,...a,children:o}):x.jsx(zl,{language:l?l[1]:"",style:Cc,PreTag:"div",wrapLines:!0,wrapLongLines:!0,customStyle:{borderRadius:"0.25rem",marginTop:"0.375rem",marginBottom:"0.375rem",fontSize:"14px"},children:String(o).replace(/\n$/,"")})}},children:n.content})})})]})]})},O4t=({message:n})=>{var i;const e=n.type==="STREAM"&&((i=n.metadata)==null?void 0:i.stream_out_type)==="code_generate",t=e&&!n.isStreaming;return e?x.jsx(B4t,{message:n,isCompleted:t}):x.jsx(P4t,{message:n})},B4t=({message:n,isCompleted:e})=>{const[t,i]=b.useState(e),r=n.content||"",s=r.split(`
@@ -6,7 +6,7 @@
6
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
7
  <title>Vite React App</title>
8
8
  <script type="module" crossorigin src="/assets/main.js"></script>
9
- <link rel="stylesheet" crossorigin href="/assets/main-RHMBGd__.css">
9
+ <link rel="stylesheet" crossorigin href="/assets/main-DpFfkJ8A.css">
10
10
  </head>
11
11
  <body>
12
12
  <div id="root"></div>
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: auto_coder_web
3
- Version: 0.1.85
3
+ Version: 0.1.86
4
4
  Summary: auto-coder.web: A Python Project
5
5
  Author: allwefantasy
6
6
  Classifier: Programming Language :: Python :: 3.10
@@ -8,7 +8,7 @@ auto_coder_web/lang.py,sha256=cXypkDesnMwZ0U6D_CZtxhDTAOp__hoJzYTulQ_8xPc,1108
8
8
  auto_coder_web/proxy.py,sha256=pbcSVIB69rycZ5fNmhuJJEsEIeQBG5YR2-NI6n7hXSs,11571
9
9
  auto_coder_web/terminal.py,sha256=jtAH7FaC573cgxc7FnI_mOZ3D2dSCO3PrZN0OehtbNQ,9521
10
10
  auto_coder_web/types.py,sha256=TT-0UruUi67wz7w1DpjFyYeaCnkdKYviJvlpSnrdtD4,1435
11
- auto_coder_web/version.py,sha256=wY2suKf-e8VDtbBWRFlwNkTJ9Nff03BK8zzI8EWGc48,23
11
+ auto_coder_web/version.py,sha256=daW0dTSMLeXJ53ouWqpbphS98YVWhR0zyXXnZpqK-Ps,23
12
12
  auto_coder_web/common_router/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
13
13
  auto_coder_web/common_router/active_context_router.py,sha256=wbwG-J2iS5uBorN20q2PVoyJCVueECBR66xYjtIEWhM,6228
14
14
  auto_coder_web/common_router/auto_coder_conf_router.py,sha256=oIRZE5OqeSfp-TYkGtX1M1Qd54iBYxftQtDbivdRj1o,1059
@@ -40,7 +40,7 @@ auto_coder_web/routers/todo_router.py,sha256=IkQurQTw0Xk9P8yEtY_iie1z5ZK3CzDQE_N
40
40
  auto_coder_web/routers/upload_router.py,sha256=HdQIl3ICcT3EB2kwryTbF-PItWV-Gugses7Y0Eaw2WQ,1798
41
41
  auto_coder_web/web/bridge.js,sha256=us40dbuGHa2_zBBVBCa_GznOvpuZNDObViksMeoQch0,7364
42
42
  auto_coder_web/web/favicon.ico,sha256=PRD32mxgMXg0AIFmjErFs66XQ8qaJiqw_NMS-7n0i90,3870
43
- auto_coder_web/web/index.html,sha256=VFNEmTZ_rrdjgKyzMCCUY2CPOLc_yJW-3jrAyYbijXs,410
43
+ auto_coder_web/web/index.html,sha256=zHZQpJsKpUaMoPG8D1IlFdDmDhOoXOGmJ8bCPkhyuGc,410
44
44
  auto_coder_web/web/logo192.png,sha256=w4Y5bscNs2CAdbX7-qxKscyqhroFpoqzk-xVHrZsPgA,5347
45
45
  auto_coder_web/web/logo512.png,sha256=nqT02nBQwMxAiSb2o5wlNiTpursdQ8eXfNghRFpgtGE,9664
46
46
  auto_coder_web/web/manifest.json,sha256=ULPYw5A68_eNhxuUVXqxT045yhkurKPSz6hjyGcnmhQ,492
@@ -85,8 +85,8 @@ auto_coder_web/web/assets/lexon-YWi4-JPR.js,sha256=l9pURhF6kU3UKzKOIIQprnjMAXzdI
85
85
  auto_coder_web/web/assets/liquid-CPaH0eVF.js,sha256=uXE_OsLEw3W8B-ReZOUwybkJu3J6se8VlGWx0MFpx7g,4208
86
86
  auto_coder_web/web/assets/lua-nf6ki56Z.js,sha256=O3vMsGoiFHDMGSxTP1bHnDnRPebfmFnC7kf8-ovGkO8,2369
87
87
  auto_coder_web/web/assets/m3-Cpb6xl2v.js,sha256=PmotBCyVZvUGHh9t9juODmjXptTEP5K6bnPj2WgYO6c,3063
88
- auto_coder_web/web/assets/main-RHMBGd__.css,sha256=EJ0pBJokKODbV6ZfAOYNYSwQZLmK3BnzF-IOSj0HsLg,236378
89
- auto_coder_web/web/assets/main.js,sha256=IXwh9RbnJTszXkKFTAzTDtlgQzgS8Zl_vpl7I76V-UY,6641346
88
+ auto_coder_web/web/assets/main-DpFfkJ8A.css,sha256=kbeKDExL4UIDS9hYlXsiYRPVx8xOp3RvtJQMqsJhG4Q,239765
89
+ auto_coder_web/web/assets/main.js,sha256=nYk164-tDPzVdoh4x5YE7oH2sLy_wFAC6iqO8guzPfE,6642876
90
90
  auto_coder_web/web/assets/markdown-DSZPf7rp.js,sha256=3ZMgfYxjKX9U8l6GFCNrO28Hj7JU-4rKrEqXIezyqT4,4034
91
91
  auto_coder_web/web/assets/mdx-DRx1b0qs.js,sha256=awzor_jnBNHRhTxk3_jcpGXsNUFbi9Ow0OIqWYq4CQA,5113
92
92
  auto_coder_web/web/assets/mips-B_c3zf-v.js,sha256=L4uNgcwtDWPbyL0qnO-2w9x2PdI02UJcc8yQrYnHahA,2825
@@ -237,8 +237,8 @@ auto_coder_web/web/monaco-editor/min/vs/language/json/jsonMode.js,sha256=kgD_zkr
237
237
  auto_coder_web/web/monaco-editor/min/vs/language/json/jsonWorker.js,sha256=Sxl8QWXjVqBIV-kxfsPVNv27krkQd7xINZDE9RBW498,131177
238
238
  auto_coder_web/web/monaco-editor/min/vs/language/typescript/tsMode.js,sha256=-ycH7oQBPivkxY9WVOPWI8z3PPwz283Qv4KngJRc_PE,23919
239
239
  auto_coder_web/web/monaco-editor/min/vs/language/typescript/tsWorker.js,sha256=_9-LDU1BwUWvrmkZvroRAzaGB1nc4L2twqFFwGoaSO0,5749518
240
- auto_coder_web-0.1.85.dist-info/METADATA,sha256=FQDDCnoctvwCE3WYiTIEbfnQGq3OR35bksvct5ApWJc,1435
241
- auto_coder_web-0.1.85.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
242
- auto_coder_web-0.1.85.dist-info/entry_points.txt,sha256=oh8kd1ZecWDgdv-bIj_ru3phvl4scuxwXl9DK0Khltg,61
243
- auto_coder_web-0.1.85.dist-info/top_level.txt,sha256=UCzEw494Im0KvR-FTYf2jh-okqHvLsC_0JLOrQZoSpg,15
244
- auto_coder_web-0.1.85.dist-info/RECORD,,
240
+ auto_coder_web-0.1.86.dist-info/METADATA,sha256=H7cDZASYoUdyHW9A3s6ZKjp-M7M2Ft_DAcYpvjxdaNs,1435
241
+ auto_coder_web-0.1.86.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
242
+ auto_coder_web-0.1.86.dist-info/entry_points.txt,sha256=oh8kd1ZecWDgdv-bIj_ru3phvl4scuxwXl9DK0Khltg,61
243
+ auto_coder_web-0.1.86.dist-info/top_level.txt,sha256=UCzEw494Im0KvR-FTYf2jh-okqHvLsC_0JLOrQZoSpg,15
244
+ auto_coder_web-0.1.86.dist-info/RECORD,,