|
3 | 3 | ## Project Structure & Module Organization |
4 | 4 |
|
5 | 5 | - Source lives in `src/` (`index.tsx`, `App.tsx`, `index.css`). Build output goes to `dist/`. |
6 | | -- Providers only in `index.tsx` (e.g., `MantineProvider`). `App.tsx` owns application state, while presentational pieces live in `src/components/`. |
| 6 | +- Providers only in `index.tsx` (e.g., `MantineProvider`). `App.tsx` coordinates views and settings; conversation state and snapshots live in the Zustand store (`src/tree/useConversationTree.ts`, `src/tree/types.ts`), and AI provider helpers live in `src/ai/openaiCompatible.ts`. |
| 7 | +- Components under `src/components/` include their own UI behavior (hover/edit states, popovers, menus) rather than being purely presentational. |
7 | 8 | - Key config: `rsbuild.config.mjs`, `tsconfig.json`, `tailwind.config.js`, `postcss.config.js`, `biome.json`. |
8 | 9 |
|
9 | 10 | ## Build, Test, and Development Commands |
10 | 11 |
|
11 | 12 | - Install: `bun install` (use Bun for everything; a `bun.lock` is present). |
12 | 13 | - Dev server: `bun dev` (Rsbuild) — starts hot‑reload and opens the browser. |
13 | 14 | - Production build: `bun build-dist` — emits static assets to `dist/` (scripts/styles are inlined by Rsbuild config). |
14 | | -- Preview production build: `bun preview` — serves the built output locally. |
15 | 15 |
|
16 | 16 | ## Coding Style & Naming Conventions |
17 | 17 |
|
18 | | -- Language: TypeScript + React 18; Tailwind for styling. |
19 | | -- Indentation: one tab (Biome default). Keep code concise and self‑documenting. |
| 18 | +- Language: TypeScript + React 18; Mantine for UI; Tailwind for styling. |
| 19 | +- Indentation: one tab (Biome default) except for Markdown files where space indentation is used. Keep code concise and self‑documenting. |
20 | 20 | - Formatting: use Biome. Run `bunx biome check --write .` to format and organize imports. |
21 | | -- Components: prefer small presentational components in `src/components/`; keep core state and data flow inside `App.tsx`. |
| 21 | +- Type-checking: use tsc. Run `bunx tsc --noEmit` to check for type errors. |
| 22 | +- Components: keep UI logic close to the component (e.g., hover/edit toggles in `MessageItem`, menu interactions in `DiagramView`); shared conversation/tree logic belongs in the store. |
22 | 23 | - CSS: prefer Tailwind utilities; add global styles in `src/index.css` only when necessary. |
23 | 24 |
|
24 | | -## Testing Guidelines |
| 25 | +## Providers & Capabilities |
25 | 26 |
|
26 | | -- No test runner is configured. Include clear manual verification steps in PRs; optional minimal tests (`*.test.ts(x)`) can land in a follow‑up. |
27 | | -- Verify `bun build-dist` and core flows in README “Usage Tips”. |
| 27 | +- OpenAI-compatible: supports chat and text completion views. |
| 28 | +- Built-in AI (Chrome/Edge): chat-only; text view is disabled. |
| 29 | + |
| 30 | +## Validation & DevTools MCP |
| 31 | + |
| 32 | +- Assume `bun dev` is already running locally; don’t start it from the agent unless explicitly asked. |
| 33 | +- Use Chrome DevTools MCP to navigate to `http://localhost:8080/` to check the UI after changes. |
| 34 | +- Avoid shell curls to localhost unless the user explicitly requests; rely on MCP interactions for UI checks. |
28 | 35 |
|
29 | 36 | ## Commit & Pull Request Guidelines |
30 | 37 |
|
|
0 commit comments