v0.2.2 872a312

reasoning.go RawHistoryFolder

1package provider
2
3import "strings"
4
5// NormalizeReasoning canonicalizes zot's user-facing thinking levels.
6// Empty string means reasoning/thinking is disabled.
7func NormalizeReasoning(level string) string {
8	switch strings.ToLower(strings.TrimSpace(level)) {
9	case "", "off", "none", "no", "false", "disabled":
10		return ""
11	case "min", "minimal", "minimum":
12		return "minimum"
13	case "low":
14		return "low"
15	case "med", "medium":
16		return "medium"
17	case "hi", "high":
18		return "high"
19	case "max", "maximum":
20		return "maximum"
21	default:
22		return strings.ToLower(strings.TrimSpace(level))
23	}
24}
25
26// ReasoningBudget returns zot's approximate token budget for thinking-capable
27// providers that accept explicit budgets.
28func ReasoningBudget(level string) int {
29	switch NormalizeReasoning(level) {
30	case "minimum":
31		return 1024
32	case "low":
33		return 2048
34	case "medium":
35		return 8192
36	case "high":
37		return 16384
38	case "maximum":
39		return 32768
40	default:
41		return 0
42	}
43}
44
45// OpenAIReasoningEffort maps zot's six-level setting onto the effort enum
46// accepted by OpenAI-compatible chat-completions endpoints.
47func OpenAIReasoningEffort(level string) string {
48	switch NormalizeReasoning(level) {
49	case "minimum", "low":
50		// Many OpenAI-compatible endpoints only accept low/medium/high.
51		// Use low for zot's minimum instead of the newer minimal enum.
52		return "low"
53	case "medium":
54		return "medium"
55	case "high", "maximum":
56		return "high"
57	default:
58		return ""
59	}
60}
61
62// OpenAICodexReasoningEffort maps zot levels onto the ChatGPT/Codex
63// Responses backend enum. That backend rejects "minimal" and uses
64// "xhigh" for the highest tier on recent GPT-5.x models.
65func OpenAICodexReasoningEffort(level string) string {
66	switch NormalizeReasoning(level) {
67	case "minimum", "low":
68		return "low"
69	case "medium":
70		return "medium"
71	case "high":
72		return "high"
73	case "maximum":
74		return "xhigh"
75	default:
76		return ""
77	}
78}

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 1

Tags 476

↑↓ moveenter openesc close