@deaquinodev/querky 0.4.6 → 0.4.7

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.
Files changed (2) hide show
  1. package/dist/index.js +102 -71
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -193,11 +193,11 @@ async function connectDsn(dsn) {
193
193
  }
194
194
 
195
195
  // src/ui/components/App.tsx
196
- import { useState as useState3, useEffect as useEffect4, useRef as useRef2 } from "react";
196
+ import { useState as useState3, useEffect as useEffect4, useRef as useRef2, memo } from "react";
197
197
  import { writeFileSync as writeFileSync5 } from "fs";
198
198
  import { homedir as homedir4 } from "os";
199
199
  import { join as join6 } from "path";
200
- import { Box as Box7, Text as Text7, Static, useApp, useInput as useInput2, useStdin as useStdin2 } from "ink";
200
+ import { Box as Box7, Text as Text7, useApp, useInput as useInput2, useStdin as useStdin2 } from "ink";
201
201
 
202
202
  // src/db/query.ts
203
203
  async function runQuery(client, sql) {
@@ -1707,30 +1707,45 @@ function QueryInput({ onSubmit, isLoading, onModeChange, onShellModeChange, vimE
1707
1707
  ] }),
1708
1708
  /* @__PURE__ */ jsx(Text, { backgroundColor: BG, children: emptyLine })
1709
1709
  ] }),
