Skip to content

Commit c8b52e7

Browse files
committed
Fix documentation issues from PR review
- Remove non-existent COPILOT_LOG_LEVEL env var references (SDK doesn't read it) - Fix Python log directory example (cli_args doesn't exist in Python SDK) - Add note about Python/Go limitation for log directory config - Add initialPrompt field to SessionStartHookInput docs - Add finalMessage and error fields to SessionEndHookInput docs - Fix SessionEndHookOutput fields (suppressOutput, cleanupActions, sessionSummary)
1 parent 11cc4d7 commit c8b52e7

2 files changed

Lines changed: 14 additions & 21 deletions

File tree

docs/debugging.md

Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,6 @@ const client = new CopilotClient({
2828
});
2929
```
3030

31-
You can also set the environment variable:
32-
```bash
33-
COPILOT_LOG_LEVEL=debug node your-app.js
34-
```
35-
3631
</details>
3732

3833
<details>
@@ -44,11 +39,6 @@ from copilot import CopilotClient
4439
client = CopilotClient(log_level="debug")
4540
```
4641

47-
Or via environment variable:
48-
```bash
49-
COPILOT_LOG_LEVEL=debug python your_app.py
50-
```
51-
5242
</details>
5343

5444
<details>
@@ -62,11 +52,6 @@ client, err := copilot.NewClient(copilot.ClientOptions{
6252
})
6353
```
6454

65-
Or via environment variable:
66-
```bash
67-
COPILOT_LOG_LEVEL=debug go run main.go
68-
```
69-
7055
</details>
7156

7257
<details>
@@ -111,19 +96,22 @@ const client = new CopilotClient({
11196
<summary><strong>Python</strong></summary>
11297

11398
```python
114-
client = CopilotClient(cli_args=["--log-dir", "/path/to/logs"])
99+
# The Python SDK does not currently support passing extra CLI arguments.
100+
# Logs are written to the default location or can be configured via
101+
# the CLI when running in server mode.
115102
```
116103

104+
> **Note:** Python SDK logging configuration is limited. For advanced logging, run the CLI manually with `--log-dir` and connect via `cli_url`.
105+
117106
</details>
118107

119108
<details>
120109
<summary><strong>Go</strong></summary>
121110

122111
```go
123-
// Pass via environment or CLI args
124-
client, err := copilot.NewClient(copilot.ClientOptions{
125-
// CLI args not directly supported; use environment variables
126-
})
112+
// The Go SDK does not currently support passing extra CLI arguments.
113+
// For custom log directories, run the CLI manually with --log-dir
114+
// and connect via CLIUrl option.
127115
```
128116

129117
</details>

docs/hooks/session-lifecycle.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ public delegate Task<SessionStartHookOutput?> SessionStartHandler(
6767
| `timestamp` | number | Unix timestamp when the hook was triggered |
6868
| `cwd` | string | Current working directory |
6969
| `source` | `"startup"` \| `"resume"` \| `"new"` | How the session was started |
70+
| `initialPrompt` | string \| undefined | The initial prompt if provided |
7071

7172
### Output
7273

@@ -242,6 +243,8 @@ public delegate Task<SessionEndHookOutput?> SessionEndHandler(
242243
| `timestamp` | number | Unix timestamp when the hook was triggered |
243244
| `cwd` | string | Current working directory |
244245
| `reason` | string | Why the session ended (see below) |
246+
| `finalMessage` | string \| undefined | The last message from the session |
247+
| `error` | string \| undefined | Error message if session ended due to error |
245248

246249
#### End Reasons
247250

@@ -257,7 +260,9 @@ public delegate Task<SessionEndHookOutput?> SessionEndHandler(
257260

258261
| Field | Type | Description |
259262
|-------|------|-------------|
260-
| `additionalContext` | string | Context to add (rarely used) |
263+
| `suppressOutput` | boolean | Suppress the final session output |
264+
| `cleanupActions` | string[] | List of cleanup actions to perform |
265+
| `sessionSummary` | string | Summary of the session for logging/analytics |
261266

262267
### Examples
263268

0 commit comments

Comments
 (0)