Fix timeline export test on Windows
- commit
- b4642094fc0da50b4d2d0b0e77068935a4af49cc
- author
- patriceckhart · · 2026-08-17 07:04 UTC
- parent
- 89513e6
- signature
- unsigned
- refs
- tag: v0.3.45
2 files · +3 -2
M README.md +1 -1
| @@ -322,7 +322,7 @@ Shows previous sessions for the current working directory, newest first, with ti | |||
| 322 | 322 | ||
| 323 | 323 | Five ops on the current session. `/session` alone opens a picker; each is also runnable directly. | |
| 324 | 324 | ||
| 325 | - | - **`/session timeline`**. Replaces the chat area with a read-only timeline of the current system prompt, user and assistant messages, and tool calls. The header shows provider-reported context usage and an estimated split between system prompt, tool definitions, and messages. The split uses a simple byte estimate, so it is directional rather than tokenizer-exact. Use `up` / `down` or `pgup` / `pgdn` to select an event, `tab` / `shift+tab` to inspect its summary, payload, result, schema, and transcript-derived timing, and `/` to search. `ctrl+e` writes a private-permission JSON export to `~/Downloads` (falling back to the home directory). Images are represented by MIME type and byte size instead of embedding their data. Press `esc` to return to chat. | |
| 325 | + | - **`/session timeline`**. Replaces the chat area with a read-only timeline of the current system prompt, user and assistant messages, and tool calls. The header shows provider-reported context usage and an estimated split between system prompt, tool definitions, and messages. The split uses a simple byte estimate, so it is directional rather than tokenizer-exact. Use `up` / `down` or `pgup` / `pgdn` to select an event, `tab` / `shift+tab` to inspect its summary, payload, result, schema, and transcript-derived timing, and `/` to search. `ctrl+e` writes a JSON export to `~/Downloads` (falling back to the home directory) with `0600` permissions on platforms that support Unix file modes. Images are represented by MIME type and byte size instead of embedding their data. Press `esc` to return to chat. | |
| 326 | 326 | - **`/session export [path]`**. Writes the running transcript to a portable `.zotsession` file. Default destination is `~/Downloads/<timestamp>-<session-id>-<prompt-slug>.zotsession`. Pass a path to override; a directory is fine (a dated name is built inside), a bare name gets `.zotsession` appended. The meta's cwd is stripped on the way out so the recipient doesn't see your filesystem layout. | |
| 327 | 327 | ||
| 328 | 328 | **What's included.** Only the main chat thread of the running session — messages, tool calls, tool results, compactions, and usage. **`/swarm` subagents are NOT included.** Their transcripts, unix-socket inboxes, and per-agent session files are all machine-local; a `.zotsession` is just a chat transcript and has no way to revive a unix socket on another box. If you want the conversation, copy it out of the dashboard manually. | |
| @@ -322,7 +322,7 @@ Shows previous sessions for the current working directory, newest first, with ti | |||||
| 322 | 322 | ||||
| 323 | Five ops on the current session. `/session` alone opens a picker; each is also runnable directly. | 323 | Five ops on the current session. `/session` alone opens a picker; each is also runnable directly. | ||
| 324 | 324 | ||||
| 325 | - | - **`/session timeline`**. Replaces the chat area with a read-only timeline of the current system prompt, user and assistant messages, and tool calls. The header shows provider-reported context usage and an estimated split between system prompt, tool definitions, and messages. The split uses a simple byte estimate, so it is directional rather than tokenizer-exact. Use `up` / `down` or `pgup` / `pgdn` to select an event, `tab` / `shift+tab` to inspect its summary, payload, result, schema, and transcript-derived timing, and `/` to search. `ctrl+e` writes a private-permission JSON export to `~/Downloads` (falling back to the home directory). Images are represented by MIME type and byte size instead of embedding their data. Press `esc` to return to chat. | 325 | + | - **`/session timeline`**. Replaces the chat area with a read-only timeline of the current system prompt, user and assistant messages, and tool calls. The header shows provider-reported context usage and an estimated split between system prompt, tool definitions, and messages. The split uses a simple byte estimate, so it is directional rather than tokenizer-exact. Use `up` / `down` or `pgup` / `pgdn` to select an event, `tab` / `shift+tab` to inspect its summary, payload, result, schema, and transcript-derived timing, and `/` to search. `ctrl+e` writes a JSON export to `~/Downloads` (falling back to the home directory) with `0600` permissions on platforms that support Unix file modes. Images are represented by MIME type and byte size instead of embedding their data. Press `esc` to return to chat. |
| 326 | - **`/session export [path]`**. Writes the running transcript to a portable `.zotsession` file. Default destination is `~/Downloads/<timestamp>-<session-id>-<prompt-slug>.zotsession`. Pass a path to override; a directory is fine (a dated name is built inside), a bare name gets `.zotsession` appended. The meta's cwd is stripped on the way out so the recipient doesn't see your filesystem layout. | 326 | - **`/session export [path]`**. Writes the running transcript to a portable `.zotsession` file. Default destination is `~/Downloads/<timestamp>-<session-id>-<prompt-slug>.zotsession`. Pass a path to override; a directory is fine (a dated name is built inside), a bare name gets `.zotsession` appended. The meta's cwd is stripped on the way out so the recipient doesn't see your filesystem layout. | ||
| 327 | 327 | ||||
| 328 | **What's included.** Only the main chat thread of the running session — messages, tool calls, tool results, compactions, and usage. **`/swarm` subagents are NOT included.** Their transcripts, unix-socket inboxes, and per-agent session files are all machine-local; a `.zotsession` is just a chat transcript and has no way to revive a unix socket on another box. If you want the conversation, copy it out of the dashboard manually. | 328 | **What's included.** Only the main chat thread of the running session — messages, tool calls, tool results, compactions, and usage. **`/swarm` subagents are NOT included.** Their transcripts, unix-socket inboxes, and per-agent session files are all machine-local; a `.zotsession` is just a chat transcript and has no way to revive a unix socket on another box. If you want the conversation, copy it out of the dashboard manually. | ||
M packages/agent/modes/timeline_view_test.go +2 -1
| @@ -4,6 +4,7 @@ import ( | |||
| 4 | 4 | "context" | |
| 5 | 5 | "encoding/json" | |
| 6 | 6 | "os" | |
| 7 | + | "runtime" | |
| 7 | 8 | "strings" | |
| 8 | 9 | "testing" | |
| 9 | 10 | "time" | |
| @@ -133,7 +134,7 @@ func TestTimelineExportOmitsImageDataAndUsesPrivatePermissions(t *testing.T) { | |||
| 133 | 134 | if err != nil { | |
| 134 | 135 | t.Fatal(err) | |
| 135 | 136 | } | |
| 136 | - | if info.Mode().Perm() != 0o600 { | |
| 137 | + | if runtime.GOOS != "windows" && info.Mode().Perm() != 0o600 { | |
| 137 | 138 | t.Fatalf("permissions = %o, want 600", info.Mode().Perm()) | |
| 138 | 139 | } | |
| 139 | 140 | } | |
| @@ -4,6 +4,7 @@ import ( | |||||
| 4 | "context" | 4 | "context" | ||
| 5 | "encoding/json" | 5 | "encoding/json" | ||
| 6 | "os" | 6 | "os" | ||
| 7 | + | "runtime" | |||
| 7 | "strings" | 8 | "strings" | ||
| 8 | "testing" | 9 | "testing" | ||
| 9 | "time" | 10 | "time" | ||
| @@ -133,7 +134,7 @@ func TestTimelineExportOmitsImageDataAndUsesPrivatePermissions(t *testing.T) { | |||||
| 133 | if err != nil { | 134 | if err != nil { | ||
| 134 | t.Fatal(err) | 135 | t.Fatal(err) | ||
| 135 | } | 136 | } | ||
| 136 | - | if info.Mode().Perm() != 0o600 { | 137 | + | if runtime.GOOS != "windows" && info.Mode().Perm() != 0o600 { |
| 137 | t.Fatalf("permissions = %o, want 600", info.Mode().Perm()) | 138 | t.Fatalf("permissions = %o, want 600", info.Mode().Perm()) | ||
| 138 | } | 139 | } | ||
| 139 | } | 140 | } | ||