1710
- suggestions.length > 0 && /* @__PURE__ */ jsxs(Box, { flexDirection: "column", marginTop: 1, marginLeft: 2, children: [
1711
- suggestions.map((name, i) => {
1712
- const selected = i === suggestionIndex;
1713
- if (isCommand) {
1714
- return /* @__PURE__ */ jsxs(Box, { children: [
1715
- /* @__PURE__ */ jsxs(Text, { children: [
1716
- /* @__PURE__ */ jsx(Text, { dimColor: !selected, color: selected ? ACCENT : void 0, children: "/" }),
1717
- /* @__PURE__ */ jsx(FuzzyHighlight, { text: name, token: partial, selected })
1718
- ] }),
1719
- /* @__PURE__ */ jsxs(Text, { dimColor: true, children: [
1720
- " \u2014 ",
1721
- descMap[name]
1722
- ] })
1723
- ] }, name);
1724
- }
1725
- return /* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsx(FuzzyHighlight, { text: name, token: sqlToken, selected }) }, name);
1726
- }),
1727
- /* @__PURE__ */ jsx(Text, { dimColor: true, children: "Tab/\u2191\u2193 navigate Enter select" })
1728
- ] }),
1729
- /* @__PURE__ */ jsx(Box, { marginTop: 1, flexDirection: hintsInline ? "row" : "column", children: allHints.map(([key, desc], i) => /* @__PURE__ */ jsxs(Text, { children: [
1730
- hintsInline && i > 0 && /* @__PURE__ */ jsx(Text, { dimColor: true, children: " | " }),
1731
- /* @__PURE__ */ jsx(Text, { color: ACCENT, bold: true, children: desc }),
1732
- /* @__PURE__ */ jsx(Text, { dimColor: true, children: `: ${key}` })
1733
- ] }, desc)) })
1710
+ (() => {
1711
+ const hasSuggestions = !isEmpty && !isShellMode && !isMultiLine && suggestions.length > 0;
1712
+ const VISIBLE = 4;
1713
+ const SEP_W = 3;
1714
+ const ELLIPSIS_W = 3;
1715
+ const prefixW = isCommand ? 1 : 0;
1716
+ const availW = termWidth - 2 - ELLIPSIS_W - (VISIBLE - 1) * SEP_W - VISIBLE * prefixW;
1717
+ const maxPerItem = Math.max(6, Math.floor(availW / VISIBLE));
1718
+ const winStart = hasSuggestions ? Math.min(Math.max(0, suggestionIndex - 1), Math.max(0, suggestions.length - VISIBLE)) : 0;
1719
+ const windowSlice = hasSuggestions ? suggestions.slice(winStart, winStart + VISIBLE) : [];
1720
+ function truncate(s) {
1721
+ return s.length > maxPerItem ? s.slice(0, maxPerItem - 1) + "\u2026" : s;
1722
+ }
1723
+ return /* @__PURE__ */ jsxs(Box, { flexDirection: "column", marginTop: 1, children: [
1724
+ /* @__PURE__ */ jsx(Box, { marginLeft: 2, children: hasSuggestions ? /* @__PURE__ */ jsxs(Fragment, { children: [
1725
+ windowSlice.map((name, i) => {
1726
+ const realIdx = winStart + i;
1727
+ const selected = realIdx === suggestionIndex;
1728
+ const displayName = truncate(name);
1729
+ return /* @__PURE__ */ jsxs(Text, { children: [
1730
+ i > 0 && /* @__PURE__ */ jsx(Text, { dimColor: true, children: " " }),
1731
+ isCommand && /* @__PURE__ */ jsx(Text, { dimColor: !selected, color: selected ? ACCENT : void 0, children: "/" }),
1732
+ /* @__PURE__ */ jsx(FuzzyHighlight, { text: displayName, token: isCommand ? partial : sqlToken, selected })
1733
+ ] }, name);
1734
+ }),
1735
+ suggestions.length > VISIBLE && /* @__PURE__ */ jsx(Text, { dimColor: true, children: " \u2026" })
1736
+ ] }) : /* @__PURE__ */ jsx(Box, { flexDirection: hintsInline ? "row" : "column", children: allHints.map(([key, desc], i) => /* @__PURE__ */ jsxs(Text, { children: [
1737
+ hintsInline && i > 0 && /* @__PURE__ */ jsx(Text, { dimColor: true, children: " | " }),
1738
+ /* @__PURE__ */ jsx(Text, { color: ACCENT, bold: true, children: desc }),
1739
+ /* @__PURE__ */ jsx(Text, { dimColor: true, children: `: ${key}` })
1740
+ ] }, desc)) }) }),
1741
+ /* @__PURE__ */ jsx(Box, { marginLeft: 2, children: hasSuggestions ? /* @__PURE__ */ jsxs(Text, { dimColor: true, children: [
1742
+ "Tab/\u2191\u2193 navigate Enter select ",
1743
+ suggestionIndex + 1,
1744
+ "/",
1745
+ suggestions.length
1746
+ ] }) : /* @__PURE__ */ jsx(Text, { children: " " }) })
1747
+ ] });
1748
+ })()
1734
1749
  ] });
1735
1750
  }
1736
1751
 
@@ -1743,7 +1758,7 @@ import { Box as Box2, Text as Text2 } from "ink";
1743
1758
  import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
1744
1759
  var COL_PAD = 1;
1745
1760
  var INDIGO = "#818cf8";
1746
- var BORDER2 = "white";
1761
+ var BORDER = "white";
1747
1762
  var NULL_COLOR = "#6366f1";
1748
1763
  var NULL_MARKER = "\u2205";
