mirror of
https://github.com/patriceckhart/zot.git
synced 2026-06-26 21:36:31 +02:00
Single Go module, four top-level packages under packages/. Import
paths become github.com/patriceckhart/zot/packages/<name>; downstream
consumers can depend on individual packages without pulling the rest.
Layout:
packages/provider/ LLM clients + catalog
packages/provider/auth/ credential store + OAuth + login server
packages/core/ agent loop, sessions, cost
packages/tui/ terminal toolkit + chat view
packages/agent/ CLI wiring, system prompt
extensions/ extproto/ modes/ tools/ skills/ swarm/
sdk/ (was pkg/zotcore, package renamed zotcore -> sdk)
ext/ (was pkg/zotext, package renamed zotext -> ext)
internal/ and pkg/ removed. The internal/assets logo moved into
packages/provider/auth/assets.
Public Go SDK identifiers renamed:
pkg/zotcore (package zotcore) -> packages/agent/sdk (package sdk)
pkg/zotext (package zotext) -> packages/agent/ext (package ext)
This breaks Go-based extensions and embedders; the JSON wire protocol
for extensions and RPC is unchanged, so non-Go extensions, already-
built extension binaries, and zot rpc consumers are unaffected.
Docs, examples, and the built-in write-zot-extension skill updated
for the new paths and identifiers. Shadow-bug fixes in code samples
(ext := ext.New -> e := ext.New).
39 lines
827 B
Go
39 lines
827 B
Go
package telegram
|
|
|
|
import (
|
|
"strings"
|
|
"testing"
|
|
|
|
"github.com/patriceckhart/zot/packages/provider"
|
|
)
|
|
|
|
func TestFormatStatusIncludesModelUsageContextAndCWD(t *testing.T) {
|
|
got := FormatStatus(StatusSnapshot{
|
|
Provider: "openai",
|
|
Model: "gpt-5.5",
|
|
CWD: "/tmp/zot",
|
|
Usage: provider.Usage{InputTokens: 961_000, OutputTokens: 10_000, CacheReadTokens: 770_000, CostUSD: 2.749},
|
|
Subscription: true,
|
|
ContextUsed: 44_800,
|
|
ContextMax: 400_000,
|
|
Busy: true,
|
|
Queued: 2,
|
|
})
|
|
|
|
wants := []string{
|
|
"(openai) gpt-5.5",
|
|
"↑961k",
|
|
"↓10k",
|
|
"R770k",
|
|
"$2.749 (sub)",
|
|
"11.2%/400k",
|
|
"state: working",
|
|
"queued: 2",
|
|
"cwd: /tmp/zot",
|
|
}
|
|
for _, want := range wants {
|
|
if !strings.Contains(got, want) {
|
|
t.Fatalf("FormatStatus missing %q in:\n%s", want, got)
|
|
}
|
|
}
|
|
}
|