reactive-vscode 0.2.21 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("@reactive-vscode/reactivity"),s=require("vscode");function F(e){return n.getCurrentScope()?(n.onScopeDispose(e),!0):!1}function R(e,t){const o=new Map;return(...a)=>{const i=t(...a);let c=o.get(i);return c?c.refCount++:(c={data:e(...a),refCount:1},o.set(i,c)),F(()=>{--c.refCount===0&&o.delete(i)}),c.data}}function g(e){let t;return()=>t!==void 0?t:t=n.effectScope(!0).run(e)}const k=[];function Y(e){k.push(e)}const C=n.shallowRef(null),D=n.effectScope();function G(e){return{activate:t=>(C.value=t,D.run(()=>(y.map(o=>o(t)),e(t)))),deactivate:()=>{k.map(t=>t()),D.stop()}}}const y=[];function A(e){C.value?e(C.value):y.push(e)}function L(e,t,o){const a=!e,i=s.workspace.getConfiguration(a?void 0:e,o);function c(r,f){const l=n.shallowRef(f),v=n.computed({get:()=>l.value,set:w=>{l.value=w,i.update(r,w)}});return v.update=async(w,h,m)=>{await i.update(r,w,h,m),v.value=w},v.set=w=>{l.value=w},v}const u=Object.fromEntries(Object.keys(t).map(r=>[r,c(r,i.get(r))]));return A(()=>{d(s.workspace.onDidChangeConfiguration(a?r=>{const f=s.workspace.getConfiguration();for(const l in t)r.affectsConfiguration(l)&&u[l].set(f.get(l))}:r=>{if(!r.affectsConfiguration(e))return;const f=s.workspace.getConfiguration(e);for(const l in t)r.affectsConfiguration(`${e}.${l}`)&&u[l].set(f.get(l))}))}),u}function J(e,t,o){const a=L(e,t,o),i={},c=n.shallowReactive({$update(u,r,f,l){return a[u].update(r,f,l)},$set(u,r){return a[u].set(r)}});for(const u in t){const r=u.split(".");let f="",l=i,v=c;for(const h of r.slice(0,-1)){f=f?`${f}.${h}`:h;const m=l=l[h]||(l[h]={});if(v[h])v=v[h];else{const I=n.shallowReactive({});Object.defineProperty(v,h,{enumerable:!0,get(){return I},set(z){function W(S,x,p){if(S)for(const T in S)W(S[T],x?`${x}.${T}`:T,p==null?void 0:p[T]);else a[x].value=p}W(m,f,z)}}),v=I}}const w=r[r.length-1];l[w]=null,Object.defineProperty(v,w,{enumerable:!0,get(){return a[u].value},set(h){a[u].value=h}})}return c}function X(e,t){const o=n.shallowRef(null),a=[],i=c=>(...u)=>o.value?o.value[c](...u):(a.push([c,u]),null);return A(()=>{o.value=K(e,t);for(const[c,u]of a)o.value[c](...u)}),{logger:o,outputChannel:n.computed(()=>{var c;return(c=o.value)==null?void 0:c.outputChannel}),info:i("info"),warn:i("warn"),error:i("error"),append:i("append"),appendLine:i("appendLine"),replace:i("replace"),clear:i("clear"),show:i("show"),hide:i("hide")}}function Z(e,...t){return s.commands.executeCommand(e,...t)}function _(e,t=!1){const o=C.value;if(!o&&!t)throw new Error("Cannot get absolute path because the extension is not activated yet");return o==null?void 0:o.asAbsolutePath(e)}function ee(e,t=!1){return n.computed(()=>_(n.toValue(e),t))}function d(e){return(n.getCurrentScope()??D).cleanups.push(e.dispose.bind(e)),e}const N=g(()=>{const e=n.shallowRef(s.window.activeColorTheme);return d(s.window.onDidChangeActiveColorTheme(t=>{e.value=t})),e}),te=g(()=>{const e=n.shallowRef(s.debug.activeDebugSession);return d(s.debug.onDidChangeActiveDebugSession(t=>{e.value=t})),n.computed(()=>e.value)}),$=g(()=>{const e=n.shallowRef(s.window.activeTextEditor);return d(s.window.onDidChangeActiveTextEditor(t=>{e.value=t})),e});function M(e){var o;const t=n.shallowRef((o=n.toValue(e))==null?void 0:o.getText());return n.watchEffect(()=>{var a;t.value=(a=n.toValue(e))==null?void 0:a.getText()}),d(s.workspace.onDidChangeTextDocument(a=>{a.document===n.toValue(e)&&(t.value=a.document.getText())})),t}function j(e,t,o,a={}){const{updateOn:i=["effect","documentChanged"]}=a;let c;const u=n.computed(()=>{c==null||c.dispose(),c=void 0;const l=n.toValue(t);if("key"in l)return l;const v=s.window.createTextEditorDecorationType(l);return c=d(v),v}),r=async()=>{const l=n.toValue(e);l&&l.setDecorations(u.value,typeof o=="function"?await o(l):n.toValue(o))},f=i.includes("documentChanged")?M(()=>{var l;return(l=n.toValue(e))==null?void 0:l.document}):null;return i.includes("effect")?n.watchEffect(async()=>{f==null||f.value,await r()}):f&&n.watch(f,r),{update:r}}function ne(e,t,o={}){const a=$();return j(a,e,t,o)}const oe=g(()=>{const e=n.shallowRef(s.window.activeNotebookEditor);return d(s.window.onDidChangeActiveNotebookEditor(t=>{e.value=t})),e}),ae=g(()=>{const e=n.shallowRef(s.window.activeTerminal);return d(s.window.onDidChangeActiveTerminal(t=>{e.value=t})),e}),ie=g(()=>{const e=n.shallowRef(s.extensions.all);return d(s.extensions.onDidChange(()=>{e.value=s.extensions.all})),n.computed(()=>e.value)});function B(e,t){d(s.commands.registerCommand(e,t))}function se(e){for(const[t,o]of Object.entries(e))o&&B(t,o)}function ue(e,t){return d(s.comments.createCommentController(e,t))}function O(e){var o;const t=n.shallowRef((o=n.toValue(e))==null?void 0:o.state);return n.watch(e,()=>{var a;t.value=(a=n.toValue(e))==null?void 0:a.state}),d(s.window.onDidChangeTerminalState(a=>{a===n.toValue(e)&&(t.value=a.state)})),n.computed(()=>t.value)}function ce(...e){const t=n.ref(null);function o(){return!!t.value&&t.value.exitStatus==null}function a(){return o()?t.value:t.value=s.window.createTerminal(...e)}function i(r){a().sendText(r)}function c(){a().show()}function u(){o()&&(t.value.sendText(""),t.value.dispose(),t.value=null)}return n.onScopeDispose(u),{terminal:t,getIsActive:o,show:c,sendText:i,close:u,state:O(t)}}const re=g(()=>{const e=n.shallowRef(s.env.shell);return d(s.env.onDidChangeShell(t=>{e.value=t})),n.computed(()=>e.value)});function b(e,t){const o=(a,i,c)=>{d(e(a,i,c))};return t==null||t.forEach(a=>o(a)),o}function V(e,t=[]){const o=Array.isArray(e)?e:t??[],a=d(Array.isArray(e)||e==null?new s.EventEmitter:e),i=b(a.event,o);for(const c of o)i(c);return{event:a.event,fire:a.fire.bind(a),addListener:i}}async function le(e){const t=C.value.secrets,o=n.ref(await t.get(e));return o.set=async a=>{o.value=a,await t.store(e,a)},o.remove=async()=>{o.value=void 0,await t.delete(e)},d(t.onDidChange(async a=>{a.key===e&&(o.value=await t.get(e))})),n.watch(o,a=>{a===void 0?t.delete(e):t.store(e,a)}),o}function de(e){return n.computed(()=>s.tasks.fetchTasks(n.toValue(e)))}function fe(e){return n.computed(()=>s.Uri.file(n.toValue(e)))}function we(e,t){const o=new s.EventEmitter,a=n.shallowRef();n.watchEffect(()=>{a.value&&o.fire(),a.value=n.toValue(t)}),d(s.languages.registerFoldingRangeProvider(e,{onDidChangeFoldingRanges:o.event,provideFoldingRanges(i,c,u){var r;return(r=a.value)==null?void 0:r.call(a,i,c,u)}}))}function ve(e,t,o,a){const i=n.shallowReactive(new Map),c=V(),u=V(),r=V(),f=n.computed(()=>{const w=n.toValue(e);return Array.isArray(w)?w:w instanceof Set?Array.from(w):[w]});function l(){const w=f.value;for(const[h,m]of i)w.includes(h)||(m.dispose(),i.delete(h));for(const h of w)if(!i.has(h)){const m=s.workspace.createFileSystemWatcher(h,n.toValue(t)||!1,n.toValue(o)||!1,n.toValue(a)||!1);m.onDidCreate(c.fire),m.onDidChange(u.fire),m.onDidDelete(r.fire),i.set(h,m)}}function v(){for(const w of i.values())w.dispose();i.clear()}return l(),n.watch(f,l),n.watch(()=>[n.toValue(t),n.toValue(o),n.toValue(a)],()=>{v(),l()}),n.onScopeDispose(v),{watchers:i,onDidCreate:c.event,onDidChange:u.event,onDidDelete:r.event}}const he=g(()=>{const e=N();return n.computed(()=>e.value.kind===s.ColorThemeKind.Dark||e.value.kind===s.ColorThemeKind.HighContrast)}),ge=g(()=>{const e=n.shallowRef(s.env.isTelemetryEnabled);return d(s.env.onDidChangeTelemetryEnabled(t=>{e.value=t})),n.computed(()=>e.value)});function me(e,...t){return n.computed(()=>typeof t[0]=="object"?s.l10n.t(n.toValue(e),n.toRaw(t[0])):s.l10n.t(n.toValue(e),...t.map(n.toValue)))}function H(e,t){return d(s.window.createOutputChannel(e,t))}function be(e){const t=new Date,o=String(t.getFullYear()).padStart(4,"0"),a=String(t.getMonth()+1).padStart(2,"0"),i=String(t.getDate()).padStart(2,"0"),c=String(t.getHours()).padStart(2,"0"),u=String(t.getMinutes()).padStart(2,"0"),r=String(t.getSeconds()).padStart(2,"0"),f=String(t.getMilliseconds()).padStart(3,"0");return`${o}-${a}-${i} ${c}:${u}:${r}.${f} [${e}] `}function K(e,t={}){const o=t.outputChannel??H(e,{log:!0}),a=i=>(...c)=>{var u;o.appendLine((((u=t.getPrefix)==null?void 0:u.call(t,i))??"")+c.join(" "))};return{outputChannel:o,createLoggerFunc:a,info:a("INFO"),warn:a("WARN"),error:a("ERROR"),append:o.append.bind(o),appendLine:o.appendLine.bind(o),replace:o.replace.bind(o),clear:o.clear.bind(o),show:o.show.bind(o),hide:o.hide.bind(o)}}const Ce=g(()=>{const e=n.shallowRef(s.env.logLevel);return d(s.env.onDidChangeLogLevel(t=>{e.value=t})),n.computed(()=>e.value)});function q(e){var o;const t=n.shallowRef(((o=n.toValue(e))==null?void 0:o.selections)??[]);return n.watch(e,()=>{var a;t.value=((a=n.toValue(e))==null?void 0:a.selections)??[]}),d(s.window.onDidChangeNotebookEditorSelection(a=>{a.notebookEditor===n.toValue(e)&&(t.value=a.selections)})),n.computed({get(){return t.value},set(a){t.value=a;const i=n.toValue(e);i&&(i.selections=a)}})}function Ve(e){const t=q(e);return n.computed({get(){return t.value[0]},set(o){t.value=t.value.toSpliced(0,1,o)}})}function pe(e){var o;const t=n.shallowRef(((o=n.toValue(e))==null?void 0:o.visibleRanges)??[]);return n.watch(e,()=>{var a;t.value=((a=n.toValue(e))==null?void 0:a.visibleRanges)??[]}),d(s.window.onDidChangeNotebookEditorVisibleRanges(a=>{a.notebookEditor===n.toValue(e)&&(t.value=a.visibleRanges)})),n.computed(()=>t.value)}const Te=g(()=>{const e=n.shallowRef(s.window.terminals);function t(){e.value=s.window.terminals}return d(s.window.onDidOpenTerminal(t)),d(s.window.onDidCloseTerminal(t)),e});function De(e={}){const t=d(s.window.createQuickPick()),o=b(t.onDidChangeActive),a=b(t.onDidChangeSelection),i=b(t.onDidAccept),c=b(t.onDidHide),u=b(t.onDidTriggerButton),r=b(t.onDidChangeValue);["items","buttons","title","step","totalSteps","enabled","busy","ignoreFocusOut","placeholder","canSelectMany","matchOnDescription","matchOnDetail","keepScrollPosition"].forEach(w=>{e[w]&&n.watchEffect(()=>t[w]=n.toValue(e[w]))}),e.value&&(t.value=e.value);const f=n.shallowRef(t.value);r(w=>f.value=w),e.activeItems&&(t.activeItems=e.activeItems);const l=n.shallowRef(t.activeItems);o(w=>l.value=w),e.selectedItems&&(t.selectedItems=e.selectedItems);const v=n.shallowRef(t.selectedItems);return a(w=>v.value=w),{...t,onDidChangeActive:o,onDidChangeSelection:a,onDidAccept:i,onDidHide:c,onDidTriggerButton:u,onDidChangeValue:r,value:f,activeItems:l,selectedItems:v}}function Ee(e){const t=d(e.id?s.window.createStatusBarItem(e.id,e.alignment,e.priority):s.window.createStatusBarItem(e.alignment,e.priority));function o(a){const i=e[a];i!=null&&n.watchEffect(()=>t[a]=n.toValue(i))}return["name","text","tooltip","color","backgroundColor","command","accessibilityInformation"].forEach(o),e.visible!=null?n.watchEffect(()=>{n.toValue(e.visible)?t.show():t.hide()}):t.show(),t}const Se=g(()=>{const e=n.shallowRef(s.tasks.taskExecutions);function t(){e.value=s.tasks.taskExecutions}return d(s.tasks.onDidStartTask(t)),d(s.tasks.onDidEndTask(t)),n.computed(()=>e.value)});function xe(...e){const t=d(s.window.createTerminal(...e));return{terminal:t,get name(){return t.name},get processId(){return t.processId},get creationOptions(){return t.creationOptions},get exitStatus(){return t.exitStatus},get shellIntegration(){return t.shellIntegration},sendText:t.sendText.bind(t),show:t.show.bind(t),hide:t.hide.bind(t),state:O(t)}}function Q(e,t){d(s.commands.registerTextEditorCommand(e,t))}function Re(e){for(const[t,o]of Object.entries(e))Q(t,o)}function U(e,t){var a;const o=n.shallowRef(((a=n.toValue(e))==null?void 0:a.selections)??[]);return n.watch(e,()=>{var i;o.value=((i=n.toValue(e))==null?void 0:i.selections)??[]}),d(s.window.onDidChangeTextEditorSelection(i=>{const c=n.toValue(e),u=n.toValue(t);i.textEditor===c&&(!u||u.includes(i.kind))&&(o.value=i.selections)})),n.computed({get(){return o.value},set(i){o.value=i;const c=n.toValue(e);c&&(c.selections=i)}})}function ke(e,t){const o=U(e,t);return n.computed({get(){return o.value[0]},set(a){o.value=o.value.toSpliced(0,1,a)}})}function ye(e){var o;const t=n.shallowRef((o=n.toValue(e))==null?void 0:o.viewColumn);return n.watch(e,()=>{var a;t.value=(a=n.toValue(e))==null?void 0:a.viewColumn}),d(s.window.onDidChangeTextEditorViewColumn(a=>{a.textEditor===n.toValue(e)&&(t.value=a.viewColumn)})),n.computed(()=>t.value)}function Ae(e){var o;const t=n.shallowRef(((o=n.toValue(e))==null?void 0:o.visibleRanges)??[]);return n.watch(e,()=>{var a;t.value=((a=n.toValue(e))==null?void 0:a.visibleRanges)??[]}),d(s.window.onDidChangeTextEditorVisibleRanges(a=>{a.textEditor===n.toValue(e)&&(t.value=a.visibleRanges)})),n.computed(()=>t.value)}function P(e,t){n.watchEffect(()=>{const o=n.toValue(e);o&&(o.badge=n.toValue(t))})}function E(e,t){n.watchEffect(()=>{const o=n.toValue(e);o&&(o.title=n.toValue(t))})}const Oe=R((e,t,o)=>{const a=V();n.watch(t,()=>a.fire()),o!=null&&o.watchSource&&n.watch(o.watchSource,()=>a.fire());const i=new WeakMap,c=d(s.window.createTreeView(e,{...o,treeDataProvider:{...o,onDidChangeTreeData:a.event,getTreeItem(u){return u.treeItem},async getChildren(u){if(u){const r=await u.children;return r==null||r.forEach(f=>i.set(f,u)),r}return n.toValue(t)},getParent(u){return i.get(u)}}}));return o!=null&&o.title&&E(c,o.title),o!=null&&o.badge&&P(c,o.badge),c},e=>e);function Pe(e){var a;const t=n.ref((a=n.toValue(e))==null?void 0:a.visible);function o(){var i;t.value=(i=n.toValue(e))==null?void 0:i.visible}return n.watchEffect(i=>{const c=n.toValue(e);if(c){const u=c.onDidChangeVisibility(o);i(()=>u.dispose())}}),n.watchEffect(o),n.computed(()=>!!t.value)}const Ie=g(()=>{const e=n.shallowRef(s.window.visibleNotebookEditors);return d(s.window.onDidChangeVisibleNotebookEditors(t=>{e.value=t})),e}),We=g(()=>{const e=n.shallowRef(s.window.visibleTextEditors);return d(s.window.onDidChangeVisibleTextEditors(t=>{e.value=t})),e});function Fe(e,t,o=!0){const a=n.isRef(t)?t:typeof t=="function"?n.computed(t):n.ref(t);return n.watchEffect(()=>{n.toValue(o)&&s.commands.executeCommand("setContext",e,a.value)}),a}function Le(e,t,o,a,i){const c=n.shallowRef(),u=d(s.window.createWebviewPanel(e,n.toValue(t),a,{enableFindWidget:i==null?void 0:i.enableFindWidget,retainContextWhenHidden:i==null?void 0:i.retainContextWhenHidden,...n.toValue(i==null?void 0:i.webviewOptions)}));i!=null&&i.onDidReceiveMessage&&u.webview.onDidReceiveMessage(i.onDidReceiveMessage);const r=n.ref(0);function f(){r.value++}if(n.watchEffect(()=>{u.webview.html=`${n.toValue(o)}<!--${r.value}-->`}),i!=null&&i.webviewOptions){const h=i.webviewOptions;n.watchEffect(()=>{u.webview.options=n.toValue(h)})}E(u,t);function l(h){return u.webview.postMessage(h)}const v=n.ref(u.active),w=n.ref(u.visible);return d(u.onDidChangeViewState(()=>{v.value=u.active,w.value=u.visible})),{panel:u,context:c,active:v,visible:w,postMessage:l,forceRefresh:f}}const Ne=R((e,t,o)=>{const a=n.shallowRef(),i=n.shallowRef();d(s.window.registerWebviewViewProvider(e,{resolveWebviewView(f,l){a.value=f,i.value=l,o!=null&&o.onDidReceiveMessage&&f.webview.onDidReceiveMessage(o.onDidReceiveMessage)}},{webviewOptions:{retainContextWhenHidden:o==null?void 0:o.retainContextWhenHidden}}));const c=n.ref(0);function u(){c.value++}if(n.watchEffect(()=>{a.value&&(a.value.webview.html=`${n.toValue(t)}<!--${c.value}-->`)}),o!=null&&o.webviewOptions){const f=o.webviewOptions;n.watchEffect(()=>{a.value&&(a.value.webview.options=n.toValue(f))})}o!=null&&o.title&&E(a,o.title),o!=null&&o.badge&&P(a,o.badge);function r(f){var l;return(l=a.value)==null?void 0:l.webview.postMessage(f)}return{view:a,context:i,postMessage:r,forceRefresh:u}},e=>e),$e=g(()=>{const e=n.shallowRef(s.window.state);return d(s.window.onDidChangeWindowState(t=>{e.value=t})),{focused:n.computed(()=>e.value.focused),active:n.computed(()=>e.value.active)}}),Me=g(()=>{const e=n.shallowRef(s.workspace.workspaceFolders);return d(s.workspace.onDidChangeWorkspaceFolders(()=>{e.value=s.workspace.workspaceFolders})),n.computed(()=>e.value)});exports.activateCbs=y;exports.createKeyedComposable=R;exports.createSingletonComposable=g;exports.deactivateCbs=k;exports.defineConfigObject=J;exports.defineConfigs=L;exports.defineExtension=G;exports.defineLogger=X;exports.executeCommand=Z;exports.extensionContext=C;exports.extensionScope=D;exports.getDefaultLoggerPrefix=be;exports.onActivate=A;exports.onDeactivate=Y;exports.tryOnScopeDispose=F;exports.useAbsolutePath=ee;exports.useActiveColorTheme=N;exports.useActiveDebugSession=te;exports.useActiveEditorDecorations=ne;exports.useActiveNotebookEditor=oe;exports.useActiveTerminal=ae;exports.useActiveTextEditor=$;exports.useAllExtensions=ie;exports.useCommand=B;exports.useCommands=se;exports.useCommentController=ue;exports.useControlledTerminal=ce;exports.useDefaultShell=re;exports.useDisposable=d;exports.useDocumentText=M;exports.useEditorDecorations=j;exports.useEvent=b;exports.useEventEmitter=V;exports.useExtensionSecret=le;exports.useFetchTasks=de;exports.useFileUri=fe;exports.useFoldingRangeProvider=we;exports.useFsWatcher=ve;exports.useIsDarkTheme=he;exports.useIsTelemetryEnabled=ge;exports.useL10nText=me;exports.useLogLevel=Ce;exports.useLogger=K;exports.useNotebookEditorSelection=Ve;exports.useNotebookEditorSelections=q;exports.useNotebookEditorVisibleRanges=pe;exports.useOpenedTerminals=Te;exports.useOutputChannel=H;exports.useQuickPick=De;exports.useStatusBarItem=Ee;exports.useTaskExecutions=Se;exports.useTerminal=xe;exports.useTerminalState=O;exports.useTextEditorCommand=Q;exports.useTextEditorCommands=Re;exports.useTextEditorSelection=ke;exports.useTextEditorSelections=U;exports.useTextEditorViewColumn=ye;exports.useTextEditorVisibleRanges=Ae;exports.useTreeView=Oe;exports.useViewBadge=P;exports.useViewTitle=E;exports.useViewVisibility=Pe;exports.useVisibleNotebookEditors=Ie;exports.useVisibleTextEditors=We;exports.useVscodeContext=Fe;exports.useWebviewPanel=Le;exports.useWebviewView=Ne;exports.useWindowState=$e;exports.useWorkspaceFolders=Me;Object.keys(n).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>n[e]})});
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("@reactive-vscode/reactivity"),s=require("vscode");function F(e){return n.getCurrentScope()?(n.onScopeDispose(e),!0):!1}function E(e,t){const o=new Map;return(...a)=>{const i=t(...a);let c=o.get(i);return c?c.refCount++:(c={data:e(...a),refCount:1},o.set(i,c)),F(()=>{--c.refCount===0&&o.delete(i)}),c.data}}function g(e){let t;return()=>t!==void 0?t:t=n.effectScope(!0).run(e)}const k=[];function G(e){k.push(e)}const C=n.shallowRef(null),T=n.effectScope();function J(e){return{activate:t=>(C.value=t,T.run(()=>(y.map(o=>o(t)),e(t)))),deactivate:()=>{k.map(t=>t()),T.stop()}}}const y=[];function O(e){C.value?e(C.value):y.push(e)}function L(e,t,o){const a=!e,i=s.workspace.getConfiguration(a?void 0:e,o);function c(r,f){const l=n.shallowRef(f),w=n.computed({get:()=>l.value,set:v=>{l.value=v,i.update(r,v)}});return w.update=async(v,h,m)=>{await i.update(r,v,h,m),w.value=v},w.set=v=>{l.value=v},w}const u=Object.fromEntries(Object.keys(t).map(r=>[r,c(r,i.get(r))]));return O(()=>{d(s.workspace.onDidChangeConfiguration(a?r=>{const f=s.workspace.getConfiguration();for(const l in t)r.affectsConfiguration(l)&&u[l].set(f.get(l))}:r=>{if(!r.affectsConfiguration(e))return;const f=s.workspace.getConfiguration(e);for(const l in t)r.affectsConfiguration(`${e}.${l}`)&&u[l].set(f.get(l))}))}),u}function X(e,t,o){const a=L(e,t,o),i={},c=n.shallowReactive({$update(u,r,f,l){return a[u].update(r,f,l)},$set(u,r){return a[u].set(r)}});for(const u in t){const r=u.split(".");let f="",l=i,w=c;for(const h of r.slice(0,-1)){f=f?`${f}.${h}`:h;const m=l=l[h]||(l[h]={});if(w[h])w=w[h];else{const I=n.shallowReactive({});Object.defineProperty(w,h,{enumerable:!0,get(){return I},set(Y){function W(S,x,V){if(S)for(const D in S)W(S[D],x?`${x}.${D}`:D,V==null?void 0:V[D]);else a[x].value=V}W(m,f,Y)}}),w=I}}const v=r[r.length-1];l[v]=null,Object.defineProperty(w,v,{enumerable:!0,get(){return a[u].value},set(h){a[u].value=h}})}return c}function Z(e,t){const o=n.shallowRef(null),a=[],i=c=>(...u)=>o.value?o.value[c](...u):(a.push([c,u]),null);return O(()=>{o.value=K(e,t);for(const[c,u]of a)o.value[c](...u)}),{logger:o,outputChannel:n.computed(()=>{var c;return(c=o.value)==null?void 0:c.outputChannel}),info:i("info"),warn:i("warn"),error:i("error"),append:i("append"),appendLine:i("appendLine"),replace:i("replace"),clear:i("clear"),show:i("show"),hide:i("hide")}}function _(e,...t){return s.commands.executeCommand(e,...t)}function ee(e,t=!1){const o=C.value;if(!o&&!t)throw new Error("Cannot get absolute path because the extension is not activated yet");return o==null?void 0:o.asAbsolutePath(e)}function te(e,t=!1){return n.computed(()=>ee(n.toValue(e),t))}function d(e){return(n.getCurrentScope()??T).cleanups.push(e.dispose.bind(e)),e}const M=g(()=>{const e=n.shallowRef(s.window.activeColorTheme);return d(s.window.onDidChangeActiveColorTheme(t=>{e.value=t})),e}),ne=g(()=>{const e=n.shallowRef(s.debug.activeDebugSession);return d(s.debug.onDidChangeActiveDebugSession(t=>{e.value=t})),n.computed(()=>e.value)}),N=g(()=>{const e=n.shallowRef(s.window.activeTextEditor);return d(s.window.onDidChangeActiveTextEditor(t=>{e.value=t})),e});function $(e){var o;const t=n.shallowRef((o=n.toValue(e))==null?void 0:o.getText());return n.watchEffect(()=>{var a;t.value=(a=n.toValue(e))==null?void 0:a.getText()}),d(s.workspace.onDidChangeTextDocument(a=>{a.document===n.toValue(e)&&(t.value=a.document.getText())})),t}function j(e,t,o,a={}){const{updateOn:i=["effect","documentChanged"]}=a;let c;const u=n.computed(()=>{c==null||c.dispose(),c=void 0;const l=n.toValue(t);if("key"in l)return l;const w=s.window.createTextEditorDecorationType(l);return c=d(w),w}),r=async()=>{const l=n.toValue(e);l&&l.setDecorations(u.value,typeof o=="function"?await o(l):n.toValue(o))},f=i.includes("documentChanged")?$(()=>{var l;return(l=n.toValue(e))==null?void 0:l.document}):null;return i.includes("effect")?n.watchEffect(async()=>{f==null||f.value,await r()}):f&&n.watch(f,r),{update:r}}function oe(e,t,o={}){const a=N();return j(a,e,t,o)}const ae=g(()=>{const e=n.shallowRef(s.window.activeNotebookEditor);return d(s.window.onDidChangeActiveNotebookEditor(t=>{e.value=t})),e}),ie=g(()=>{const e=n.shallowRef(s.window.activeTerminal);return d(s.window.onDidChangeActiveTerminal(t=>{e.value=t})),e}),se=g(()=>{const e=n.shallowRef(s.extensions.all);return d(s.extensions.onDidChange(()=>{e.value=s.extensions.all})),n.computed(()=>e.value)});function H(e,t,o){for(const a of o){const i=t[a];i!==void 0&&n.watchEffect(()=>{e[a]=n.toValue(i)})}}function b(e,t){const o=(a,i,c)=>{d(e(a,i,c))};return t==null||t.forEach(a=>o(a)),o}const ue=E((e,t,o={})=>{const a=d(s.chat.createChatParticipant(e,n.unref(t)));return H(a,o,["iconPath"]),o.followupProvider!==void 0&&n.watchEffect(()=>{a.followupProvider=n.unref(o.followupProvider)}),n.watchEffect(()=>{a.requestHandler=n.unref(t)}),{onDidReceiveFeedback:b(a.onDidReceiveFeedback)}},e=>e);function B(e,t){d(s.commands.registerCommand(e,t))}function ce(e){for(const[t,o]of Object.entries(e))o&&B(t,o)}function re(e,t){return d(s.comments.createCommentController(e,t))}function P(e){var o;const t=n.shallowRef((o=n.toValue(e))==null?void 0:o.state);return n.watch(e,()=>{var a;t.value=(a=n.toValue(e))==null?void 0:a.state}),d(s.window.onDidChangeTerminalState(a=>{a===n.toValue(e)&&(t.value=a.state)})),n.computed(()=>t.value)}function le(...e){const t=n.ref(null);function o(){return!!t.value&&t.value.exitStatus==null}function a(){return o()?t.value:t.value=s.window.createTerminal(...e)}function i(r){a().sendText(r)}function c(){a().show()}function u(){o()&&(t.value.sendText(""),t.value.dispose(),t.value=null)}return n.onScopeDispose(u),{terminal:t,getIsActive:o,show:c,sendText:i,close:u,state:P(t)}}const de=g(()=>{const e=n.shallowRef(s.env.shell);return d(s.env.onDidChangeShell(t=>{e.value=t})),n.computed(()=>e.value)});function p(e,t=[]){const o=Array.isArray(e)?e:t??[],a=d(Array.isArray(e)||e==null?new s.EventEmitter:e),i=b(a.event,o);for(const c of o)i(c);return{event:a.event,fire:a.fire.bind(a),addListener:i}}async function fe(e){const t=C.value.secrets,o=n.ref(await t.get(e));return o.set=async a=>{o.value=a,await t.store(e,a)},o.remove=async()=>{o.value=void 0,await t.delete(e)},d(t.onDidChange(async a=>{a.key===e&&(o.value=await t.get(e))})),n.watch(o,a=>{a===void 0?t.delete(e):t.store(e,a)}),o}function ve(e){return n.computed(()=>s.tasks.fetchTasks(n.toValue(e)))}function we(e){return n.computed(()=>s.Uri.file(n.toValue(e)))}function he(e,t){const o=new s.EventEmitter,a=n.shallowRef();n.watchEffect(()=>{a.value&&o.fire(),a.value=n.toValue(t)}),d(s.languages.registerFoldingRangeProvider(e,{onDidChangeFoldingRanges:o.event,provideFoldingRanges(i,c,u){var r;return(r=a.value)==null?void 0:r.call(a,i,c,u)}}))}function ge(e,t,o,a){const i=n.shallowReactive(new Map),c=p(),u=p(),r=p(),f=n.computed(()=>{const v=n.toValue(e);return Array.isArray(v)?v:v instanceof Set?Array.from(v):[v]});function l(){const v=f.value;for(const[h,m]of i)v.includes(h)||(m.dispose(),i.delete(h));for(const h of v)if(!i.has(h)){const m=s.workspace.createFileSystemWatcher(h,n.toValue(t)||!1,n.toValue(o)||!1,n.toValue(a)||!1);m.onDidCreate(c.fire),m.onDidChange(u.fire),m.onDidDelete(r.fire),i.set(h,m)}}function w(){for(const v of i.values())v.dispose();i.clear()}return l(),n.watch(f,l),n.watch(()=>[n.toValue(t),n.toValue(o),n.toValue(a)],()=>{w(),l()}),n.onScopeDispose(w),{watchers:i,onDidCreate:c.event,onDidChange:u.event,onDidDelete:r.event}}const me=g(()=>{const e=M();return n.computed(()=>e.value.kind===s.ColorThemeKind.Dark||e.value.kind===s.ColorThemeKind.HighContrast)}),be=g(()=>{const e=n.shallowRef(s.env.isTelemetryEnabled);return d(s.env.onDidChangeTelemetryEnabled(t=>{e.value=t})),n.computed(()=>e.value)});function Ce(e,...t){return n.computed(()=>typeof t[0]=="object"?s.l10n.t(n.toValue(e),n.toRaw(t[0])):s.l10n.t(n.toValue(e),...t.map(n.toValue)))}const pe=g(()=>{const e=n.shallowRef(s.lm.tools);return d(s.lm.onDidChangeChatModels(()=>{e.value=s.lm.tools})),n.computed(()=>e.value)});function q(e,t){return d(s.window.createOutputChannel(e,t))}function Ve(e){const t=new Date,o=String(t.getFullYear()).padStart(4,"0"),a=String(t.getMonth()+1).padStart(2,"0"),i=String(t.getDate()).padStart(2,"0"),c=String(t.getHours()).padStart(2,"0"),u=String(t.getMinutes()).padStart(2,"0"),r=String(t.getSeconds()).padStart(2,"0"),f=String(t.getMilliseconds()).padStart(3,"0");return`${o}-${a}-${i} ${c}:${u}:${r}.${f} [${e}] `}function K(e,t={}){const o=t.outputChannel??q(e,{log:!0}),a=i=>(...c)=>{var u;o.appendLine((((u=t.getPrefix)==null?void 0:u.call(t,i))??"")+c.join(" "))};return{outputChannel:o,createLoggerFunc:a,info:a("INFO"),warn:a("WARN"),error:a("ERROR"),append:o.append.bind(o),appendLine:o.appendLine.bind(o),replace:o.replace.bind(o),clear:o.clear.bind(o),show:o.show.bind(o),hide:o.hide.bind(o)}}const De=g(()=>{const e=n.shallowRef(s.env.logLevel);return d(s.env.onDidChangeLogLevel(t=>{e.value=t})),n.computed(()=>e.value)});function Q(e){var o;const t=n.shallowRef(((o=n.toValue(e))==null?void 0:o.selections)??[]);return n.watch(e,()=>{var a;t.value=((a=n.toValue(e))==null?void 0:a.selections)??[]}),d(s.window.onDidChangeNotebookEditorSelection(a=>{a.notebookEditor===n.toValue(e)&&(t.value=a.selections)})),n.computed({get(){return t.value},set(a){t.value=a;const i=n.toValue(e);i&&(i.selections=a)}})}function Te(e){const t=Q(e);return n.computed({get(){return t.value[0]},set(o){t.value=t.value.toSpliced(0,1,o)}})}function Ee(e){var o;const t=n.shallowRef(((o=n.toValue(e))==null?void 0:o.visibleRanges)??[]);return n.watch(e,()=>{var a;t.value=((a=n.toValue(e))==null?void 0:a.visibleRanges)??[]}),d(s.window.onDidChangeNotebookEditorVisibleRanges(a=>{a.notebookEditor===n.toValue(e)&&(t.value=a.visibleRanges)})),n.computed(()=>t.value)}const Re=g(()=>{const e=n.shallowRef(s.window.terminals);function t(){e.value=s.window.terminals}return d(s.window.onDidOpenTerminal(t)),d(s.window.onDidCloseTerminal(t)),e});function Se(e={}){const t=d(s.window.createQuickPick()),o=b(t.onDidChangeActive),a=b(t.onDidChangeSelection),i=b(t.onDidAccept),c=b(t.onDidHide),u=b(t.onDidTriggerButton),r=b(t.onDidChangeValue);["items","buttons","title","step","totalSteps","enabled","busy","ignoreFocusOut","placeholder","canSelectMany","matchOnDescription","matchOnDetail","keepScrollPosition"].forEach(v=>{e[v]&&n.watchEffect(()=>t[v]=n.toValue(e[v]))}),e.value&&(t.value=e.value);const f=n.shallowRef(t.value);r(v=>f.value=v),e.activeItems&&(t.activeItems=e.activeItems);const l=n.shallowRef(t.activeItems);o(v=>l.value=v),e.selectedItems&&(t.selectedItems=e.selectedItems);const w=n.shallowRef(t.selectedItems);return a(v=>w.value=v),{...t,onDidChangeActive:o,onDidChangeSelection:a,onDidAccept:i,onDidHide:c,onDidTriggerButton:u,onDidChangeValue:r,value:f,activeItems:l,selectedItems:w}}function xe(e){const t=d(e.id?s.window.createStatusBarItem(e.id,e.alignment,e.priority):s.window.createStatusBarItem(e.alignment,e.priority));return H(t,e,["name","text","tooltip","color","backgroundColor","command","accessibilityInformation"]),e.visible!=null?n.watchEffect(()=>{n.toValue(e.visible)?t.show():t.hide()}):t.show(),t}const ke=g(()=>{const e=n.shallowRef(s.tasks.taskExecutions);function t(){e.value=s.tasks.taskExecutions}return d(s.tasks.onDidStartTask(t)),d(s.tasks.onDidEndTask(t)),n.computed(()=>e.value)});function ye(...e){const t=d(s.window.createTerminal(...e));return{terminal:t,get name(){return t.name},get processId(){return t.processId},get creationOptions(){return t.creationOptions},get exitStatus(){return t.exitStatus},get shellIntegration(){return t.shellIntegration},sendText:t.sendText.bind(t),show:t.show.bind(t),hide:t.hide.bind(t),state:P(t)}}function U(e,t){d(s.commands.registerTextEditorCommand(e,t))}function Oe(e){for(const[t,o]of Object.entries(e))U(t,o)}function z(e,t){var a;const o=n.shallowRef(((a=n.toValue(e))==null?void 0:a.selections)??[]);return n.watch(e,()=>{var i;o.value=((i=n.toValue(e))==null?void 0:i.selections)??[]}),d(s.window.onDidChangeTextEditorSelection(i=>{const c=n.toValue(e),u=n.toValue(t);i.textEditor===c&&(!u||u.includes(i.kind))&&(o.value=i.selections)})),n.computed({get(){return o.value},set(i){o.value=i;const c=n.toValue(e);c&&(c.selections=i)}})}function Pe(e,t){const o=z(e,t);return n.computed({get(){return o.value[0]},set(a){o.value=o.value.toSpliced(0,1,a)}})}function Ae(e){var o;const t=n.shallowRef((o=n.toValue(e))==null?void 0:o.viewColumn);return n.watch(e,()=>{var a;t.value=(a=n.toValue(e))==null?void 0:a.viewColumn}),d(s.window.onDidChangeTextEditorViewColumn(a=>{a.textEditor===n.toValue(e)&&(t.value=a.viewColumn)})),n.computed(()=>t.value)}function Ie(e){var o;const t=n.shallowRef(((o=n.toValue(e))==null?void 0:o.visibleRanges)??[]);return n.watch(e,()=>{var a;t.value=((a=n.toValue(e))==null?void 0:a.visibleRanges)??[]}),d(s.window.onDidChangeTextEditorVisibleRanges(a=>{a.textEditor===n.toValue(e)&&(t.value=a.visibleRanges)})),n.computed(()=>t.value)}function A(e,t){n.watchEffect(()=>{const o=n.toValue(e);o&&(o.badge=n.toValue(t))})}function R(e,t){n.watchEffect(()=>{const o=n.toValue(e);o&&(o.title=n.toValue(t))})}const We=E((e,t,o)=>{const a=p();n.watch(t,()=>a.fire()),o!=null&&o.watchSource&&n.watch(o.watchSource,()=>a.fire());const i=new WeakMap,c=d(s.window.createTreeView(e,{...o,treeDataProvider:{...o,onDidChangeTreeData:a.event,getTreeItem(u){return u.treeItem},async getChildren(u){if(u){const r=await u.children;return r==null||r.forEach(f=>i.set(f,u)),r}return n.toValue(t)},getParent(u){return i.get(u)}}}));return o!=null&&o.title&&R(c,o.title),o!=null&&o.badge&&A(c,o.badge),c},e=>e);function Fe(e){var a;const t=n.ref((a=n.toValue(e))==null?void 0:a.visible);function o(){var i;t.value=(i=n.toValue(e))==null?void 0:i.visible}return n.watchEffect(i=>{const c=n.toValue(e);if(c){const u=c.onDidChangeVisibility(o);i(()=>u.dispose())}}),n.watchEffect(o),n.computed(()=>!!t.value)}const Le=g(()=>{const e=n.shallowRef(s.window.visibleNotebookEditors);return d(s.window.onDidChangeVisibleNotebookEditors(t=>{e.value=t})),e}),Me=g(()=>{const e=n.shallowRef(s.window.visibleTextEditors);return d(s.window.onDidChangeVisibleTextEditors(t=>{e.value=t})),e});function Ne(e,t,o=!0){const a=n.isRef(t)?t:typeof t=="function"?n.computed(t):n.ref(t);return n.watchEffect(()=>{n.toValue(o)&&s.commands.executeCommand("setContext",e,a.value)}),a}function $e(e,t,o,a,i){const c=n.shallowRef(),u=d(s.window.createWebviewPanel(e,n.toValue(t),a,{enableFindWidget:i==null?void 0:i.enableFindWidget,retainContextWhenHidden:i==null?void 0:i.retainContextWhenHidden,...n.toValue(i==null?void 0:i.webviewOptions)}));i!=null&&i.onDidReceiveMessage&&u.webview.onDidReceiveMessage(i.onDidReceiveMessage);const r=n.ref(0);function f(){r.value++}if(n.watchEffect(()=>{u.webview.html=`${n.toValue(o)}<!--${r.value}-->`}),i!=null&&i.webviewOptions){const h=i.webviewOptions;n.watchEffect(()=>{u.webview.options=n.toValue(h)})}R(u,t);function l(h){return u.webview.postMessage(h)}const w=n.ref(u.active),v=n.ref(u.visible);return d(u.onDidChangeViewState(()=>{w.value=u.active,v.value=u.visible})),{panel:u,context:c,active:w,visible:v,postMessage:l,forceRefresh:f}}const je=E((e,t,o)=>{const a=n.shallowRef(),i=n.shallowRef();d(s.window.registerWebviewViewProvider(e,{resolveWebviewView(f,l){a.value=f,i.value=l,o!=null&&o.onDidReceiveMessage&&f.webview.onDidReceiveMessage(o.onDidReceiveMessage)}},{webviewOptions:{retainContextWhenHidden:o==null?void 0:o.retainContextWhenHidden}}));const c=n.ref(0);function u(){c.value++}if(n.watchEffect(()=>{a.value&&(a.value.webview.html=`${n.toValue(t)}<!--${c.value}-->`)}),o!=null&&o.webviewOptions){const f=o.webviewOptions;n.watchEffect(()=>{a.value&&(a.value.webview.options=n.toValue(f))})}o!=null&&o.title&&R(a,o.title),o!=null&&o.badge&&A(a,o.badge);function r(f){var l;return(l=a.value)==null?void 0:l.webview.postMessage(f)}return{view:a,context:i,postMessage:r,forceRefresh:u}},e=>e),He=g(()=>{const e=n.shallowRef(s.window.state);return d(s.window.onDidChangeWindowState(t=>{e.value=t})),{focused:n.computed(()=>e.value.focused),active:n.computed(()=>e.value.active)}}),Be=g(()=>{const e=n.shallowRef(s.workspace.workspaceFolders);return d(s.workspace.onDidChangeWorkspaceFolders(()=>{e.value=s.workspace.workspaceFolders})),n.computed(()=>e.value)});exports.activateCbs=y;exports.createKeyedComposable=E;exports.createSingletonComposable=g;exports.deactivateCbs=k;exports.defineConfigObject=X;exports.defineConfigs=L;exports.defineExtension=J;exports.defineLogger=Z;exports.executeCommand=_;exports.extensionContext=C;exports.extensionScope=T;exports.getDefaultLoggerPrefix=Ve;exports.onActivate=O;exports.onDeactivate=G;exports.tryOnScopeDispose=F;exports.useAbsolutePath=te;exports.useActiveColorTheme=M;exports.useActiveDebugSession=ne;exports.useActiveEditorDecorations=oe;exports.useActiveNotebookEditor=ae;exports.useActiveTerminal=ie;exports.useActiveTextEditor=N;exports.useAllExtensions=se;exports.useChatParticipant=ue;exports.useCommand=B;exports.useCommands=ce;exports.useCommentController=re;exports.useControlledTerminal=le;exports.useDefaultShell=de;exports.useDisposable=d;exports.useDocumentText=$;exports.useEditorDecorations=j;exports.useEvent=b;exports.useEventEmitter=p;exports.useExtensionSecret=fe;exports.useFetchTasks=ve;exports.useFileUri=we;exports.useFoldingRangeProvider=he;exports.useFsWatcher=ge;exports.useIsDarkTheme=me;exports.useIsTelemetryEnabled=be;exports.useL10nText=Ce;exports.useLmTools=pe;exports.useLogLevel=De;exports.useLogger=K;exports.useNotebookEditorSelection=Te;exports.useNotebookEditorSelections=Q;exports.useNotebookEditorVisibleRanges=Ee;exports.useOpenedTerminals=Re;exports.useOutputChannel=q;exports.useQuickPick=Se;exports.useStatusBarItem=xe;exports.useTaskExecutions=ke;exports.useTerminal=ye;exports.useTerminalState=P;exports.useTextEditorCommand=U;exports.useTextEditorCommands=Oe;exports.useTextEditorSelection=Pe;exports.useTextEditorSelections=z;exports.useTextEditorViewColumn=Ae;exports.useTextEditorVisibleRanges=Ie;exports.useTreeView=We;exports.useViewBadge=A;exports.useViewTitle=R;exports.useViewVisibility=Fe;exports.useVisibleNotebookEditors=Le;exports.useVisibleTextEditors=Me;exports.useVscodeContext=Ne;exports.useWebviewPanel=$e;exports.useWebviewView=je;exports.useWindowState=He;exports.useWorkspaceFolders=Be;Object.keys(n).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>n[e]})});
package/dist/index.d.ts CHANGED
@@ -1,3 +1,6 @@
1
+ import { ChatFollowupProvider } from 'vscode';
2
+ import { ChatRequestHandler } from 'vscode';
3
+ import { ChatResultFeedback } from 'vscode';
1
4
  import { ColorTheme } from 'vscode';