1749
1764
  function isNull(val) {
@@ -1774,10 +1789,10 @@ function hline(widths, left, mid, right) {
1774
1789
  function ExpandedTable({ columns, rows }) {
1775
1790
  const keyWidth = columns.reduce((max, col) => Math.max(max, col.length), 0);
1776
1791
  return /* @__PURE__ */ jsx2(Box2, { flexDirection: "column", children: rows.map((row, i) => /* @__PURE__ */ jsxs2(Box2, { flexDirection: "column", marginBottom: i < rows.length - 1 ? 1 : 0, children: [
1777
- /* @__PURE__ */ jsx2(Text2, { color: BORDER2, children: `\u2500[ Record ${i + 1} ]${"\u2500".repeat(Math.max(0, keyWidth + 14 - String(i + 1).length))}` }),
1792
+ /* @__PURE__ */ jsx2(Text2, { color: BORDER, children: `\u2500[ Record ${i + 1} ]${"\u2500".repeat(Math.max(0, keyWidth + 14 - String(i + 1).length))}` }),
1778
1793
  columns.map((col) => /* @__PURE__ */ jsxs2(Box2, { children: [
1779
1794
  /* @__PURE__ */ jsx2(Text2, { color: INDIGO, bold: true, children: col.padEnd(keyWidth) }),
1780
- /* @__PURE__ */ jsx2(Text2, { color: BORDER2, children: " \u2502 " }),
1795
+ /* @__PURE__ */ jsx2(Text2, { color: BORDER, children: " \u2502 " }),
1781
1796
  isNull(row[col]) ? /* @__PURE__ */ jsx2(Text2, { color: NULL_COLOR, dimColor: true, children: NULL_MARKER }) : /* @__PURE__ */ jsx2(Text2, { children: cellValue(row[col]) })
1782
1797
  ] }, col))
1783
1798
  ] }, i)) });
@@ -1790,31 +1805,31 @@ function Table({ columns, rows, expanded = false }) {
1790
1805
  const botLine = hline(widths, "\u2570", "\u2534", "\u256F");
1791
1806
  function renderHeaderRow(cols) {
1792
1807
  return /* @__PURE__ */ jsxs2(Box2, { children: [
1793
- /* @__PURE__ */ jsx2(Text2, { color: BORDER2, children: "\u2502" }),
1808
+ /* @__PURE__ */ jsx2(Text2, { color: BORDER, children: "\u2502" }),
1794
1809
  cols.map((v, i) => /* @__PURE__ */ jsxs2(Box2, { children: [
1795
1810
  /* @__PURE__ */ jsx2(Text2, { color: INDIGO, bold: true, children: " ".repeat(COL_PAD) + pad(v, widths[i]) + " ".repeat(COL_PAD) }),
1796
- /* @__PURE__ */ jsx2(Text2, { color: BORDER2, children: "\u2502" })
1811
+ /* @__PURE__ */ jsx2(Text2, { color: BORDER, children: "\u2502" })
1797
1812
  ] }, i))
1798
1813
  ] });
1799
1814
  }
1800
1815
  function renderDataRow(row) {
1801
1816
  return /* @__PURE__ */ jsxs2(Box2, { children: [
1802
- /* @__PURE__ */ jsx2(Text2, { color: BORDER2, children: "\u2502" }),
1817
+ /* @__PURE__ */ jsx2(Text2, { color: BORDER, children: "\u2502" }),
1803
1818
  columns.map((col, i) => /* @__PURE__ */ jsxs2(Box2, { children: [
1804
1819
  isNull(row[col]) ? /* @__PURE__ */ jsx2(Text2, { color: NULL_COLOR, dimColor: true, children: " ".repeat(COL_PAD) + pad(NULL_MARKER, widths[i]) + " ".repeat(COL_PAD) }) : /* @__PURE__ */ jsx2(Text2, { children: " ".repeat(COL_PAD) + pad(cellValue(row[col]), widths[i]) + " ".repeat(COL_PAD) }),
1805
- /* @__PURE__ */ jsx2(Text2, { color: BORDER2, children: "\u2502" })
1820
+ /* @__PURE__ */ jsx2(Text2, { color: BORDER, children: "\u2502" })
1806
1821
  ] }, i))
1807
1822
  ] });
1808
1823
  }
1809
1824
  return /* @__PURE__ */ jsxs2(Box2, { flexDirection: "column", children: [
1810
- /* @__PURE__ */ jsx2(Text2, { color: BORDER2, children: topLine }),
1825
+ /* @__PURE__ */ jsx2(Text2, { color: BORDER, children: topLine }),
1811
1826
  renderHeaderRow(columns),
1812
- /* @__PURE__ */ jsx2(Text2, { color: BORDER2, children: midLine }),
1827
+ /* @__PURE__ */ jsx2(Text2, { color: BORDER, children: midLine }),
1813
1828
  rows.map((row, i) => /* @__PURE__ */ jsxs2(Box2, { flexDirection: "column", children: [
1814
1829
  renderDataRow(row),
1815
- i < rows.length - 1 && /* @__PURE__ */ jsx2(Text2, { color: BORDER2, children: midLine })
1830
+ i < rows.length - 1 && /* @__PURE__ */ jsx2(Text2, { color: BORDER, children: midLine })
1816
1831
  ] }, i)),
1817
- /* @__PURE__ */ jsx2(Text2, { color: BORDER2, children: botLine })
1832
+ /* @__PURE__ */ jsx2(Text2, { color: BORDER, children: botLine })
1818
1833
  ] });
1819
1834
  }
1820
1835
 
@@ -2019,6 +2034,7 @@ var TABLE_COLORS = [
2019
2034
  "#fbbf24",
2020
2035
  "#2dd4bf"
2021
2036
  ];
2037
+ var BORDER2 = "#4b5563";
2022
2038
  var PAD = 1;
2023
2039
  var GAP = 2;
2024
2040
  var FK_PREFIX = "FK \u2192 ";
@@ -2066,31 +2082,31 @@ function TableBox({ table, m, color, colorMap }) {
2066
2082
  const bot = "\u2570" + "\u2500".repeat(nameW + PAD * 2) + "\u2534" + "\u2500".repeat(typeW + PAD * 2) + "\u2534" + "\u2500".repeat(keyW + PAD * 2) + "\u256F";
2067
2083
  const headerW = totalW - 4;
2068
2084
  return /* @__PURE__ */ jsxs6(Box6, { flexDirection: "column", children: [
2069
- /* @__PURE__ */ jsx6(Text6, { color, children: top }),
2085
+ /* @__PURE__ */ jsx6(Text6, { color: BORDER2, children: top }),
2070
2086
  /* @__PURE__ */ jsxs6(Box6, { children: [
2071
- /* @__PURE__ */ jsx6(Text6, { color, children: "\u2502" }),
2087
+ /* @__PURE__ */ jsx6(Text6, { color: BORDER2, children: "\u2502" }),
2072
2088
  /* @__PURE__ */ jsxs6(Text6, { color, bold: true, children: [
2073
2089
  sp,
2074
2090
  p(table.name, headerW),
2075
2091
  sp
2076
2092
  ] }),
2077
- /* @__PURE__ */ jsx6(Text6, { color, children: "\u2502" })
2093
+ /* @__PURE__ */ jsx6(Text6, { color: BORDER2, children: "\u2502" })
2078
2094
  ] }),
2079
- /* @__PURE__ */ jsx6(Text6, { color, children: sep }),
2095
+ /* @__PURE__ */ jsx6(Text6, { color: BORDER2, children: sep }),
2080
2096
  table.columns.map((col, i) => /* @__PURE__ */ jsxs6(Box6, { children: [
2081
- /* @__PURE__ */ jsx6(Text6, { color, children: "\u2502" }),
2097
+ /* @__PURE__ */ jsx6(Text6, { color: BORDER2, children: "\u2502" }),
2082
2098
  /* @__PURE__ */ jsxs6(Text6, { children: [
2083
2099
  sp,
2084
2100
  p(col.name, nameW),
2085
2101
  sp
2086
2102
  ] }),
2087
- /* @__PURE__ */ jsx6(Text6, { color, children: "\u2502" }),
2103
+ /* @__PURE__ */ jsx6(Text6, { color: BORDER2, children: "\u2502" }),
2088
2104
  /* @__PURE__ */ jsxs6(Text6, { dimColor: true, children: [
2089
2105
  sp,
2090
2106
  p(col.type, typeW),
2091
2107
  sp
2092
2108
  ] }),
2093
- /* @__PURE__ */ jsx6(Text6, { color, children: "\u2502" }),
2109
+ /* @__PURE__ */ jsx6(Text6, { color: BORDER2, children: "\u2502" }),
2094
2110
  col.isPk ? /* @__PURE__ */ jsxs6(Text6, { bold: true, children: [
2095
2111
  sp,
2096
2112
  p("PK", keyW),
@@ -2109,9 +2125,9 @@ function TableBox({ table, m, color, colorMap }) {
2109
2125
  " ".repeat(keyW),
2110
2126
  sp
2111
2127
  ] }),
2112
- /* @__PURE__ */ jsx6(Text6, { color, children: "\u2502" })
2128
+ /* @__PURE__ */ jsx6(Text6, { color: BORDER2, children: "\u2502" })
2113
2129
  ] }, i)),
2114
- /* @__PURE__ */ jsx6(Text6, { color, children: bot })
2130
+ /* @__PURE__ */ jsx6(Text6, { color: BORDER2, children: bot })
2115
2131
  ] });
2116
2132
  }
2117
2133
  function ErdView({ data }) {
@@ -2129,7 +2145,7 @@ function ErdView({ data }) {
2129
2145
  {
2130
2146
  table: data.tables[ti],
2131
2147
  m: metrics[ti],
2132
- color: colorMap.get(data.tables[ti].name) ?? BORDER,
2148
+ color: colorMap.get(data.tables[ti].name) ?? BORDER2,
2133
2149
  colorMap
2134
2150
  }
2135
2151
  ) }, ti)) }, ri)) });
