diff --git a/cli/cmd/chunk/list.go b/cli/cmd/chunk/list.go index a2d26ca1..a0e3076d 100644 --- a/cli/cmd/chunk/list.go +++ b/cli/cmd/chunk/list.go @@ -36,7 +36,7 @@ var chunkListFields = []string{ // ListService is the narrow SDK surface this command depends on. type ListService interface { - ListKnowledgeChunks(ctx context.Context, knowledgeID string, page, pageSize int) ([]sdk.Chunk, int64, error) + ListKnowledgeChunks(ctx context.Context, knowledgeID string, page, pageSize int, chunkTypes ...string) ([]sdk.Chunk, int64, error) } type ListOptions struct { diff --git a/cli/cmd/chunk/list_test.go b/cli/cmd/chunk/list_test.go index 3a5b2927..110c62d5 100644 --- a/cli/cmd/chunk/list_test.go +++ b/cli/cmd/chunk/list_test.go @@ -28,7 +28,7 @@ type fakeListSvc struct { callIdx int } -func (f *fakeListSvc) ListKnowledgeChunks(_ context.Context, docID string, page, pageSize int) ([]sdk.Chunk, int64, error) { +func (f *fakeListSvc) ListKnowledgeChunks(_ context.Context, docID string, page, pageSize int, _ ...string) ([]sdk.Chunk, int64, error) { f.calls = append(f.calls, listCall{docID, page, pageSize}) defer func() { f.callIdx++ }() if f.callIdx >= len(f.pages) { diff --git a/cli/internal/mcp/tools.go b/cli/internal/mcp/tools.go index e6274b43..1a46e229 100644 --- a/cli/internal/mcp/tools.go +++ b/cli/internal/mcp/tools.go @@ -92,7 +92,7 @@ type agentService interface { // separate from knowledgeService because the chunk subtree is its own // domain on the server side (/api/v1/chunks/...). type chunkListService interface { - ListKnowledgeChunks(ctx context.Context, knowledgeID string, page, pageSize int) ([]sdk.Chunk, int64, error) + ListKnowledgeChunks(ctx context.Context, knowledgeID string, page, pageSize int, chunkTypes ...string) ([]sdk.Chunk, int64, error) } // agentInvokeService composes the two SDK methods agent_invoke needs diff --git a/cli/internal/mcp/tools_test.go b/cli/internal/mcp/tools_test.go index 1394540a..6397e477 100644 --- a/cli/internal/mcp/tools_test.go +++ b/cli/internal/mcp/tools_test.go @@ -128,7 +128,7 @@ func (f *fakeSvc) AgentQAStreamWithRequest(_ context.Context, sess string, req * } return f.agentStreamErr } -func (f *fakeSvc) ListKnowledgeChunks(_ context.Context, docID string, page, pageSize int) ([]sdk.Chunk, int64, error) { +func (f *fakeSvc) ListKnowledgeChunks(_ context.Context, docID string, page, pageSize int, _ ...string) ([]sdk.Chunk, int64, error) { f.calls.chunkDocID = docID f.calls.chunkPage = page f.calls.chunkPageSize = pageSize