Skip to content

Commit de4133b

Browse files
committed
chore(release): v1.0.26 — AI artifacts review and, unified auth, code polish, remove unused components
1 parent 69a5d39 commit de4133b

File tree

12 files changed

+311
-715
lines changed

12 files changed

+311
-715
lines changed

bun.lock

Lines changed: 227 additions & 261 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "gigapi-ui",
3-
"version": "1.0.25",
3+
"version": "1.0.26",
44
"type": "module",
55
"description": "UI interface for GigAPI: The Infinite Timeseries Lakehouse. GigAPI UI provides a slick web interface to query time-series using GigAPI Catalog Metadata + DuckDB",
66
"scripts": {
@@ -32,7 +32,7 @@
3232
"@radix-ui/react-switch": "^1.2.6",
3333
"@radix-ui/react-tabs": "^1.1.13",
3434
"@radix-ui/react-tooltip": "^1.2.8",
35-
"@tailwindcss/vite": "^4.1.12",
35+
"@tailwindcss/vite": "^4.1.13",
3636
"@tanstack/react-table": "^8.21.3",
3737
"@tanstack/react-virtual": "^3.13.12",
3838
"@types/react-grid-layout": "^1.3.5",
@@ -43,14 +43,13 @@
4343
"date-fns": "^4.1.0",
4444
"date-fns-tz": "^3.2.0",
4545
"highlight.js": "^11.11.1",
46-
"jotai": "^2.13.1",
46+
"jotai": "^2.14.0",
4747
"katex": "^0.16.22",
48-
"lucide-react": "^0.542.0",
48+
"lucide-react": "^0.543.0",
4949
"pako": "^2.1.0",
5050
"react": "^19.1.1",
5151
"react-day-picker": "^9.9.0",
5252
"react-dom": "^19.1.1",
53-
"react-error-boundary": "^6.0.0",
5453
"react-grid-layout": "^1.5.2",
5554
"react-hook-form": "^7.62.0",
5655
"react-markdown": "^10.1.0",
@@ -65,9 +64,9 @@
6564
"tailwind-merge": "^3.3.1",
6665
"tw-animate-css": "^1.3.8",
6766
"uplot": "^1.6.32",
68-
"uuid": "^11.1.0",
69-
"vite": "^7.1.4",
70-
"zod": "^4.1.5"
67+
"uuid": "^13.0.0",
68+
"vite": "^7.1.5",
69+
"zod": "^4.1.7"
7170
},
7271
"devDependencies": {
7372
"@types/node": "^24.3.1",
@@ -78,4 +77,4 @@
7877
"knip": "^5.63.1",
7978
"typescript": "^5.9.2"
8079
}
81-
}
80+
}

