Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/reference/gateway-rpc-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ Response Schema:
"saved_ratio": 0.63,
"trigger_mode": "manual",
"transcript_id": "compact-1",
"transcript_path": ".neocode/transcripts/compact-1.md"
"transcript_path": ".neocode/transcripts/compact-subagent.md"
}
}
}
Expand Down Expand Up @@ -1147,7 +1147,7 @@ Success Response:
"SavedRatio": 0.63,
"TriggerMode": "manual",
"TranscriptID": "compact-demo-1",
"TranscriptPath": ".neocode/transcripts/compact-demo-1.md"
"TranscriptPath": ".neocode/transcripts/compact-demo-subagent.md"
}
}
}
Expand Down
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ require (
github.com/muesli/termenv v0.16.0 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/ncruces/go-strftime v1.0.0 // indirect
github.com/odvcencio/gotreesitter v0.15.3 // indirect
github.com/pelletier/go-toml/v2 v2.2.4 // indirect
github.com/prometheus/client_model v0.6.2 // indirect
github.com/prometheus/common v0.66.1 // indirect
Expand Down
4 changes: 4 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,10 @@ github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
github.com/ncruces/go-strftime v1.0.0 h1:HMFp8mLCTPp341M/ZnA4qaf7ZlsbTc+miZjCLOFAw7w=
github.com/ncruces/go-strftime v1.0.0/go.mod h1:Fwc5htZGVVkseilnfgOVb9mKy6w1naJmn9CehxcKcls=
github.com/odvcencio/gotreesitter v0.15.3 h1:bcSIEMyRrDaFIZw2zwM8cNR03VX6y8CbXFxVzfFSGX0=
github.com/odvcencio/gotreesitter v0.15.3/go.mod h1:ccYZsDUmAJQAtliLsNHT33F3X4AN7f/Z6JGiPNZoEzY=
github.com/openai/openai-go/v3 v3.30.0 h1:T8VkhqAm6BuvxwpVG+Aw+H4TcYIsbj9nqytjpWcE/aU=
github.com/openai/openai-go/v3 v3.30.0/go.mod h1:cdufnVK14cWcT9qA1rRtrXx4FTRsgbDPW7Ia7SS5cZo=
github.com/openai/openai-go/v3 v3.32.0 h1:aHp/3wkX1W6jB8zTtf9xV0aK0qPFSVDqS7AHmlJ4hXs=
github.com/openai/openai-go/v3 v3.32.0/go.mod h1:cdufnVK14cWcT9qA1rRtrXx4FTRsgbDPW7Ia7SS5cZo=
github.com/pelletier/go-toml/v2 v2.2.4 h1:mye9XuhQ6gvn5h28+VilKrrPoQVanw5PMw/TB0t5Ec4=
Expand Down
6 changes: 6 additions & 0 deletions internal/app/bootstrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,14 @@ import (
"neo-code/internal/provider/builtin"
providercatalog "neo-code/internal/provider/catalog"
providertypes "neo-code/internal/provider/types"
"neo-code/internal/repository"
agentruntime "neo-code/internal/runtime"
"neo-code/internal/security"
agentsession "neo-code/internal/session"
"neo-code/internal/skills"
"neo-code/internal/tools"
"neo-code/internal/tools/bash"
"neo-code/internal/tools/codebase"
diagnosetool "neo-code/internal/tools/diagnose"
"neo-code/internal/tools/filesystem"
"neo-code/internal/tools/mcp"
Expand Down Expand Up @@ -460,6 +462,10 @@ func buildToolRegistry(cfg config.Config) (*tools.Registry, func() error, error)
}))
toolRegistry.Register(todo.New())
toolRegistry.Register(spawnsubagent.New())
repoSvc := repository.NewService()
toolRegistry.Register(codebase.NewRead(repoSvc, cfg.Workdir))
toolRegistry.Register(codebase.NewSearchText(repoSvc, cfg.Workdir))
toolRegistry.Register(codebase.NewSearchSymbol(repoSvc, cfg.Workdir))
mcpRegistry, err := BuildMCPRegistry(cfg)
if err != nil {
return nil, nil, err
Expand Down
12 changes: 12 additions & 0 deletions internal/checkpoint/bash_capture_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -220,3 +220,15 @@ func TestSourceFilesInWorkdir_HandlesEmptyWorkdir(t *testing.T) {
t.Fatalf("expected nil with empty workdir, got %v", got)
}
}

