mirror of
https://gitcode.com/JianFeeeee/HomeAgent.git
synced 2026-09-22 09:58:06 +00:00
refactor: pluginize text cleaning and tool NoMemory control
- SDK: ToolDef.NoMemory field, PluginSDK.RegisterTextCleaner/TextCleaners - Registry: aggregate text cleaners from plugins, expose CleanText() - Memory: replace hardcoded QQ regex CleanTemplateText with dynamic CleanText/SetTextCleaner - StageHost: add ToolDef(name) lookup - eventloop: check ToolDef.NoMemory before emitMemoryCandidate - context/Prune: replace hardcoded agentcli/terminal source filter with ToolsUsed NoMemory check - agentcli/cmd: mark tools with NoMemory: true - main.go: wire memory.SetTextCleaner(pluginReg.CleanText)
This commit is contained in:
@ -101,7 +101,7 @@ func TestCutExactRemoveTimestamp(t *testing.T) {
|
||||
got := CutExact("[15:04] 今天天气不错")
|
||||
for _, g := range got {
|
||||
if g == "15" || g == "04" || g == "15:04" {
|
||||
t.Errorf("timestamp should be removed by CleanTemplateText, got %q in %v", g, got)
|
||||
t.Errorf("timestamp should be removed by CleanText, got %q in %v", g, got)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user