Agentic AI chat inside the Vicinae launcher, powered by Ollama. - chat: the search bar is the composer (Return sends), cmd+return opens a multi-line composer, answers stream into a markdown detail panel, the newest turn renders first, and Tab reaches a conversation switcher in the search bar accessory - sessions: browse, reopen, copy, and delete past conversations - setup: verifies the Ollama connection and lists the models the key can actually reach, rather than trusting a hand-typed model name - tools: get_datetime, get_location, web_search, web_fetch. All read-only, and the tool-calling loop is capped at 5 rounds Notes on two constraints that shaped the design: The search bar is single-line and there is no API to change it, so "Return sends" and "cmd+return inserts a newline" cannot both live in one field. They are split across the search bar and a pushed Form instead. An extension can read preferences but cannot write them, so setup hands over the exact model name to paste rather than saving it. The logic layer (ollama, agent, tools, location, history, markdown) holds no Vicinae imports and is unit tested without a runtime; a test enforces that boundary. 77 tests cover NDJSON chunk-boundary parsing, the tool loop, session caps, and timezone handling.
22 lines
677 B
TypeScript
22 lines
677 B
TypeScript
import { fileURLToPath } from "node:url";
|
|
import { defineConfig } from "vitest/config";
|
|
|
|
/**
|
|
* `.mts` rather than `.ts`: this package is CommonJS (the Vicinae toolchain
|
|
* compiles extensions with `module: commonjs`), and Vite warns when an ESM
|
|
* config is loaded as CJS. The extension lets us write the config as ESM.
|
|
*/
|
|
export default defineConfig({
|
|
test: {
|
|
globals: true,
|
|
include: ["src/__tests__/**/*.test.ts"],
|
|
},
|
|
resolve: {
|
|
alias: {
|
|
// Point the API package at the in-memory stub; there is no Vicinae
|
|
// runtime under test.
|
|
"@vicinae/api": fileURLToPath(new URL("./src/__mocks__/@vicinae/api.ts", import.meta.url)),
|
|
},
|
|
},
|
|
});
|