func equalStringSlice(a, b []string) bool {
if len(a) != len(b) {
return false
}
for i := range a {
if a[i] != b[i] {
return false
}
}
return true
}
19 changes: 9 additions & 10 deletions internal/checkpoint/per_edit_snapshot.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ import (
"time"

"github.com/pmezard/go-difflib/difflib"

"neo-code/internal/repository"
)

const (
Expand Down Expand Up @@ -446,20 +448,17 @@ func (s *PerEditSnapshotStore) HasPending() bool {
return len(s.pending) > 0
}

// FileChangeKind 表示两个 checkpoint 之间单个 path 的变更类别
type FileChangeKind string
// FileChangeKind 是 repository.FileChangeKind 的别名,保留以维持向后兼容
type FileChangeKind = repository.FileChangeKind

const (
FileChangeAdded FileChangeKind = "added"
FileChangeDeleted FileChangeKind = "deleted"
FileChangeModified FileChangeKind = "modified"
FileChangeAdded = repository.FileChangeAdded
FileChangeDeleted = repository.FileChangeDeleted
FileChangeModified = repository.FileChangeModified
)

// FileChangeEntry 描述端到端 diff 中单个 path 的变更。
type FileChangeEntry struct {
Path string
Kind FileChangeKind
}
// FileChangeEntry 是 repository.FileChangeEntry 的别名,保留以维持向后兼容。
type FileChangeEntry = repository.FileChangeEntry

// ChangedFiles 端到端比较两个 checkpoint,返回 path → 变更类别的列表(按 path 字典序)。
// 不返回内容差异,仅用于 UI 分组(添加/删除/修改)。完整 patch 仍由 Diff 生成。
Expand Down
2 changes: 1 addition & 1 deletion internal/cli/gateway_runtime_bridge_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,7 @@ func TestGatewayRuntimePortBridgeRuntimeMethods(t *testing.T) {
SavedRatio: 0.5,
TriggerMode: "manual",
TranscriptID: "tx-1",
TranscriptPath: "/tmp/tx-1.md",
TranscriptPath: "/tmp/tx-subagent.md",
},
systemToolRes: tools.ToolResult{
ToolCallID: "call-system-1",
Expand Down
2 changes: 1 addition & 1 deletion internal/config/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -734,7 +734,7 @@ const (
GLMDefaultAPIKeyEnv = "GLM_API_KEY"

MiMoName = "mimo"
MiMoDefaultBaseURL = "https://api.xiaomimimo.com/v1"
MiMoDefaultBaseURL = "https://token-plan-cn.xiaomimimo.com/v1"
MiMoDefaultModel = "mimo-v2.5-pro"
MiMoDefaultAPIKeyEnv = "MIMO_API_KEY"

Expand Down
2 changes: 1 addition & 1 deletion internal/context/prompt_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ func TestDefaultToolUsagePromptIncludesPermissionAndAntiLoopGuidance(t *testing.
if !strings.Contains(toolUsage, "`status`, `ok`, `tool_call_id`, `truncated`, `meta.*`, exit codes, and `content`") {
t.Fatalf("expected Tool Usage to explain structured tool results, got %q", toolUsage)
}
if !strings.Contains(toolUsage, "inspect (`git status`/`git diff`/`git log`)") {
if !strings.Contains(toolUsage, "Use Git through dedicated `git_*` tools") {
t.Fatalf("expected Tool Usage to describe git inspection order, got %q", toolUsage)
}
if !strings.Contains(toolUsage, "Prefer rollback primitives in this order: `git restore`") {
Expand Down
Loading
Loading