@sqlrooms/ai 0.27.0-rc.5 → 0.27.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"QueryToolResult.d.ts","sourceRoot":"","sources":["../../../src/tools/query/QueryToolResult.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiB,4BAA4B,EAAC,MAAM,sBAAsB,CAAC;AAElF,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AAGtC,KAAK,oBAAoB,GAAG;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,kEAAkE;IAClE,UAAU,CAAC,EAAE,KAAK,CAAC,KAAK,CAAC;IACzB,iDAAiD;IACjD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,+DAA+D;IAC/D,WAAW,CAAC,EAAE,4BAA4B,CAAC;CAC5C,CAAC;AAEF,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,2CA+C1D"}
1
+ {"version":3,"file":"QueryToolResult.d.ts","sourceRoot":"","sources":["../../../src/tools/query/QueryToolResult.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,4BAA4B,EAE7B,MAAM,sBAAsB,CAAC;AAE9B,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AAGtC,KAAK,oBAAoB,GAAG;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,kEAAkE;IAClE,UAAU,CAAC,EAAE,KAAK,CAAC,KAAK,CAAC;IACzB,iDAAiD;IACjD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,+DAA+D;IAC/D,WAAW,CAAC,EAAE,4BAA4B,CAAC;CAC5C,CAAC;AAEF,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,2CA6C1D"}
@@ -1,10 +1,10 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
- import { DataTableModal } from '@sqlrooms/data-table';
2
+ import { DataTableModal, } from '@sqlrooms/data-table';
3
3
  import { Button, CopyButton, useDisclosure } from '@sqlrooms/ui';
4
4
  import { TableIcon } from 'lucide-react';
5
5
  export function QueryToolResult(props) {
6
6
  const { title, sqlQuery, showSql = true, formatValue } = props;
7
7
  const tableModal = useDisclosure();
8
- return (_jsxs(_Fragment, { children: [showSql && (_jsxs("div", { className: "text-muted-foreground bg-muted relative max-h-[150px] w-full overflow-auto rounded-md p-2 font-mono text-xs", children: [_jsx("pre", { className: "whitespace-pre-wrap break-words pr-8", children: sqlQuery }), _jsx("div", { className: "absolute right-1 top-1", children: _jsx(CopyButton, { text: sqlQuery, variant: "ghost", size: "icon", className: "h-6 w-6", ariaLabel: "Copy SQL" }) })] })), _jsx("div", { className: "flex items-center gap-1 text-gray-500 dark:text-gray-400", children: _jsxs(Button, { variant: "ghost", size: "xs", onClick: tableModal.onOpen, children: [_jsx(TableIcon, { className: "h-4 w-4" }), _jsx("h3", { className: "text-xs", children: "Show Query Result" })] }) }), 'arrowTable' in props ? (props.arrowTable ? (_jsx(DataTableModal, { title: title, arrowTable: props.arrowTable, tableModal: tableModal, formatValue: formatValue })) : (_jsx("div", { className: "p-4 text-xs", children: "No data" }))) : (_jsx(DataTableModal, { title: title, query: sqlQuery, tableModal: tableModal, formatValue: formatValue }))] }));
8
+ return (_jsxs(_Fragment, { children: [showSql && (_jsxs("div", { className: "text-muted-foreground group/sql bg-muted relative max-h-[150px] w-full overflow-auto rounded-md p-2 font-mono text-xs", children: [_jsx("pre", { className: "whitespace-pre-wrap break-words pr-8", children: sqlQuery }), _jsx("div", { className: "absolute right-1 top-1 opacity-0 transition-opacity group-focus-within/sql:opacity-100 group-hover/sql:opacity-100", children: _jsx(CopyButton, { text: sqlQuery, tooltipLabel: "Copy SQL query", className: "h-6 w-6" }) })] })), _jsx("div", { className: "flex items-center gap-1 text-gray-500 dark:text-gray-400", children: _jsxs(Button, { variant: "ghost", size: "xs", onClick: tableModal.onOpen, children: [_jsx(TableIcon, { className: "h-4 w-4" }), _jsx("h3", { className: "text-xs", children: "Show Query Result" })] }) }), 'arrowTable' in props ? (props.arrowTable ? (_jsx(DataTableModal, { title: title, arrowTable: props.arrowTable, tableModal: tableModal, formatValue: formatValue })) : (_jsx("div", { className: "p-4 text-xs", children: "No data" }))) : (_jsx(DataTableModal, { title: title, query: sqlQuery, tableModal: tableModal, formatValue: formatValue }))] }));
9
9
  }
10
10
  //# sourceMappingURL=QueryToolResult.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"QueryToolResult.js","sourceRoot":"","sources":["../../../src/tools/query/QueryToolResult.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAC,cAAc,EAA+B,MAAM,sBAAsB,CAAC;AAClF,OAAO,EAAC,MAAM,EAAE,UAAU,EAAE,aAAa,EAAC,MAAM,cAAc,CAAC;AAE/D,OAAO,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAavC,MAAM,UAAU,eAAe,CAAC,KAA2B;IACzD,MAAM,EAAC,KAAK,EAAE,QAAQ,EAAE,OAAO,GAAG,IAAI,EAAE,WAAW,EAAC,GAAG,KAAK,CAAC;IAC7D,MAAM,UAAU,GAAG,aAAa,EAAE,CAAC;IACnC,OAAO,CACL,8BACG,OAAO,IAAI,CACV,eAAK,SAAS,EAAC,6GAA6G,aAC1H,cAAK,SAAS,EAAC,sCAAsC,YAAE,QAAQ,GAAO,EACtE,cAAK,SAAS,EAAC,wBAAwB,YACrC,KAAC,UAAU,IACT,IAAI,EAAE,QAAQ,EACd,OAAO,EAAC,OAAO,EACf,IAAI,EAAC,MAAM,EACX,SAAS,EAAC,SAAS,EACnB,SAAS,EAAC,UAAU,GACpB,GACE,IACF,CACP,EACD,cAAK,SAAS,EAAC,0DAA0D,YACvE,MAAC,MAAM,IAAC,OAAO,EAAC,OAAO,EAAC,IAAI,EAAC,IAAI,EAAC,OAAO,EAAE,UAAU,CAAC,MAAM,aAC1D,KAAC,SAAS,IAAC,SAAS,EAAC,SAAS,GAAG,EACjC,aAAI,SAAS,EAAC,SAAS,kCAAuB,IACvC,GACL,EAEL,YAAY,IAAI,KAAK,CAAC,CAAC,CAAC,CACvB,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,CACjB,KAAC,cAAc,IACb,KAAK,EAAE,KAAK,EACZ,UAAU,EAAE,KAAK,CAAC,UAAU,EAC5B,UAAU,EAAE,UAAU,EACtB,WAAW,EAAE,WAAW,GACxB,CACH,CAAC,CAAC,CAAC,CACF,cAAK,SAAS,EAAC,aAAa,wBAAc,CAC3C,CACF,CAAC,CAAC,CAAC,CACF,KAAC,cAAc,IACb,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,QAAQ,EACf,UAAU,EAAE,UAAU,EACtB,WAAW,EAAE,WAAW,GACxB,CACH,IACA,CACJ,CAAC;AACJ,CAAC","sourcesContent":["import {DataTableModal, ArrowDataTableValueFormatter} from '@sqlrooms/data-table';\nimport {Button, CopyButton, useDisclosure} from '@sqlrooms/ui';\nimport * as arrow from 'apache-arrow';\nimport {TableIcon} from 'lucide-react';\n\ntype QueryToolResultProps = {\n title: string;\n sqlQuery: string;\n /** Provided in case the query result is already an arrow table */\n arrowTable?: arrow.Table;\n /** Whether to show the SQL text in the result */\n showSql?: boolean;\n /** Optional custom value formatter for binary/geometry data */\n formatValue?: ArrowDataTableValueFormatter;\n};\n\nexport function QueryToolResult(props: QueryToolResultProps) {\n const {title, sqlQuery, showSql = true, formatValue} = props;\n const tableModal = useDisclosure();\n return (\n <>\n {showSql && (\n <div className=\"text-muted-foreground bg-muted relative max-h-[150px] w-full overflow-auto rounded-md p-2 font-mono text-xs\">\n <pre className=\"whitespace-pre-wrap break-words pr-8\">{sqlQuery}</pre>\n <div className=\"absolute right-1 top-1\">\n <CopyButton\n text={sqlQuery}\n variant=\"ghost\"\n size=\"icon\"\n className=\"h-6 w-6\"\n ariaLabel=\"Copy SQL\"\n />\n </div>\n </div>\n )}\n <div className=\"flex items-center gap-1 text-gray-500 dark:text-gray-400\">\n <Button variant=\"ghost\" size=\"xs\" onClick={tableModal.onOpen}>\n <TableIcon className=\"h-4 w-4\" />\n <h3 className=\"text-xs\">Show Query Result</h3>\n </Button>\n </div>\n\n {'arrowTable' in props ? (\n props.arrowTable ? (\n <DataTableModal\n title={title}\n arrowTable={props.arrowTable}\n tableModal={tableModal}\n formatValue={formatValue}\n />\n ) : (\n <div className=\"p-4 text-xs\">No data</div>\n )\n ) : (\n <DataTableModal\n title={title}\n query={sqlQuery}\n tableModal={tableModal}\n formatValue={formatValue}\n />\n )}\n </>\n );\n}\n"]}
1
+ {"version":3,"file":"QueryToolResult.js","sourceRoot":"","sources":["../../../src/tools/query/QueryToolResult.tsx"],"names":[],"mappings":";AAAA,OAAO,EAEL,cAAc,GACf,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAC,MAAM,EAAE,UAAU,EAAE,aAAa,EAAC,MAAM,cAAc,CAAC;AAE/D,OAAO,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAavC,MAAM,UAAU,eAAe,CAAC,KAA2B;IACzD,MAAM,EAAC,KAAK,EAAE,QAAQ,EAAE,OAAO,GAAG,IAAI,EAAE,WAAW,EAAC,GAAG,KAAK,CAAC;IAC7D,MAAM,UAAU,GAAG,aAAa,EAAE,CAAC;IACnC,OAAO,CACL,8BACG,OAAO,IAAI,CACV,eAAK,SAAS,EAAC,uHAAuH,aACpI,cAAK,SAAS,EAAC,sCAAsC,YAAE,QAAQ,GAAO,EACtE,cAAK,SAAS,EAAC,oHAAoH,YACjI,KAAC,UAAU,IACT,IAAI,EAAE,QAAQ,EACd,YAAY,EAAC,gBAAgB,EAC7B,SAAS,EAAC,SAAS,GACnB,GACE,IACF,CACP,EACD,cAAK,SAAS,EAAC,0DAA0D,YACvE,MAAC,MAAM,IAAC,OAAO,EAAC,OAAO,EAAC,IAAI,EAAC,IAAI,EAAC,OAAO,EAAE,UAAU,CAAC,MAAM,aAC1D,KAAC,SAAS,IAAC,SAAS,EAAC,SAAS,GAAG,EACjC,aAAI,SAAS,EAAC,SAAS,kCAAuB,IACvC,GACL,EAEL,YAAY,IAAI,KAAK,CAAC,CAAC,CAAC,CACvB,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,CACjB,KAAC,cAAc,IACb,KAAK,EAAE,KAAK,EACZ,UAAU,EAAE,KAAK,CAAC,UAAU,EAC5B,UAAU,EAAE,UAAU,EACtB,WAAW,EAAE,WAAW,GACxB,CACH,CAAC,CAAC,CAAC,CACF,cAAK,SAAS,EAAC,aAAa,wBAAc,CAC3C,CACF,CAAC,CAAC,CAAC,CACF,KAAC,cAAc,IACb,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,QAAQ,EACf,UAAU,EAAE,UAAU,EACtB,WAAW,EAAE,WAAW,GACxB,CACH,IACA,CACJ,CAAC;AACJ,CAAC","sourcesContent":["import {\n ArrowDataTableValueFormatter,\n DataTableModal,\n} from '@sqlrooms/data-table';\nimport {Button, CopyButton, useDisclosure} from '@sqlrooms/ui';\nimport * as arrow from 'apache-arrow';\nimport {TableIcon} from 'lucide-react';\n\ntype QueryToolResultProps = {\n title: string;\n sqlQuery: string;\n /** Provided in case the query result is already an arrow table */\n arrowTable?: arrow.Table;\n /** Whether to show the SQL text in the result */\n showSql?: boolean;\n /** Optional custom value formatter for binary/geometry data */\n formatValue?: ArrowDataTableValueFormatter;\n};\n\nexport function QueryToolResult(props: QueryToolResultProps) {\n const {title, sqlQuery, showSql = true, formatValue} = props;\n const tableModal = useDisclosure();\n return (\n <>\n {showSql && (\n <div className=\"text-muted-foreground group/sql bg-muted relative max-h-[150px] w-full overflow-auto rounded-md p-2 font-mono text-xs\">\n <pre className=\"whitespace-pre-wrap break-words pr-8\">{sqlQuery}</pre>\n <div className=\"absolute right-1 top-1 opacity-0 transition-opacity group-focus-within/sql:opacity-100 group-hover/sql:opacity-100\">\n <CopyButton\n text={sqlQuery}\n tooltipLabel=\"Copy SQL query\"\n className=\"h-6 w-6\"\n />\n </div>\n </div>\n )}\n <div className=\"flex items-center gap-1 text-gray-500 dark:text-gray-400\">\n <Button variant=\"ghost\" size=\"xs\" onClick={tableModal.onOpen}>\n <TableIcon className=\"h-4 w-4\" />\n <h3 className=\"text-xs\">Show Query Result</h3>\n </Button>\n </div>\n\n {'arrowTable' in props ? (\n props.arrowTable ? (\n <DataTableModal\n title={title}\n arrowTable={props.arrowTable}\n tableModal={tableModal}\n formatValue={formatValue}\n />\n ) : (\n <div className=\"p-4 text-xs\">No data</div>\n )\n ) : (\n <DataTableModal\n title={title}\n query={sqlQuery}\n tableModal={tableModal}\n formatValue={formatValue}\n />\n )}\n </>\n );\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sqlrooms/ai",
3
- "version": "0.27.0-rc.5",
3
+ "version": "0.27.0",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "module": "dist/index.js",
@@ -20,13 +20,13 @@
20
20
  },
21
21
  "dependencies": {
22
22
  "@openassistant/utils": "1.0.0-alpha.0",
23
- "@sqlrooms/ai-config": "0.27.0-rc.5",
24
- "@sqlrooms/ai-core": "0.27.0-rc.5",
25
- "@sqlrooms/ai-settings": "0.27.0-rc.5",
26
- "@sqlrooms/data-table": "0.27.0-rc.5",
27
- "@sqlrooms/duckdb": "0.27.0-rc.5",
28
- "@sqlrooms/room-shell": "0.27.0-rc.5",
29
- "@sqlrooms/ui": "0.27.0-rc.5",
23
+ "@sqlrooms/ai-config": "0.27.0",
24
+ "@sqlrooms/ai-core": "0.27.0",
25
+ "@sqlrooms/ai-settings": "0.27.0",
26
+ "@sqlrooms/data-table": "0.27.0",
27
+ "@sqlrooms/duckdb": "0.27.0",
28
+ "@sqlrooms/room-shell": "0.27.0",
29
+ "@sqlrooms/ui": "0.27.0",
30
30
  "lucide-react": "^0.556.0",
31
31
  "zod": "^4.1.8"
32
32
  },
@@ -42,5 +42,5 @@
42
42
  "typecheck": "tsc --noEmit",
43
43
  "typedoc": "typedoc"
44
44
  },
45
- "gitHead": "d860b9100d63e0d4029712872741abfa3a9c31a1"
45
+ "gitHead": "f215995ab4adeac4c58171739261a15cbba9e82b"
46
46
  }