|
Add context token counter: 64k default, live UI display
- config: ollama_num_ctx default 8192 β 65536 - LLMChunk: add prompt_tokens / completion_tokens fields - OllamaBackend.stream: populate token counts from final chunk (prompt_eval_count + eval_count when chunk.done) - StreamEnd: add context_tokens and max_context_tokens - Agent.run_stream: capture token counts, pass to StreamEnd - websocket: include context_tokens / max_context_tokens in stream_end - index.html: split chat-header into title span + token-counter span - sidebar.js: updateChatHeader targets #chat-header-title, not innerHTML - app.js: updateTokenCounter() shows "X/Y (Z%) tokens", colors: gray <50%, amber 50β79%, red β₯80% - style.css: .token-counter, .warn, .danger styles Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> |
|---|
|
|
| client/index.html |
|---|
| client/js/app.js |
|---|
| client/js/sidebar.js |
|---|
| client/style.css |
|---|
| navi/api/websocket.py |
|---|
| navi/config.py |
|---|
| navi/core/agent.py |
|---|
| navi/llm/base.py |
|---|
| navi/llm/ollama.py |
|---|