2
5
  import { CommentController } from 'vscode';
3
6
  import { ComputedRef } from '@reactive-vscode/reactivity';
@@ -17,6 +20,8 @@ import { ExtensionTerminalOptions } from 'vscode';
17
20
  import { FileSystemWatcher } from 'vscode';
18
21
  import { FoldingRangeProvider } from 'vscode';
19
22
  import { GlobPattern } from 'vscode';
23
+ import { IconPath } from 'vscode';
24
+ import { LanguageModelToolInformation } from 'vscode';
20
25
  import { LogLevel } from 'vscode';
21
26
  import { LogOutputChannel } from 'vscode';
22
27
  import { MaybeRef } from '@reactive-vscode/reactivity';
@@ -67,6 +72,11 @@ export declare type AnyWatchSource = any;
67
72
 
68
73
  export declare type Awaitable<T> = T | Promise<T>;
69
74
 
75
+ export declare interface ChatParticipantOptions {
76
+ iconPath?: MaybeRefOrGetter<IconPath>;
77
+ followupProvider?: MaybeRef<ChatFollowupProvider>;
78
+ }
79
+
70
80
  export declare interface Commands extends Record<string, (...args: any[]) => any> {
71
81
  'vscode.open': (uri: Uri) => void;
72
82
  }
@@ -390,6 +400,14 @@ export declare const useActiveTextEditor: () => ShallowRef<TextEditor | undefine
390
400
  */
