diff --git a/index.html b/index.html index 412e2f8..2f8069e 100644 --- a/index.html +++ b/index.html @@ -6,7 +6,10 @@ Tusk - +
diff --git a/src/components/chat/ChatPanel.tsx b/src/components/chat/ChatPanel.tsx index 94e7424..f3089d2 100644 --- a/src/components/chat/ChatPanel.tsx +++ b/src/components/chat/ChatPanel.tsx @@ -111,13 +111,13 @@ function UsageBadge({ usage }: { usage: ContextUsage | undefined }) { let toneClass = "text-muted-foreground/70"; if (ratio >= 0.85) toneClass = "text-destructive"; - else if (ratio >= 0.6) toneClass = "text-amber-500"; - else if (ratio >= 0.3) toneClass = "text-emerald-500/80"; + else if (ratio >= 0.6) toneClass = "text-warning"; + else if (ratio >= 0.3) toneClass = "text-success/80"; const trackClass = "h-1.5 w-12 overflow-hidden rounded-full bg-muted"; - let fillClass = "bg-emerald-500/70"; + let fillClass = "bg-success/70"; if (ratio >= 0.85) fillClass = "bg-destructive"; - else if (ratio >= 0.6) fillClass = "bg-amber-500"; + else if (ratio >= 0.6) fillClass = "bg-warning"; return ( diff --git a/src/components/editor/SqlEditor.tsx b/src/components/editor/SqlEditor.tsx index 9cc61f6..5df0ff5 100644 --- a/src/components/editor/SqlEditor.tsx +++ b/src/components/editor/SqlEditor.tsx @@ -3,6 +3,7 @@ import { sql, PostgreSQL, StandardSQL } from "@codemirror/lang-sql"; import { keymap } from "@codemirror/view"; import { useCallback, useMemo } from "react"; import { useAppStore } from "@/stores/app-store"; +import { tuskEditorExtensions } from "@/lib/editor-theme"; interface Props { value: string; @@ -44,6 +45,7 @@ export function SqlEditor({ value, onChange, onExecute, onFormat, schema }: Prop const dialect = flavor === "clickhouse" ? StandardSQL : PostgreSQL; const defaultSchema = flavor === "clickhouse" ? undefined : "public"; return [ + tuskEditorExtensions, sql({ dialect, schema: sqlNamespace, @@ -80,7 +82,6 @@ export function SqlEditor({ value, onChange, onExecute, onFormat, schema }: Prop value={value} onChange={handleChange} extensions={extensions} - theme="dark" // height="100%" propagates down to .cm-editor so the inner .cm-scroller // can render a vertical scrollbar; without it, long queries overflow the // flex container and the editor cannot be scrolled. diff --git a/src/components/history/HistoryPanel.tsx b/src/components/history/HistoryPanel.tsx index e622b4d..6440ac4 100644 --- a/src/components/history/HistoryPanel.tsx +++ b/src/components/history/HistoryPanel.tsx @@ -57,9 +57,9 @@ export function HistoryPanel() { >
{entry.status === "success" ? ( - + ) : ( - + )} {entry.sql.length > 80 diff --git a/src/components/layout/ReadOnlyToggle.tsx b/src/components/layout/ReadOnlyToggle.tsx index cd82294..ad60543 100644 --- a/src/components/layout/ReadOnlyToggle.tsx +++ b/src/components/layout/ReadOnlyToggle.tsx @@ -39,8 +39,8 @@ export function ReadOnlyToggle() { size="xs" className={`gap-1.5 font-medium ${ isReadOnly - ? "text-amber-500 hover:bg-amber-500/10 hover:text-amber-500" - : "text-emerald-500 hover:bg-emerald-500/10 hover:text-emerald-500" + ? "text-warning hover:bg-warning/10 hover:text-warning" + : "text-success hover:bg-success/10 hover:text-success" }`} onClick={handleToggle} disabled={toggleMutation.isPending} diff --git a/src/components/layout/StatusBar.tsx b/src/components/layout/StatusBar.tsx index be2e37c..e574c76 100644 --- a/src/components/layout/StatusBar.tsx +++ b/src/components/layout/StatusBar.tsx @@ -42,7 +42,7 @@ export function StatusBar({ rowCount, executionTime }: Props) { @@ -56,8 +56,8 @@ export function StatusBar({ rowCount, executionTime }: Props) { {(readOnlyMap[activeConnectionId] ?? true) ? "READ" : "WRITE"} @@ -86,7 +86,7 @@ export function StatusBar({ rowCount, executionTime }: Props) { diff --git a/src/components/layout/Toolbar.tsx b/src/components/layout/Toolbar.tsx index b652bfc..66d6bb2 100644 --- a/src/components/layout/Toolbar.tsx +++ b/src/components/layout/Toolbar.tsx @@ -66,6 +66,15 @@ export function Toolbar() { "--strip-color": activeColor ?? "transparent", } as React.CSSProperties} > + + TUSK + + +
+