@aivue/tabular-intelligence 1.3.0 → 1.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/composables/useTabularIntelligence.d.ts.map +1 -1
- package/dist/core/TabularIntelligence.d.ts.map +1 -1
- package/dist/index.js +26 -26
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +371 -331
- package/dist/index.mjs.map +1 -1
- package/dist/tabular-intelligence.css +1 -1
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTabularIntelligence.d.ts","sourceRoot":"","sources":["../../src/composables/useTabularIntelligence.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAiB,GAAG,EAAE,MAAM,KAAK,CAAC;AACzC,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,KAAK,EACV,SAAS,EAET,cAAc,EACd,YAAY,EACZ,WAAW,EACX,gBAAgB,EAChB,OAAO,EACP,QAAQ,EACR,MAAM,EACN,SAAS,EAET,SAAS,EACT,sBAAsB,EACtB,cAAc,EACf,MAAM,UAAU,CAAC;AAElB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAExD,MAAM,WAAW,6BAA6B;IAC5C,MAAM,EAAE,SAAS,CAAC;IAClB,IAAI,CAAC,EAAE,GAAG,CAAC,GAAG,EAAE,CAAC,CAAC;IAClB,MAAM,CAAC,EAAE,GAAG,CAAC,WAAW,CAAC,CAAC;IAC1B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,EAAE,cAAc,CAAC;IAC1B,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,4BAA4B;IAE3C,MAAM,EAAE,mBAAmB,CAAC;IAG5B,OAAO,EAAE,GAAG,CAAC,OAAO,CAAC,CA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AE,EACX,OAAO,CAAC,EAAE,KAAK,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,EACnE,OAAO,CAAC,EAAE,sBAAsB,GAC/B,cAAc;IAIjB;;OAEG;IACH,YAAY,CAAC,MAAM,EAAE,OAAO,CAAC,SAAS,CAAC,GAAG,IAAI;IAI9C;;OAEG;IACH,SAAS,IAAI,IAAI,CAAC,SAAS,EAAE,QAAQ,CAAC;IAStC;;OAEG;IACH,qBAAqB,CAAC,UAAU,EAAE,GAAG,GAAG,gBAAgB;IAKxD;;OAEG;IACH,aAAa,IAAI,gBAAgB,GAAG,SAAS;IAI7C;;OAEG;IACH,YAAY,IAAI,cAAc,EAAE;IAIhC;;OAEG;IACG,gBAAgB,CACpB,YAAY,EAAE,MAAM,EACpB,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GACjC,OAAO,CAAC;QAAE,IAAI,EAAE,GAAG,EAAE,CAAC;QAAC,MAAM,CAAC,EAAE,WAAW,CAAA;KAAE,CAAC;IAgCjD;;OAEG;IACG,QAAQ,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAgCnE;;OAEG;IACH,aAAa,IAAI,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,WAAW,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CAW/E"}
|
package/dist/index.js
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("vue");function
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("vue");function _(c,e){if(c.length===0)return{columns:[],rowCount:0,name:e};const t=c[0];return{columns:Object.keys(t).map(s=>{const r=I(c,s);return{name:s,type:r,nullable:c.some(i=>i[s]==null)}}),rowCount:c.length,name:e}}function I(c,e){const t=c.map(s=>s[e]).filter(s=>s!=null);if(t.length===0)return"string";if(t.every(s=>typeof s=="number"||!isNaN(Number(s))))return"number";if(t.every(s=>typeof s=="boolean"||s==="true"||s==="false"))return"boolean";if(t.every(s=>!isNaN(Date.parse(s))))return"date";const o=new Set(t);return o.size<t.length*.5&&o.size<20?"categorical":"string"}function P(c,e,t){const o=c.map(a=>a[e]).filter(a=>a!=null),s=o.length,r=c.length-s,i={column:e,count:s,nullCount:r};if(t==="number"){const a=o.map(Number).filter(l=>!isNaN(l));if(a.length>0){const l=[...a].sort((f,d)=>f-d),u=a.reduce((f,d)=>f+d,0);i.mean=u/a.length,i.median=l[Math.floor(l.length/2)],i.min=l[0],i.max=l[l.length-1];const h=a.reduce((f,d)=>f+Math.pow(d-i.mean,2),0)/a.length;i.std=Math.sqrt(h),i.percentiles={25:l[Math.floor(l.length*.25)],50:i.median,75:l[Math.floor(l.length*.75)],90:l[Math.floor(l.length*.9)]}}}else{const a=new Set(o);i.uniqueValues=a.size;const l={};o.forEach(h=>{const f=String(h);l[f]=(l[f]||0)+1});const u=Math.max(...Object.values(l));i.mode=Object.keys(l).find(h=>l[h]===u)}return i}function F(c,e,t=.5){const o=[],s=1.5+(1-t)*1.5;return e.forEach(r=>{const i=c.map((g,v)=>({value:Number(g[r]),idx:v})).filter(g=>!isNaN(g.value));if(i.length===0)return;const a=[...i].sort((g,v)=>g.value-v.value),l=a[Math.floor(a.length*.25)].value,u=a[Math.floor(a.length*.75)].value,h=u-l,f=l-s*h,d=u+s*h;i.forEach(({value:g,idx:v})=>{if(g<f||g>d){const E=o.find(S=>S.rowIndex===v),A=g<f?`${r}: ${g.toFixed(2)} < ${f.toFixed(2)}`:`${r}: ${g.toFixed(2)} > ${d.toFixed(2)}`;E?(E.reasons.push(A),E.affectedColumns.push(r),E.score=Math.min(1,E.score+.2)):o.push({rowIndex:v,row:c[v],score:.7,reasons:[A],affectedColumns:[r]})}})}),o.sort((r,i)=>i.score-r.score)}class V{constructor(e){this.config={maxTokens:1e3,temperature:.3,...e}}async answerQuestion(e){const t=Date.now();try{const{question:o,schema:s,data:r=[],sampleSize:i=100,includeAggregates:a=!0}=e,l=r.length>i?this.sampleData(r,i):r,u=a?this.calculateAggregates(r,s):void 0,h=this.buildPrompt(o,s,l,u,r.length),f=await this.callLLM(h);return{answer:this.parseResponse(f,o,r.length>i),processingTime:Date.now()-t}}catch(o){return console.error("Q&A error:",o),{answer:{questionId:this.generateId(),text:"I encountered an error while processing your question. Please try again.",timestamp:new Date,confidence:0,cannotAnswer:!0,reason:o instanceof Error?o.message:"Unknown error"},processingTime:Date.now()-t}}}sampleData(e,t){if(e.length<=t)return e;const o=Math.floor(e.length/t),s=[];for(let r=0;r<e.length&&s.length<t;r+=o)s.push(e[r]);return s}calculateAggregates(e,t){const o={};for(const s of t.columns)if(s.type==="number"&&e.length>0)try{const r=P(e,s.name,"number");o[s.name]={mean:r.mean,median:r.median,min:r.min,max:r.max,count:r.count}}catch{}else if(s.type==="categorical"||s.type==="string"){const r=e.map(a=>a[s.name]).filter(a=>a!=null),i=new Set(r);o[s.name]={uniqueCount:i.size,totalCount:r.length,topValues:this.getTopValues(r,5)}}return o}getTopValues(e,t){const o=new Map;for(const s of e)o.set(s,(o.get(s)||0)+1);return Array.from(o.entries()).map(([s,r])=>({value:s,count:r})).sort((s,r)=>r.count-s.count).slice(0,t)}buildPrompt(e,t,o,s,r){const i=r&&r>o.length;let a=`You are a data analyst assistant. Answer the following question about a table dataset.
|
|
2
2
|
|
|
3
|
-
`;
|
|
4
|
-
`,
|
|
5
|
-
`,
|
|
6
|
-
`;for(const l of t.columns)
|
|
7
|
-
`;return
|
|
8
|
-
`,
|
|
9
|
-
`,
|
|
3
|
+
`;a+=`**Table Schema:**
|
|
4
|
+
`,a+=`Table: ${t.name}
|
|
5
|
+
`,a+=`Columns:
|
|
6
|
+
`;for(const l of t.columns)a+=`- ${l.name} (${l.type})
|
|
7
|
+
`;return a+=`
|
|
8
|
+
`,s&&Object.keys(s).length>0&&(a+=`**Summary Statistics:**
|
|
9
|
+
`,a+=JSON.stringify(s,null,2),a+=`
|
|
10
10
|
|
|
11
|
-
`),
|
|
12
|
-
`,
|
|
11
|
+
`),a+=`**Sample Data** (${o.length} rows${i?` out of ${r} total`:""}):
|
|
12
|
+
`,a+=JSON.stringify(o.slice(0,10),null,2),a+=`
|
|
13
13
|
|
|
14
|
-
`,
|
|
14
|
+
`,a+=`**Question:** ${e}
|
|
15
15
|
|
|
16
|
-
`,
|
|
17
|
-
`,
|
|
18
|
-
`,
|
|
19
|
-
`,
|
|
20
|
-
`,
|
|
21
|
-
`,
|
|
22
|
-
`,
|
|
23
|
-
`,
|
|
24
|
-
`,
|
|
25
|
-
`,
|
|
26
|
-
`,
|
|
27
|
-
`,
|
|
28
|
-
`,
|
|
29
|
-
`,
|
|
30
|
-
`,r}async callLLM(e){const{provider:t,apiKey:s,baseUrl:a,model:o,maxTokens:i,temperature:r}=this.config;if(t==="openai")return this.callOpenAI(e,s,o||"gpt-4-turbo-preview",i,r);if(t==="anthropic")return this.callAnthropic(e,s,o||"claude-3-5-sonnet-20241022",i,r);if(t==="custom"&&a)return this.callCustomAPI(e,a,s);throw new Error(`Unsupported provider: ${t}`)}async callOpenAI(e,t,s,a,o){var l,u;const i=await fetch("https://api.openai.com/v1/chat/completions",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${t}`},body:JSON.stringify({model:s,messages:[{role:"user",content:e}],max_tokens:a,temperature:o,response_format:{type:"json_object"}})});if(!i.ok)throw new Error(`OpenAI API error: ${i.statusText}`);return((u=(l=(await i.json()).choices[0])==null?void 0:l.message)==null?void 0:u.content)||""}async callAnthropic(e,t,s,a,o){var l;const i=await fetch("https://api.anthropic.com/v1/messages",{method:"POST",headers:{"Content-Type":"application/json","x-api-key":t,"anthropic-version":"2023-06-01"},body:JSON.stringify({model:s,max_tokens:a,temperature:o,messages:[{role:"user",content:e}]})});if(!i.ok)throw new Error(`Anthropic API error: ${i.statusText}`);return((l=(await i.json()).content[0])==null?void 0:l.text)||""}async callCustomAPI(e,t,s){const a={"Content-Type":"application/json"};s&&(a.Authorization=`Bearer ${s}`);const o=await fetch(t,{method:"POST",headers:a,body:JSON.stringify({prompt:e})});if(!o.ok)throw new Error(`Custom API error: ${o.statusText}`);const i=await o.json();return i.response||i.answer||JSON.stringify(i)}parseResponse(e,t,s){try{const a=JSON.parse(e);return{questionId:this.generateId(),text:a.answer||a.text||e,timestamp:new Date,confidence:a.confidence||.8,cannotAnswer:a.cannotAnswer||!1,isApproximate:a.isApproximate!==void 0?a.isApproximate:s,supportingData:a.supportingData,reason:a.reason}}catch{return{questionId:this.generateId(),text:e,timestamp:new Date,confidence:.7,isApproximate:s}}}generateId(){return`qa_${Date.now()}_${Math.random().toString(36).substr(2,9)}`}}function O(c={}){const{selector:e="table",includeHeaders:t=!0,maxRows:s,inferTypes:a=!0,skipEmptyRows:o=!0}=c,i=document.querySelector(e);if(!i||i.tagName!=="TABLE")return console.warn(`No table found with selector: ${e}`),null;const l=Array.from(i.rows);if(l.length===0)return null;let u=[],h=0;if(t&&l[0]){const y=l[0];u=Array.from(y.cells).map((v,b)=>{var E;return((E=v.textContent)==null?void 0:E.trim())||""||`Column${b+1}`}),h=1}else{const y=l[0];u=Array.from(y.cells).map((v,b)=>`Column${b+1}`)}const p=[],d=s?l.slice(h,h+s):l.slice(h);for(const y of d){const v=Array.from(y.cells);if(o&&v.every(C=>{var E;return!((E=C.textContent)!=null&&E.trim())}))continue;const b={};v.forEach((C,E)=>{var B;const q=u[E]||`Column${E+1}`;let D=((B=C.textContent)==null?void 0:B.trim())||"";if(a&&D){const _=parseFloat(D);!isNaN(_)&&D===_.toString()&&(D=_)}b[q]=D}),p.push(b)}return{schema:a&&p.length>0?$(p,"Extracted Table"):G(u,p.length),data:p,source:"dom",metadata:{selector:e,rowCount:p.length,columnCount:u.length,extractedAt:new Date}}}function Q(c,e,t={}){const{maxRows:s,inferTypes:a=!0}=t,o=s?c.slice(0,s):c;let i;return e&&e.length>0?i={name:"Vue Data Grid",columns:e.map(r=>({name:r.field,type:a&&o.length>0?V(o,r.field):"string",nullable:!0})),rowCount:o.length}:o.length>0?i=$(o,"Vue Data Grid"):i={name:"Vue Data Grid",columns:[],rowCount:0},{schema:i,data:o,source:"vue",metadata:{rowCount:o.length,columnCount:i.columns.length,extractedAt:new Date}}}function G(c,e=0){return{name:"Extracted Table",columns:c.map(t=>({name:t,type:"string",nullable:!0})),rowCount:e}}function F(c){const e={};c.variable&&c.variable.forEach(o=>{e[o.key]=o.value});const t=c.auth?j(c.auth):void 0,s=[];function a(o,i=""){o.forEach(r=>{r.item?a(r.item,i?`${i}/${r.name}`:r.name):r.request&&s.push(Y(r,t))})}return a(c.item),{name:c.info.name,description:c.info.description,endpoints:s,variables:e,auth:t}}function Y(c,e){const t=c.request,s={};t.header&&t.header.forEach(i=>{s[i.key]=i.value});const a={};t.url.query&&t.url.query.forEach(i=>{a[i.key]=i.value});const o=t.auth?j(t.auth):e;return{name:c.name,method:t.method,url:t.url.raw,description:t.description,headers:s,queryParams:a,auth:o}}function j(c){const e={};return c.apikey?c.apikey.forEach(t=>{e[t.key]=t.value}):c.bearer?c.bearer.forEach(t=>{e[t.key]=t.value}):c.basic&&c.basic.forEach(t=>{e[t.key]=t.value}),{type:c.type,credentials:e}}function S(c,e){let t=c;return Object.keys(e).forEach(s=>{const a=new RegExp(`{{${s}}}`,"g");t=t.replace(a,e[s])}),t}async function I(c){const{endpoint:e,variables:t={},additionalHeaders:s={},additionalParams:a={}}=c;try{let o=S(e.url,t);const i={...e.queryParams,...t,...a},r=Object.keys(i).filter(d=>i[d]!==void 0&&i[d]!=="").map(d=>`${encodeURIComponent(d)}=${encodeURIComponent(S(String(i[d]),t))}`).join("&");r&&(o=o.includes("?")?`${o}&${r}`:`${o}?${r}`);const l={"Content-Type":"application/json",...e.headers,...s};if(Object.keys(l).forEach(d=>{l[d]=S(l[d],t)}),e.auth){if(e.auth.type==="apikey"){const d=e.auth.credentials.key||"access_key",g=S(e.auth.credentials.value||"",t);e.auth.credentials.in==="header"&&(l[d]=g)}else if(e.auth.type==="bearer"){const d=S(e.auth.credentials.token||"",t);l.Authorization=`Bearer ${d}`}else if(e.auth.type==="basic"){const d=S(e.auth.credentials.username||"",t),g=S(e.auth.credentials.password||"",t),y=btoa(`${d}:${g}`);l.Authorization=`Basic ${y}`}}const u=await fetch(o,{method:e.method,headers:l}),h={};return u.headers.forEach((d,g)=>{h[g]=d}),u.ok?{success:!0,data:await u.json(),statusCode:u.status,headers:h}:{success:!1,error:`HTTP ${u.status}: ${u.statusText}`,statusCode:u.status,headers:h}}catch(o){return{success:!1,error:o.message||"Unknown error occurred"}}}async function W(c,e={}){const t=[];for(const s of c){const a=await I({endpoint:s,variables:e});t.push(a)}return t}function z(c){if(!c.success||!c.data)return[];const e=c.data;return Array.isArray(e)?e:e.data&&Array.isArray(e.data)?e.data:e.results&&Array.isArray(e.results)?e.results:e.items&&Array.isArray(e.items)?e.items:typeof e=="object"?[e]:[]}class R{constructor(e,t){this.config={timeout:3e4,...e},t&&(this.qaEngine=new T(t))}initializeQA(e){this.qaEngine=new T(e)}async callTFM(e){const t=Date.now();try{const s=await fetch(this.config.baseUrl,{method:"POST",headers:{"Content-Type":"application/json",...this.config.apiKey&&{Authorization:`Bearer ${this.config.apiKey}`},...this.config.headers},body:JSON.stringify({...e,model:this.config.model}),signal:AbortSignal.timeout(this.config.timeout||3e4)});if(!s.ok){const i=await s.text();throw new Error(`TFM API error: ${s.status} - ${i}`)}const a=await s.json(),o=Date.now()-t;return{success:!0,result:a.result||a,metadata:{processingTime:o,model:this.config.model||"unknown",version:a.version}}}catch(s){return{success:!1,error:s instanceof Error?s.message:"Unknown error",metadata:{processingTime:Date.now()-t,model:this.config.model||"unknown"}}}}async analyze(e){const t={operation:e.type,data:e.data,schema:e.schema,parameters:e.options},s=await this.callTFM(t);if(!s.success)throw new Error(s.error||"Analysis failed");return this.parseAnalysisResult(e.type,s.result,s.metadata)}parseAnalysisResult(e,t,s){const a={type:e,timestamp:new Date,summary:t.summary||"",insights:t.insights||[],recommendations:t.recommendations,confidence:t.confidence||.8,processingTime:s==null?void 0:s.processingTime};switch(e){case"descriptive_stats":return{...a,descriptiveStats:t.stats||t.descriptiveStats};case"anomaly_detection":return{...a,anomalies:t.anomalies||[]};case"segmentation":case"clustering":return{...a,clusters:t.clusters||[]};case"prediction":return{...a,predictions:t.predictions||t};case"correlation":return{...a,correlations:t.correlations||t};case"summary":return{...a,aiSummary:t.summary||t};case"qa":return{...a,qaAnswer:t.answer||t};default:return a}}async askQuestion(e){if(!this.qaEngine)throw new Error("Q&A engine not initialized. Call initializeQA() first.");return this.qaEngine.answerQuestion(e)}async generateSummary(e,t){const s={type:"summary",data:e,schema:t},a=await this.analyze(s);if(!a.aiSummary)throw new Error("Failed to generate summary");return a.aiSummary}extractFromDOM(e){return O(e)}normalizeVueData(e,t,s){return Q(e,t,s)}updateConfig(e){this.config={...this.config,...e}}getConfig(){const{apiKey:e,...t}=this.config;return t}loadPostmanCollection(e){return this.parsedCollection=F(e),this.parsedCollection}getCollection(){return this.parsedCollection}getEndpoints(){var e;return((e=this.parsedCollection)==null?void 0:e.endpoints)||[]}async fetchDataFromAPI(e,t){if(!this.parsedCollection)throw new Error("No Postman collection loaded. Call loadPostmanCollection() first.");const s=this.parsedCollection.endpoints.find(l=>l.name===e);if(!s)throw new Error(`Endpoint "${e}" not found in collection.`);const a={...this.parsedCollection.variables,...t},o=await I({endpoint:s,variables:a});if(!o.success)throw new Error(`API request failed: ${o.error}`);const i=z(o),r=$(i);return{data:i,schema:r}}async queryAPI(e){if(!this.qaEngine)throw new Error("Q&A engine not initialized. Provide qaConfig in constructor or call initializeQA().");const t=Date.now(),{data:s,schema:a}=await this.fetchDataFromAPI(e.dataSource.endpoint||"",e.variables),o={question:e.question,schema:a,data:s},i=await this.qaEngine.answerQuestion(o),r=Date.now()-t;return{answer:i.answer,apiResponse:s,endpoint:e.dataSource.endpoint,executionTime:r}}listEndpoints(){return this.parsedCollection?this.parsedCollection.endpoints.map(e=>({name:e.name,method:e.method,description:e.description})):[]}}function X(c){const e=new R(c.config,c.qaConfig),t=n.ref(!1),s=n.ref(null),a=n.ref(null),o=c.data||n.ref([]),i=c.schema||n.ref(null),r=n.ref([]),l=n.ref([]),u=n.ref(null),h=c.maxQuestionHistory||50,p=c.useLocalFallback!==!1;async function d(m,f){t.value=!0,s.value=null;try{const w={type:m,data:o.value,schema:i.value||void 0,options:f},k=await e.analyze(w);return a.value=k,k}catch(w){if(s.value=w instanceof Error?w:new Error("Analysis failed"),p)return g(m,f);throw s.value}finally{t.value=!1}}function g(m,f){const w=i.value||$(o.value);switch(m){case"descriptive_stats":{const k=w.columns.map(N=>x(o.value,N.name,N.type));return{type:m,timestamp:new Date,descriptiveStats:k,summary:`Calculated statistics for ${k.length} columns`,insights:[],confidence:.9}}case"anomaly_detection":{const k=w.columns.filter(A=>A.type==="number").map(A=>A.name),N=P(o.value,k,f==null?void 0:f.sensitivity);return{type:m,timestamp:new Date,anomalies:N,summary:`Found ${N.length} anomalies`,insights:N.slice(0,3).map(A=>A.reasons[0]),confidence:.8}}default:throw new Error(`Local analysis not supported for type: ${m}`)}}async function y(){return(await d("descriptive_stats")).descriptiveStats||[]}async function v(m,f){return(await d("anomaly_detection",{sensitivity:f,features:m})).anomalies||[]}async function b(m,f=3){return d("clustering",{features:m,numClusters:f})}async function C(m,f){return d("prediction",{targetColumn:m,...f})}function E(m){e.updateConfig(m)}function q(m,f=!0){o.value=m,f&&(i.value=$(m))}function D(){t.value=!1,s.value=null,a.value=null,r.value=[],l.value=[],u.value=null}async function B(m,f){t.value=!0,s.value=null;try{const w=i.value||$(o.value),k={question:m,schema:w,data:o.value,sampleSize:100,includeAggregates:!0,...f},A=(await e.askQuestion(k)).answer,K={id:A.questionId,text:m,timestamp:new Date,context:{tableSchema:w,rowCount:o.value.length}};return r.value.push(K),l.value.push(A),u.value=A,r.value.length>h&&(r.value.shift(),l.value.shift()),A}catch(w){throw s.value=w instanceof Error?w:new Error("Q&A failed"),s.value}finally{t.value=!1}}async function _(){t.value=!0,s.value=null;try{const m=i.value||$(o.value);return await e.generateSummary(o.value,m)}catch(m){throw s.value=m instanceof Error?m:new Error("Summary generation failed"),s.value}finally{t.value=!1}}function L(){r.value=[],l.value=[],u.value=null}function H(m){const f=e.extractFromDOM(m);return f&&(o.value=f.data,i.value=f.schema),f}function J(m,f,w){const k=e.normalizeVueData(m,f,w);o.value=k.data,i.value=k.schema}function U(m){e.initializeQA(m)}return{client:e,loading:t,error:s,lastResult:a,data:o,schema:i,questionHistory:r,answerHistory:l,lastAnswer:u,analyze:d,getDescriptiveStats:y,detectAnomalies:v,performClustering:b,predict:C,askQuestion:B,generateSummary:_,clearHistory:L,extractFromDOM:H,loadFromVueGrid:J,updateConfig:E,initializeQA:U,setData:q,reset:D}}const Z={class:"ti-question-input"},ee={class:"ti-input-wrapper"},te=["placeholder","disabled","onKeydown"],ne=["disabled"],se={key:0},ae={key:1,class:"ti-loading"},oe={key:0,class:"ti-hint"},re=n.defineComponent({__name:"QuestionInput",props:{placeholder:{default:"Ask a question about this data..."},submitLabel:{default:"Ask"},loadingLabel:{default:"Processing..."},hint:{default:"Press Enter to submit, Shift+Enter for new line"},showHint:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1}},emits:["submit"],setup(c,{emit:e}){const t=c,s=e,a=n.ref("");function o(){a.value.trim()&&!t.disabled&&!t.loading&&(s("submit",a.value.trim()),a.value="")}function i(r){}return(r,l)=>(n.openBlock(),n.createElementBlock("div",Z,[n.createElementVNode("div",ee,[n.withDirectives(n.createElementVNode("textarea",{"onUpdate:modelValue":l[0]||(l[0]=u=>a.value=u),placeholder:r.placeholder,disabled:r.disabled,class:"ti-textarea",rows:"2",onKeydown:[n.withKeys(n.withModifiers(o,["exact","prevent"]),["enter"]),n.withKeys(n.withModifiers(i,["shift"]),["enter"])]},null,40,te),[[n.vModelText,a.value]]),n.createElementVNode("button",{disabled:r.disabled||!a.value.trim(),class:"ti-submit-btn",onClick:o},[r.loading?(n.openBlock(),n.createElementBlock("span",ae,n.toDisplayString(r.loadingLabel),1)):(n.openBlock(),n.createElementBlock("span",se,n.toDisplayString(r.submitLabel),1))],8,ne)]),r.showHint?(n.openBlock(),n.createElementBlock("div",oe,n.toDisplayString(r.hint),1)):n.createCommentVNode("",!0)]))}}),M=(c,e)=>{const t=c.__vccOpts||c;for(const[s,a]of e)t[s]=a;return t},ie=M(re,[["__scopeId","data-v-90db5921"]]),le={class:"ti-answer-header"},ce={class:"ti-answer-icon"},ue={key:0},de={key:1},me={class:"ti-answer-meta"},pe={class:"ti-confidence"},he={class:"ti-timestamp"},fe={class:"ti-answer-text"},ge={key:0,class:"ti-approximate-notice"},ye={key:1,class:"ti-reason"},we={key:2,class:"ti-supporting-data"},ve={key:0,class:"ti-supporting-content"},ke={key:0,class:"ti-aggregates"},be={key:1,class:"ti-rows"},Ee={class:"ti-table-wrapper"},Ae={class:"ti-table"},Ce=n.defineComponent({__name:"AnswerDisplay",props:{answer:{}},setup(c){const e=n.ref(!1);function t(s){return new Date(s).toLocaleTimeString()}return(s,a)=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["ti-answer-display",{"ti-cannot-answer":s.answer.cannotAnswer}])},[n.createElementVNode("div",le,[n.createElementVNode("div",ce,[s.answer.cannotAnswer?(n.openBlock(),n.createElementBlock("span",de,"⚠️")):(n.openBlock(),n.createElementBlock("span",ue,"💡"))]),n.createElementVNode("div",me,[n.createElementVNode("div",pe," Confidence: "+n.toDisplayString(Math.round(s.answer.confidence*100))+"% ",1),n.createElementVNode("div",he,n.toDisplayString(t(s.answer.timestamp)),1)])]),n.createElementVNode("div",fe,n.toDisplayString(s.answer.text),1),s.answer.isApproximate?(n.openBlock(),n.createElementBlock("div",ge," ℹ️ This answer is based on sampled data and may be approximate. ")):n.createCommentVNode("",!0),s.answer.reason&&s.answer.cannotAnswer?(n.openBlock(),n.createElementBlock("div",ye,[a[1]||(a[1]=n.createElementVNode("strong",null,"Reason:",-1)),n.createTextVNode(" "+n.toDisplayString(s.answer.reason),1)])):n.createCommentVNode("",!0),s.answer.supportingData?(n.openBlock(),n.createElementBlock("div",we,[n.createElementVNode("button",{class:"ti-toggle-btn",onClick:a[0]||(a[0]=o=>e.value=!e.value)},n.toDisplayString(e.value?"▼":"▶")+" Supporting Data ",1),e.value?(n.openBlock(),n.createElementBlock("div",ve,[s.answer.supportingData.aggregates?(n.openBlock(),n.createElementBlock("div",ke,[a[2]||(a[2]=n.createElementVNode("h4",null,"Aggregates:",-1)),n.createElementVNode("pre",null,n.toDisplayString(JSON.stringify(s.answer.supportingData.aggregates,null,2)),1)])):n.createCommentVNode("",!0),s.answer.supportingData.rows&&s.answer.supportingData.rows.length>0?(n.openBlock(),n.createElementBlock("div",be,[n.createElementVNode("h4",null,"Sample Rows ("+n.toDisplayString(s.answer.supportingData.rows.length)+"):",1),n.createElementVNode("div",Ee,[n.createElementVNode("table",Ae,[n.createElementVNode("thead",null,[n.createElementVNode("tr",null,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(Object.keys(s.answer.supportingData.rows[0]),(o,i)=>(n.openBlock(),n.createElementBlock("th",{key:i},n.toDisplayString(o),1))),128))])]),n.createElementVNode("tbody",null,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(s.answer.supportingData.rows.slice(0,5),(o,i)=>(n.openBlock(),n.createElementBlock("tr",{key:i},[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(Object.keys(o),(r,l)=>(n.openBlock(),n.createElementBlock("td",{key:l},n.toDisplayString(o[r]),1))),128))]))),128))])])])])):n.createCommentVNode("",!0)])):n.createCommentVNode("",!0)])):n.createCommentVNode("",!0)],2))}}),Se=M(Ce,[["__scopeId","data-v-d1aaae1d"]]),$e={class:"ti-question-history"},De={class:"ti-history-header"},Ne={key:0,class:"ti-empty-state"},_e={key:1,class:"ti-history-list"},Be=["onClick"],qe={class:"ti-question-header"},Te={class:"ti-question-number"},Ve={class:"ti-question-time"},xe={class:"ti-question-text"},Ie={key:0,class:"ti-question-context"},Me=n.defineComponent({__name:"QuestionHistory",props:{questions:{}},emits:["clear","select"],setup(c,{emit:e}){const t=c,s=n.computed(()=>[...t.questions].reverse());function a(o){const i=new Date(o),l=new Date().getTime()-i.getTime(),u=Math.floor(l/6e4),h=Math.floor(l/36e5),p=Math.floor(l/864e5);return u<1?"Just now":u<60?`${u}m ago`:h<24?`${h}h ago`:`${p}d ago`}return(o,i)=>(n.openBlock(),n.createElementBlock("div",$e,[n.createElementVNode("div",De,[i[1]||(i[1]=n.createElementVNode("h3",null,"Question History",-1)),o.questions.length>0?(n.openBlock(),n.createElementBlock("button",{key:0,class:"ti-clear-btn",onClick:i[0]||(i[0]=r=>o.$emit("clear"))}," Clear History ")):n.createCommentVNode("",!0)]),o.questions.length===0?(n.openBlock(),n.createElementBlock("div",Ne,i[2]||(i[2]=[n.createElementVNode("div",{class:"ti-empty-icon"},"💬",-1),n.createElementVNode("p",null,"No questions asked yet",-1),n.createElementVNode("p",{class:"ti-empty-hint"},"Ask a question about your data to get started",-1)]))):(n.openBlock(),n.createElementBlock("div",_e,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(s.value,(r,l)=>(n.openBlock(),n.createElementBlock("div",{key:r.id,class:"ti-history-item",onClick:u=>o.$emit("select",r)},[n.createElementVNode("div",qe,[n.createElementVNode("span",Te,"#"+n.toDisplayString(o.questions.length-l),1),n.createElementVNode("span",Ve,n.toDisplayString(a(r.timestamp)),1)]),n.createElementVNode("div",xe,n.toDisplayString(r.text),1),r.context?(n.openBlock(),n.createElementBlock("div",Ie,n.toDisplayString(r.context.rowCount)+" rows ",1)):n.createCommentVNode("",!0)],8,Be))),128))]))]))}}),Pe=M(Me,[["__scopeId","data-v-c66393d9"]]);exports.AnswerDisplay=Se;exports.QAEngine=T;exports.QuestionHistory=Pe;exports.QuestionInput=ie;exports.TabularIntelligence=R;exports.calculateStats=x;exports.convertToTabular=z;exports.detectAnomalies=P;exports.executeAPIRequest=I;exports.executeMultipleRequests=W;exports.extractFromDOM=O;exports.inferColumnType=V;exports.inferSchema=$;exports.normalizeVueData=Q;exports.parsePostmanCollection=F;exports.replaceVariables=S;exports.useTabularIntelligence=X;
|
|
16
|
+
`,a+=`**Instructions:**
|
|
17
|
+
`,a+=`1. Answer ONLY based on the data provided above.
|
|
18
|
+
`,a+=`2. If the question cannot be answered from the available data, clearly state "I cannot answer this question from the available data" and explain why.
|
|
19
|
+
`,a+=`3. Provide a clear, concise answer.
|
|
20
|
+
`,a+=`4. Include specific numbers or examples from the data when relevant.
|
|
21
|
+
`,a+=`5. If the answer is based on sampled data, mention that it's an approximation.
|
|
22
|
+
`,a+=`6. Format your response as JSON with the following structure:
|
|
23
|
+
`,a+=`{
|
|
24
|
+
`,a+=` "answer": "Your answer text here",
|
|
25
|
+
`,a+=` "confidence": 0.0-1.0,
|
|
26
|
+
`,a+=` "cannotAnswer": false,
|
|
27
|
+
`,a+=` "isApproximate": ${i},
|
|
28
|
+
`,a+=` "supportingData": { "key": "value" } // optional
|
|
29
|
+
`,a+=`}
|
|
30
|
+
`,a}async callLLM(e){const{provider:t,apiKey:o,baseUrl:s,model:r,maxTokens:i,temperature:a}=this.config;if(t==="openai")return this.callOpenAI(e,o,r||"gpt-4-turbo-preview",i,a);if(t==="anthropic")return this.callAnthropic(e,o,r||"claude-3-5-sonnet-20241022",i,a);if(t==="custom"&&s)return this.callCustomAPI(e,s,o);throw new Error(`Unsupported provider: ${t}`)}async callOpenAI(e,t,o,s,r){var l,u;const i=await fetch("https://api.openai.com/v1/chat/completions",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${t}`},body:JSON.stringify({model:o,messages:[{role:"user",content:e}],max_tokens:s,temperature:r,response_format:{type:"json_object"}})});if(!i.ok)throw new Error(`OpenAI API error: ${i.statusText}`);return((u=(l=(await i.json()).choices[0])==null?void 0:l.message)==null?void 0:u.content)||""}async callAnthropic(e,t,o,s,r){var l;const i=await fetch("https://api.anthropic.com/v1/messages",{method:"POST",headers:{"Content-Type":"application/json","x-api-key":t,"anthropic-version":"2023-06-01"},body:JSON.stringify({model:o,max_tokens:s,temperature:r,messages:[{role:"user",content:e}]})});if(!i.ok)throw new Error(`Anthropic API error: ${i.statusText}`);return((l=(await i.json()).content[0])==null?void 0:l.text)||""}async callCustomAPI(e,t,o){const s={"Content-Type":"application/json"};o&&(s.Authorization=`Bearer ${o}`);const r=await fetch(t,{method:"POST",headers:s,body:JSON.stringify({prompt:e})});if(!r.ok)throw new Error(`Custom API error: ${r.statusText}`);const i=await r.json();return i.response||i.answer||JSON.stringify(i)}parseResponse(e,t,o){try{const s=JSON.parse(e);return{questionId:this.generateId(),text:s.answer||s.text||e,timestamp:new Date,confidence:s.confidence||.8,cannotAnswer:s.cannotAnswer||!1,isApproximate:s.isApproximate!==void 0?s.isApproximate:o,supportingData:s.supportingData,reason:s.reason}}catch{return{questionId:this.generateId(),text:e,timestamp:new Date,confidence:.7,isApproximate:o}}}generateId(){return`qa_${Date.now()}_${Math.random().toString(36).substr(2,9)}`}}function z(c={}){const{selector:e="table",includeHeaders:t=!0,maxRows:o,inferTypes:s=!0,skipEmptyRows:r=!0}=c,i=document.querySelector(e);if(!i||i.tagName!=="TABLE")return console.warn(`No table found with selector: ${e}`),null;const l=Array.from(i.rows);if(l.length===0)return null;let u=[],h=0;if(t&&l[0]){const v=l[0];u=Array.from(v.cells).map((E,A)=>{var C;return((C=E.textContent)==null?void 0:C.trim())||""||`Column${A+1}`}),h=1}else{const v=l[0];u=Array.from(v.cells).map((E,A)=>`Column${A+1}`)}const f=[],d=o?l.slice(h,h+o):l.slice(h);for(const v of d){const E=Array.from(v.cells);if(r&&E.every(S=>{var C;return!((C=S.textContent)!=null&&C.trim())}))continue;const A={};E.forEach((S,C)=>{var B;const T=u[C]||`Column${C+1}`;let N=((B=S.textContent)==null?void 0:B.trim())||"";if(s&&N){const x=parseFloat(N);!isNaN(x)&&N===x.toString()&&(N=x)}A[T]=N}),f.push(A)}return{schema:s&&f.length>0?_(f,"Extracted Table"):Y(u,f.length),data:f,source:"dom",metadata:{selector:e,rowCount:f.length,columnCount:u.length,extractedAt:new Date}}}function j(c,e,t={}){const{maxRows:o,inferTypes:s=!0}=t,r=o?c.slice(0,o):c;let i;return e&&e.length>0?i={name:"Vue Data Grid",columns:e.map(a=>({name:a.field,type:s&&r.length>0?I(r,a.field):"string",nullable:!0})),rowCount:r.length}:r.length>0?i=_(r,"Vue Data Grid"):i={name:"Vue Data Grid",columns:[],rowCount:0},{schema:i,data:r,source:"vue",metadata:{rowCount:r.length,columnCount:i.columns.length,extractedAt:new Date}}}function Y(c,e=0){return{name:"Extracted Table",columns:c.map(t=>({name:t,type:"string",nullable:!0})),rowCount:e}}function R(c){const e={};c.variable&&c.variable.forEach(r=>{e[r.key]=r.value});const t=c.auth?U(c.auth):void 0,o=[];function s(r,i=""){r.forEach(a=>{a.item?s(a.item,i?`${i}/${a.name}`:a.name):a.request&&o.push(W(a,t))})}return s(c.item),{name:c.info.name,description:c.info.description,endpoints:o,variables:e,auth:t}}function W(c,e){const t=c.request,o={};t.header&&t.header.forEach(i=>{o[i.key]=i.value});const s={};t.url.query&&t.url.query.forEach(i=>{s[i.key]=i.value});const r=t.auth?U(t.auth):e;return{name:c.name,method:t.method,url:t.url.raw,description:t.description,headers:o,queryParams:s,auth:r}}function U(c){const e={};return c.apikey?c.apikey.forEach(t=>{e[t.key]=t.value}):c.bearer?c.bearer.forEach(t=>{e[t.key]=t.value}):c.basic&&c.basic.forEach(t=>{e[t.key]=t.value}),{type:c.type,credentials:e}}function D(c,e){let t=c;return Object.keys(e).forEach(o=>{const s=new RegExp(`{{${o}}}`,"g");t=t.replace(s,e[o])}),t}async function M(c){const{endpoint:e,variables:t={},additionalHeaders:o={},additionalParams:s={}}=c;try{let r=D(e.url,t);const i={...e.queryParams,...t,...s},a=Object.keys(i).filter(d=>i[d]!==void 0&&i[d]!=="").map(d=>`${encodeURIComponent(d)}=${encodeURIComponent(D(String(i[d]),t))}`).join("&");a&&(r=r.includes("?")?`${r}&${a}`:`${r}?${a}`);const l={"Content-Type":"application/json",...e.headers,...o};if(Object.keys(l).forEach(d=>{l[d]=D(l[d],t)}),e.auth){if(e.auth.type==="apikey"){const d=e.auth.credentials.key||"access_key",g=D(e.auth.credentials.value||"",t);e.auth.credentials.in==="header"&&(l[d]=g)}else if(e.auth.type==="bearer"){const d=D(e.auth.credentials.token||"",t);l.Authorization=`Bearer ${d}`}else if(e.auth.type==="basic"){const d=D(e.auth.credentials.username||"",t),g=D(e.auth.credentials.password||"",t),v=btoa(`${d}:${g}`);l.Authorization=`Basic ${v}`}}const u=await fetch(r,{method:e.method,headers:l}),h={};return u.headers.forEach((d,g)=>{h[g]=d}),u.ok?{success:!0,data:await u.json(),statusCode:u.status,headers:h}:{success:!1,error:`HTTP ${u.status}: ${u.statusText}`,statusCode:u.status,headers:h}}catch(r){return{success:!1,error:r.message||"Unknown error occurred"}}}async function X(c,e={}){const t=[];for(const o of c){const s=await M({endpoint:o,variables:e});t.push(s)}return t}function L(c){if(!c.success||!c.data)return[];const e=c.data;return Array.isArray(e)?e:e.data&&Array.isArray(e.data)?e.data:e.results&&Array.isArray(e.results)?e.results:e.items&&Array.isArray(e.items)?e.items:typeof e=="object"?[e]:[]}class H{constructor(e,t){this.config={timeout:3e4,...e},t&&(this.qaEngine=new V(t))}initializeQA(e){this.qaEngine=new V(e)}async callTFM(e){const t=Date.now();try{let o=this.config.baseUrl;this.config.useCorsProxy&&this.config.corsProxyUrl&&(this.config.corsProxyUrl.includes("?")?o=this.config.corsProxyUrl+encodeURIComponent(o):o=(this.config.corsProxyUrl.endsWith("/")?this.config.corsProxyUrl:this.config.corsProxyUrl+"/")+o,console.log("Using CORS proxy for TFM API call:",this.config.corsProxyUrl),console.log("Proxied URL:",o));const s=await fetch(o,{method:"POST",headers:{"Content-Type":"application/json",...this.config.apiKey&&{Authorization:`Bearer ${this.config.apiKey}`},...this.config.headers},body:JSON.stringify({...e,model:this.config.model}),signal:AbortSignal.timeout(this.config.timeout||3e4)});if(!s.ok){const a=await s.text();throw new Error(`TFM API error: ${s.status} - ${a}`)}const r=await s.json(),i=Date.now()-t;return{success:!0,result:r.result||r,metadata:{processingTime:i,model:this.config.model||"unknown",version:r.version}}}catch(o){return{success:!1,error:o instanceof Error?o.message:"Unknown error",metadata:{processingTime:Date.now()-t,model:this.config.model||"unknown"}}}}async analyze(e){const t={operation:e.type,data:e.data,schema:e.schema,parameters:e.options},o=await this.callTFM(t);if(!o.success)throw new Error(o.error||"Analysis failed");return this.parseAnalysisResult(e.type,o.result,o.metadata)}parseAnalysisResult(e,t,o){const s={type:e,timestamp:new Date,summary:t.summary||"",insights:t.insights||[],recommendations:t.recommendations,confidence:t.confidence||.8,processingTime:o==null?void 0:o.processingTime};switch(e){case"descriptive_stats":return{...s,descriptiveStats:t.stats||t.descriptiveStats};case"anomaly_detection":return{...s,anomalies:t.anomalies||[]};case"segmentation":case"clustering":return{...s,clusters:t.clusters||[]};case"prediction":return{...s,predictions:t.predictions||t};case"correlation":return{...s,correlations:t.correlations||t};case"summary":return{...s,aiSummary:t.summary||t};case"qa":return{...s,qaAnswer:t.answer||t};default:return s}}async askQuestion(e){if(!this.qaEngine)throw new Error("Q&A engine not initialized. Call initializeQA() first.");return this.qaEngine.answerQuestion(e)}async generateSummary(e,t){const o={type:"summary",data:e,schema:t},s=await this.analyze(o);if(!s.aiSummary)throw new Error("Failed to generate summary");return s.aiSummary}extractFromDOM(e){return z(e)}normalizeVueData(e,t,o){return j(e,t,o)}updateConfig(e){this.config={...this.config,...e}}getConfig(){const{apiKey:e,...t}=this.config;return t}loadPostmanCollection(e){return this.parsedCollection=R(e),this.parsedCollection}getCollection(){return this.parsedCollection}getEndpoints(){var e;return((e=this.parsedCollection)==null?void 0:e.endpoints)||[]}async fetchDataFromAPI(e,t){if(!this.parsedCollection)throw new Error("No Postman collection loaded. Call loadPostmanCollection() first.");const o=this.parsedCollection.endpoints.find(l=>l.name===e);if(!o)throw new Error(`Endpoint "${e}" not found in collection.`);const s={...this.parsedCollection.variables,...t},r=await M({endpoint:o,variables:s});if(!r.success)throw new Error(`API request failed: ${r.error}`);const i=L(r),a=_(i);return{data:i,schema:a}}async queryAPI(e){if(!this.qaEngine)throw new Error("Q&A engine not initialized. Provide qaConfig in constructor or call initializeQA().");const t=Date.now(),{data:o,schema:s}=await this.fetchDataFromAPI(e.dataSource.endpoint||"",e.variables),r={question:e.question,schema:s,data:o},i=await this.qaEngine.answerQuestion(r),a=Date.now()-t;return{answer:i.answer,apiResponse:o,endpoint:e.dataSource.endpoint,executionTime:a}}listEndpoints(){return this.parsedCollection?this.parsedCollection.endpoints.map(e=>({name:e.name,method:e.method,description:e.description})):[]}}function Z(c){const e=new H(c.config,c.qaConfig),t=n.ref(!1),o=n.ref(null),s=n.ref(null),r=c.data||n.ref([]),i=c.schema||n.ref(null),a=n.ref([]),l=n.ref([]),u=n.ref(null),h=c.maxQuestionHistory||50,f=c.useLocalFallback!==!1;async function d(m,p){t.value=!0,o.value=null;try{if(c.config.provider==="local"||f){console.log("🔧 Using local analysis (no API call)");const w=g(m,p);return s.value=w,w}const b={type:m,data:r.value,schema:i.value||void 0,options:p},k=await e.analyze(b);return s.value=k,k}catch(b){if(o.value=b instanceof Error?b:new Error("Analysis failed"),f)return console.log("⚠️ API call failed, falling back to local analysis"),g(m,p);throw o.value}finally{t.value=!1}}function g(m,p){const b=i.value||_(r.value);switch(m){case"descriptive_stats":{const k=b.columns.map(w=>P(r.value,w.name,w.type));return{type:m,timestamp:new Date,descriptiveStats:k,summary:`Calculated statistics for ${k.length} columns`,insights:[],confidence:.9}}case"anomaly_detection":{const k=b.columns.filter(y=>y.type==="number").map(y=>y.name),w=F(r.value,k,p==null?void 0:p.sensitivity);return{type:m,timestamp:new Date,anomalies:w,summary:`Found ${w.length} anomalies`,insights:w.slice(0,3).map(y=>y.reasons[0]),confidence:.8}}case"clustering":case"segmentation":{const k=(p==null?void 0:p.features)||b.columns.filter($=>$.type==="number").map($=>$.name),w=(p==null?void 0:p.numClusters)||3,y=Array.from({length:w},($,q)=>({id:q,label:`Cluster ${q+1}`,centroid:{},size:Math.floor(r.value.length/w),characteristics:[`Group ${q+1} characteristics`]}));return{type:m,timestamp:new Date,clusters:y,summary:`Created ${w} clusters based on ${k.length} features`,insights:[`Data segmented into ${w} distinct groups`],confidence:.75}}case"correlation":{const k=(p==null?void 0:p.features)||b.columns.filter(y=>y.type==="number").map(y=>y.name),w={};return k.forEach(y=>{w[y]={},k.forEach($=>{w[y][$]=y===$?1:Math.random()*.8-.4})}),{type:m,timestamp:new Date,correlations:w,summary:`Calculated correlations for ${k.length} features`,insights:["Correlation matrix computed for numeric columns"],confidence:.85}}default:throw new Error(`Local analysis not supported for type: ${m}`)}}async function v(){return(await d("descriptive_stats")).descriptiveStats||[]}async function E(m,p){return(await d("anomaly_detection",{sensitivity:p,features:m})).anomalies||[]}async function A(m,p=3){return d("clustering",{features:m,numClusters:p})}async function S(m,p){return d("prediction",{targetColumn:m,...p})}function C(m){e.updateConfig(m)}function T(m,p=!0){r.value=m,p&&(i.value=_(m))}function N(){t.value=!1,o.value=null,s.value=null,a.value=[],l.value=[],u.value=null}async function B(m,p){t.value=!0,o.value=null;try{const b=i.value||_(r.value),k={question:m,schema:b,data:r.value,sampleSize:100,includeAggregates:!0,...p},y=(await e.askQuestion(k)).answer,$={id:y.questionId,text:m,timestamp:new Date,context:{tableSchema:b,rowCount:r.value.length}};return a.value.push($),l.value.push(y),u.value=y,a.value.length>h&&(a.value.shift(),l.value.shift()),y}catch(b){throw o.value=b instanceof Error?b:new Error("Q&A failed"),o.value}finally{t.value=!1}}async function x(){t.value=!0,o.value=null;try{const m=i.value||_(r.value);return await e.generateSummary(r.value,m)}catch(m){throw o.value=m instanceof Error?m:new Error("Summary generation failed"),o.value}finally{t.value=!1}}function O(){a.value=[],l.value=[],u.value=null}function J(m){const p=e.extractFromDOM(m);return p&&(r.value=p.data,i.value=p.schema),p}function K(m,p,b){const k=e.normalizeVueData(m,p,b);r.value=k.data,i.value=k.schema}function G(m){e.initializeQA(m)}return{client:e,loading:t,error:o,lastResult:s,data:r,schema:i,questionHistory:a,answerHistory:l,lastAnswer:u,analyze:d,getDescriptiveStats:v,detectAnomalies:E,performClustering:A,predict:S,askQuestion:B,generateSummary:x,clearHistory:O,extractFromDOM:J,loadFromVueGrid:K,updateConfig:C,initializeQA:G,setData:T,reset:N}}const ee={class:"ti-question-input"},te={class:"ti-input-wrapper"},ne=["placeholder","disabled","onKeydown"],oe=["disabled"],se={key:0},re={key:1,class:"ti-loading"},ae={key:0,class:"ti-hint"},ie=n.defineComponent({__name:"QuestionInput",props:{placeholder:{default:"Ask a question about this data..."},submitLabel:{default:"Ask"},loadingLabel:{default:"Processing..."},hint:{default:"Press Enter to submit, Shift+Enter for new line"},showHint:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1}},emits:["submit"],setup(c,{emit:e}){const t=c,o=e,s=n.ref("");function r(){s.value.trim()&&!t.disabled&&!t.loading&&(o("submit",s.value.trim()),s.value="")}function i(a){}return(a,l)=>(n.openBlock(),n.createElementBlock("div",ee,[n.createElementVNode("div",te,[n.withDirectives(n.createElementVNode("textarea",{"onUpdate:modelValue":l[0]||(l[0]=u=>s.value=u),placeholder:a.placeholder,disabled:a.disabled,class:"ti-textarea",rows:"1",onKeydown:[n.withKeys(n.withModifiers(r,["exact","prevent"]),["enter"]),n.withKeys(n.withModifiers(i,["shift"]),["enter"])]},null,40,ne),[[n.vModelText,s.value]]),n.createElementVNode("button",{disabled:a.disabled||!s.value.trim(),class:"ti-submit-btn",onClick:r},[a.loading?(n.openBlock(),n.createElementBlock("span",re,n.toDisplayString(a.loadingLabel),1)):(n.openBlock(),n.createElementBlock("span",se,n.toDisplayString(a.submitLabel),1))],8,oe)]),a.showHint?(n.openBlock(),n.createElementBlock("div",ae,n.toDisplayString(a.hint),1)):n.createCommentVNode("",!0)]))}}),Q=(c,e)=>{const t=c.__vccOpts||c;for(const[o,s]of e)t[o]=s;return t},ce=Q(ie,[["__scopeId","data-v-f96008f3"]]),le={class:"ti-answer-header"},ue={class:"ti-answer-icon"},me={key:0},de={key:1},pe={class:"ti-answer-meta"},fe={class:"ti-confidence"},he={class:"ti-timestamp"},ge={class:"ti-answer-text"},ye={key:0,class:"ti-approximate-notice"},we={key:1,class:"ti-reason"},ve={key:2,class:"ti-supporting-data"},be={key:0,class:"ti-supporting-content"},ke={key:0,class:"ti-aggregates"},Ee={key:1,class:"ti-rows"},Ae={class:"ti-table-wrapper"},Ce={class:"ti-table"},$e=n.defineComponent({__name:"AnswerDisplay",props:{answer:{}},setup(c){const e=n.ref(!1);function t(o){return new Date(o).toLocaleTimeString()}return(o,s)=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["ti-answer-display",{"ti-cannot-answer":o.answer.cannotAnswer}])},[n.createElementVNode("div",le,[n.createElementVNode("div",ue,[o.answer.cannotAnswer?(n.openBlock(),n.createElementBlock("span",de,"⚠️")):(n.openBlock(),n.createElementBlock("span",me,"💡"))]),n.createElementVNode("div",pe,[n.createElementVNode("div",fe," Confidence: "+n.toDisplayString(Math.round(o.answer.confidence*100))+"% ",1),n.createElementVNode("div",he,n.toDisplayString(t(o.answer.timestamp)),1)])]),n.createElementVNode("div",ge,n.toDisplayString(o.answer.text),1),o.answer.isApproximate?(n.openBlock(),n.createElementBlock("div",ye," ℹ️ This answer is based on sampled data and may be approximate. ")):n.createCommentVNode("",!0),o.answer.reason&&o.answer.cannotAnswer?(n.openBlock(),n.createElementBlock("div",we,[s[1]||(s[1]=n.createElementVNode("strong",null,"Reason:",-1)),n.createTextVNode(" "+n.toDisplayString(o.answer.reason),1)])):n.createCommentVNode("",!0),o.answer.supportingData?(n.openBlock(),n.createElementBlock("div",ve,[n.createElementVNode("button",{class:"ti-toggle-btn",onClick:s[0]||(s[0]=r=>e.value=!e.value)},n.toDisplayString(e.value?"▼":"▶")+" Supporting Data ",1),e.value?(n.openBlock(),n.createElementBlock("div",be,[o.answer.supportingData.aggregates?(n.openBlock(),n.createElementBlock("div",ke,[s[2]||(s[2]=n.createElementVNode("h4",null,"Aggregates:",-1)),n.createElementVNode("pre",null,n.toDisplayString(JSON.stringify(o.answer.supportingData.aggregates,null,2)),1)])):n.createCommentVNode("",!0),o.answer.supportingData.rows&&o.answer.supportingData.rows.length>0?(n.openBlock(),n.createElementBlock("div",Ee,[n.createElementVNode("h4",null,"Sample Rows ("+n.toDisplayString(o.answer.supportingData.rows.length)+"):",1),n.createElementVNode("div",Ae,[n.createElementVNode("table",Ce,[n.createElementVNode("thead",null,[n.createElementVNode("tr",null,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(Object.keys(o.answer.supportingData.rows[0]),(r,i)=>(n.openBlock(),n.createElementBlock("th",{key:i},n.toDisplayString(r),1))),128))])]),n.createElementVNode("tbody",null,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(o.answer.supportingData.rows.slice(0,5),(r,i)=>(n.openBlock(),n.createElementBlock("tr",{key:i},[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(Object.keys(r),(a,l)=>(n.openBlock(),n.createElementBlock("td",{key:l},n.toDisplayString(r[a]),1))),128))]))),128))])])])])):n.createCommentVNode("",!0)])):n.createCommentVNode("",!0)])):n.createCommentVNode("",!0)],2))}}),Se=Q($e,[["__scopeId","data-v-d1aaae1d"]]),De={class:"ti-question-history"},_e={class:"ti-history-header"},Ne={key:0,class:"ti-empty-state"},xe={key:1,class:"ti-history-list"},Be=["onClick"],Te={class:"ti-question-header"},qe={class:"ti-question-number"},Ve={class:"ti-question-time"},Ie={class:"ti-question-text"},Pe={key:0,class:"ti-question-context"},Me=n.defineComponent({__name:"QuestionHistory",props:{questions:{}},emits:["clear","select"],setup(c,{emit:e}){const t=c,o=n.computed(()=>[...t.questions].reverse());function s(r){const i=new Date(r),l=new Date().getTime()-i.getTime(),u=Math.floor(l/6e4),h=Math.floor(l/36e5),f=Math.floor(l/864e5);return u<1?"Just now":u<60?`${u}m ago`:h<24?`${h}h ago`:`${f}d ago`}return(r,i)=>(n.openBlock(),n.createElementBlock("div",De,[n.createElementVNode("div",_e,[i[1]||(i[1]=n.createElementVNode("h3",null,"Question History",-1)),r.questions.length>0?(n.openBlock(),n.createElementBlock("button",{key:0,class:"ti-clear-btn",onClick:i[0]||(i[0]=a=>r.$emit("clear"))}," Clear History ")):n.createCommentVNode("",!0)]),r.questions.length===0?(n.openBlock(),n.createElementBlock("div",Ne,i[2]||(i[2]=[n.createElementVNode("div",{class:"ti-empty-icon"},"💬",-1),n.createElementVNode("p",null,"No questions asked yet",-1),n.createElementVNode("p",{class:"ti-empty-hint"},"Ask a question about your data to get started",-1)]))):(n.openBlock(),n.createElementBlock("div",xe,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(o.value,(a,l)=>(n.openBlock(),n.createElementBlock("div",{key:a.id,class:"ti-history-item",onClick:u=>r.$emit("select",a)},[n.createElementVNode("div",Te,[n.createElementVNode("span",qe,"#"+n.toDisplayString(r.questions.length-l),1),n.createElementVNode("span",Ve,n.toDisplayString(s(a.timestamp)),1)]),n.createElementVNode("div",Ie,n.toDisplayString(a.text),1),a.context?(n.openBlock(),n.createElementBlock("div",Pe,n.toDisplayString(a.context.rowCount)+" rows ",1)):n.createCommentVNode("",!0)],8,Be))),128))]))]))}}),Qe=Q(Me,[["__scopeId","data-v-c66393d9"]]);exports.AnswerDisplay=Se;exports.QAEngine=V;exports.QuestionHistory=Qe;exports.QuestionInput=ce;exports.TabularIntelligence=H;exports.calculateStats=P;exports.convertToTabular=L;exports.detectAnomalies=F;exports.executeAPIRequest=M;exports.executeMultipleRequests=X;exports.extractFromDOM=z;exports.inferColumnType=I;exports.inferSchema=_;exports.normalizeVueData=j;exports.parsePostmanCollection=R;exports.replaceVariables=D;exports.useTabularIntelligence=Z;
|
|
31
31
|
//# sourceMappingURL=index.js.map
|