mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-17 06:04:51 +00:00
SDK docs: add links to specific examples in each section
This commit is contained in:
parent
519688cb35
commit
f835f031eb
1 changed files with 22 additions and 0 deletions
|
|
@ -254,6 +254,8 @@ If no model is provided:
|
||||||
2. Uses default from settings
|
2. Uses default from settings
|
||||||
3. Falls back to first available model
|
3. Falls back to first available model
|
||||||
|
|
||||||
|
> See [examples/sdk/02-custom-model.ts](../examples/sdk/02-custom-model.ts)
|
||||||
|
|
||||||
### API Keys
|
### API Keys
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
|
|
@ -282,6 +284,8 @@ const { session } = await createAgentSession({
|
||||||
});
|
});
|
||||||
```
|
```
|
||||||
|
|
||||||
|
> See [examples/sdk/09-api-keys-and-oauth.ts](../examples/sdk/09-api-keys-and-oauth.ts)
|
||||||
|
|
||||||
### System Prompt
|
### System Prompt
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
|
|
@ -296,6 +300,8 @@ const { session } = await createAgentSession({
|
||||||
});
|
});
|
||||||
```
|
```
|
||||||
|
|
||||||
|
> See [examples/sdk/03-custom-prompt.ts](../examples/sdk/03-custom-prompt.ts)
|
||||||
|
|
||||||
### Tools
|
### Tools
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
|
|
@ -317,6 +323,8 @@ const { session } = await createAgentSession({
|
||||||
});
|
});
|
||||||
```
|
```
|
||||||
|
|
||||||
|
> See [examples/sdk/05-tools.ts](../examples/sdk/05-tools.ts)
|
||||||
|
|
||||||
### Custom Tools
|
### Custom Tools
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
|
|
@ -354,6 +362,8 @@ const { session } = await createAgentSession({
|
||||||
});
|
});
|
||||||
```
|
```
|
||||||
|
|
||||||
|
> See [examples/sdk/05-tools.ts](../examples/sdk/05-tools.ts)
|
||||||
|
|
||||||
### Hooks
|
### Hooks
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
|
|
@ -397,6 +407,8 @@ const { session } = await createAgentSession({
|
||||||
});
|
});
|
||||||
```
|
```
|
||||||
|
|
||||||
|
> See [examples/sdk/06-hooks.ts](../examples/sdk/06-hooks.ts)
|
||||||
|
|
||||||
### Skills
|
### Skills
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
|
|
@ -431,6 +443,8 @@ const skills = discoverSkills(process.cwd(), undefined, {
|
||||||
});
|
});
|
||||||
```
|
```
|
||||||
|
|
||||||
|
> See [examples/sdk/04-skills.ts](../examples/sdk/04-skills.ts)
|
||||||
|
|
||||||
### Context Files
|
### Context Files
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
|
|
@ -456,6 +470,8 @@ const { session } = await createAgentSession({
|
||||||
});
|
});
|
||||||
```
|
```
|
||||||
|
|
||||||
|
> See [examples/sdk/07-context-files.ts](../examples/sdk/07-context-files.ts)
|
||||||
|
|
||||||
### Slash Commands
|
### Slash Commands
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
|
|
@ -475,6 +491,8 @@ const { session } = await createAgentSession({
|
||||||
});
|
});
|
||||||
```
|
```
|
||||||
|
|
||||||
|
> See [examples/sdk/08-slash-commands.ts](../examples/sdk/08-slash-commands.ts)
|
||||||
|
|
||||||
### Session Management
|
### Session Management
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
|
|
@ -516,6 +534,8 @@ const { session } = await createAgentSession({
|
||||||
});
|
});
|
||||||
```
|
```
|
||||||
|
|
||||||
|
> See [examples/sdk/11-sessions.ts](../examples/sdk/11-sessions.ts)
|
||||||
|
|
||||||
### Settings Management
|
### Settings Management
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
|
|
@ -558,6 +578,8 @@ Settings load from two locations and merge:
|
||||||
|
|
||||||
Project overrides global. Nested objects merge keys. Setters only modify global (project is read-only for version control).
|
Project overrides global. Nested objects merge keys. Setters only modify global (project is read-only for version control).
|
||||||
|
|
||||||
|
> See [examples/sdk/10-settings.ts](../examples/sdk/10-settings.ts)
|
||||||
|
|
||||||
## Discovery Functions
|
## Discovery Functions
|
||||||
|
|
||||||
All discovery functions accept optional `cwd` and `agentDir` parameters.
|
All discovery functions accept optional `cwd` and `agentDir` parameters.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue