Skip to content

Commit f49dd8a

Browse files
authored
Merge pull request #799 from CodingCatDev/dev
feat(site,chat): ship Clairic extraction model & persistent Ask Agent drawer to production
2 parents db019cc + e9bdcd7 commit f49dd8a

12 files changed

Lines changed: 2464 additions & 841 deletions

File tree

‎apps/site/src/components/ChatModal.astro‎

Lines changed: 732 additions & 299 deletions
Large diffs are not rendered by default.

‎apps/site/src/components/Header.astro‎

Lines changed: 36 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ const desktopLinks = navLinks.filter((link) => link?.sideOnly !== true);
1313
---
1414

1515
<header
16+
id="site-header"
1617
class="fixed left-0 right-0 top-0 z-40 flex items-center justify-between px-6 py-4 shadow-md bg-background"
1718
>
1819
<div class="flex items-center gap-4">
@@ -31,11 +32,35 @@ const desktopLinks = navLinks.filter((link) => link?.sideOnly !== true);
3132
id="search-header-trigger"
3233
data-track="search_open"
3334
data-track-label="header_search"
34-
class="inline-flex items-center justify-center gap-1.5 rounded-md px-2.5 py-1.5 text-xs text-muted-foreground hover:bg-accent hover:text-accent-foreground transition-colors border border-border/60 cursor-pointer"
35+
class="inline-flex min-h-8 min-w-8 items-center justify-center sm:justify-between gap-3 rounded-full px-3 py-1.5 text-xs text-muted-foreground hover:bg-accent hover:text-accent-foreground transition-colors border border-border/70 cursor-pointer"
3536
aria-label="Search CodingCat.dev (⌘K)"
37+
>
38+
<span class="inline-flex items-center gap-1.5">
39+
<svg
40+
class="size-3.5"
41+
viewBox="0 0 24 24"
42+
fill="none"
43+
stroke="currentColor"
44+
stroke-width="2"
45+
stroke-linecap="round"
46+
stroke-linejoin="round"
47+
aria-hidden="true"
48+
>
49+
<circle cx="11" cy="11" r="8"></circle>
50+
<path d="m21 21-4.3-4.3"></path>
51+
</svg>
52+
<span class="hidden sm:inline font-mono text-[11px] uppercase tracking-wider text-foreground">Search</span>
53+
</span>
54+
<span class="hidden md:inline-flex items-center text-[10px] font-mono bg-muted text-foreground px-1.5 py-0.5 rounded border border-border">⌘K</span>
55+
</button>
56+
<button
57+
type="button"
58+
id="ask-agent-header-trigger"
59+
class="inline-flex min-h-8 min-w-8 items-center justify-center gap-1.5 rounded-full px-3 py-1.5 font-mono text-[11px] uppercase tracking-wider text-foreground hover:bg-accent transition-colors border border-border/70 cursor-pointer"
60+
aria-label="Ask Agent AJ"
3661
>
3762
<svg
38-
class="size-4"
63+
class="size-3.5 text-primary"
3964
viewBox="0 0 24 24"
4065
fill="none"
4166
stroke="currentColor"
@@ -44,10 +69,11 @@ const desktopLinks = navLinks.filter((link) => link?.sideOnly !== true);
4469
stroke-linejoin="round"
4570
aria-hidden="true"
4671
>
47-
<circle cx="11" cy="11" r="8"></circle>
48-
<path d="m21 21-4.3-4.3"></path>
72+
<path d="M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z"></path>
73+
<path d="M20 3v4"></path>
74+
<path d="M22 5h-4"></path>
4975
</svg>
50-
<span class="hidden md:inline-flex items-center text-[10px] font-mono bg-muted text-foreground px-1.5 py-0.5 rounded border border-border">⌘K</span>
76+
<span class="hidden sm:inline">Ask Agent</span>
5177
</button>
5278
<ThemeToggle />
5379
<button
@@ -112,11 +138,16 @@ const desktopLinks = navLinks.filter((link) => link?.sideOnly !== true);
112138
const openButton = document.getElementById("nav-drawer-toggle");
113139
const closeButton = document.getElementById("nav-drawer-close");
114140
const searchTrigger = document.getElementById("search-header-trigger");
141+
const askAgentTrigger = document.getElementById("ask-agent-header-trigger");
115142

116143
searchTrigger?.addEventListener("click", () => {
117144
(window as unknown as { openSearchModal?: () => void }).openSearchModal?.();
118145
});
119146

147+
askAgentTrigger?.addEventListener("click", () => {
148+
(window as unknown as { toggleAgentAjDrawer?: () => void }).toggleAgentAjDrawer?.();
149+
});
150+
120151
const setOpen = (open: boolean) => {
121152
if (!drawer) {
122153
return;

0 commit comments

Comments
 (0)