391
401
  export declare const useAllExtensions: () => ComputedRef<readonly Extension<any>[]>;
392
402
 
403
+ /**
404
+ * @reactive `chat.createChatParticipant`
405
+ * @category chat
406
+ */
407
+ export declare const useChatParticipant: (id: string, handler: MaybeRef<ChatRequestHandler>, options?: ChatParticipantOptions | undefined) => {
408
+ onDidReceiveFeedback: (listener: (e: ChatResultFeedback) => any, thisArgs?: any, disposables?: Disposable_2[]) => void;
409
+ };
410
+
393
411
  /**
394
412
  * Register a command. See `vscode::commands.registerCommand`.
395
413
  *
@@ -546,6 +564,14 @@ export declare function useL10nText(message: MaybeRefOrGetter<string>, ...args:
546
564
 
547
565
  export declare function useL10nText(message: MaybeRefOrGetter<string>, args: Record<string, any>): ComputedRef<string>;
548
566
 
567
+ /**
568
+ * A list of all available tools that were registered by all extensions using `vscode::lm.registerTool`.
569
+ *
570
+ * @reactive `lm.tools`
571
+ * @category lm
572
+ */
573
+ export declare const useLmTools: () => ComputedRef<readonly LanguageModelToolInformation[]>;
574
+
549
575
  /**
550
576
  * Creates a logger that writes to the output channel.
551
577
  *
package/dist/index.js CHANGED
@@ -1,115 +1,115 @@
1
- import { getCurrentScope as K, onScopeDispose as F, effectScope as Q, shallowRef as g, computed as h, shallowReactive as $, toValue as s, watchEffect as C, watch as D, ref as x, toRaw as ee, isRef as te } from "@reactive-vscode/reactivity";
1
+ import { getCurrentScope as U, onScopeDispose as N, effectScope as Y, shallowRef as g, computed as h, shallowReactive as M, toValue as o, watchEffect as w, watch as D, unref as W, ref as x, toRaw as ie, isRef as ae } from "@reactive-vscode/reactivity";
2
2
  export * from "@reactive-vscode/reactivity";
3
- import { workspace as S, commands as O, window as v, debug as H, extensions as W, comments as ne, env as p, EventEmitter as U, tasks as k, Uri as ie, languages as ae, ColorThemeKind as B, l10n as z } from "vscode";
4
- function re(e) {
5
- return K() ? (F(e), !0) : !1;
3
+ import { workspace as S, commands as V, window as v, debug as z, extensions as $, chat as re, comments as oe, env as E, EventEmitter as G, tasks as k, Uri as se, languages as ue, ColorThemeKind as K, l10n as Q, lm as F } from "vscode";
4
+ function ce(e) {
5
+ return U() ? (N(e), !0) : !1;
6
6
  }
7
- function q(e, t) {
7
+ function j(e, t) {
8
8
  const n = /* @__PURE__ */ new Map();
