xonecas.io
53129
Pa

PAT / commit 5dce873

feat: adds tests for ratelimit lib and test runner

xonecas2025-12-17 5dce87377fa25a1c4389dd6779e68cfbf0ce40f2 parent 373aef0

18 files changed

This diff is too big to show in full. The first 1000 lines are below, and every file is listed with its counts.

AGENTS.md+91−20
@@ -12,6 +12,9 @@ All commands should be run from the project root directory:
1212 - **Lint**: `npm run lint` - Runs ESLint to check code quality
1313 - **Format**: `npm run format` - Formats all files with Prettier
1414 - **Format Check**: `npm run format:check` - Checks code formatting without making changes
15+- **Test**: `npm test` - Runs tests in watch mode using Vitest
16+- **Test UI**: `npm run test:ui` - Opens Vitest UI for interactive test running
17+- **Test Run**: `npm run test:run` - Runs tests once and exits
1518 - **DB Generate**: `npm run db:generate` - Generates database migrations using Drizzle Kit
1619 - **DB Migrate**: `npm run db:migrate` - Runs database migrations
1720 - **DB Studio**: `npm run db:studio` - Opens Drizzle Studio for database management
@@ -29,6 +32,8 @@ Agents MUST use only these existing dependencies. Do NOT add new dependencies wi
2932 - **@tailwindcss/typography**: ^0.5.x - Tailwind CSS plugin for beautiful typographic defaults
3033 - **typescript**: ^5.4.2 - TypeScript compiler
3134 - **ollama**: ^0.6.3 - Official Ollama npm package for model interaction
35+- **@googleapis/customsearch**: ^7.0.1 - Google Custom Search API client
36+- **googleapis**: ^169.0.0 - Google APIs client library
3237 - **autoprefixer**: ^10.4.17 - CSS post-processor
3338 - **postcss**: ^8.4.30 - CSS transformation tool
3439 - **drizzle-orm**: ^0.45.1 - TypeScript ORM for SQL databases
@@ -49,6 +54,8 @@ Agents MUST use only these existing dependencies. Do NOT add new dependencies wi
4954 - **prettier-plugin-tailwindcss**: ^0.5.11 - Prettier plugin for sorting Tailwind CSS classes
5055 - **drizzle-kit**: ^0.31.8 - Drizzle ORM migration and introspection tool
5156 - **@types/better-sqlite3**: ^7.6.13 - TypeScript types for better-sqlite3
57+- **vitest**: ^4.0.16 - Fast unit test framework for Vite
58+- **@vitest/ui**: ^4.0.16 - Vitest UI for interactive test running
5259
5360 ## Code Style Guidelines
5461
@@ -68,7 +75,8 @@ Agents MUST use only these existing dependencies. Do NOT add new dependencies wi
6875 - Reusable components in `src/components/`
6976 - Icon components in `src/components/icons/`
7077 - Custom React hooks in `src/hooks/`
71- - Shared TypeScript types in `src/types.ts`
78+ - Test files use `.test.ts` or `.test.tsx` extension (e.g., `ratelimit.test.ts`)
79+ - TypeScript types are imported directly from `src/lib/db/schema` (Drizzle ORM inferred types)
7280 - Use TypeScript for all code files (`.ts`, `.tsx`)
7381
7482 2. **Component Style**:
@@ -150,7 +158,9 @@ Agents MUST use only these existing dependencies. Do NOT add new dependencies wi
150158 ├── src/
151159 │ ├── components/
152160 │ │ ├── icons/
153-│ │ │ └── PaperPlaneIcon.tsx # Reusable icon components
161+│ │ │ ├── ChevronDownIcon.tsx # Reusable icon components
162+│ │ │ ├── PaperPlaneIcon.tsx
163+│ │ │ └── PlusIcon.tsx
154164 │ │ ├── MessageInput.tsx # Message input form component
155165 │ │ ├── NoThreadSelected.tsx # Welcome screen when no thread selected
156166 │ │ └── Sidebar.tsx # Sidebar component with thread selection
@@ -160,15 +170,23 @@ Agents MUST use only these existing dependencies. Do NOT add new dependencies wi
160170 │ │ ├── db/
161171 │ │ │ ├── index.ts # Database connection and setup
162172 │ │ │ └── schema.ts # Drizzle ORM schema definitions
173+│ │ ├── cache.ts # File-based caching utility with TTL support
163174 │ │ ├── debug.ts # Debug logging utility (development only)
164-│ │ └── ollama.ts # Ollama API wrapper with tool calling support
165-│ └── types.ts # Shared TypeScript type definitions
175+│ │ ├── ratelimit.ts # Reusable rate limiting utility using cache
176+│ │ ├── ratelimit.test.ts # Tests for rate limiting utility
177+│ │ └── ollama/
178+│ │ ├── index.ts # Ollama API wrapper with tool calling support
179+│ │ ├── duckduckgo.ts # DuckDuckGo Instant Answer tool
180+│ │ ├── weather.ts # Open-Meteo weather tool
181+│ │ └── websearch.ts # Google Custom Search tool
166182 ├── drizzle/ # Generated migration files
167183 │ ├── meta/ # Migration metadata
168184 │ └── *.sql # SQL migration files
169185 ├── data/ # Database files (created at runtime)
170-│ └── database.db # SQLite database file
186+│ ├── database.db # SQLite database file
187+│ └── cache.json # Cache file (created automatically)
171188 ├── drizzle.config.ts # Drizzle Kit configuration
189+├── vitest.config.ts # Vitest test framework configuration
172190 ├── package.json
173191 ├── tsconfig.json
174192 └── tailwind.config.js
@@ -194,13 +212,14 @@ Agents MUST use only these existing dependencies. Do NOT add new dependencies wi
194212
195213 - Default model: `gpt-oss`
196214 - Function: `fetchOllamaResponse(messages: OllamaMessageInput[], model?: string)`
197-- Returns: Promise<OllamaResponse> with `{ content: string, generationTimeMs: number }`
215+- Returns: Promise<OllamaResponse> with `{ content: string, generationTimeMs: number, toolCalls?: any[] }`
198216 - Uses `ollama.chat()` API with full conversation history
199217 - **Tool Calling Support**: Supports tool calling with automatic iteration to exhaust tool calls
200218 - Tools are executed and results are sent back to the model until a final response is generated
201219 - Maximum 10 iterations to prevent infinite loops
202- - Currently supports: `query_duckduckgo` tool for DuckDuckGo Instant Answer API queries, and `query_weather` tool for Open-Meteo weather API queries
203-- Located in: `src/lib/ollama.ts`
220+ - Currently supports: `query_duckduckgo` tool for DuckDuckGo Instant Answer API queries, `query_weather` tool for Open-Meteo weather API queries, and `query_web_search` tool for Google Custom Search API queries
221+- Located in: `src/lib/ollama/index.ts`
222+- Tool implementations are modularized in separate files: `duckduckgo.ts`, `weather.ts`, `websearch.ts`
204223
205224 ### Tool Integration
206225
@@ -208,7 +227,9 @@ Agents MUST use only these existing dependencies. Do NOT add new dependencies wi
208227 - Function: `queryDuckDuckGo(query: string): Promise<string>`
209228 - Returns formatted information including heading, abstract, answer, definition, and related topics
210229 - Handles cases where no instant answer is available (limited API coverage)
211- - Located in: `src/lib/ollama.ts`
230+ - Enforces rate limit of 500 requests per 24 hours using the rate limit utility (persisted across restarts via cache)
231+ - Results are cached for 6 hours using the cache utility
232+ - Located in: `src/lib/ollama/duckduckgo.ts`
212233
213234 - **Weather Tool** (`query_weather`): Queries Open-Meteo's weather API for current conditions and forecasts
214235 - Function: `queryWeather(location: string): Promise<string>`
@@ -216,7 +237,36 @@ Agents MUST use only these existing dependencies. Do NOT add new dependencies wi
216237 - Returns current weather conditions (temperature, humidity, wind speed, conditions) and 3-day forecast
217238 - Supports any location worldwide (city names, cities with countries, etc.)
218239 - Uses WMO weather codes converted to human-readable descriptions
219- - Located in: `src/lib/ollama.ts`
240+ - Enforces rate limit of 1000 requests per 24 hours using the rate limit utility (persisted across restarts via cache)
241+ - Results are cached for 6 hours using the cache utility
242+ - Located in: `src/lib/ollama/weather.ts`
243+
244+- **Web Search Tool** (`query_web_search`): Performs web searches using Google Custom Search API
245+ - Function: `queryWebSearch(query: string): Promise<string>`
246+ - Returns formatted search results with titles, URLs, and snippets
247+ - Enforces rate limit of 100 requests per 24 hours using the rate limit utility (persisted across restarts via cache)
248+ - Results are cached for 6 hours using the cache utility
249+ - Requires `GOOGLE_CUSTOM_SEARCH_API_KEY` and `GOOGLE_CUSTOM_SEARCH_ENGINE_ID` environment variables
250+ - Located in: `src/lib/ollama/websearch.ts`
251+
252+### Cache Utility
253+
254+- **File-based Caching** (`src/lib/cache.ts`): Persistent caching utility with TTL support
255+ - Functions: `getCache<T>(key: string)`, `setCache<T>(key: string, value: T, ttlMs?: number)`, `deleteCache(key: string)`, `clearCache()`, `hasCache(key: string)`
256+ - Stores cache data in `data/cache.json` (created automatically)
257+ - Automatically cleans up expired entries on load
258+ - Used by tool implementations to cache API responses (6-hour TTL)
259+ - Thread-safe file operations with error handling
260+
261+### Rate Limit Utility
262+
263+- **Rate Limiting** (`src/lib/ratelimit.ts`): Reusable rate limiting utility using the cache system
264+ - Function: `createRateLimiter(config: RateLimitConfig)` - Creates a rate limiter instance
265+ - Configuration: `{ maxRequests: number, windowMs: number, identifier: string }`
266+ - Methods: `check()`, `increment()`, `reset()`, `getState()`
267+ - Uses the cache utility for persistence across restarts
268+ - Automatically handles window resets when the time window expires
269+ - Returns detailed rate limit information including remaining requests and reset time
220270
221271 ### Debug Utility
222272
@@ -224,6 +274,24 @@ Agents MUST use only these existing dependencies. Do NOT add new dependencies wi
224274 - Function: `debug(...args: any[]): void`
225275 - Only logs when `NODE_ENV === "development"`
226276
277+### Testing
278+
279+- **Test Framework**: Vitest (v4.0.16) - Fast unit test framework
280+- **Configuration**: `vitest.config.ts` - Configures Vitest with TypeScript support and path aliases
281+- **Test Files**: Test files use `.test.ts` or `.test.tsx` extension and are located alongside the code they test
282+- **Test Commands**:
283+ - `npm test` - Run tests in watch mode
284+ - `npm run test:ui` - Open Vitest UI for interactive testing
285+ - `npm run test:run` - Run tests once and exit
286+- **Test Coverage**: Currently includes comprehensive tests for `ratelimit.ts` covering:
287+ - Initial state creation
288+ - Rate limit checking and enforcement
289+ - Request counting and incrementing
290+ - Window expiration and automatic reset
291+ - Manual reset functionality
292+ - Edge cases and integration scenarios
293+- **Mocking**: Tests use Vitest's mocking capabilities to isolate units (e.g., cache module is mocked in rate limiter tests)
294+
227295 ### Database Integration (Drizzle ORM)
228296
229297 - **Database**: SQLite using better-sqlite3
@@ -232,9 +300,9 @@ Agents MUST use only these existing dependencies. Do NOT add new dependencies wi
232300 - **Connection**: Exported from `src/lib/db/index.ts` as `db`
233301 - **Tables**:
234302 - `threads`: Stores conversation threads with id, title, createdAt, updatedAt
235- - `messages`: Stores messages with id, threadId, role, content, createdAt, generationTimeMs
303+ - `messages`: Stores messages with id, threadId, role, content, createdAt, generationTimeMs, toolCalls (JSON string of tool calls made to generate assistant messages)
236304 - **Relations**: Messages belong to threads (one-to-many)
237-- **Types**: Type definitions for `Thread` and `Message` are in `src/types.ts` (shared across the application)
305+- **Types**: Type definitions for `Thread` and `Message` are exported from `src/lib/db/schema` using Drizzle's `$inferSelect` (import directly from schema, e.g., `import type { Thread, Message } from "@/src/lib/db/schema"`)
238306 - **Configuration**: `drizzle.config.ts` defines schema path and database location
239307 - **Migrations**: Generated in `drizzle/` directory using `npm run db:generate`
240308 - **Foreign Keys**: Enabled automatically in database connection
@@ -250,9 +318,10 @@ Agents MUST use only these existing dependencies. Do NOT add new dependencies wi
250318
251319 ### Type Definitions
252320
253-- **Types** (`src/types.ts`): Shared TypeScript types
254- - `Thread`: Thread type with id, title, createdAt, updatedAt
255- - `Message`: Message type with id, threadId, role, content, createdAt, generationTimeMs
321+- **Types** (`src/lib/db/schema.ts`): TypeScript types inferred from Drizzle ORM schema
322+ - `Thread`: Thread type with id, title, createdAt, updatedAt (inferred from `threads` table)
323+ - `Message`: Message type with id, threadId, role, content, createdAt, generationTimeMs, toolCalls (inferred from `messages` table)
324+ - Types are exported using `$inferSelect` and should be imported directly from the schema module
256325
257326 ### Chat API Flow
258327
@@ -260,7 +329,7 @@ Agents MUST use only these existing dependencies. Do NOT add new dependencies wi
260329 2. API route fetches previous messages from the thread
261330 3. API route stores the user message
262331 4. API route calls Ollama with the full conversation history
263-5. API route stores the assistant response with generation time
332+5. API route stores the assistant response with generation time and tool calls (if any)
264333 6. API route returns `{ answer: string }`
265334
266335 ### Threads API
@@ -274,9 +343,11 @@ Agents MUST use only these existing dependencies. Do NOT add new dependencies wi
274343 1. Start development server: `npm run dev`
275344 2. Make code changes
276345 3. Test in browser (typically `http://localhost:3000`)
277-4. Format code: `npm run format`
278-5. Run linter: `npm run lint`
279-6. Build for production: `npm run build`
346+4. Write/update tests: `npm test` (watch mode) or `npm run test:ui` (interactive UI)
347+5. Format code: `npm run format`
348+6. Run linter: `npm run lint`
349+7. Run tests: `npm run test:run` (verify all tests pass)
350+8. Build for production: `npm run build`
280351
281352 ## Important Constraints
282353
@@ -287,4 +358,4 @@ Agents MUST use only these existing dependencies. Do NOT add new dependencies wi
287358 - **DO** maintain existing code style and patterns
288359 - **DO** use existing utility functions from `src/lib/`
289360 - **DO** follow the App Router conventions for Next.js 16
290-- **DO** ALWAY Skeep this file up to date as changes are made in the code
361+- **DO** ALWAYS keep this file up to date as changes are made in the code
app/api/chat/route.ts+5−1
@@ -40,7 +40,11 @@ export async function POST(request: Request) {
4040 });
4141
4242 // 4. Get assistant response
43- const { content: answer, generationTimeMs, toolCalls } = await fetchOllamaResponse(ollamaMessages);
43+ const {
44+ content: answer,
45+ generationTimeMs,
46+ toolCalls,
47+ } = await fetchOllamaResponse(ollamaMessages);
4448
4549 // 5. Store assistant message with generation time and tool calls
4650 await db.insert(messages).values({
app/page.tsx+18−6
@@ -7,7 +7,7 @@ import Sidebar from "@/src/components/Sidebar";
77 import MessageInput, { type MessageInputRef } from "@/src/components/MessageInput";
88 import NoThreadSelected from "@/src/components/NoThreadSelected";
99 import { useTheme } from "@/src/hooks/useTheme";
10-import type { Thread, Message } from "@/src/types";
10+import type { Thread, Message } from "@/src/lib/db/schema";
1111 import "./highlight-theme.css";
1212
1313 export default function Home() {
@@ -211,8 +211,20 @@ export default function Home() {
211211 try {
212212 const toolCalls = JSON.parse(toolCallsJson);
213213 if (!Array.isArray(toolCalls) || toolCalls.length === 0) return null;
214- const toolNames = toolCalls.map((tc: any) => tc.function?.name || "unknown").join(", ");
215- return toolNames;
214+
215+ // Count occurrences of each tool name
216+ const toolCounts: Record<string, number> = {};
217+ toolCalls.forEach((tc: any) => {
218+ const toolName = tc.function?.name || "unknown";
219+ toolCounts[toolName] = (toolCounts[toolName] || 0) + 1;
220+ });
221+
222+ // Format as "toolName x count"
223+ const formatted = Object.entries(toolCounts)
224+ .map(([name, count]) => `${name} x ${count}`)
225+ .join(", ");
226+
227+ return formatted;
216228 } catch {
217229 return null;
218230 }
@@ -256,14 +268,14 @@ export default function Home() {
256268 <div>{msg.content}</div>
257269 )}
258270 <div className="mt-1 text-xs text-neutral-600 dark:text-neutral-400">
259- sent on: {formatTimestamp(msg.createdAt)}
271+ sent on {formatTimestamp(msg.createdAt)}
260272 {msg.role === "assistant" && msg.generationTimeMs && (
261- <span className="ml-2">
273+ <span className="ml-1">
262274 • generated in {formatGenerationTime(msg.generationTimeMs)}
263275 </span>
264276 )}
265277 {msg.role === "assistant" && formatToolCalls(msg.toolCalls) && (
266- <span className="ml-2">• tools: {formatToolCalls(msg.toolCalls)}</span>
278+ <span className="ml-1">• tools: {formatToolCalls(msg.toolCalls)}</span>
267279 )}
268280 </div>
269281 </div>
next-env.d.ts+1−1
@@ -1,6 +1,6 @@
11 /// <reference types="next" />
22 /// <reference types="next/image-types/global" />
3-import "./.next/dev/types/routes.d.ts";
3+import "./.next/types/routes.d.ts";
44
55 // NOTE: This file should not be edited
66 // see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
package-lock.json+1467−87
@@ -32,10 +32,12 @@
3232 "@types/node": "^20.11.18",
3333 "@types/react": "^18.2.55",
3434 "@types/react-dom": "^18.2.19",
35+ "@vitest/ui": "^4.0.16",
3536 "eslint": "^8.56.0",
3637 "eslint-config-next": "^13.5.6",
3738 "prettier": "^3.2.5",
38- "prettier-plugin-tailwindcss": "^0.5.11"
39+ "prettier-plugin-tailwindcss": "^0.5.11",
40+ "vitest": "^4.0.16"
3941 }
4042 },
4143 "node_modules/@alloc/quick-lru": {
@@ -1786,6 +1788,321 @@
17861788 "node": ">=14"
17871789 }
17881790 },
1791+ "node_modules/@polka/url": {
1792+ "version": "1.0.0-next.29",
1793+ "resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.29.tgz",
1794+ "integrity": "sha512-wwQAWhWSuHaag8c4q/KN/vCoeOJYshAIvMQwD4GpSb3OiZklFfvAgmj0VCBBImRpuF/aFgIRzllXlVX93Jevww==",
1795+ "dev": true,
1796+ "license": "MIT"
1797+ },
1798+ "node_modules/@rollup/rollup-android-arm-eabi": {
1799+ "version": "4.53.5",
1800+ "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.53.5.tgz",
1801+ "integrity": "sha512-iDGS/h7D8t7tvZ1t6+WPK04KD0MwzLZrG0se1hzBjSi5fyxlsiggoJHwh18PCFNn7tG43OWb6pdZ6Y+rMlmyNQ==",
1802+ "cpu": [
1803+ "arm"
1804+ ],
1805+ "dev": true,
1806+ "license": "MIT",
1807+ "optional": true,
1808+ "os": [
1809+ "android"
1810+ ]
1811+ },
1812+ "node_modules/@rollup/rollup-android-arm64": {
1813+ "version": "4.53.5",
1814+ "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.53.5.tgz",
1815+ "integrity": "sha512-wrSAViWvZHBMMlWk6EJhvg8/rjxzyEhEdgfMMjREHEq11EtJ6IP6yfcCH57YAEca2Oe3FNCE9DSTgU70EIGmVw==",
1816+ "cpu": [
1817+ "arm64"
1818+ ],
1819+ "dev": true,
1820+ "license": "MIT",
1821+ "optional": true,
1822+ "os": [
1823+ "android"
1824+ ]
1825+ },
1826+ "node_modules/@rollup/rollup-darwin-arm64": {
1827+ "version": "4.53.5",
1828+ "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.53.5.tgz",
1829+ "integrity": "sha512-S87zZPBmRO6u1YXQLwpveZm4JfPpAa6oHBX7/ghSiGH3rz/KDgAu1rKdGutV+WUI6tKDMbaBJomhnT30Y2t4VQ==",
1830+ "cpu": [
1831+ "arm64"
1832+ ],
1833+ "dev": true,
1834+ "license": "MIT",
1835+ "optional": true,
1836+ "os": [
1837+ "darwin"
1838+ ]
1839+ },
1840+ "node_modules/@rollup/rollup-darwin-x64": {
1841+ "version": "4.53.5",
1842+ "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.53.5.tgz",
1843+ "integrity": "sha512-YTbnsAaHo6VrAczISxgpTva8EkfQus0VPEVJCEaboHtZRIb6h6j0BNxRBOwnDciFTZLDPW5r+ZBmhL/+YpTZgA==",
1844+ "cpu": [
1845+ "x64"
1846+ ],
1847+ "dev": true,
1848+ "license": "MIT",
1849+ "optional": true,
1850+ "os": [
1851+ "darwin"
1852+ ]
1853+ },
1854+ "node_modules/@rollup/rollup-freebsd-arm64": {
1855+ "version": "4.53.5",
1856+ "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.53.5.tgz",
1857+ "integrity": "sha512-1T8eY2J8rKJWzaznV7zedfdhD1BqVs1iqILhmHDq/bqCUZsrMt+j8VCTHhP0vdfbHK3e1IQ7VYx3jlKqwlf+vw==",
1858+ "cpu": [
1859+ "arm64"
1860+ ],
1861+ "dev": true,
1862+ "license": "MIT",
1863+ "optional": true,
1864+ "os": [
1865+ "freebsd"
1866+ ]
1867+ },
1868+ "node_modules/@rollup/rollup-freebsd-x64": {
1869+ "version": "4.53.5",
1870+ "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.53.5.tgz",
1871+ "integrity": "sha512-sHTiuXyBJApxRn+VFMaw1U+Qsz4kcNlxQ742snICYPrY+DDL8/ZbaC4DVIB7vgZmp3jiDaKA0WpBdP0aqPJoBQ==",
1872+ "cpu": [
1873+ "x64"
1874+ ],
1875+ "dev": true,
1876+ "license": "MIT",
1877+ "optional": true,
1878+ "os": [
1879+ "freebsd"
1880+ ]
1881+ },
1882+ "node_modules/@rollup/rollup-linux-arm-gnueabihf": {
1883+ "version": "4.53.5",
1884+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.53.5.tgz",
1885+ "integrity": "sha512-dV3T9MyAf0w8zPVLVBptVlzaXxka6xg1f16VAQmjg+4KMSTWDvhimI/Y6mp8oHwNrmnmVl9XxJ/w/mO4uIQONA==",
1886+ "cpu": [
1887+ "arm"
1888+ ],
1889+ "dev": true,
1890+ "license": "MIT",
1891+ "optional": true,
1892+ "os": [
1893+ "linux"
1894+ ]
1895+ },
1896+ "node_modules/@rollup/rollup-linux-arm-musleabihf": {
1897+ "version": "4.53.5",
1898+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.53.5.tgz",
1899+ "integrity": "sha512-wIGYC1x/hyjP+KAu9+ewDI+fi5XSNiUi9Bvg6KGAh2TsNMA3tSEs+Sh6jJ/r4BV/bx/CyWu2ue9kDnIdRyafcQ==",
1900+ "cpu": [
1901+ "arm"
1902+ ],
1903+ "dev": true,
1904+ "license": "MIT",
1905+ "optional": true,
1906+ "os": [
1907+ "linux"
1908+ ]
1909+ },
1910+ "node_modules/@rollup/rollup-linux-arm64-gnu": {
1911+ "version": "4.53.5",
1912+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.53.5.tgz",
1913+ "integrity": "sha512-Y+qVA0D9d0y2FRNiG9oM3Hut/DgODZbU9I8pLLPwAsU0tUKZ49cyV1tzmB/qRbSzGvY8lpgGkJuMyuhH7Ma+Vg==",
1914+ "cpu": [
1915+ "arm64"
1916+ ],
1917+ "dev": true,
1918+ "license": "MIT",
1919+ "optional": true,
1920+ "os": [
1921+ "linux"
1922+ ]
1923+ },
1924+ "node_modules/@rollup/rollup-linux-arm64-musl": {
1925+ "version": "4.53.5",
1926+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.53.5.tgz",
1927+ "integrity": "sha512-juaC4bEgJsyFVfqhtGLz8mbopaWD+WeSOYr5E16y+1of6KQjc0BpwZLuxkClqY1i8sco+MdyoXPNiCkQou09+g==",
1928+ "cpu": [
1929+ "arm64"
1930+ ],
1931+ "dev": true,
1932+ "license": "MIT",
1933+ "optional": true,
1934+ "os": [
1935+ "linux"
1936+ ]
1937+ },
1938+ "node_modules/@rollup/rollup-linux-loong64-gnu": {
1939+ "version": "4.53.5",
1940+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.53.5.tgz",
1941+ "integrity": "sha512-rIEC0hZ17A42iXtHX+EPJVL/CakHo+tT7W0pbzdAGuWOt2jxDFh7A/lRhsNHBcqL4T36+UiAgwO8pbmn3dE8wA==",
1942+ "cpu": [
1943+ "loong64"
1944+ ],
1945+ "dev": true,
1946+ "license": "MIT",
1947+ "optional": true,
1948+ "os": [
1949+ "linux"
1950+ ]
1951+ },
1952+ "node_modules/@rollup/rollup-linux-ppc64-gnu": {
1953+ "version": "4.53.5",
1954+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.53.5.tgz",
1955+ "integrity": "sha512-T7l409NhUE552RcAOcmJHj3xyZ2h7vMWzcwQI0hvn5tqHh3oSoclf9WgTl+0QqffWFG8MEVZZP1/OBglKZx52Q==",
1956+ "cpu": [
1957+ "ppc64"
1958+ ],
1959+ "dev": true,
1960+ "license": "MIT",
1961+ "optional": true,
1962+ "os": [
1963+ "linux"
1964+ ]
1965+ },
1966+ "node_modules/@rollup/rollup-linux-riscv64-gnu": {
1967+ "version": "4.53.5",
1968+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.53.5.tgz",
1969+ "integrity": "sha512-7OK5/GhxbnrMcxIFoYfhV/TkknarkYC1hqUw1wU2xUN3TVRLNT5FmBv4KkheSG2xZ6IEbRAhTooTV2+R5Tk0lQ==",
1970+ "cpu": [
1971+ "riscv64"
1972+ ],
1973+ "dev": true,
1974+ "license": "MIT",
1975+ "optional": true,
1976+ "os": [
1977+ "linux"
1978+ ]
1979+ },
1980+ "node_modules/@rollup/rollup-linux-riscv64-musl": {
1981+ "version": "4.53.5",
1982+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.53.5.tgz",
1983+ "integrity": "sha512-GwuDBE/PsXaTa76lO5eLJTyr2k8QkPipAyOrs4V/KJufHCZBJ495VCGJol35grx9xryk4V+2zd3Ri+3v7NPh+w==",
1984+ "cpu": [
1985+ "riscv64"
1986+ ],
1987+ "dev": true,
1988+ "license": "MIT",
1989+ "optional": true,
1990+ "os": [
1991+ "linux"
1992+ ]
1993+ },
1994+ "node_modules/@rollup/rollup-linux-s390x-gnu": {
1995+ "version": "4.53.5",
1996+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.53.5.tgz",
1997+ "integrity": "sha512-IAE1Ziyr1qNfnmiQLHBURAD+eh/zH1pIeJjeShleII7Vj8kyEm2PF77o+lf3WTHDpNJcu4IXJxNO0Zluro8bOw==",
1998+ "cpu": [
1999+ "s390x"
2000+ ],
2001+ "dev": true,
2002+ "license": "MIT",
2003+ "optional": true,
2004+ "os": [
2005+ "linux"
2006+ ]
2007+ },
2008+ "node_modules/@rollup/rollup-linux-x64-gnu": {
2009+ "version": "4.53.5",
2010+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.53.5.tgz",
2011+ "integrity": "sha512-Pg6E+oP7GvZ4XwgRJBuSXZjcqpIW3yCBhK4BcsANvb47qMvAbCjR6E+1a/U2WXz1JJxp9/4Dno3/iSJLcm5auw==",
2012+ "cpu": [
2013+ "x64"
2014+ ],
2015+ "dev": true,
2016+ "license": "MIT",
2017+ "optional": true,
2018+ "os": [
2019+ "linux"
2020+ ]
2021+ },
2022+ "node_modules/@rollup/rollup-linux-x64-musl": {
2023+ "version": "4.53.5",
2024+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.53.5.tgz",
2025+ "integrity": "sha512-txGtluxDKTxaMDzUduGP0wdfng24y1rygUMnmlUJ88fzCCULCLn7oE5kb2+tRB+MWq1QDZT6ObT5RrR8HFRKqg==",
2026+ "cpu": [
2027+ "x64"
2028+ ],
2029+ "dev": true,
2030+ "license": "MIT",
2031+ "optional": true,
2032+ "os": [
2033+ "linux"
2034+ ]
2035+ },
2036+ "node_modules/@rollup/rollup-openharmony-arm64": {
2037+ "version": "4.53.5",
2038+ "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.53.5.tgz",
2039+ "integrity": "sha512-3DFiLPnTxiOQV993fMc+KO8zXHTcIjgaInrqlG8zDp1TlhYl6WgrOHuJkJQ6M8zHEcntSJsUp1XFZSY8C1DYbg==",
2040+ "cpu": [
2041+ "arm64"
2042+ ],
2043+ "dev": true,
2044+ "license": "MIT",
2045+ "optional": true,
2046+ "os": [
2047+ "openharmony"
2048+ ]
2049+ },
2050+ "node_modules/@rollup/rollup-win32-arm64-msvc": {
2051+ "version": "4.53.5",
2052+ "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.53.5.tgz",
2053+ "integrity": "sha512-nggc/wPpNTgjGg75hu+Q/3i32R00Lq1B6N1DO7MCU340MRKL3WZJMjA9U4K4gzy3dkZPXm9E1Nc81FItBVGRlA==",
2054+ "cpu": [
2055+ "arm64"
2056+ ],
2057+ "dev": true,
2058+ "license": "MIT",
2059+ "optional": true,
2060+ "os": [
2061+ "win32"
2062+ ]
2063+ },
2064+ "node_modules/@rollup/rollup-win32-ia32-msvc": {
2065+ "version": "4.53.5",
2066+ "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.53.5.tgz",
2067+ "integrity": "sha512-U/54pTbdQpPLBdEzCT6NBCFAfSZMvmjr0twhnD9f4EIvlm9wy3jjQ38yQj1AGznrNO65EWQMgm/QUjuIVrYF9w==",
2068+ "cpu": [
2069+ "ia32"
2070+ ],
2071+ "dev": true,
2072+ "license": "MIT",
2073+ "optional": true,
2074+ "os": [
2075+ "win32"
2076+ ]
2077+ },
2078+ "node_modules/@rollup/rollup-win32-x64-gnu": {
2079+ "version": "4.53.5",
2080+ "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.53.5.tgz",
2081+ "integrity": "sha512-2NqKgZSuLH9SXBBV2dWNRCZmocgSOx8OJSdpRaEcRlIfX8YrKxUT6z0F1NpvDVhOsl190UFTRh2F2WDWWCYp3A==",
2082+ "cpu": [
2083+ "x64"
2084+ ],
2085+ "dev": true,
2086+ "license": "MIT",
2087+ "optional": true,
2088+ "os": [
2089+ "win32"
2090+ ]
2091+ },
2092+ "node_modules/@rollup/rollup-win32-x64-msvc": {
2093+ "version": "4.53.5",
2094+ "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.53.5.tgz",
2095+ "integrity": "sha512-JRpZUhCfhZ4keB5v0fe02gQJy05GqboPOaxvjugW04RLSYYoB/9t2lx2u/tMs/Na/1NXfY8QYjgRljRpN+MjTQ==",
2096+ "cpu": [
2097+ "x64"
2098+ ],
2099+ "dev": true,
2100+ "license": "MIT",
2101+ "optional": true,
2102+ "os": [
2103+ "win32"
2104+ ]
2105+ },
17892106 "node_modules/@rtsao/scc": {
17902107 "version": "1.1.0",
17912108 "resolved": "https://registry.npmjs.org/@rtsao/scc/-/scc-1.1.0.tgz",
@@ -1800,6 +2117,13 @@
18002117 "dev": true,
18012118 "license": "MIT"
18022119 },
2120+ "node_modules/@standard-schema/spec": {
2121+ "version": "1.1.0",
2122+ "resolved": "https://registry.npmjs.org/@standard-schema/spec/-/spec-1.1.0.tgz",
2123+ "integrity": "sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w==",
2124+ "dev": true,
2125+ "license": "MIT"
2126+ },
18032127 "node_modules/@swc/helpers": {
18042128 "version": "0.5.15",
18052129 "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.15.tgz",
@@ -1855,6 +2179,17 @@
18552179 "@types/node": "*"
18562180 }
18572181 },
2182+ "node_modules/@types/chai": {
2183+ "version": "5.2.3",
2184+ "resolved": "https://registry.npmjs.org/@types/chai/-/chai-5.2.3.tgz",
2185+ "integrity": "sha512-Mw558oeA9fFbv65/y4mHtXDs9bPnFMZAL/jxdPFUpOHHIXX91mcgEHbS5Lahr+pwZFR8A7GQleRWeI6cGFC2UA==",
2186+ "dev": true,
2187+ "license": "MIT",
2188+ "dependencies": {
2189+ "@types/deep-eql": "*",
2190+ "assertion-error": "^2.0.1"
2191+ }
2192+ },
18582193 "node_modules/@types/debug": {
18592194 "version": "4.1.12",
18602195 "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.12.tgz",
@@ -1864,6 +2199,13 @@
18642199 "@types/ms": "*"
18652200 }
18662201 },
2202+ "node_modules/@types/deep-eql": {
2203+ "version": "4.0.2",
2204+ "resolved": "https://registry.npmjs.org/@types/deep-eql/-/deep-eql-4.0.2.tgz",
2205+ "integrity": "sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==",
2206+ "dev": true,
2207+ "license": "MIT"
2208+ },
18672209 "node_modules/@types/estree": {
18682210 "version": "1.0.8",
18692211 "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz",
@@ -2361,28 +2703,161 @@
23612703 "win32"
23622704 ]
23632705 },
2364- "node_modules/acorn": {
2365- "version": "8.15.0",
2366- "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz",
2367- "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==",
2706+ "node_modules/@vitest/expect": {
2707+ "version": "4.0.16",
2708+ "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-4.0.16.tgz",
2709+ "integrity": "sha512-eshqULT2It7McaJkQGLkPjPjNph+uevROGuIMJdG3V+0BSR2w9u6J9Lwu+E8cK5TETlfou8GRijhafIMhXsimA==",
23682710 "dev": true,
23692711 "license": "MIT",
2370- "bin": {
2371- "acorn": "bin/acorn"
2712+ "dependencies": {
2713+ "@standard-schema/spec": "^1.0.0",
2714+ "@types/chai": "^5.2.2",
2715+ "@vitest/spy": "4.0.16",
2716+ "@vitest/utils": "4.0.16",
2717+ "chai": "^6.2.1",
2718+ "tinyrainbow": "^3.0.3"
23722719 },
2373- "engines": {
2374- "node": ">=0.4.0"
2720+ "funding": {
2721+ "url": "https://opencollective.com/vitest"
23752722 }
23762723 },
2377- "node_modules/acorn-jsx": {
2378- "version": "5.3.2",
2379- "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz",
2380- "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==",
2724+ "node_modules/@vitest/mocker": {
2725+ "version": "4.0.16",
2726+ "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-4.0.16.tgz",
2727+ "integrity": "sha512-yb6k4AZxJTB+q9ycAvsoxGn+j/po0UaPgajllBgt1PzoMAAmJGYFdDk0uCcRcxb3BrME34I6u8gHZTQlkqSZpg==",
23812728 "dev": true,
23822729 "license": "MIT",
2730+ "dependencies": {
2731+ "@vitest/spy": "4.0.16",
2732+ "estree-walker": "^3.0.3",
2733+ "magic-string": "^0.30.21"
2734+ },
2735+ "funding": {
2736+ "url": "https://opencollective.com/vitest"
2737+ },
23832738 "peerDependencies": {
2384- "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0"
2385- }
2739+ "msw": "^2.4.9",
2740+ "vite": "^6.0.0 || ^7.0.0-0"
2741+ },
2742+ "peerDependenciesMeta": {
2743+ "msw": {
2744+ "optional": true
2745+ },
2746+ "vite": {
2747+ "optional": true
2748+ }
2749+ }
2750+ },
2751+ "node_modules/@vitest/pretty-format": {
2752+ "version": "4.0.16",
2753+ "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-4.0.16.tgz",
2754+ "integrity": "sha512-eNCYNsSty9xJKi/UdVD8Ou16alu7AYiS2fCPRs0b1OdhJiV89buAXQLpTbe+X8V9L6qrs9CqyvU7OaAopJYPsA==",
2755+ "dev": true,
2756+ "license": "MIT",
2757+ "dependencies": {
2758+ "tinyrainbow": "^3.0.3"
2759+ },
2760+ "funding": {
2761+ "url": "https://opencollective.com/vitest"
2762+ }
2763+ },
2764+ "node_modules/@vitest/runner": {
2765+ "version": "4.0.16",
2766+ "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-4.0.16.tgz",
2767+ "integrity": "sha512-VWEDm5Wv9xEo80ctjORcTQRJ539EGPB3Pb9ApvVRAY1U/WkHXmmYISqU5E79uCwcW7xYUV38gwZD+RV755fu3Q==",
2768+ "dev": true,
2769+ "license": "MIT",
2770+ "dependencies": {
2771+ "@vitest/utils": "4.0.16",
2772+ "pathe": "^2.0.3"
2773+ },
2774+ "funding": {
2775+ "url": "https://opencollective.com/vitest"
2776+ }
2777+ },
2778+ "node_modules/@vitest/snapshot": {
2779+ "version": "4.0.16",
2780+ "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-4.0.16.tgz",
2781+ "integrity": "sha512-sf6NcrYhYBsSYefxnry+DR8n3UV4xWZwWxYbCJUt2YdvtqzSPR7VfGrY0zsv090DAbjFZsi7ZaMi1KnSRyK1XA==",
2782+ "dev": true,
2783+ "license": "MIT",
2784+ "dependencies": {
2785+ "@vitest/pretty-format": "4.0.16",
2786+ "magic-string": "^0.30.21",
2787+ "pathe": "^2.0.3"
2788+ },
2789+ "funding": {
2790+ "url": "https://opencollective.com/vitest"
2791+ }
2792+ },
2793+ "node_modules/@vitest/spy": {
2794+ "version": "4.0.16",
2795+ "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-4.0.16.tgz",
2796+ "integrity": "sha512-4jIOWjKP0ZUaEmJm00E0cOBLU+5WE0BpeNr3XN6TEF05ltro6NJqHWxXD0kA8/Zc8Nh23AT8WQxwNG+WeROupw==",
2797+ "dev": true,
2798+ "license": "MIT",
2799+ "funding": {
2800+ "url": "https://opencollective.com/vitest"
2801+ }
2802+ },
2803+ "node_modules/@vitest/ui": {
2804+ "version": "4.0.16",
2805+ "resolved": "https://registry.npmjs.org/@vitest/ui/-/ui-4.0.16.tgz",
2806+ "integrity": "sha512-rkoPH+RqWopVxDnCBE/ysIdfQ2A7j1eDmW8tCxxrR9nnFBa9jKf86VgsSAzxBd1x+ny0GC4JgiD3SNfRHv3pOg==",
2807+ "dev": true,
2808+ "license": "MIT",
2809+ "dependencies": {
2810+ "@vitest/utils": "4.0.16",
2811+ "fflate": "^0.8.2",
2812+ "flatted": "^3.3.3",
2813+ "pathe": "^2.0.3",
2814+ "sirv": "^3.0.2",
2815+ "tinyglobby": "^0.2.15",
2816+ "tinyrainbow": "^3.0.3"
2817+ },
2818+ "funding": {
2819+ "url": "https://opencollective.com/vitest"
2820+ },
2821+ "peerDependencies": {
2822+ "vitest": "4.0.16"
2823+ }
2824+ },
2825+ "node_modules/@vitest/utils": {
2826+ "version": "4.0.16",
2827+ "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-4.0.16.tgz",
2828+ "integrity": "sha512-h8z9yYhV3e1LEfaQ3zdypIrnAg/9hguReGZoS7Gl0aBG5xgA410zBqECqmaF/+RkTggRsfnzc1XaAHA6bmUufA==",
2829+ "dev": true,
2830+ "license": "MIT",
2831+ "dependencies": {
2832+ "@vitest/pretty-format": "4.0.16",
2833+ "tinyrainbow": "^3.0.3"
2834+ },
2835+ "funding": {
2836+ "url": "https://opencollective.com/vitest"
2837+ }
2838+ },
2839+ "node_modules/acorn": {
2840+ "version": "8.15.0",
2841+ "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz",
2842+ "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==",
2843+ "dev": true,
2844+ "license": "MIT",
2845+ "bin": {
2846+ "acorn": "bin/acorn"
2847+ },
2848+ "engines": {
2849+ "node": ">=0.4.0"
2850+ }
2851+ },
2852+ "node_modules/acorn-jsx": {
2853+ "version": "5.3.2",
2854+ "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz",
2855+ "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==",
2856+ "dev": true,
2857+ "license": "MIT",
2858+ "peerDependencies": {
2859+ "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0"
2860+ }
23862861 },
23872862 "node_modules/agent-base": {
23882863 "version": "7.1.4",
@@ -2646,6 +3121,16 @@
26463121 "url": "https://github.com/sponsors/ljharb"
26473122 }
26483123 },
3124+ "node_modules/assertion-error": {
3125+ "version": "2.0.1",
3126+ "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-2.0.1.tgz",
3127+ "integrity": "sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==",
3128+ "dev": true,
3129+ "license": "MIT",
3130+ "engines": {
3131+ "node": ">=12"
3132+ }
3133+ },
26493134 "node_modules/ast-types-flow": {
26503135 "version": "0.0.8",
26513136 "resolved": "https://registry.npmjs.org/ast-types-flow/-/ast-types-flow-0.0.8.tgz",
@@ -3024,6 +3509,16 @@
30243509 "url": "https://github.com/sponsors/wooorm"
30253510 }
30263511 },
3512+ "node_modules/chai": {
3513+ "version": "6.2.1",
3514+ "resolved": "https://registry.npmjs.org/chai/-/chai-6.2.1.tgz",
3515+ "integrity": "sha512-p4Z49OGG5W/WBCPSS/dH3jQ73kD6tiMmUM+bckNK6Jr5JHMG3k9bg/BvKR8lKmtVBKmOiuVaV2ws8s9oSbwysg==",
3516+ "dev": true,
3517+ "license": "MIT",
3518+ "engines": {
3519+ "node": ">=18"
3520+ }
3521+ },
30273522 "node_modules/chalk": {
30283523 "version": "4.1.2",
30293524 "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
@@ -3746,6 +4241,13 @@
37464241 "node": ">= 0.4"
37474242 }
37484243 },
4244+ "node_modules/es-module-lexer": {
4245+ "version": "1.7.0",
4246+ "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.7.0.tgz",
4247+ "integrity": "sha512-jEQoCwk8hyb2AZziIOLhDqpm5+2ww5uIE6lkO/6jcOCusfk6LhMHpXXfBLXTZ7Ydyt0j4VoUQv6uGNYbdW+kBA==",
4248+ "dev": true,
4249+ "license": "MIT"
4250+ },
37494251 "node_modules/es-object-atoms": {
37504252 "version": "1.1.1",
37514253 "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz",
@@ -4327,6 +4829,16 @@
43274829 "url": "https://opencollective.com/unified"
43284830 }
43294831 },
4832+ "node_modules/estree-walker": {
4833+ "version": "3.0.3",
4834+ "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz",
4835+ "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==",
4836+ "dev": true,
4837+ "license": "MIT",
4838+ "dependencies": {
4839+ "@types/estree": "^1.0.0"
4840+ }
4841+ },
43304842 "node_modules/esutils": {
43314843 "version": "2.0.3",
43324844 "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz",
@@ -4346,6 +4858,16 @@
43464858 "node": ">=6"
43474859 }
43484860 },
4861+ "node_modules/expect-type": {
4862+ "version": "1.3.0",
4863+ "resolved": "https://registry.npmjs.org/expect-type/-/expect-type-1.3.0.tgz",
4864+ "integrity": "sha512-knvyeauYhqjOYvQ66MznSMs83wmHrCycNEN6Ao+2AeYEfxUIkuiVxdEa1qlGEPK+We3n0THiDciYSsCcgW/DoA==",
4865+ "dev": true,
4866+ "license": "Apache-2.0",
4867+ "engines": {
4868+ "node": ">=12.0.0"
4869+ }
4870+ },
43494871 "node_modules/extend": {
43504872 "version": "3.0.2",
43514873 "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz",
@@ -4433,6 +4955,13 @@
44334955 "node": "^12.20 || >= 14.13"
44344956 }
44354957 },
4958+ "node_modules/fflate": {
4959+ "version": "0.8.2",
4960+ "resolved": "https://registry.npmjs.org/fflate/-/fflate-0.8.2.tgz",
4961+ "integrity": "sha512-cPJU47OaAoCbg0pBvzsgpTPhmhqI5eJjh/JIu8tPj5q+T7iLvW/JAYUqmE7KOB4R1ZyEhzBaIQpQpardBF5z8A==",
4962+ "dev": true,
4963+ "license": "MIT"
4964+ },
44364965 "node_modules/file-entry-cache": {
44374966 "version": "6.0.1",
44384967 "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz",
@@ -6036,6 +6565,16 @@
60366565 "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==",
60376566 "license": "ISC"
60386567 },
6568+ "node_modules/magic-string": {
6569+ "version": "0.30.21",
6570+ "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz",
6571+ "integrity": "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==",
6572+ "dev": true,
6573+ "license": "MIT",
6574+ "dependencies": {
6575+ "@jridgewell/sourcemap-codec": "^1.5.5"
6576+ }
6577+ },
60396578 "node_modules/markdown-table": {
60406579 "version": "3.0.4",
60416580 "resolved": "https://registry.npmjs.org/markdown-table/-/markdown-table-3.0.4.tgz",
@@ -6971,6 +7510,16 @@
69717510 "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==",
69727511 "license": "MIT"
69737512 },
7513+ "node_modules/mrmime": {
7514+ "version": "2.0.1",
7515+ "resolved": "https://registry.npmjs.org/mrmime/-/mrmime-2.0.1.tgz",
7516+ "integrity": "sha512-Y3wQdFg2Va6etvQ5I82yUhGdsKrcYox6p7FfL1LbK2J4V01F9TGlepTIhnK24t7koZibmg82KGglhA1XK5IsLQ==",
7517+ "dev": true,
7518+ "license": "MIT",
7519+ "engines": {
7520+ "node": ">=10"
7521+ }
7522+ },
69747523 "node_modules/ms": {
69757524 "version": "2.1.3",
69767525 "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
@@ -7310,6 +7859,17 @@
73107859 "url": "https://github.com/sponsors/ljharb"
73117860 }
73127861 },
7862+ "node_modules/obug": {
7863+ "version": "2.1.1",
7864+ "resolved": "https://registry.npmjs.org/obug/-/obug-2.1.1.tgz",
7865+ "integrity": "sha512-uTqF9MuPraAQ+IsnPf366RG4cP9RtUi7MLO1N3KEc+wb0a6yKpeL0lmk2IB1jY5KHPAlTc6T/JRdC/YqxHNwkQ==",
7866+ "dev": true,
7867+ "funding": [
7868+ "https://github.com/sponsors/sxzz",
7869+ "https://opencollective.com/debug"
7870+ ],
7871+ "license": "MIT"
7872+ },
73137873 "node_modules/ollama": {
73147874 "version": "0.6.3",
Cut short: this commit's diff is over 1000 lines.
package.json+6−1
Cut short: this commit's diff is over 1000 lines.
src/components/MessageInput.tsx+1−1
Cut short: this commit's diff is over 1000 lines.
src/components/Sidebar.tsx+1−1
Cut short: this commit's diff is over 1000 lines.
src/lib/cache.ts+0−1
Cut short: this commit's diff is over 1000 lines.
src/lib/debug.ts+0−70
Cut short: this commit's diff is over 1000 lines.
src/lib/ollama/duckduckgo.ts+21−1
Cut short: this commit's diff is over 1000 lines.
src/lib/ollama/index.ts+0−1
Cut short: this commit's diff is over 1000 lines.
src/lib/ollama/weather.ts+21−1
Cut short: this commit's diff is over 1000 lines.
src/lib/ollama/websearch.ts+9−102
Cut short: this commit's diff is over 1000 lines.
src/lib/ratelimit.test.ts+557−0
Cut short: this commit's diff is over 1000 lines.
src/lib/ratelimit.ts+179−0
Cut short: this commit's diff is over 1000 lines.
src/types.ts+0−16
Cut short: this commit's diff is over 1000 lines.
vitest.config.ts+14−0
Cut short: this commit's diff is over 1000 lines.