mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-15 15:03:31 +00:00
docs(coding-agent): update README-NEW.md, tui.md, add new docs
- README-NEW.md: add environment variables, philosophy extras (no built-in to-dos, no background bash), session ID support, pi config command, plain git URLs, version pinning - tui.md: fix hooks->extensions terminology, update Component interface (invalidate required, add wantsKeyRelease) - Add new docs: settings.md, development.md, json.md - Add screenshots: tree-view.png, doom-extension.png
This commit is contained in:
parent
28ab25b07e
commit
5340862910
7 changed files with 626 additions and 107 deletions
69
packages/coding-agent/docs/development.md
Normal file
69
packages/coding-agent/docs/development.md
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
# Development
|
||||
|
||||
See [AGENTS.md](../../../AGENTS.md) for additional guidelines.
|
||||
|
||||
## Setup
|
||||
|
||||
```bash
|
||||
git clone https://github.com/badlogic/pi-mono
|
||||
cd pi-mono
|
||||
npm install
|
||||
npm run build
|
||||
```
|
||||
|
||||
Run from source:
|
||||
|
||||
```bash
|
||||
./pi-test.sh
|
||||
```
|
||||
|
||||
## Forking / Rebranding
|
||||
|
||||
Configure via `package.json`:
|
||||
|
||||
```json
|
||||
{
|
||||
"piConfig": {
|
||||
"name": "pi",
|
||||
"configDir": ".pi"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Change `name`, `configDir`, and `bin` field for your fork. Affects CLI banner, config paths, and environment variable names.
|
||||
|
||||
## Path Resolution
|
||||
|
||||
Three execution modes: npm install, standalone binary, tsx from source.
|
||||
|
||||
**Always use `src/config.ts`** for package assets:
|
||||
|
||||
```typescript
|
||||
import { getPackageDir, getThemeDir } from "./config.js";
|
||||
```
|
||||
|
||||
Never use `__dirname` directly for package assets.
|
||||
|
||||
## Debug Command
|
||||
|
||||
`/debug` (hidden) writes to `~/.pi/agent/pi-debug.log`:
|
||||
- Rendered TUI lines with ANSI codes
|
||||
- Last messages sent to the LLM
|
||||
|
||||
## Testing
|
||||
|
||||
```bash
|
||||
./test.sh # Run non-LLM tests (no API keys needed)
|
||||
npm test # Run all tests
|
||||
npm test -- test/specific.test.ts # Run specific test
|
||||
```
|
||||
|
||||
## Project Structure
|
||||
|
||||
```
|
||||
packages/
|
||||
ai/ # LLM provider abstraction
|
||||
agent/ # Agent loop and message types
|
||||
tui/ # Terminal UI components
|
||||
coding-agent/ # CLI and interactive mode
|
||||
```
|
||||
Loading…
Add table
Add a link
Reference in a new issue