MCPcopy
hub / github.com/docker/docker-agent / UpdateSessionTokens

Method UpdateSessionTokens

pkg/runtime/remote_runtime.go:759–764  ·  view source on GitHub ↗

UpdateSessionTokens updates token counts for the current session on the remote server.

(ctx context.Context, inputTokens, outputTokens int64, cost float64)

Source from the content-addressed store, hash-verified

757
758// UpdateSessionTokens updates token counts for the current session on the remote server.
759func (r *RemoteRuntime) UpdateSessionTokens(ctx context.Context, inputTokens, outputTokens int64, cost float64) error {
760 if r.sessionID == "" {
761 return errors.New("no active session")
762 }
763 return r.client.UpdateSessionTokens(ctx, r.sessionID, inputTokens, outputTokens, cost)
764}
765
766// SetSessionStarred sets the starred status for the current session on the remote server.
767func (r *RemoteRuntime) SetSessionStarred(ctx context.Context, starred bool) error {

Callers

nothing calls this directly

Calls 2

UpdateSessionTokensMethod · 0.65
NewMethod · 0.45

Tested by

no test coverage detected