-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstatusLine.ts
More file actions
49 lines (46 loc) · 1.11 KB
/
statusLine.ts
File metadata and controls
49 lines (46 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
import { z } from "zod";
const statusSchema = z.object({
session_id: z.string(),
transcript_path: z.string(),
cwd: z.string(),
model: z.object({
id: z.string(),
display_name: z.string(),
}),
workspace: z.object({
current_dir: z.string(),
project_dir: z.string(),
}),
version: z.string(),
output_style: z.object({
name: z.string(),
}),
context_window: z.object({
total_input_tokens: z.number(),
total_output_tokens: z.number(),
context_window_size: z.number(),
current_usage: z
.object({
input_tokens: z.number(),
output_tokens: z.number(),
cache_creation_input_tokens: z.number(),
cache_read_input_tokens: z.number(),
})
.nullable(),
used_percentage: z.number().nullable(),
remaining_percentage: z.number().nullable(),
vim: z
.object({
mode: z.enum(["INSERT", "NORMAL"]),
})
.optional(),
agent: z
.object({
name: z.string(),
type: z.string(),
})
.optional(),
}),
});
type Status = z.infer<typeof statusSchema>;
export { statusSchema, type Status };