src/atoms/chat-atoms.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1398,11 +1398,11 @@ async function sendToAIStreaming(
13981398
content: `REMINDER: You MUST create artifacts for ALL queries and visualizations.
13991399
14001400
Example - when user asks "show me data from users":
1401-
\`\`\`query
1401+
\`\`\`query json
14021402
{
14031403
"title": "Users Data",
14041404
"query": "SELECT * FROM users LIMIT 100",
1405-
"database": "@main"
1405+
"database": "main"
14061406
}
14071407
\`\`\`
14081408
@@ -1435,7 +1435,7 @@ You are currently in AGENTIC MODE. This means:
14351435
## EXACT PROPOSAL FORMAT REQUIRED:
14361436
14371437
For queries:
1438-
\`\`\`proposal
1438+
\`\`\`proposal json
14391439
{
14401440
"type": "query_proposal",
14411441
"title": "Clear descriptive title",
@@ -1448,7 +1448,7 @@ For queries:
14481448
\`\`\`
14491449
14501450
For charts:
1451-
\`\`\`proposal
1451+
\`\`\`proposal json
14521452
{
14531453
"type": "chart_proposal",
14541454
"title": "Chart title",
@@ -1930,7 +1930,7 @@ async function processAIResponse(
19301930

19311931
// Extract chart artifacts
19321932
const chartMatches = processedContent.matchAll(
1933-
/\`\`\`chart\n([\s\S]*?)\`\`\`/g
1933+
/\`\`\`chart(?:\s+\w+)?\n([\s\S]*?)\`\`\`/g
19341934
);
19351935
for (const match of chartMatches) {
19361936
try {
@@ -1959,7 +1959,7 @@ async function processAIResponse(
19591959

19601960
// Extract query artifacts
19611961
const queryMatches = processedContent.matchAll(
1962-
/\`\`\`query\n([\s\S]*?)\`\`\`/g
1962+
/\`\`\`query(?:\s+\w+)?\n([\s\S]*?)\`\`\`/g
19631963
);
19641964
for (const match of queryMatches) {
19651965
try {
@@ -1988,7 +1988,7 @@ async function processAIResponse(
19881988

19891989
// Extract table artifacts
19901990
const tableMatches = processedContent.matchAll(
1991-
/\`\`\`table\n([\s\S]*?)\`\`\`/g
1991+
/\`\`\`table(?:\s+\w+)?\n([\s\S]*?)\`\`\`/g
19921992
);
19931993
for (const match of tableMatches) {
19941994
try {
@@ -2017,7 +2017,7 @@ async function processAIResponse(
20172017

20182018
// Extract summary artifacts
20192019
const summaryMatches = processedContent.matchAll(
2020-
/\`\`\`summary\n([\s\S]*?)\`\`\`/g
2020+
/\`\`\`summary(?:\s+\w+)?\n([\s\S]*?)\`\`\`/g
20212021
);
20222022
for (const match of summaryMatches) {
20232023
try {
@@ -2042,7 +2042,7 @@ async function processAIResponse(
20422042

20432043
// Extract insight artifacts
20442044
const insightMatches = processedContent.matchAll(
2045-
/\`\`\`insight\n([\s\S]*?)\`\`\`/g
2045+
/\`\`\`insight(?:\s+\w+)?\n([\s\S]*?)\`\`\`/g
20462046
);
20472047
for (const match of insightMatches) {
20482048
try {
@@ -2066,7 +2066,7 @@ async function processAIResponse(
20662066
}
20672067

20682068
// Extract proposal artifacts
2069-
const proposalRegex = /\`\`\`proposal\n([\s\S]*?)\`\`\`/g;
2069+
const proposalRegex = /\`\`\`proposal(?:\s+\w+)?\n([\s\S]*?)\`\`\`/g;
20702070
const proposalMatches = Array.from(processedContent.matchAll(proposalRegex));
20712071

20722072
console.log("🔍 Processing proposal artifacts:", {
@@ -2138,7 +2138,7 @@ async function processAIResponse(
21382138

21392139
// Extract metric artifacts
21402140
const metricMatches = processedContent.matchAll(
2141-
/\`\`\`metric\n([\s\S]*?)\`\`\`/g
2141+
/\`\`\`metric(?:\s+\w+)?\n([\s\S]*?)\`\`\`/g
21422142
);
21432143
for (const match of metricMatches) {
21442144
try {

src/atoms/ui-atoms.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@ export const openCommandPaletteAtom = atom(
1212
}
1313
);
1414

15+
// (Safe Mode removed by request)

src/components/charts/components/Legend.tsx

Lines changed: 0 additions & 83 deletions
This file was deleted.

src/components/chat/ChatArtifactEnhanced.tsx

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { useState, useEffect, useCallback, useMemo } from "react";
22
import { useAtom, useSetAtom } from "jotai";
33
import { apiUrlAtom } from "@/atoms";
4+
import { selectedConnectionAtom, buildApiRequestConfig } from "@/atoms/connection-atoms";
45
import { setQueryAtom } from "@/atoms/query-atoms";
56
import {
67
dashboardListAtom,
@@ -110,6 +111,7 @@ export default function ChatArtifactEnhanced({
110111
const addPanel = useSetAtom(addPanelAtom);
111112
const [chatSessions, setChatSessions] = useAtom(chatSessionsAtom);
112113
const [schemaCache] = useAtom(schemaCacheAtom);
114+
const [selectedConnection] = useAtom(selectedConnectionAtom);
113115

114116
// Navigate
115117
const navigation = useNavigate();
@@ -364,16 +366,23 @@ export default function ChatArtifactEnhanced({
364366
});
365367
}
366368

369+
// Safe Mode removed: no client-side blocking here
370+
367371
// Execute query
368372
log(artifact.id, "info", "Executing query against API", {
369373
url: apiUrl,
370374
database,
371375
});
372376

377+
const { url: requestUrl, headers } = buildApiRequestConfig(
378+
selectedConnection,
379+
apiUrl,
380+
{ db: database, format: 'ndjson' }
381+
);
373382
const response = await axios.post(
374-
`${apiUrl}?db=${encodeURIComponent(database)}&format=ndjson`,
383+
requestUrl,
375384
{ query: finalQuery },
376-
{ responseType: "text", timeout: 30000 }
385+
{ responseType: "text", timeout: 30000, headers }
377386
);
378387

379388
// Parse NDJSON response

src/components/chat/artifacts/ArtifactRenderer.tsx

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { useState, useCallback, useEffect, useRef } from "react";
22
import { useAtom } from "jotai";
33
import { apiUrlAtom } from "@/atoms";
4+
import { selectedConnectionAtom, buildApiRequestConfig } from "@/atoms/connection-atoms";
45
import { useArtifact } from "@/contexts/ArtifactContext";
56
import { Card, CardContent, CardHeader } from "@/components/ui/card";
67
import { Badge } from "@/components/ui/badge";
@@ -60,6 +61,7 @@ export default function ArtifactRenderer({
6061
config = {},
6162
}: ArtifactRendererProps) {
6263
const [apiUrl] = useAtom(apiUrlAtom);
64+
const [selectedConnection] = useAtom(selectedConnectionAtom);
6365
const { log, startOperation, endOperation } = useArtifact();
6466

6567
const [data, setData] = useState<any[]>([]);
@@ -240,16 +242,23 @@ export default function ArtifactRenderer({
240242
});
241243
}
242244

245+
// Safe Mode removed: no client-side blocking here
246+
243247
log(artifact.id, "info", "Executing final query", {
244248
finalQuery,
245249
database,
246250
apiUrl: `${apiUrl}?db=${encodeURIComponent(database)}&format=ndjson`
247251
});
248252

253+
const { url: requestUrl, headers } = buildApiRequestConfig(
254+
selectedConnection,
255+
apiUrl,
256+
{ db: database, format: 'ndjson' }
257+
);
249258
const response = await axios.post(
250-
`${apiUrl}?db=${encodeURIComponent(database)}&format=ndjson`,
259+
requestUrl,
251260
{ query: finalQuery },
252-
{ responseType: "text", timeout: 30000 }
261+
{ responseType: "text", timeout: 30000, headers }
253262
);
254263

255264
const parseResult = parseNDJSON(response.data);

0 commit comments

Comments
 (0)