reactive-vscode 0.3.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/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 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]})});
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("@reactive-vscode/reactivity"),s=require("vscode");function L(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)),L(()=>{--c.refCount===0&&o.delete(i)}),c.data}}function g(e){let t=!1,o;return()=>(t||(o=n.effectScope(!0).run(e),t=!0),o)}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 M(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=M(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 W=n.shallowReactive({});Object.defineProperty(w,h,{enumerable:!0,get(){return W},set(Y){function F(S,x,V){if(S)for(const D in S)F(S[D],x?`${x}.${D}`:D,V==null?void 0:V[D]);else a[x].value=V}F(m,f,Y)}}),w=W}}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 N=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)}),$=g(()=>{const e=n.shallowRef(s.window.activeTextEditor);return d(s.window.onDidChangeActiveTextEditor(t=>{e.value=t})),e});function j(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 H(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")?j(()=>{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=$();return H(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 b(e,t){const o=(a,i,c)=>{d(e(a,i,c))};return t==null||t.forEach(a=>o(a)),o}function P(e,t,o){for(const a of o){const i=t[a];i!==void 0&&n.watchEffect(()=>{e[a]=n.toValue(i)})}}const ue=E((e,t,o={})=>{const a=d(s.chat.createChatParticipant(e,n.unref(t)));return P(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 A(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:A(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=N();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 P(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:A(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 I(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&&I(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&&I(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=M;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=L;exports.useAbsolutePath=te;exports.useActiveColorTheme=N;exports.useActiveDebugSession=ne;exports.useActiveEditorDecorations=oe;exports.useActiveNotebookEditor=ae;exports.useActiveTerminal=ie;exports.useActiveTextEditor=$;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=j;exports.useEditorDecorations=H;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.useReactiveOptions=P;exports.useStatusBarItem=xe;exports.useTaskExecutions=ke;exports.useTerminal=ye;exports.useTerminalState=A;exports.useTextEditorCommand=U;exports.useTextEditorCommands=Oe;exports.useTextEditorSelection=Pe;exports.useTextEditorSelections=z;exports.useTextEditorViewColumn=Ae;exports.useTextEditorVisibleRanges=Ie;exports.useTreeView=We;exports.useViewBadge=I;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
@@ -672,6 +672,10 @@ export declare function useQuickPick<T extends QuickPickItem>(options?: QuickPic
672
672
  dispose(): void;
673
673
  };
674
674
 
675
+ export declare function useReactiveOptions<T extends object>(target: T, options: {
676
+ [K in keyof T]?: MaybeRefOrGetter<T[K]>;
677
+ }, keys: (keyof T)[]): void;
678
+
675
679
  /**
676
680
  * @reactive `window.createStatusBarItem`
677
681
  */
package/dist/index.js CHANGED
@@ -18,8 +18,8 @@ function j(e, t) {
18
18
  };
19
19
  }
20
20
  function C(e) {
21
- let t;
22
- return () => t !== void 0 ? t : t = Y(!0).run(e);
21
+ let t = !1, n;
22
+ return () => (t || (n = Y(!0).run(e), t = !0), n);
23
23
  }
24
24
  const J = [];
25
25
  function xe(e) {
@@ -239,6 +239,12 @@ const Ae = C(() => {
239
239
  e.value = $.all;
240
240
  })), h(() => e.value);
241
241
  });
242
+ function p(e, t) {
243
+ const n = (i, a, s) => {
244
+ l(e(i, a, s));
245
+ };
246
+ return t == null || t.forEach((i) => n(i)), n;
247
+ }
242
248
  function _(e, t, n) {
243
249
  for (const i of n) {
244
250
  const a = t[i];
@@ -247,12 +253,6 @@ function _(e, t, n) {
247
253
  });
248
254
  }
249
255
  }
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
256
  const $e = j((e, t, n = {}) => {
257
257
  const i = l(re.createChatParticipant(e, W(t)));
258
258
  return _(i, n, [
@@ -846,6 +846,7 @@ export {
846
846
  _e as useOpenedTerminals,
847
847
  be as useOutputChannel,
848
848
  et as useQuickPick,
849
+ _ as useReactiveOptions,
849
850
  tt as useStatusBarItem,
850
851
  nt as useTaskExecutions,
851
852
  it as useTerminal,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "reactive-vscode",
3
3
  "type": "module",
4
- "version": "0.3.0",
4
+ "version": "0.3.1",
5
5
  "description": "Develop VSCode extension with Vue Reactivity API",
6
6
  "author": "_Kerman <kermanx@qq.com>",
7
7
  "license": "MIT",
@@ -38,7 +38,7 @@
38
38
  "@types/vscode": "^1.101.0"
39
39
  },
40
40
  "dependencies": {
41
- "@reactive-vscode/reactivity": "0.3.0"
41
+ "@reactive-vscode/reactivity": "0.3.1"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@types/node": "^20.19.1",