-
Notifications
You must be signed in to change notification settings - Fork 0
How to Change
Yash Aryan edited this page Aug 8, 2026
·
1 revision
Practical recipes for common contributor tasks. Always keep Gotchas in mind.
- Edit
app/src/types/api.d.ts(AnyLmApi). - Implement in
app/preload.ts(ipcRenderer.invoke/on/send). - Handle in
app/src/main/ipc.ts(ipcMain.handle/on). - Call from renderer modules.
-
bun run typecheck— ambient types make renames fail the build on purpose.
Streaming and confirms use events, not invoke-only patterns. Mirror existing chat:* / tool-confirm channels when adding async push APIs.
| Intent | Where |
|---|---|
| System prompt assembly |
ipc.ts (orchestration) + context.ts / memory.ts / skills instructionsBlock
|
| Governance / PII / limits |
governance.ts, policy-engine.ts, api/*
|
| Tool loop / round limits |
ipc.ts (15), agents/workers.ts (3) |
| Multi-agent routing |
agents/* + flags in settings; project-coding forces single-agent |
| Streaming UI |
renderer/js/chat.ts + activity/working strip modules |
| Persist messages |
store.ts / chats.ts
|
Read Chat Pipeline before large edits.
- Extend settings type in
domain.d.ts. - Default in
settings.ts(file:llmeter-settings.json). - Expose get/set via IPC if renderer needs it (update
api.d.ts+ preload + ipc). - Wire UI in settings views.
- Consume in main where the behavior lives.
- Add handler module under
app/src/main/api/. - Register path in
api/index.tsdispatch table (keep REST shapes). - Update
firebase/firestore.rules— required for authz. - Update indexes if queries need them.
- Call via
auth.requestfrom main or expose through IPC for UI.
Remember: usage limits are cooperative on Spark (clients must report).
- Prefer existing patterns in
renderer/js/(*-view.ts,rail/,sidebar/). - Styles in
styles.css(site-theme / glass language). - State in
state.ts; pure bits inviews.tswhen possible. - No Node in renderer — only
window.api.
- Chunking / retrieve:
rag.ts,context.ts - Chroma lifecycle:
chroma-server.ts,chroma.ts,startup-deps.ts - Embed model:
embed.ts+ANYLM_EMBED_MODEL - Soft-fail: never assume Chroma is up
- Client:
ollama.ts - First-run:
ollama-setup/, renderersetup-wizard.ts - Host override: env
ANYLM_OLLAMA_HOST/OLLAMA_HOST - Model catalog UI:
model-catalog.ts+ renderer models browser
- Version:
app/package.jsonmust match git tagvX.Y.Z - Workflow:
.github/workflows/release.yml→build.yml - Notes: add
docs/releases/vX.Y.Z.mdwhen tagging - See Build & Release
firebase/hosting/public/- Deploy with
firebase deploy - App opens system browser with
?provider=&port=
- Prefer graph / tests for blast radius (
bun test, typecheck). - Keep ambient types as the contract — don’t duplicate interfaces in renderer.
- Don’t revive
auth-backend/as a runtime dependency. - Don’t put secrets in
app/.env— build will refuse many patterns.
-
cd app && bun run typecheck -
bun test - Manual smoke for the path you touched (chat / tools / auth / settings)
- Rules updated if Firestore shape changed
- IPC triple updated if API changed
- No secrets in diffs
| Page | Description |
|---|---|
| Home | Overview and navigation |
| Getting-Started | Local setup |
| Architecture | System design |
| Code-Structure | Directory map |
| Features | Feature inventory |
| Contributing | PR workflow |
| How-to-Change | Common change recipes |
| Gotchas | Footguns |
| Chat-Pipeline | Turn lifecycle |
| IPC-Contract | window.api |
| Auth-and-Firebase | Identity + rules |
| RAG-and-Knowledge | Vectors + graph |
| Agents | Multi-agent |
| Proxy-and-Governance | :3227 + policies |
| Configuration | Env + settings |
| Testing | bun test |
| Build-and-Release | Packaging |
| Skills | Build skills |
| Tools | Build tools |
| MCP-and-Extensions | MCP status + options |