MCPcopy Create free account
hub / github.com/diillson/chatcli / newModeBuilder

Function newModeBuilder

cli/workspace/context_builder_mode_test.go:16–34  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

14)
15
16func newModeBuilder(t *testing.T) *ContextBuilder {
17 t.Helper()
18 wsDir := t.TempDir()
19 if err := os.WriteFile(filepath.Join(wsDir, "SOUL.md"), []byte("You are helpful"), 0o644); err != nil {
20 t.Fatal(err)
21 }
22 bl := NewBootstrapLoader(wsDir, "", testLogger())
23 ms := NewMemoryStore(t.TempDir(), testLogger())
24 ms.Manager().ProcessExtraction(`## LONGTERM
25- embed.FS needs '/' on Windows
26
27## PROFILE_UPDATE
28name=Edilson
29role=SRE
30
31## TOPICS
32oauth, cache`)
33 return NewContextBuilder(bl, ms, t.TempDir())
34}
35
36func TestBuildWorkspaceContextMode_Off(t *testing.T) {
37 cb := newModeBuilder(t)

Calls 6

ManagerMethod · 0.95
NewBootstrapLoaderFunction · 0.85
NewContextBuilderFunction · 0.85
testLoggerFunction · 0.70
NewMemoryStoreFunction · 0.70
ProcessExtractionMethod · 0.45

Tested by

no test coverage detected