webui: display context window size in info box
diff --git a/loop/agent.go b/loop/agent.go
index 82d823e..82c3268 100644
--- a/loop/agent.go
+++ b/loop/agent.go
@@ -159,6 +159,9 @@
// GetPorts returns the cached list of open TCP ports
GetPorts() []portlist.Port
+
+ // TokenContextWindow returns the TokenContextWindow size of the model the agent is using.
+ TokenContextWindow() int
}
type CodingAgentMessageType string
@@ -468,6 +471,11 @@
outstandingToolCalls map[string]string
}
+// TokenContextWindow implements CodingAgent.
+func (a *Agent) TokenContextWindow() int {
+ return a.config.Service.TokenContextWindow()
+}
+
// NewIterator implements CodingAgent.
func (a *Agent) NewIterator(ctx context.Context, nextMessageIdx int) MessageIterator {
a.mu.Lock()