SDK docs: add links to specific examples in each section
This commit is contained in:
@@ -254,6 +254,8 @@ If no model is provided:
|
||||
2. Uses default from settings
|
||||
3. Falls back to first available model
|
||||
|
||||
> See [examples/sdk/02-custom-model.ts](../examples/sdk/02-custom-model.ts)
|
||||
|
||||
### API Keys
|
||||
|
||||
```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
|
||||
|
||||
```typescript
|
||||
@@ -296,6 +300,8 @@ const { session } = await createAgentSession({
|
||||
});
|
||||
```
|
||||
|
||||
> See [examples/sdk/03-custom-prompt.ts](../examples/sdk/03-custom-prompt.ts)
|
||||
|
||||
### Tools
|
||||
|
||||
```typescript
|
||||
@@ -317,6 +323,8 @@ const { session } = await createAgentSession({
|
||||
});
|
||||
```
|
||||
|
||||
> See [examples/sdk/05-tools.ts](../examples/sdk/05-tools.ts)
|
||||
|
||||
### Custom Tools
|
||||
|
||||
```typescript
|
||||
@@ -354,6 +362,8 @@ const { session } = await createAgentSession({
|
||||
});
|
||||
```
|
||||
|
||||
> See [examples/sdk/05-tools.ts](../examples/sdk/05-tools.ts)
|
||||
|
||||
### Hooks
|
||||
|
||||
```typescript
|
||||
@@ -397,6 +407,8 @@ const { session } = await createAgentSession({
|
||||
});
|
||||
```
|
||||
|
||||
> See [examples/sdk/06-hooks.ts](../examples/sdk/06-hooks.ts)
|
||||
|
||||
### Skills
|
||||
|
||||
```typescript
|
||||
@@ -431,6 +443,8 @@ const skills = discoverSkills(process.cwd(), undefined, {
|
||||
});
|
||||
```
|
||||
|
||||
> See [examples/sdk/04-skills.ts](../examples/sdk/04-skills.ts)
|
||||
|
||||
### Context Files
|
||||
|
||||
```typescript
|
||||
@@ -456,6 +470,8 @@ const { session } = await createAgentSession({
|
||||
});
|
||||
```
|
||||
|
||||
> See [examples/sdk/07-context-files.ts](../examples/sdk/07-context-files.ts)
|
||||
|
||||
### Slash Commands
|
||||
|
||||
```typescript
|
||||
@@ -475,6 +491,8 @@ const { session } = await createAgentSession({
|
||||
});
|
||||
```
|
||||
|
||||
> See [examples/sdk/08-slash-commands.ts](../examples/sdk/08-slash-commands.ts)
|
||||
|
||||
### Session Management
|
||||
|
||||
```typescript
|
||||
@@ -516,6 +534,8 @@ const { session } = await createAgentSession({
|
||||
});
|
||||
```
|
||||
|
||||
> See [examples/sdk/11-sessions.ts](../examples/sdk/11-sessions.ts)
|
||||
|
||||
### Settings Management
|
||||
|
||||
```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).
|
||||
|
||||
> See [examples/sdk/10-settings.ts](../examples/sdk/10-settings.ts)
|
||||
|
||||
## Discovery Functions
|
||||
|
||||
All discovery functions accept optional `cwd` and `agentDir` parameters.
|
||||
|
||||
Reference in New Issue
Block a user