research-agent-ui 0.1.218 → 0.1.220

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.
package/README.md CHANGED
@@ -20,259 +20,285 @@
20
20
  </p>
21
21
  <!-- template-git-repo:badges:end -->
22
22
 
23
- # research-agent-ui
24
-
25
-
26
- The QwkSearch app UI: conversation window, article reader, search config,
27
- file uploads, chat history — plus the app shell (providers, app dock, cookie
28
- banner, the research/docs view switch) that assembles them into a whole app.
29
- Includes the shadcn primitives and icons the components depend on, so it can be
30
- dropped into a Next.js app with a single dependency.
31
-
32
- ![img1](https://i.imgur.com/UxNJOKy.png)
33
-
34
- ## Two entry points: with and without the editor
35
-
36
- The package ships the same app twice, and the only difference is whether the
37
- REASON document editor and its file sidebar come along:
38
-
39
- | Import from | You get | Extra dependencies |
40
- | --- | --- | --- |
41
- | `research-agent-ui` | Chat, search, article reader, app shell | none |
42
- | `research-agent-ui/workspace` | All of the above **plus** the REASON editor, document tree, and file sidebar | `react-reason-editor`, `react-reason-editor-sidebar` |
43
-
44
- `research-agent-ui/workspace` re-exports everything the root entry does, so a
45
- host that wants documents imports from that one path rather than mixing the
46
- two. Going the other way, the root entry's import graph never reaches
47
- `react-reason-editor` — the editor's (large) dependency tree stays out of a
48
- chat-only consumer's bundle entirely. `test/entryBoundaries.test.ts` enforces
49
- that in both directions.
50
-
51
- The two editor packages are declared as **optional** peer dependencies:
52
- installing `research-agent-ui` on its own is enough for the chat-only build,
53
- and package managers will not warn about the missing peers.
54
-
55
- ## Usage
56
-
57
- ### The whole app in one component
58
-
59
- ```tsx
60
- // Chat only — no editor, no sidebar.
61
- import { QwkSearchApp } from 'research-agent-ui';
62
-
63
- export default function Page() {
64
- return (
65
- <QwkSearchApp
66
- authClient={myAuthClient}
67
- config={{ appName: 'MyApp', footerLinks: myLinks }}
68
- />
69
- );
70
- }
71
- ```
72
-
73
- ```tsx
74
- // The same app, with documents.
75
- import { QwkSearchWorkspaceApp } from 'research-agent-ui/workspace';
76
-
77
- export default function Page() {
78
- return (
79
- <QwkSearchWorkspaceApp
80
- authClient={myAuthClient}
81
- config={{ appName: 'MyApp', footerLinks: myLinks }}
82
- />
83
- );
84
- }
85
- ```
86
-
87
- `QwkSearchProviders` is the same shell without a page inside it, for hosts that
88
- render their own routes within the app chrome. It accepts a `ChromeProvider` to
89
- mount app-owned context (a settings modal, say) inside the stack, and
90
- `showDock` / `showCookieConsent` / `showToaster` to opt out of individual
91
- pieces.
92
-
93
- ### Composing the pieces yourself
94
-
95
- ```tsx
96
- import {
97
- ChatProvider,
98
- SessionProvider,
99
- ExtractPanelProvider,
100
- ChatWindow,
101
- configureResearchAgentUI,
102
- } from 'research-agent-ui';
103
-
104
- configureResearchAgentUI({
105
- appName: 'MyApp',
106
- getAutoMediaSearch: () => true,
107
- // ...see ResearchAgentUIConfig for the full list of overridable values
108
- });
109
-
110
- function App() {
111
- return (
112
- <SessionProvider authClient={myAuthClient}>
113
- <ExtractPanelProvider>
114
- <ChatProvider>
115
- <ChatWindow />
116
- </ChatProvider>
117
- </ExtractPanelProvider>
118
- </SessionProvider>
119
- );
120
- }
121
- ```
122
-
123
- ## Storybook
124
-
125
- Individual UI pieces can be browsed in isolation with [Storybook](https://storybook.js.org/).
126
- Stories render against **mock data only** (see `src/stories/mocks.ts`) — no API,
127
- auth session, or chat backend is required, so you can develop and review the
128
- chat components (message header with timestamp/copy/edit actions, search
129
- progress, follow-up suggestions, file & pasted-content cards) on their own.
130
-
131
- ```bash
132
- # from packages/research-agent-ui
133
- bun run storybook # dev server on http://localhost:6006
134
- bun run build-storybook # static build → storybook-static/
135
- ```
136
-
137
- A light/dark toggle in the toolbar switches between the two token palettes
138
- (mirrored from the host app's `globals.css` in `.storybook/preview.css`). Add
139
- new stories next to their component as `*.stories.tsx`.
140
-
141
- ## API Routes (`research-agent-ui/api`)
142
-
143
- All 25 Next.js route handlers are exported from the `research-agent-ui/api`
144
- subpath as factory functions. Each factory accepts a **deps** object that
145
- injects your app's database, auth helpers, and other services, so the same
146
- handler logic works in any Next.js project without hard-coding any imports.
147
-
148
- ### How it works
149
-
150
- The route logic lives in `packages/research-agent-ui/src/api/handlers/`.
151
- Your app's `app/api/agent/*/route.ts` files become thin wrappers that call
152
- the factory and re-export the HTTP method handlers.
153
-
154
- ### Step 1 — install / workspace link
155
-
156
- If you are in this monorepo, `research-agent-ui` is already linked via the
157
- `workspace:*` protocol. For an external project, install the published
158
- package:
159
-
160
- ```bash
161
- npm install research-agent-ui
162
- # or
163
- bun add research-agent-ui
164
- ```
165
-
166
- ### Step 2 — create your route files
167
-
168
- For each API path, create a `route.ts` that calls the matching factory and
169
- passes in your app's dependencies. Every factory is named
170
- `create<RouteName>Handler` and is exported from `research-agent-ui/api`.
171
-
172
- #### Example: `app/api/agent/chats/route.ts`
173
-
174
- ```ts
175
- import { createChatsHandler } from "research-agent-ui/api";
176
- import { getDB } from "@/lib/database";
177
- import { chats, messages } from "@/lib/database/schema";
178
- import { requireUserId } from "@/lib/auth/session";
179
-
180
- const handler = createChatsHandler({
181
- getDB,
182
- requireUserId,
183
- schema: { chats, messages },
184
- });
185
- export const { GET, DELETE } = handler;
186
- ```
187
-
188
- #### Example: `app/api/agent/article-followups/route.ts`
189
-
190
- ```ts
191
- import { createArticleFollowupsHandler } from "research-agent-ui/api";
192
- import { getUserId } from "@/lib/auth/session";
193
- import { getDB } from "@/lib/database";
194
- import { user as userSchema } from "@/lib/database/schema";
195
- import { getEnv } from "@/lib/env";
196
-
197
- export const POST = createArticleFollowupsHandler({
198
- getUserId,
199
- requireUserId: async () => {
200
- const id = await getUserId();
201
- if (!id) throw new Error("Unauthorized");
202
- return id;
203
- },
204
- getDB,
205
- userSchema,
206
- getEnv,
207
- });
208
- ```
209
-
210
- ### All available factories and their dep shapes
211
-
212
- | Factory | File | Required deps |
213
- |---|---|---|
214
- | `createArticleFollowupsHandler` | `article-followups` | `getUserId`, `requireUserId`, `getDB`, `userSchema`, `getEnv` |
215
- | `createArticleQAHandler` | `article-qa` | `getUserId`, `requireUserId`, `getDB`, `userSchema`, `getEnv` |
216
- | `createChatsHandler` | `chats` | `getDB`, `requireUserId`, `schema.chats`, `schema.messages` |
217
- | `createChatByIdHandler` | `chats/[id]` | `getDB`, `requireUserId`, `schema.chats`, `schema.messages` |
218
- | `createChatsSearchHandler` | `chats/search` | `getDB`, `requireUserId`, `schema.chats`, `schema.messages` |
219
- | `createChatsShareHandler` | `chats/share` | `getDB`, `requireUserId`, `schema.chats`, `schema.messages` |
220
- | `createMessagesHandler` | `messages` | `getDB`, `requireUserId`, `messagesSchema` |
221
- | `createProvidersHandler` | `providers` | `getSession` |
222
- | `createProviderByIdHandler` | `providers/[id]` | _(none)_ |
223
- | `createProviderModelsHandler` | `providers/[id]/models` | _(none)_ |
224
- | `createMCPServersHandler` | `mcpservers` | `configManager`, `getConfiguredMCPServers` |
225
- | `createMCPServerByIdHandler` | `mcpservers/[id]` | `configManager`, `getConfiguredMCPServers` |
226
- | `createMCPServerToggleHandler` | `mcpservers/[id]/toggle` | `configManager`, `getConfiguredMCPServers` |
227
- | `createSearchHandler` | `search` | `searxngDomain?` (default: `https://search.qwksearch.com`) |
228
- | `createDiscoverHandler` | `discover` | _(none)_ |
229
- | `createAutocompleteHandler` | `autocomplete` | _(none)_ |
230
- | `createSuggestionsHandler` | `suggestions` | _(none)_ |
231
- | `createAgentsHandler` | `agents` | `getUserId`, `requireUserId`, `getDB`, `userSchema`, `getEnv` |
232
- | `createRewriteHandler` | `rewrite` | `getEnv`, `generateText`, `createGroq` |
233
- | `createVoiceHandler` | `voice` | `getUserId`, `checkTTSRateLimit`, `generateSpeech` |
234
- | `createTranscriptHandler` | `transcript` | `getCloudflareContext` |
235
- | `createTestModelsHandler` | `test-models` | _(none)_ |
236
- | `createValidateOpenRouterHandler` | `validate-openrouter` | `validateOpenRouterModels` |
237
-
238
- ### Dep type definitions
239
-
240
- All dep interfaces are exported from `research-agent-ui/api`:
241
-
242
- ```ts
243
- import type {
244
- ArticleDeps,
245
- ChatsDeps,
246
- MessagesDeps,
247
- ProvidersDeps,
248
- MCPServersDeps,
249
- SearchDeps,
250
- VoiceDeps,
251
- TranscriptDeps,
252
- RewriteDeps,
253
- ValidateOpenRouterDeps,
254
- AgentsDeps,
255
- } from "research-agent-ui/api";
256
- ```
257
-
258
- ### The chat route
259
-
260
- `POST /api/agent/chat` is not migrated into this package because it delegates
261
- to a full `handleChatRequest` orchestrator that is app-specific (streaming,
262
- search integration, database writes). Keep it directly in your app:
263
-
264
- ```ts
265
- // app/api/agent/chat/route.ts
266
- import { handleChatRequest } from "@/lib/chat";
267
-
268
- export const runtime = "nodejs";
269
- export const dynamic = "force-dynamic";
270
- export const POST = handleChatRequest;
271
- ```
272
-
273
- ## Configuration
274
-
275
- `configureResearchAgentUI` overrides app-specific values (branding strings,
276
- the Google API key used by the Drive picker, and the auto-media-search
277
- toggle) that would otherwise couple this package to a specific app. See
278
- `ResearchAgentUIConfig` in `src/config.ts` for the full list.
23
+ # research-agent-ui
24
+
25
+
26
+ The QwkSearch app UI: conversation window, article reader, search config,
27
+ file uploads, chat history — plus the app shell (providers, app dock, cookie
28
+ banner, the research/docs view switch) that assembles them into a whole app.
29
+ Includes the shadcn primitives and icons the components depend on, so it can be
30
+ dropped into a Next.js app with a single dependency.
31
+
32
+ ![img1](https://i.imgur.com/UxNJOKy.png)
33
+
34
+ ## Two entry points: with and without the editor
35
+
36
+ The package ships the same app twice, and the only difference is whether the
37
+ REASON document editor and its file sidebar come along:
38
+
39
+ | Import from | You get | Extra dependencies |
40
+ | --- | --- | --- |
41
+ | `research-agent-ui` | Chat, search, article reader, app shell | none |
42
+ | `research-agent-ui/workspace` | All of the above **plus** the REASON editor, document tree, and file sidebar | `react-reason-editor`, `react-reason-editor-sidebar` |
43
+
44
+ `research-agent-ui/workspace` re-exports everything the root entry does, so a
45
+ host that wants documents imports from that one path rather than mixing the
46
+ two. Going the other way, the root entry's import graph never reaches
47
+ `react-reason-editor` — the editor's (large) dependency tree stays out of a
48
+ chat-only consumer's bundle entirely. `test/entryBoundaries.test.ts` enforces
49
+ that in both directions.
50
+
51
+ The two editor packages are declared as **optional** peer dependencies:
52
+ installing `research-agent-ui` on its own is enough for the chat-only build,
53
+ and package managers will not warn about the missing peers.
54
+
55
+ ## Spotlight search
56
+
57
+ `QwkSearchProviders` mounts a macOS-Spotlight-style command palette over the
58
+ whole app. <kbd>Ctrl</kbd> <kbd>Space</kbd> opens it (Cmd-Space belongs to
59
+ macOS), or call `openSpotlight()` from your own chrome. Typing searches past
60
+ chats, app pages, settings sections and actions at once, with "ask the research
61
+ agent this" pinned to the top; a leading letter scopes the search to one source
62
+ — `c ` chats, `t ` pages, `s ` settings, `a ` actions, `w ` ask — and
63
+ <kbd>Tab</kbd> cycles between them.
64
+
65
+ ```tsx
66
+ import { QwkSearchProviders, openSpotlight } from 'research-agent-ui';
67
+
68
+ <QwkSearchProviders authClient={authClient} showSpotlight> {/* the default */}
69
+ <YourApp />
70
+ </QwkSearchProviders>;
71
+
72
+ // …and from a button somewhere in your own chrome:
73
+ <button onClick={() => openSpotlight()}>Search everything</button>;
74
+ ```
75
+
76
+ Rows that open a chat or a settings section go through `onOpenChat` /
77
+ `onOpenSettings` first, so a host rendering chats inline handles them without
78
+ navigating; returning anything but `true` falls back to `/c/<id>` and
79
+ `/settings/<section>`.
80
+
81
+ ## Usage
82
+
83
+ ### The whole app in one component
84
+
85
+ ```tsx
86
+ // Chat only — no editor, no sidebar.
87
+ import { QwkSearchApp } from 'research-agent-ui';
88
+
89
+ export default function Page() {
90
+ return (
91
+ <QwkSearchApp
92
+ authClient={myAuthClient}
93
+ config={{ appName: 'MyApp', footerLinks: myLinks }}
94
+ />
95
+ );
96
+ }
97
+ ```
98
+
99
+ ```tsx
100
+ // The same app, with documents.
101
+ import { QwkSearchWorkspaceApp } from 'research-agent-ui/workspace';
102
+
103
+ export default function Page() {
104
+ return (
105
+ <QwkSearchWorkspaceApp
106
+ authClient={myAuthClient}
107
+ config={{ appName: 'MyApp', footerLinks: myLinks }}
108
+ />
109
+ );
110
+ }
111
+ ```
112
+
113
+ `QwkSearchProviders` is the same shell without a page inside it, for hosts that
114
+ render their own routes within the app chrome. It accepts a `ChromeProvider` to
115
+ mount app-owned context (a settings modal, say) inside the stack, and
116
+ `showDock` / `showCookieConsent` / `showToaster` to opt out of individual
117
+ pieces.
118
+
119
+ ### Composing the pieces yourself
120
+
121
+ ```tsx
122
+ import {
123
+ ChatProvider,
124
+ SessionProvider,
125
+ ExtractPanelProvider,
126
+ ChatWindow,
127
+ configureResearchAgentUI,
128
+ } from 'research-agent-ui';
129
+
130
+ configureResearchAgentUI({
131
+ appName: 'MyApp',
132
+ getAutoMediaSearch: () => true,
133
+ // ...see ResearchAgentUIConfig for the full list of overridable values
134
+ });
135
+
136
+ function App() {
137
+ return (
138
+ <SessionProvider authClient={myAuthClient}>
139
+ <ExtractPanelProvider>
140
+ <ChatProvider>
141
+ <ChatWindow />
142
+ </ChatProvider>
143
+ </ExtractPanelProvider>
144
+ </SessionProvider>
145
+ );
146
+ }
147
+ ```
148
+
149
+ ## Storybook
150
+
151
+ Individual UI pieces can be browsed in isolation with [Storybook](https://storybook.js.org/).
152
+ Stories render against **mock data only** (see `src/stories/mocks.ts`) — no API,
153
+ auth session, or chat backend is required, so you can develop and review the
154
+ chat components (message header with timestamp/copy/edit actions, search
155
+ progress, follow-up suggestions, file & pasted-content cards) on their own.
156
+
157
+ ```bash
158
+ # from packages/research-agent-ui
159
+ bun run storybook # dev server on http://localhost:6006
160
+ bun run build-storybook # static build → storybook-static/
161
+ ```
162
+
163
+ A light/dark toggle in the toolbar switches between the two token palettes
164
+ (mirrored from the host app's `globals.css` in `.storybook/preview.css`). Add
165
+ new stories next to their component as `*.stories.tsx`.
166
+
167
+ ## API Routes (`research-agent-ui/api`)
168
+
169
+ All 25 Next.js route handlers are exported from the `research-agent-ui/api`
170
+ subpath as factory functions. Each factory accepts a **deps** object that
171
+ injects your app's database, auth helpers, and other services, so the same
172
+ handler logic works in any Next.js project without hard-coding any imports.
173
+
174
+ ### How it works
175
+
176
+ The route logic lives in `packages/research-agent-ui/src/api/handlers/`.
177
+ Your app's `app/api/agent/*/route.ts` files become thin wrappers that call
178
+ the factory and re-export the HTTP method handlers.
179
+
180
+ ### Step 1 — install / workspace link
181
+
182
+ If you are in this monorepo, `research-agent-ui` is already linked via the
183
+ `workspace:*` protocol. For an external project, install the published
184
+ package:
185
+
186
+ ```bash
187
+ npm install research-agent-ui
188
+ # or
189
+ bun add research-agent-ui
190
+ ```
191
+
192
+ ### Step 2 — create your route files
193
+
194
+ For each API path, create a `route.ts` that calls the matching factory and
195
+ passes in your app's dependencies. Every factory is named
196
+ `create<RouteName>Handler` and is exported from `research-agent-ui/api`.
197
+
198
+ #### Example: `app/api/agent/chats/route.ts`
199
+
200
+ ```ts
201
+ import { createChatsHandler } from "research-agent-ui/api";
202
+ import { getDB } from "@/lib/database";
203
+ import { chats, messages } from "@/lib/database/schema";
204
+ import { requireUserId } from "@/lib/auth/session";
205
+
206
+ const handler = createChatsHandler({
207
+ getDB,
208
+ requireUserId,
209
+ schema: { chats, messages },
210
+ });
211
+ export const { GET, DELETE } = handler;
212
+ ```
213
+
214
+ #### Example: `app/api/agent/article-followups/route.ts`
215
+
216
+ ```ts
217
+ import { createArticleFollowupsHandler } from "research-agent-ui/api";
218
+ import { getUserId } from "@/lib/auth/session";
219
+ import { getDB } from "@/lib/database";
220
+ import { user as userSchema } from "@/lib/database/schema";
221
+ import { getEnv } from "@/lib/env";
222
+
223
+ export const POST = createArticleFollowupsHandler({
224
+ getUserId,
225
+ requireUserId: async () => {
226
+ const id = await getUserId();
227
+ if (!id) throw new Error("Unauthorized");
228
+ return id;
229
+ },
230
+ getDB,
231
+ userSchema,
232
+ getEnv,
233
+ });
234
+ ```
235
+
236
+ ### All available factories and their dep shapes
237
+
238
+ | Factory | File | Required deps |
239
+ |---|---|---|
240
+ | `createArticleFollowupsHandler` | `article-followups` | `getUserId`, `requireUserId`, `getDB`, `userSchema`, `getEnv` |
241
+ | `createArticleQAHandler` | `article-qa` | `getUserId`, `requireUserId`, `getDB`, `userSchema`, `getEnv` |
242
+ | `createChatsHandler` | `chats` | `getDB`, `requireUserId`, `schema.chats`, `schema.messages` |
243
+ | `createChatByIdHandler` | `chats/[id]` | `getDB`, `requireUserId`, `schema.chats`, `schema.messages` |
244
+ | `createChatsSearchHandler` | `chats/search` | `getDB`, `requireUserId`, `schema.chats`, `schema.messages` |
245
+ | `createChatsShareHandler` | `chats/share` | `getDB`, `requireUserId`, `schema.chats`, `schema.messages` |
246
+ | `createMessagesHandler` | `messages` | `getDB`, `requireUserId`, `messagesSchema` |
247
+ | `createProvidersHandler` | `providers` | `getSession` |
248
+ | `createProviderByIdHandler` | `providers/[id]` | _(none)_ |
249
+ | `createProviderModelsHandler` | `providers/[id]/models` | _(none)_ |
250
+ | `createMCPServersHandler` | `mcpservers` | `configManager`, `getConfiguredMCPServers` |
251
+ | `createMCPServerByIdHandler` | `mcpservers/[id]` | `configManager`, `getConfiguredMCPServers` |
252
+ | `createMCPServerToggleHandler` | `mcpservers/[id]/toggle` | `configManager`, `getConfiguredMCPServers` |
253
+ | `createSearchHandler` | `search` | `searxngDomain?` (default: `https://search.qwksearch.com`) |
254
+ | `createDiscoverHandler` | `discover` | _(none)_ |
255
+ | `createAutocompleteHandler` | `autocomplete` | _(none)_ |
256
+ | `createSuggestionsHandler` | `suggestions` | _(none)_ |
257
+ | `createAgentsHandler` | `agents` | `getUserId`, `requireUserId`, `getDB`, `userSchema`, `getEnv` |
258
+ | `createRewriteHandler` | `rewrite` | `getEnv`, `generateText`, `createGroq` |
259
+ | `createVoiceHandler` | `voice` | `getUserId`, `checkTTSRateLimit`, `generateSpeech` |
260
+ | `createTranscriptHandler` | `transcript` | `getCloudflareContext` |
261
+ | `createTestModelsHandler` | `test-models` | _(none)_ |
262
+ | `createValidateOpenRouterHandler` | `validate-openrouter` | `validateOpenRouterModels` |
263
+
264
+ ### Dep type definitions
265
+
266
+ All dep interfaces are exported from `research-agent-ui/api`:
267
+
268
+ ```ts
269
+ import type {
270
+ ArticleDeps,
271
+ ChatsDeps,
272
+ MessagesDeps,
273
+ ProvidersDeps,
274
+ MCPServersDeps,
275
+ SearchDeps,
276
+ VoiceDeps,
277
+ TranscriptDeps,
278
+ RewriteDeps,
279
+ ValidateOpenRouterDeps,
280
+ AgentsDeps,
281
+ } from "research-agent-ui/api";
282
+ ```
283
+
284
+ ### The chat route
285
+
286
+ `POST /api/agent/chat` is not migrated into this package because it delegates
287
+ to a full `handleChatRequest` orchestrator that is app-specific (streaming,
288
+ search integration, database writes). Keep it directly in your app:
289
+
290
+ ```ts
291
+ // app/api/agent/chat/route.ts
292
+ import { handleChatRequest } from "@/lib/chat";
293
+
294
+ export const runtime = "nodejs";
295
+ export const dynamic = "force-dynamic";
296
+ export const POST = handleChatRequest;
297
+ ```
298
+
299
+ ## Configuration
300
+
301
+ `configureResearchAgentUI` overrides app-specific values (branding strings,
302
+ the Google API key used by the Drive picker, and the auto-media-search
303
+ toggle) that would otherwise couple this package to a specific app. See
304
+ `ResearchAgentUIConfig` in `src/config.ts` for the full list.
@@ -45,5 +45,11 @@ export interface QwkSearchProvidersProps {
45
45
  showCookieConsent?: boolean;
46
46
  /** Render the `sonner` toaster. Default true. */
47
47
  showToaster?: boolean;
48
+ /**
49
+ * Mount the Ctrl-Space spotlight palette. Default true. Turn it off in a
50
+ * shell that already binds that chord (a VS Code webview, say, where the
51
+ * host may want the keystroke for itself).
52
+ */
53
+ showSpotlight?: boolean;
48
54
  }
49
- export declare function QwkSearchProviders({ children, authClient, config, googleOneTap, docsEnabled, ChromeProvider, showDock, showCookieConsent, showToaster, }: QwkSearchProvidersProps): import("react").JSX.Element;
55
+ export declare function QwkSearchProviders({ children, authClient, config, googleOneTap, docsEnabled, ChromeProvider, showDock, showCookieConsent, showToaster, showSpotlight, }: QwkSearchProvidersProps): import("react").JSX.Element;
@@ -0,0 +1,9 @@
1
+ import type { ReactNode } from 'react';
2
+ export interface FocusMode {
3
+ /** The value stored in chat state and sent with a search request. */
4
+ key: string;
5
+ title: string;
6
+ description: string;
7
+ icon: ReactNode;
8
+ }
9
+ export declare const focusModes: FocusMode[];
@@ -0,0 +1,5 @@
1
+ /** Opens the spotlight palette from anywhere in the tree, without threading
2
+ * state through props. A no-op if the palette is not mounted. */
3
+ export declare function openSpotlight(): void;
4
+ export declare function SpotlightPalette(): import("react").JSX.Element;
5
+ export default SpotlightPalette;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * @fileoverview The Ctrl-Space spotlight palette — a single bar that searches
3
+ * chats, pages, settings and actions, and asks the research agent anything
4
+ * that matches none of them.
5
+ */
6
+ export { SpotlightPalette, openSpotlight } from './SpotlightPalette';
7
+ export { buildActionItems, buildChatItems, buildPageItems, buildSearchItem, buildSettingItems, } from './spotlightItems';
8
+ export type { SpotlightContext, SpotlightIcon, SpotlightItem, } from './spotlightItems';
9
+ export { matchSpotlight, parsePrefix, prefixForSource, SPOTLIGHT_PREFIXES, } from './spotlightMatch';
10
+ export type { SpotlightMatch, SpotlightMatchable, SpotlightPrefix, SpotlightSource, } from './spotlightMatch';
11
+ export { SPOTLIGHT_LINKS, type SpotlightLink } from './spotlightLinks';