9
9
  return (...i) => {
10
10
  const a = t(...i);
11
- let u = n.get(a);
12
- return u ? u.refCount++ : (u = {
11
+ let s = n.get(a);
12
+ return s ? s.refCount++ : (s = {
13
13
  data: e(...i),
14
14
  refCount: 1
15
- }, n.set(a, u)), re(() => {
16
- --u.refCount === 0 && n.delete(a);
17
- }), u.data;
15
+ }, n.set(a, s)), ce(() => {
16
+ --s.refCount === 0 && n.delete(a);
17
+ }), s.data;
18
18
  };
19
19
  }
20
- function w(e) {
20
+ function C(e) {
21
21
  let t;
22
- return () => t !== void 0 ? t : t = Q(!0).run(e);
22
+ return () => t !== void 0 ? t : t = Y(!0).run(e);
23
23
  }
24
- const Y = [];
25
- function De(e) {
26
- Y.push(e);
24
+ const J = [];
25
+ function xe(e) {
26
+ J.push(e);
27
27
  }
28
- const y = g(null), M = Q();
29
- function Te(e) {
28
+ const R = g(null), L = Y();
29
+ function Ee(e) {
30
30
  return {
31
- activate: (t) => (y.value = t, M.run(() => (G.map((n) => n(t)), e(t)))),
31
+ activate: (t) => (R.value = t, L.run(() => (X.map((n) => n(t)), e(t)))),
32
32
  deactivate: () => {
33
- Y.map((t) => t()), M.stop();
33
+ J.map((t) => t()), L.stop();
34
34
  }
35
35
  };
36
36
  }
37
- const G = [];
38
- function J(e) {
39
- y.value ? e(y.value) : G.push(e);
37
+ const X = [];
38
+ function Z(e) {
39
+ R.value ? e(R.value) : X.push(e);
40
40
  }
41
- function se(e, t, n) {
41
+ function le(e, t, n) {
42
42
  const i = !e, a = S.getConfiguration(i ? void 0 : e, n);
43
- function u(o, d) {
43
+ function s(u, d) {
44
44
  const c = g(d), m = h({
45
45
  get: () => c.value,
46
46
  set: (f) => {
47
- c.value = f, a.update(o, f);
47
+ c.value = f, a.update(u, f);
48
48
  }
49
49
  });
50
50
  return m.update = async (f, b, T) => {
51
- await a.update(o, f, b, T), m.value = f;
51
+ await a.update(u, f, b, T), m.value = f;
52
52
  }, m.set = (f) => {
53
53
  c.value = f;
54
54
  }, m;
55
55
  }
56
56
  const r = Object.fromEntries(
57
- Object.keys(t).map((o) => [o, u(o, a.get(o))])
57
+ Object.keys(t).map((u) => [u, s(u, a.get(u))])
58
58
  );
59
- return J(() => {
59
+ return Z(() => {
60
60
  l(S.onDidChangeConfiguration(
61
- i ? (o) => {
61
+ i ? (u) => {
62
62
  const d = S.getConfiguration();
63
63
  for (const c in t)
64
- o.affectsConfiguration(c) && r[c].set(d.get(c));
65
- } : (o) => {
66
- if (!o.affectsConfiguration(e))
64
+ u.affectsConfiguration(c) && r[c].set(d.get(c));
65
+ } : (u) => {
66
+ if (!u.affectsConfiguration(e))
67
67
  return;
68
68
  const d = S.getConfiguration(e);
69
69
  for (const c in t)
70
- o.affectsConfiguration(`${e}.${c}`) && r[c].set(d.get(c));
70
+ u.affectsConfiguration(`${e}.${c}`) && r[c].set(d.get(c));
71
71
  }
72
72
  ));
73
73
  }), r;
74
74
  }
75
- function Se(e, t, n) {
76
- const i = se(e, t, n), a = {}, u = $({
77
- $update(r, o, d, c) {
78
- return i[r].update(o, d, c);
75
+ function ke(e, t, n) {
76
+ const i = le(e, t, n), a = {}, s = M({
77
+ $update(r, u, d, c) {
78
+ return i[r].update(u, d, c);
79
79
  },
80
- $set(r, o) {
81
- return i[r].set(o);
80
+ $set(r, u) {
81
+ return i[r].set(u);
82
82
  }
83
83
  });
84
84
  for (const r in t) {
85
- const o = r.split(".");
86
- let d = "", c = a, m = u;
87
- for (const b of o.slice(0, -1)) {
85
+ const u = r.split(".");
86
+ let d = "", c = a, m = s;
87
+ for (const b of u.slice(0, -1)) {
88
88
  d = d ? `${d}.${b}` : b;
89
89
  const T = c = c[b] || (c[b] = {});
90
90
  if (m[b])
91
91
  m = m[b];
92
92
  else {
93
- const N = $({});
93
+ const B = M({});
94
94
  Object.defineProperty(m, b, {
95
95
  enumerable: !0,
96
96
  get() {
97
- return N;
97
+ return B;
98
98
  },
99
- set(_) {
100
- function j(I, P, R) {
101
- if (I)
102
- for (const V in I)
103
- j(I[V], P ? `${P}.${V}` : V, R == null ? void 0 : R[V]);
99
+ set(ne) {
100
+ function q(A, I, y) {
101
+ if (A)
102
+ for (const O in A)
103
+ q(A[O], I ? `${I}.${O}` : O, y == null ? void 0 : y[O]);
104
104
  else
105
- i[P].value = R;
105
+ i[I].value = y;
106
106
  }
107
- j(T, d, _);
107
+ q(T, d, ne);
108
108
  }
109
- }), m = N;
109
+ }), m = B;
110
110
  }
111
111
  }
112
- const f = o[o.length - 1];
112
+ const f = u[u.length - 1];
113
113
  c[f] = null, Object.defineProperty(m, f, {
114
114
  enumerable: !0,
115
115
  get() {
@@ -120,19 +120,19 @@ function Se(e, t, n) {
120
120
  }
121
121
  });
122
122
  }
123
- return u;
124
- }
125
- function xe(e, t) {
126
- const n = g(null), i = [], a = (u) => (...r) => n.value ? n.value[u](...r) : (i.push([u, r]), null);
127
- return J(() => {
128
- n.value = ge(e, t);
129
- for (const [u, r] of i)
130
- n.value[u](...r);
123
+ return s;
124
+ }
125
+ function Re(e, t) {
126
+ const n = g(null), i = [], a = (s) => (...r) => n.value ? n.value[s](...r) : (i.push([s, r]), null);
127
+ return Z(() => {
128
+ n.value = we(e, t);
129
+ for (const [s, r] of i)
130
+ n.value[s](...r);
131
131
  }), {
132
132
  logger: n,
133
133
  outputChannel: h(() => {
134
- var u;
135
- return (u = n.value) == null ? void 0 : u.outputChannel;
134
+ var s;
135
+ return (s = n.value) == null ? void 0 : s.outputChannel;
136
136
  }),
137
137
  info: a("info"),
138
138
  warn: a("warn"),
@@ -145,121 +145,147 @@ function xe(e, t) {
145
145
  hide: a("hide")
146
146
  };
147
147
  }
148
- function Ee(e, ...t) {
149
- return O.executeCommand(e, ...t);
148
+ function ye(e, ...t) {
149
+ return V.executeCommand(e, ...t);
150
150
  }
151
- function ue(e, t = !1) {
152
- const n = y.value;
151
+ function de(e, t = !1) {
152
+ const n = R.value;
153
153
  if (!n && !t)
154
154
  throw new Error("Cannot get absolute path because the extension is not activated yet");
155
155
  return n == null ? void 0 : n.asAbsolutePath(e);
156
156
  }
157
- function pe(e, t = !1) {
158
- return h(() => ue(s(e), t));
157
+ function Oe(e, t = !1) {
158
+ return h(() => de(o(e), t));
159
159
  }
160
160
  function l(e) {
161
- return (K() ?? M).cleanups.push(e.dispose.bind(e)), e;
161
+ return (U() ?? L).cleanups.push(e.dispose.bind(e)), e;
162
162
  }
163
- const oe = w(() => {
163
+ const fe = C(() => {
164
164
  const e = g(v.activeColorTheme);
165
165
  return l(v.onDidChangeActiveColorTheme((t) => {
166
166
  e.value = t;
167
167
  })), e;
168
- }), ke = w(() => {
169
- const e = g(H.activeDebugSession);
170
- return l(H.onDidChangeActiveDebugSession((t) => {
168
+ }), Pe = C(() => {
169
+ const e = g(z.activeDebugSession);
170
+ return l(z.onDidChangeActiveDebugSession((t) => {
171
171
  e.value = t;
172
172
  })), h(() => e.value);
173
- }), ce = w(() => {
173
+ }), ve = C(() => {
174
174
  const e = g(v.activeTextEditor);
175
175
  return l(v.onDidChangeActiveTextEditor((t) => {
176
176
  e.value = t;
177
177
  })), e;
178
178
  });
179
- function le(e) {
179
+ function ge(e) {
180
180
  var n;
181
- const t = g((n = s(e)) == null ? void 0 : n.getText());
182
- return C(() => {
181
+ const t = g((n = o(e)) == null ? void 0 : n.getText());
182
+ return w(() => {
183
183
  var i;
184
- t.value = (i = s(e)) == null ? void 0 : i.getText();
184
+ t.value = (i = o(e)) == null ? void 0 : i.getText();
185
185
  }), l(S.onDidChangeTextDocument((i) => {
186
- i.document === s(e) && (t.value = i.document.getText());
186
+ i.document === o(e) && (t.value = i.document.getText());
187
187
  })), t;
188
188
  }
189
- function de(e, t, n, i = {}) {
189
+ function he(e, t, n, i = {}) {
190
190
  const {
191
191
  updateOn: a = ["effect", "documentChanged"]
192
192
  } = i;
193
- let u;
193
+ let s;
194
194
  const r = h(
195
195
  () => {
196
- u == null || u.dispose(), u = void 0;
197
- const c = s(t);
196
+ s == null || s.dispose(), s = void 0;
197
+ const c = o(t);
198
198
  if ("key" in c)
199
199
  return c;
200
200
  const m = v.createTextEditorDecorationType(c);
201
- return u = l(m), m;
201
+ return s = l(m), m;
202
202
  }
203
- ), o = async () => {
204
- const c = s(e);
203
+ ), u = async () => {
204
+ const c = o(e);
205
205
  c && c.setDecorations(
206
206
  r.value,
207
- typeof n == "function" ? await n(c) : s(n)
207
+ typeof n == "function" ? await n(c) : o(n)
208
208
  );
209
- }, d = a.includes("documentChanged") ? le(() => {
209
+ }, d = a.includes("documentChanged") ? ge(() => {
210
210
  var c;
211
- return (c = s(e)) == null ? void 0 : c.document;
211
+ return (c = o(e)) == null ? void 0 : c.document;
212
212
  }) : null;
213
- return a.includes("effect") ? C(async () => {
214
- d == null || d.value, await o();
215
- }) : d && D(d, o), {
213
+ return a.includes("effect") ? w(async () => {
214
+ d == null || d.value, await u();
215
+ }) : d && D(d, u), {
216
216
  /**
217
217
  * Manually trigger the decoration update.
218
218
  */
219
- update: o
219
+ update: u
220
220
  };
221
221
  }
222
- function ye(e, t, n = {}) {
223
- const i = ce();
224
- return de(i, e, t, n);
222
+ function Ve(e, t, n = {}) {
223
+ const i = ve();
224
+ return he(i, e, t, n);
225
225
  }
226
- const Re = w(() => {
226
+ const Ae = C(() => {
227
227
  const e = g(v.activeNotebookEditor);
228
228
  return l(v.onDidChangeActiveNotebookEditor((t) => {
229
229
  e.value = t;
230
230
  })), e;
231
- }), Ve = w(() => {
231
+ }), Ie = C(() => {
232
232
  const e = g(v.activeTerminal);
233
233
  return l(v.onDidChangeActiveTerminal((t) => {
234
234
  e.value = t;
235
235
  })), e;
236
- }), Ae = w(() => {
237
- const e = g(W.all);
238
- return l(W.onDidChange(() => {
239
- e.value = W.all;
236
+ }), We = C(() => {
237
+ const e = g($.all);
238
+ return l($.onDidChange(() => {
239
+ e.value = $.all;
240
240
  })), h(() => e.value);
241
241
  });
242
- function fe(e, t) {
243
- l(O.registerCommand(e, t));
242
+ function _(e, t, n) {
243
+ for (const i of n) {
244
+ const a = t[i];
245
+ a !== void 0 && w(() => {
246
+ e[i] = o(a);
247
+ });
248
+ }
244
249
  }
245
- function Oe(e) {
250
+ function p(e, t) {
251
+ const n = (i, a, s) => {
252
+ l(e(i, a, s));
253
+ };
254
+ return t == null || t.forEach((i) => n(i)), n;
255
+ }
256
+ const $e = j((e, t, n = {}) => {
257
+ const i = l(re.createChatParticipant(e, W(t)));
258
+ return _(i, n, [
259
+ "iconPath"
260
+ ]), n.followupProvider !== void 0 && w(() => {
261
+ i.followupProvider = W(n.followupProvider);
262
+ }), w(() => {
263
+ i.requestHandler = W(t);
264
+ }), {
265
+ onDidReceiveFeedback: p(i.onDidReceiveFeedback)
266
+ };
267
+ }, (e) => e);
268
+ function me(e, t) {
269
+ l(V.registerCommand(e, t));
270
+ }
271
+ function Fe(e) {
246
272
  for (const [t, n] of Object.entries(e))
247
- n && fe(t, n);
273
+ n && me(t, n);
248
274
  }
249
- function Ie(e, t) {
250
- return l(ne.createCommentController(e, t));
275
+ function Me(e, t) {
276
+ return l(oe.createCommentController(e, t));
251
277
  }
252
- function X(e) {
278
+ function ee(e) {
253
279
  var n;
254
- const t = g((n = s(e)) == null ? void 0 : n.state);
280
+ const t = g((n = o(e)) == null ? void 0 : n.state);
255
281
  return D(e, () => {
256
282
  var i;
257
- t.value = (i = s(e)) == null ? void 0 : i.state;
283
+ t.value = (i = o(e)) == null ? void 0 : i.state;
258
284
  }), l(v.onDidChangeTerminalState((i) => {
259
- i === s(e) && (t.value = i.state);
285
+ i === o(e) && (t.value = i.state);
260
286
  })), h(() => t.value);
261
287
  }
262
- function Pe(...e) {
288
+ function Le(...e) {
263
289
  const t = x(null);
264
290
  function n() {
265
291
  return !!t.value && t.value.exitStatus == null;
@@ -267,48 +293,42 @@ function Pe(...e) {
267
293
  function i() {
268
294
  return n() ? t.value : t.value = v.createTerminal(...e);
269
295
  }
270
- function a(o) {
271
- i().sendText(o);
296
+ function a(u) {
297
+ i().sendText(u);
272
298
  }
273
- function u() {
299
+ function s() {
274
300
  i().show();
275
301
  }
276
302
  function r() {
277
303
  n() && (t.value.sendText(""), t.value.dispose(), t.value = null);
278
304
  }
279
- return F(r), {
305
+ return N(r), {
280
306
  terminal: t,
281
307
  getIsActive: n,
282
- show: u,
308
+ show: s,
283
309
  sendText: a,
284
310
  close: r,
285
- state: X(t)
311
+ state: ee(t)
286
312
  };
287
313
  }
288
- const We = w(() => {
289
- const e = g(p.shell);
290
- return l(p.onDidChangeShell((t) => {
314
+ const Ne = C(() => {
315
+ const e = g(E.shell);
316
+ return l(E.onDidChangeShell((t) => {
291
317
  e.value = t;
292
318
  })), h(() => e.value);
293
319
  });
294
- function E(e, t) {
295
- const n = (i, a, u) => {
296
- l(e(i, a, u));
297
- };
298
- return t == null || t.forEach((i) => n(i)), n;
299
- }
300
- function A(e, t = []) {
301
- const n = Array.isArray(e) ? e : t ?? [], i = l(Array.isArray(e) || e == null ? new U() : e), a = E(i.event, n);
302
- for (const u of n)
303
- a(u);
320
+ function P(e, t = []) {
321
+ const n = Array.isArray(e) ? e : t ?? [], i = l(Array.isArray(e) || e == null ? new G() : e), a = p(i.event, n);
322
+ for (const s of n)
323
+ a(s);
304
324
  return {
305
325
  event: i.event,
306
326
  fire: i.fire.bind(i),
307
327
  addListener: a
308
328
  };
309
329
  }
310
- async function $e(e) {
311
- const t = y.value.secrets, n = x(await t.get(e));
330
+ async function je(e) {
331
+ const t = R.value.secrets, n = x(await t.get(e));
312
332
  return n.set = async (i) => {
313
333
  n.value = i, await t.store(e, i);
314
334
  }, n.remove = async () => {
@@ -319,30 +339,30 @@ async function $e(e) {
319
339
  i === void 0 ? t.delete(e) : t.store(e, i);
320
340
  }), n;
321
341
  }
322
- function Me(e) {
323
- return h(() => k.fetchTasks(s(e)));
342
+ function He(e) {
343
+ return h(() => k.fetchTasks(o(e)));
324
344
  }
325
- function Fe(e) {
326
- return h(() => ie.file(s(e)));
345
+ function Be(e) {
346
+ return h(() => se.file(o(e)));
327
347
  }
328
- function Le(e, t) {
329
- const n = new U(), i = g();
330
- C(() => {
331
- i.value && n.fire(), i.value = s(t);
332
- }), l(ae.registerFoldingRangeProvider(
348
+ function qe(e, t) {
349
+ const n = new G(), i = g();
350
+ w(() => {
351
+ i.value && n.fire(), i.value = o(t);
352
+ }), l(ue.registerFoldingRangeProvider(
333
353
  e,
334
354
  {
335
355
  onDidChangeFoldingRanges: n.event,
336
- provideFoldingRanges(a, u, r) {
337
- var o;
338
- return (o = i.value) == null ? void 0 : o.call(i, a, u, r);
356
+ provideFoldingRanges(a, s, r) {
357
+ var u;
358
+ return (u = i.value) == null ? void 0 : u.call(i, a, s, r);
339
359
  }
340
360
  }
341
361
  ));
342
362
  }
343
- function Ne(e, t, n, i) {
344
- const a = $(/* @__PURE__ */ new Map()), u = A(), r = A(), o = A(), d = h(() => {
345
- const f = s(e);
363
+ function ze(e, t, n, i) {
364
+ const a = M(/* @__PURE__ */ new Map()), s = P(), r = P(), u = P(), d = h(() => {
365
+ const f = o(e);
346
366
  return Array.isArray(f) ? f : f instanceof Set ? Array.from(f) : [f];
347
367
  });
348
368
  function c() {
@@ -353,11 +373,11 @@ function Ne(e, t, n, i) {
353
373
  if (!a.has(b)) {
354
374
  const T = S.createFileSystemWatcher(
355
375
  b,
356
- s(t) || !1,
357
- s(n) || !1,
358
- s(i) || !1
376
+ o(t) || !1,
377
+ o(n) || !1,
378
+ o(i) || !1
359
379
  );
360
- T.onDidCreate(u.fire), T.onDidChange(r.fire), T.onDidDelete(o.fire), a.set(b, T);
380
+ T.onDidCreate(s.fire), T.onDidChange(r.fire), T.onDidDelete(u.fire), a.set(b, T);
361
381
  }
362
382
  }
363
383
  function m() {
@@ -367,43 +387,49 @@ function Ne(e, t, n, i) {
367
387
  }
368
388
  return c(), D(d, c), D(
369
389
  () => [
370
- s(t),
371
- s(n),
372
- s(i)
390
+ o(t),
391
+ o(n),
392
+ o(i)
373
393
  ],
374
394
  () => {
375
395
  m(), c();
376
396
  }
377
- ), F(m), {
397
+ ), N(m), {
378
398
  watchers: a,
379
- onDidCreate: u.event,
399
+ onDidCreate: s.event,
380
400
  onDidChange: r.event,
381
- onDidDelete: o.event
401
+ onDidDelete: u.event
382
402
  };
383
403
  }
384
- const je = w(() => {
385
- const e = oe();
386
- return h(() => e.value.kind === B.Dark || e.value.kind === B.HighContrast);
387
- }), He = w(() => {
388
- const e = g(p.isTelemetryEnabled);
389
- return l(p.onDidChangeTelemetryEnabled((t) => {
404
+ const Ke = C(() => {
405
+ const e = fe();
406
+ return h(() => e.value.kind === K.Dark || e.value.kind === K.HighContrast);
407
+ }), Qe = C(() => {
408
+ const e = g(E.isTelemetryEnabled);
409
+ return l(E.onDidChangeTelemetryEnabled((t) => {
390
410
  e.value = t;
391
411
  })), h(() => e.value);
392
412
  });
393
- function Be(e, ...t) {
394
- return h(() => typeof t[0] == "object" ? z.t(s(e), ee(t[0])) : z.t(s(e), ...t.map(s)));
413
+ function Ue(e, ...t) {
414
+ return h(() => typeof t[0] == "object" ? Q.t(o(e), ie(t[0])) : Q.t(o(e), ...t.map(o)));
395
415
  }
396
- function ve(e, t) {
416
+ const Ye = C(() => {
417
+ const e = g(F.tools);
418
+ return l(F.onDidChangeChatModels(() => {
419
+ e.value = F.tools;
420
+ })), h(() => e.value);
421
+ });
422
+ function be(e, t) {
397
423
  return l(v.createOutputChannel(e, t));
398
424
  }
399
- function ze(e) {
400
- const t = /* @__PURE__ */ new Date(), n = String(t.getFullYear()).padStart(4, "0"), i = String(t.getMonth() + 1).padStart(2, "0"), a = String(t.getDate()).padStart(2, "0"), u = String(t.getHours()).padStart(2, "0"), r = String(t.getMinutes()).padStart(2, "0"), o = String(t.getSeconds()).padStart(2, "0"), d = String(t.getMilliseconds()).padStart(3, "0");
401
- return `${n}-${i}-${a} ${u}:${r}:${o}.${d} [${e}] `;
425
+ function Ge(e) {
426
+ const t = /* @__PURE__ */ new Date(), n = String(t.getFullYear()).padStart(4, "0"), i = String(t.getMonth() + 1).padStart(2, "0"), a = String(t.getDate()).padStart(2, "0"), s = String(t.getHours()).padStart(2, "0"), r = String(t.getMinutes()).padStart(2, "0"), u = String(t.getSeconds()).padStart(2, "0"), d = String(t.getMilliseconds()).padStart(3, "0");
427
+ return `${n}-${i}-${a} ${s}:${r}:${u}.${d} [${e}] `;
402
428
  }
403
- function ge(e, t = {}) {
404
- const n = t.outputChannel ?? ve(e, { log: !0 }), i = (a) => (...u) => {
429
+ function we(e, t = {}) {
430
+ const n = t.outputChannel ?? be(e, { log: !0 }), i = (a) => (...s) => {
405
431
  var r;
406
- n.appendLine((((r = t.getPrefix) == null ? void 0 : r.call(t, a)) ?? "") + u.join(" "));
432
+ n.appendLine((((r = t.getPrefix) == null ? void 0 : r.call(t, a)) ?? "") + s.join(" "));
407
433
  };
408
434
  return {
409
435
  outputChannel: n,
@@ -419,33 +445,33 @@ function ge(e, t = {}) {
419
445
  hide: n.hide.bind(n)
420
446
  };
421
447
  }
422
- const Ke = w(() => {
423
- const e = g(p.logLevel);
424
- return l(p.onDidChangeLogLevel((t) => {
448
+ const Je = C(() => {
449
+ const e = g(E.logLevel);
450
+ return l(E.onDidChangeLogLevel((t) => {
425
451
  e.value = t;
426
452
  })), h(() => e.value);
427
453
  });
428
- function he(e) {
454
+ function Ce(e) {
429
455
  var n;
430
- const t = g(((n = s(e)) == null ? void 0 : n.selections) ?? []);
456
+ const t = g(((n = o(e)) == null ? void 0 : n.selections) ?? []);
431
457
  return D(e, () => {
432
458
  var i;
433
- t.value = ((i = s(e)) == null ? void 0 : i.selections) ?? [];
459
+ t.value = ((i = o(e)) == null ? void 0 : i.selections) ?? [];
434
460
  }), l(v.onDidChangeNotebookEditorSelection((i) => {
435
- i.notebookEditor === s(e) && (t.value = i.selections);
461
+ i.notebookEditor === o(e) && (t.value = i.selections);
436
462
  })), h({
437
463
  get() {
438
464
  return t.value;
439
465
  },
440
466
  set(i) {
441
467
  t.value = i;
442
- const a = s(e);
468
+ const a = o(e);
443
469
  a && (a.selections = i);
444
470
  }
445
471
  });
446
472
  }
447
- function Qe(e) {
448
- const t = he(e);
473
+ function Xe(e) {
474
+ const t = Ce(e);
449
475
  return h({
450
476
  get() {
451
477
  return t.value[0];
@@ -455,25 +481,25 @@ function Qe(e) {
455
481
  }
456
482
  });
457
483
  }
458
- function Ue(e) {
484
+ function Ze(e) {
459
485
  var n;
460
- const t = g(((n = s(e)) == null ? void 0 : n.visibleRanges) ?? []);
486
+ const t = g(((n = o(e)) == null ? void 0 : n.visibleRanges) ?? []);
461
487
  return D(e, () => {
462
488
  var i;
463
- t.value = ((i = s(e)) == null ? void 0 : i.visibleRanges) ?? [];
489
+ t.value = ((i = o(e)) == null ? void 0 : i.visibleRanges) ?? [];
464
490
  }), l(v.onDidChangeNotebookEditorVisibleRanges((i) => {
465
- i.notebookEditor === s(e) && (t.value = i.visibleRanges);
491
+ i.notebookEditor === o(e) && (t.value = i.visibleRanges);
466
492
  })), h(() => t.value);
467
493
  }
468
- const qe = w(() => {
494
+ const _e = C(() => {
469
495
  const e = g(v.terminals);
470
496
  function t() {
471
497
  e.value = v.terminals;
472
498
  }
473
499
  return l(v.onDidOpenTerminal(t)), l(v.onDidCloseTerminal(t)), e;
474
500
  });
475
- function Ye(e = {}) {
476
- const t = l(v.createQuickPick()), n = E(t.onDidChangeActive), i = E(t.onDidChangeSelection), a = E(t.onDidAccept), u = E(t.onDidHide), r = E(t.onDidTriggerButton), o = E(t.onDidChangeValue);
501
+ function et(e = {}) {
502
+ const t = l(v.createQuickPick()), n = p(t.onDidChangeActive), i = p(t.onDidChangeSelection), a = p(t.onDidAccept), s = p(t.onDidHide), r = p(t.onDidTriggerButton), u = p(t.onDidChangeValue);
477
503
  [
478
504
  "items",
479
505
  "buttons",
@@ -489,10 +515,10 @@ function Ye(e = {}) {
489
515
  "matchOnDetail",
490
516
  "keepScrollPosition"
491
517
  ].forEach((f) => {
492
- e[f] && C(() => t[f] = s(e[f]));
518
+ e[f] && w(() => t[f] = o(e[f]));
493
519
  }), e.value && (t.value = e.value);
494
520
  const d = g(t.value);
495
- o((f) => d.value = f), e.activeItems && (t.activeItems = e.activeItems);
521
+ u((f) => d.value = f), e.activeItems && (t.activeItems = e.activeItems);
496
522
  const c = g(t.activeItems);
497
523
  n((f) => c.value = f), e.selectedItems && (t.selectedItems = e.selectedItems);
498
524
  const m = g(t.selectedItems);
@@ -501,21 +527,17 @@ function Ye(e = {}) {
501
527
  onDidChangeActive: n,
502
528
  onDidChangeSelection: i,
503
529
  onDidAccept: a,
504
- onDidHide: u,
530
+ onDidHide: s,
505
531
  onDidTriggerButton: r,
506
- onDidChangeValue: o,
532
+ onDidChangeValue: u,
507
533
  value: d,
508
534
  activeItems: c,
509
535
  selectedItems: m
510
536
  };
511
537
  }
512
- function Ge(e) {
538
+ function tt(e) {
513
539
  const t = l(e.id ? v.createStatusBarItem(e.id, e.alignment, e.priority) : v.createStatusBarItem(e.alignment, e.priority));
514
- function n(i) {
515
- const a = e[i];
516
- a != null && C(() => t[i] = s(a));
517
- }
518
- return [
540
+ return _(t, e, [
519
541
  "name",
520
542
  "text",
521
543
  "tooltip",
@@ -523,18 +545,18 @@ function Ge(e) {
523
545
  "backgroundColor",
524
546
  "command",
525
547
  "accessibilityInformation"
526
- ].forEach(n), e.visible != null ? C(() => {
527
- s(e.visible) ? t.show() : t.hide();
548
+ ]), e.visible != null ? w(() => {
549
+ o(e.visible) ? t.show() : t.hide();
528
550
  }) : t.show(), t;
529
551
  }
530
- const Je = w(() => {
552
+ const nt = C(() => {
531
553
  const e = g(k.taskExecutions);
532
554
  function t() {
533
555
  e.value = k.taskExecutions;
534
556
  }
535
557
  return l(k.onDidStartTask(t)), l(k.onDidEndTask(t)), h(() => e.value);
536
558
  });
537
- function Xe(...e) {
559
+ function it(...e) {
538
560
  const t = l(v.createTerminal(...e));
539
561
  return {
540
562
  terminal: t,
@@ -556,38 +578,38 @@ function Xe(...e) {
556
578
  sendText: t.sendText.bind(t),
557
579
  show: t.show.bind(t),
558
580
  hide: t.hide.bind(t),
559
- state: X(t)
581
+ state: ee(t)
560
582
  };
561
583
  }
562
- function me(e, t) {
563
- l(O.registerTextEditorCommand(e, t));
584
+ function De(e, t) {
585
+ l(V.registerTextEditorCommand(e, t));
564
586
  }
565
- function Ze(e) {
587
+ function at(e) {
566
588
  for (const [t, n] of Object.entries(e))
567
- me(t, n);
589
+ De(t, n);
568
590
  }
569
- function be(e, t) {
591
+ function Te(e, t) {
570
592
  var i;
571
- const n = g(((i = s(e)) == null ? void 0 : i.selections) ?? []);
593
+ const n = g(((i = o(e)) == null ? void 0 : i.selections) ?? []);
572
594
  return D(e, () => {
573
595
  var a;
574
- n.value = ((a = s(e)) == null ? void 0 : a.selections) ?? [];
596
+ n.value = ((a = o(e)) == null ? void 0 : a.selections) ?? [];
575
597
  }), l(v.onDidChangeTextEditorSelection((a) => {
576
- const u = s(e), r = s(t);
577
- a.textEditor === u && (!r || r.includes(a.kind)) && (n.value = a.selections);
598
+ const s = o(e), r = o(t);
599
+ a.textEditor === s && (!r || r.includes(a.kind)) && (n.value = a.selections);
578
600
  })), h({
579
601
  get() {
580
602
  return n.value;
581
603
  },
582
604
  set(a) {
583
605
  n.value = a;
584
- const u = s(e);
585
- u && (u.selections = a);
606
+ const s = o(e);
607
+ s && (s.selections = a);
586
608
  }
587
609
  });
588
610
  }
589
- function _e(e, t) {
590
- const n = be(e, t);
611
+ function rt(e, t) {
612
+ const n = Te(e, t);
591
613
  return h({
592
614
  get() {
593
615
  return n.value[0];
@@ -597,43 +619,43 @@ function _e(e, t) {
597
619
  }
598
620
  });
599
621
  }
600
- function et(e) {
622
+ function ot(e) {
601
623
  var n;
602
- const t = g((n = s(e)) == null ? void 0 : n.viewColumn);
624
+ const t = g((n = o(e)) == null ? void 0 : n.viewColumn);
603
625
  return D(e, () => {
604
626
  var i;
605
- t.value = (i = s(e)) == null ? void 0 : i.viewColumn;
627
+ t.value = (i = o(e)) == null ? void 0 : i.viewColumn;
606
628
  }), l(v.onDidChangeTextEditorViewColumn((i) => {
607
- i.textEditor === s(e) && (t.value = i.viewColumn);
629
+ i.textEditor === o(e) && (t.value = i.viewColumn);
608
630
  })), h(() => t.value);
609
631
  }
610
- function tt(e) {
632
+ function st(e) {
611
633
  var n;
612
- const t = g(((n = s(e)) == null ? void 0 : n.visibleRanges) ?? []);
634
+ const t = g(((n = o(e)) == null ? void 0 : n.visibleRanges) ?? []);
613
635
  return D(e, () => {
614
636
  var i;
615
- t.value = ((i = s(e)) == null ? void 0 : i.visibleRanges) ?? [];
637
+ t.value = ((i = o(e)) == null ? void 0 : i.visibleRanges) ?? [];
616
638
  }), l(v.onDidChangeTextEditorVisibleRanges((i) => {
617
- i.textEditor === s(e) && (t.value = i.visibleRanges);
639
+ i.textEditor === o(e) && (t.value = i.visibleRanges);
618
640
  })), h(() => t.value);
619
641
  }
620
- function Z(e, t) {
621
- C(() => {
622
- const n = s(e);
623
- n && (n.badge = s(t));
642
+ function te(e, t) {
643
+ w(() => {
644
+ const n = o(e);
645
+ n && (n.badge = o(t));
624
646
  });
625
647
  }
626
- function L(e, t) {
627
- C(() => {
628
- const n = s(e);
629
- n && (n.title = s(t));
648
+ function H(e, t) {
649
+ w(() => {
650
+ const n = o(e);
651
+ n && (n.title = o(t));
630
652
  });
631
653
  }
632
- const nt = q(
654
+ const ut = j(
633
655
  (e, t, n) => {
634
- const i = A();
656
+ const i = P();
635
657
  D(t, () => i.fire()), n != null && n.watchSource && D(n.watchSource, () => i.fire());
636
- const a = /* @__PURE__ */ new WeakMap(), u = l(v.createTreeView(e, {
658
+ const a = /* @__PURE__ */ new WeakMap(), s = l(v.createTreeView(e, {
637
659
  ...n,
638
660
  treeDataProvider: {
639
661
  ...n,
@@ -643,86 +665,86 @@ const nt = q(
643
665
  },
644
666
  async getChildren(r) {
645
667
  if (r) {
646
- const o = await r.children;
647
- return o == null || o.forEach((d) => a.set(d, r)), o;
668
+ const u = await r.children;
669
+ return u == null || u.forEach((d) => a.set(d, r)), u;
648
670
  }
649
- return s(t);
671
+ return o(t);
650
672
  },
651
673
  getParent(r) {
652
674
  return a.get(r);
653
675
  }
654
676
  }
655
677
  }));
656
- return n != null && n.title && L(u, n.title), n != null && n.badge && Z(u, n.badge), u;
678
+ return n != null && n.title && H(s, n.title), n != null && n.badge && te(s, n.badge), s;
657
679
  },
658
680
  (e) => e
659
681
  );
660
- function it(e) {
682
+ function ct(e) {
661
683
  var i;
662
- const t = x((i = s(e)) == null ? void 0 : i.visible);
684
+ const t = x((i = o(e)) == null ? void 0 : i.visible);
663
685
  function n() {
664
686
  var a;
665
- t.value = (a = s(e)) == null ? void 0 : a.visible;
687
+ t.value = (a = o(e)) == null ? void 0 : a.visible;
666
688
  }
667
- return C((a) => {
668
- const u = s(e);
669
- if (u) {
670
- const r = u.onDidChangeVisibility(n);
689
+ return w((a) => {
690
+ const s = o(e);
691
+ if (s) {
692
+ const r = s.onDidChangeVisibility(n);
671
693
  a(() => r.dispose());
672
694
  }
673
- }), C(n), h(() => !!t.value);
695
+ }), w(n), h(() => !!t.value);
674
696
  }
675
- const at = w(() => {
697
+ const lt = C(() => {
676
698
  const e = g(v.visibleNotebookEditors);
677
699
  return l(v.onDidChangeVisibleNotebookEditors((t) => {
678
700
  e.value = t;
679
701
  })), e;
680
- }), rt = w(() => {
702
+ }), dt = C(() => {
681
703
  const e = g(v.visibleTextEditors);
682
704
  return l(v.onDidChangeVisibleTextEditors((t) => {
683
705
  e.value = t;
684
706
  })), e;
685
707
  });
686
- function st(e, t, n = !0) {
687
- const i = te(t) ? t : typeof t == "function" ? h(t) : x(t);
688
- return C(() => {
689
- s(n) && O.executeCommand("setContext", e, i.value);
708
+ function ft(e, t, n = !0) {
709
+ const i = ae(t) ? t : typeof t == "function" ? h(t) : x(t);
710
+ return w(() => {
711
+ o(n) && V.executeCommand("setContext", e, i.value);
690
712
  }), i;
691
713
  }
692
- function ut(e, t, n, i, a) {
693
- const u = g(), r = l(v.createWebviewPanel(
714
+ function vt(e, t, n, i, a) {
715
+ const s = g(), r = l(v.createWebviewPanel(
694
716
  e,
695
- s(t),
717
+ o(t),
696
718
  i,
697
719
  {
698
720
  enableFindWidget: a == null ? void 0 : a.enableFindWidget,
699
721
  retainContextWhenHidden: a == null ? void 0 : a.retainContextWhenHidden,
700
- ...s(a == null ? void 0 : a.webviewOptions)
722
+ ...o(a == null ? void 0 : a.webviewOptions)
701
723
  }
702
724
  ));
703
725
  a != null && a.onDidReceiveMessage && r.webview.onDidReceiveMessage(a.onDidReceiveMessage);
704
- const o = x(0);
726
+ const u = x(0);
705
727
  function d() {
706
- o.value++;
728
+ u.value++;
707
729
  }
708
- if (C(() => {
709
- r.webview.html = `${s(n)}<!--${o.value}-->`;
730
+ if (w(() => {
731
+ r.webview.html = `${o(n)}<!--${u.value}-->`;
710
732
  }), a != null && a.webviewOptions) {
711
733
  const b = a.webviewOptions;
712
- C(() => {
713
- r.webview.options = s(b);
734
+ w(() => {
735
+ r.webview.options = o(b);
714
736
  });
715
737
  }
716
- L(r, t);
738
+ H(r, t);
717
739
  function c(b) {
718
740
  return r.webview.postMessage(b);
719
741
  }
720
742
  const m = x(r.active), f = x(r.visible);
721
743
  return l(r.onDidChangeViewState(() => {
722
744
  m.value = r.active, f.value = r.visible;
723
- })), { panel: r, context: u, active: m, visible: f, postMessage: c, forceRefresh: d };
745
+ })), { panel: r, context: s, active: m, visible: f, postMessage: c, forceRefresh: d };
724
746
  }
725
- const ot = q(
747
+ const gt = j(
726
748
  (e, t, n) => {
727
749
  const i = g(), a = g();
728
750
  l(v.registerWebviewViewProvider(
@@ -738,27 +760,27 @@ const ot = q(
738
760
  }
739
761
  }
740
762
  ));
741
- const u = x(0);
763
+ const s = x(0);
742
764
  function r() {
743
- u.value++;
765
+ s.value++;
744
766
  }
745
- if (C(() => {
746
- i.value && (i.value.webview.html = `${s(t)}<!--${u.value}-->`);
767
+ if (w(() => {
768
+ i.value && (i.value.webview.html = `${o(t)}<!--${s.value}-->`);
747
769
  }), n != null && n.webviewOptions) {
748
770
  const d = n.webviewOptions;
749
- C(() => {
750
- i.value && (i.value.webview.options = s(d));
771
+ w(() => {
772
+ i.value && (i.value.webview.options = o(d));
751
773
  });
752
774
  }
753
- n != null && n.title && L(i, n.title), n != null && n.badge && Z(i, n.badge);
754
- function o(d) {
775
+ n != null && n.title && H(i, n.title), n != null && n.badge && te(i, n.badge);
776
+ function u(d) {
755
777
  var c;
756
778
  return (c = i.value) == null ? void 0 : c.webview.postMessage(d);
757
779
  }
758
- return { view: i, context: a, postMessage: o, forceRefresh: r };
780
+ return { view: i, context: a, postMessage: u, forceRefresh: r };
759
781
  },
760
782
  (e) => e
761
- ), ct = w(() => {
783
+ ), ht = C(() => {
762
784
  const e = g(v.state);
763
785
  return l(v.onDidChangeWindowState((t) => {
764
786
  e.value = t;
@@ -766,81 +788,83 @@ const ot = q(
766
788
  focused: h(() => e.value.focused),
767
789
  active: h(() => e.value.active)
768
790
  };
769
- }), lt = w(() => {
791
+ }), mt = C(() => {
770
792
  const e = g(S.workspaceFolders);
771
793
  return l(S.onDidChangeWorkspaceFolders(() => {
772
794
  e.value = S.workspaceFolders;
773
795
  })), h(() => e.value);
774
796
  });
775
797
  export {
776
- G as activateCbs,
777
- q as createKeyedComposable,
778
- w as createSingletonComposable,
779
- Y as deactivateCbs,
780
- Se as defineConfigObject,
781
- se as defineConfigs,
782
- Te as defineExtension,
783
- xe as defineLogger,
784
- Ee as executeCommand,
785
- y as extensionContext,
786
- M as extensionScope,
787
- ze as getDefaultLoggerPrefix,
788
- J as onActivate,
789
- De as onDeactivate,
790
- re as tryOnScopeDispose,
791
- pe as useAbsolutePath,
792
- oe as useActiveColorTheme,
793
- ke as useActiveDebugSession,
794
- ye as useActiveEditorDecorations,
795
- Re as useActiveNotebookEditor,
796
- Ve as useActiveTerminal,
797
- ce as useActiveTextEditor,
798
- Ae as useAllExtensions,
799
- fe as useCommand,
800
- Oe as useCommands,
801
- Ie as useCommentController,
802
- Pe as useControlledTerminal,
803
- We as useDefaultShell,
798
+ X as activateCbs,
799
+ j as createKeyedComposable,
800
+ C as createSingletonComposable,
801
+ J as deactivateCbs,
802
+ ke as defineConfigObject,
803
+ le as defineConfigs,
804
+ Ee as defineExtension,
805
+ Re as defineLogger,
806
+ ye as executeCommand,
807
+ R as extensionContext,
808
+ L as extensionScope,
809
+ Ge as getDefaultLoggerPrefix,
810
+ Z as onActivate,
811
+ xe as onDeactivate,
812
+ ce as tryOnScopeDispose,
813
+ Oe as useAbsolutePath,
814
+ fe as useActiveColorTheme,
815
+ Pe as useActiveDebugSession,
816
+ Ve as useActiveEditorDecorations,
817
+ Ae as useActiveNotebookEditor,
818
+ Ie as useActiveTerminal,
819
+ ve as useActiveTextEditor,
820
+ We as useAllExtensions,
821
+ $e as useChatParticipant,
822
+ me as useCommand,
823
+ Fe as useCommands,
824
+ Me as useCommentController,
825
+ Le as useControlledTerminal,
826
+ Ne as useDefaultShell,
804
827
  l as useDisposable,
805
- le as useDocumentText,
806
- de as useEditorDecorations,
807
- E as useEvent,
808
- A as useEventEmitter,
809
- $e as useExtensionSecret,
810
- Me as useFetchTasks,
811
- Fe as useFileUri,
812
- Le as useFoldingRangeProvider,
813
- Ne as useFsWatcher,
814
- je as useIsDarkTheme,
815
- He as useIsTelemetryEnabled,
816
- Be as useL10nText,
817
- Ke as useLogLevel,
818
- ge as useLogger,
819
- Qe as useNotebookEditorSelection,
820
- he as useNotebookEditorSelections,
821
- Ue as useNotebookEditorVisibleRanges,
822
- qe as useOpenedTerminals,
823
- ve as useOutputChannel,
824
- Ye as useQuickPick,
825
- Ge as useStatusBarItem,
826
- Je as useTaskExecutions,
827
- Xe as useTerminal,
828
- X as useTerminalState,
829
- me as useTextEditorCommand,
830
- Ze as useTextEditorCommands,
831
- _e as useTextEditorSelection,
832
- be as useTextEditorSelections,
833
- et as useTextEditorViewColumn,
834
- tt as useTextEditorVisibleRanges,
835
- nt as useTreeView,
836
- Z as useViewBadge,
837
- L as useViewTitle,
838
- it as useViewVisibility,
839
- at as useVisibleNotebookEditors,
840
- rt as useVisibleTextEditors,
841
- st as useVscodeContext,
842
- ut as useWebviewPanel,
843
- ot as useWebviewView,
844
- ct as useWindowState,
845
- lt as useWorkspaceFolders
828
+ ge as useDocumentText,
829
+ he as useEditorDecorations,
830
+ p as useEvent,
831
+ P as useEventEmitter,
832
+ je as useExtensionSecret,
833
+ He as useFetchTasks,
834
+ Be as useFileUri,
835
+ qe as useFoldingRangeProvider,
836
+ ze as useFsWatcher,
837
+ Ke as useIsDarkTheme,
838
+ Qe as useIsTelemetryEnabled,
839
+ Ue as useL10nText,
840
+ Ye as useLmTools,
841
+ Je as useLogLevel,
842
+ we as useLogger,
843
+ Xe as useNotebookEditorSelection,
844
+ Ce as useNotebookEditorSelections,
845
+ Ze as useNotebookEditorVisibleRanges,
846
+ _e as useOpenedTerminals,
847
+ be as useOutputChannel,
848
+ et as useQuickPick,
849
+ tt as useStatusBarItem,
850
+ nt as useTaskExecutions,
851
+ it as useTerminal,
852
+ ee as useTerminalState,
853
+ De as useTextEditorCommand,
854
+ at as useTextEditorCommands,
855
+ rt as useTextEditorSelection,
856
+ Te as useTextEditorSelections,
857
+ ot as useTextEditorViewColumn,
858
+ st as useTextEditorVisibleRanges,
859
+ ut as useTreeView,
860
+ te as useViewBadge,
861
+ H as useViewTitle,
862
+ ct as useViewVisibility,
863
+ lt as useVisibleNotebookEditors,
864
+ dt as useVisibleTextEditors,
865
+ ft as useVscodeContext,
866
+ vt as useWebviewPanel,
867
+ gt as useWebviewView,
868
+ ht as useWindowState,
869
+ mt as useWorkspaceFolders
846
870
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "reactive-vscode",
3
3
  "type": "module",
4
- "version": "0.2.21",
4
+ "version": "0.3.0",
5
5
  "description": "Develop VSCode extension with Vue Reactivity API",
6
6
  "author": "_Kerman <kermanx@qq.com>",
7
7
  "license": "MIT",
@@ -35,14 +35,14 @@
35
35
  "dist"
36
36
  ],
37
37
  "peerDependencies": {
38
- "@types/vscode": "^1.99.1"
38
+ "@types/vscode": "^1.101.0"
39
39
  },
40
40
  "dependencies": {
41
- "@reactive-vscode/reactivity": "0.2.21"
41
+ "@reactive-vscode/reactivity": "0.3.0"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@types/node": "^20.19.1",
45
- "@types/vscode": "^1.99.1",
45
+ "@types/vscode": "^1.101.0",
46
46
  "typescript": "^5.8.3",
47
47
  "vite": "^5.4.19",
48
48
  "vite-plugin-dts": "^4.5.4"