@@ -2148,26 +2164,42 @@ function limitLines(s, n) {
2148
2164
  return lines.slice(0, n).join("\n") + `
2149
2165
  \u2026 +${lines.length - n} more lines (scroll up after next submit)`;
2150
2166
  }
2151
- function displayQuery(query) {
2152
- const cols = process.stdout.columns ?? 80;
2153
- const max = Math.max(20, cols - 16);
2154
- const flat = query.replace(/\n/g, " ").replace(/\s+/g, " ").trim();
2155
- return flat.length > max ? flat.slice(0, max) + "\u2026" : flat;
2167
+ var QUERY_HEADER_COLOR = "#9ca3af";
2168
+ function QueryHeader({ label, query }) {
2169
+ const isMultiLine = query.includes("\n");
2170
+ if (isMultiLine) {
2171
+ return /* @__PURE__ */ jsxs7(Box7, { flexDirection: "column", children: [
2172
+ /* @__PURE__ */ jsxs7(Text7, { children: [
2173
+ /* @__PURE__ */ jsx7(Text7, { color: theme.accent, bold: true, children: "\u25CF " }),
2174
+ /* @__PURE__ */ jsxs7(Text7, { color: QUERY_HEADER_COLOR, bold: true, children: [
2175
+ label,
2176
+ ":"
2177
+ ] })
2178
+ ] }),
2179
+ query.split("\n").map((line, i) => /* @__PURE__ */ jsxs7(Text7, { color: QUERY_HEADER_COLOR, bold: true, children: [
2180
+ " ",
2181
+ line
2182
+ ] }, i))
2183
+ ] });
2184
+ }
2185
+ return /* @__PURE__ */ jsxs7(Text7, { children: [
2186
+ /* @__PURE__ */ jsx7(Text7, { color: theme.accent, bold: true, children: "\u25CF " }),
2187
+ /* @__PURE__ */ jsxs7(Text7, { color: QUERY_HEADER_COLOR, bold: true, children: [
2188
+ label,
2189
+ "(",
2190
+ query,
2191
+ ")"
2192
+ ] })
2193
+ ] });
2156
2194
  }
2157
- function EntryView({ entry }) {
2195
+ var EntryView = memo(function EntryView2({ entry }) {
2158
2196
  const showAi = entry.aiResponse !== "" || entry.aiError !== null;
2159
2197
  const showErd = entry.erdData !== null;
2160
2198
  const isShell = entry.query.startsWith("!");
2161
2199
  const isCommand = !isShell && (entry.query.startsWith("/") || entry.query.startsWith("\\"));
2162
- const label = isShell ? "Shell:" : isCommand ? "Command:" : "Query:";
2200
+ const label = isShell ? "Shell" : isCommand ? "Command" : "Query";
2163
2201
  return /* @__PURE__ */ jsxs7(Box7, { flexDirection: "column", marginBottom: 1, paddingX: 1, children: [
2164
- /* @__PURE__ */ jsxs7(Box7, { borderStyle: "round", borderColor: theme.accent, paddingX: 1, children: [
2165
- /* @__PURE__ */ jsxs7(Text7, { color: theme.accent, bold: true, children: [
2166
- label,
2167
- " "
2168
- ] }),
2169
- /* @__PURE__ */ jsx7(Text7, { dimColor: true, children: displayQuery(entry.query) })
2170
- ] }),
2202
+ /* @__PURE__ */ jsx7(QueryHeader, { label, query: entry.query }),
2171
2203
  /* @__PURE__ */ jsx7(Box7, { marginTop: 1, flexDirection: "column", children: isShell ? entry.shellOutput !== null && /* @__PURE__ */ jsx7(Text7, { children: entry.shellOutput || "(no output)" }) : /* @__PURE__ */ jsxs7(Fragment4, { children: [
2172
2204
  entry.commandMessage && (entry.commandMessage.helpData ? /* @__PURE__ */ jsx7(HelpView, { data: entry.commandMessage.helpData }) : entry.commandMessage.ok ? /* @__PURE__ */ jsxs7(Text7, { color: theme.accent, children: [
2173
2205
  "\u2713 ",
@@ -2179,7 +2211,7 @@ function EntryView({ entry }) {
2179
2211
  ] }) : !entry.commandMessage && /* @__PURE__ */ jsx7(QueryResult, { state: entry.queryState, elapsed: entry.elapsed, page: entry.page, pageSize: PAGE_SIZE })
2180
2212
  ] }) })
2181
2213
  ] });
2182
- }
2214
+ });
2183
2215
  function App({ connectionState, aiUrl: aiUrl2, aiModel: aiModel2, aiKey: aiKey2, onChangeDatabase }) {
2184
2216
  const { exit } = useApp();
2185
2217
  const { isRawModeSupported } = useStdin2();
@@ -2203,6 +2235,7 @@ function App({ connectionState, aiUrl: aiUrl2, aiModel: aiModel2, aiKey: aiKey2,
2203
2235
  const [erdData, setErdData] = useState3(null);
2204
2236
  const [isErdLoading, setIsErdLoading] = useState3(false);
2205
2237
  const [completedEntries, setCompletedEntries] = useState3([]);
2238
+ const [clearSeq, setClearSeq] = useState3(0);
2206
2239
  const entryIdRef = useRef2(0);
2207
2240
  const aliasScope = connectionState.status === "connected" ? makeScope(connectionState.driver, connectionState.user, connectionState.host, connectionState.database) : "";
2208
2241
  const [aliases, setAliases] = useState3(
@@ -2233,6 +2266,10 @@ function App({ connectionState, aiUrl: aiUrl2, aiModel: aiModel2, aiKey: aiKey2,
2233
2266
  process.off("SIGCONT", handleCont);
2234
2267
  };
2235
2268
  }, [isRawModeSupported]);
2269
+ useEffect4(() => {
2270
+ if (clearSeq === 0) return;
2271
+ process.stdout.write("\x1B[3J");
2272
+ }, [clearSeq]);
2236
2273
  useEffect4(() => {
2237
2274
  if (!isRawModeSupported) return;
2238
2275
  process.stdout.write("\x1B[?25l");
@@ -2403,7 +2440,6 @@ function App({ connectionState, aiUrl: aiUrl2, aiModel: aiModel2, aiKey: aiKey2,
2403
2440
  void handleErd();
2404
2441
  },
2405
2442
  onClear: () => {
2406
- process.stdout.write("\x1B[2J\x1B[3J\x1B[H");
2407
2443
  setCompletedEntries([]);
2408
2444
  setLastQuery("");
2409
2445
  setCommandMessage(null);
@@ -2413,6 +2449,7 @@ function App({ connectionState, aiUrl: aiUrl2, aiModel: aiModel2, aiKey: aiKey2,
2413
2449
  setAiError(null);
2414
2450
  setElapsed(null);
2415
2451
  setPage(0);
2452
+ setClearSeq((s) => s + 1);
2416
2453
  },
2417
2454
  aliases,
2418
2455
  onSaveAlias: handleSaveAlias,
@@ -2440,17 +2477,11 @@ function App({ connectionState, aiUrl: aiUrl2, aiModel: aiModel2, aiKey: aiKey2,
2440
2477
  const isCommand = !isShellEntry && (lastQuery.startsWith("/") || lastQuery.startsWith("\\"));
2441
2478
  const activeLabel = isShellEntry ? "Shell:" : isCommand ? "Command:" : "Query:";
2442
2479
  return /* @__PURE__ */ jsxs7(Box7, { flexDirection: "column", children: [
2443
- /* @__PURE__ */ jsx7(Static, { items: completedEntries, children: (entry) => /* @__PURE__ */ jsx7(EntryView, { entry }, entry.id) }),
2480
+ completedEntries.map((entry) => /* @__PURE__ */ jsx7(EntryView, { entry }, entry.id)),
2444
2481
  /* @__PURE__ */ jsxs7(Box7, { flexDirection: "column", paddingX: 1, children: [
2445
2482
  lastQuery === "" && /* @__PURE__ */ jsx7(Banner, { connectionState }),
2446
2483
  lastQuery !== "" && /* @__PURE__ */ jsxs7(Box7, { flexDirection: "column", marginBottom: 2, children: [
2447
- /* @__PURE__ */ jsxs7(Box7, { borderStyle: "round", borderColor: theme.accent, paddingX: 1, children: [
2448
- /* @__PURE__ */ jsxs7(Text7, { color: theme.accent, bold: true, children: [
2449
- activeLabel,
2450
- " "
2451
- ] }),
2452
- /* @__PURE__ */ jsx7(Text7, { dimColor: true, children: displayQuery(lastQuery) })
2453
- ] }),
2484
+ /* @__PURE__ */ jsx7(QueryHeader, { label: activeLabel.replace(":", ""), query: lastQuery }),
2454
2485
  /* @__PURE__ */ jsx7(Box7, { marginTop: 1, flexDirection: "column", children: isShellEntry ? isShellRunning ? /* @__PURE__ */ jsx7(Text7, { dimColor: true, children: "running\u2026" }) : /* @__PURE__ */ jsx7(Text7, { children: limitLines(shellOutput ?? "", activePageSize()) }) : /* @__PURE__ */ jsxs7(Fragment4, { children: [
2455
2486
  commandMessage && (commandMessage.helpData ? /* @__PURE__ */ jsx7(HelpView, { data: commandMessage.helpData }) : commandMessage.ok ? /* @__PURE__ */ jsxs7(Text7, { color: theme.accent, children: [
2456
2487
  "\u2713 ",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deaquinodev/querky",
3
- "version": "0.4.6",
3
+ "version": "0.4.7",
4
4
  "description": "A quirky terminal SQL client with vim mode, AI features, and schema-aware autocomplete",
5
5
  "main": "dist/index.js",
6
6
  "files": [