Feat(channels): unify animated tool feedback across chat channels and Pico (#2622)
* feat(channels): unify tool feedback animation across discord telegram and feishu * fix(tool-feedback): unify fallback and single-message delivery * fix(channels): finalize tool feedback in place * fix ci * feat: improve tool feedback * fix review blockers in pico token cache and tool feedback fix(provider): preserve function thought signatures fix(feishu): recover tool feedback after edit fallback * * delete dead code * fix(pico): clean up tool feedback progress state * fix ci * fix(web): preserve tool feedback line breaks in chat * fix(channels): preserve tool feedback progress state fix(pico): preserve context usage when finalizing tool feedback chore: record branch review pass fix: preserve tool feedback finalization state fix(web): handle pico history update fallback * fix ci
This commit is contained in:
1 parent
68ceb54b36
commit
451db2f5d8
44 files changed
+4569
-188
No files matched your search
@@ -55,6 +55,12 @@ func buildCLIToolsPrompt(tools []ToolDefinition) string {
|
||||
func NormalizeToolCall(tc ToolCall) ToolCall {
|
||||
normalized := tc
|
||||
|
||||
if normalized.ThoughtSignature == "" &&
|
||||
normalized.ExtraContent != nil &&
|
||||
normalized.ExtraContent.Google != nil {
|
||||
normalized.ThoughtSignature = normalized.ExtraContent.Google.ThoughtSignature
|
||||
}
|
||||
|
||||
// Ensure Name is populated from Function if not set
|
||||
if normalized.Name == "" && normalized.Function != nil {
|
||||
normalized.Name = normalized.Function.Name
|
||||
@@ -77,8 +83,9 @@ func NormalizeToolCall(tc ToolCall) ToolCall {
|
||||
argsJSON, _ := json.Marshal(normalized.Arguments)
|
||||
if normalized.Function == nil {
|
||||
normalized.Function = &FunctionCall{
|
||||
Name: normalized.Name,
|
||||
Arguments: string(argsJSON),
|
||||
Name: normalized.Name,
|
||||
Arguments: string(argsJSON),
|
||||
ThoughtSignature: normalized.ThoughtSignature,
|
||||
}
|
||||
} else {
|
||||
if normalized.Function.Name == "" {
|
||||
@@ -90,6 +97,12 @@ func NormalizeToolCall(tc ToolCall) ToolCall {
|
||||
if normalized.Function.Arguments == "" {
|
||||
normalized.Function.Arguments = string(argsJSON)
|
||||
}
|
||||
if normalized.Function.ThoughtSignature == "" {
|
||||
normalized.Function.ThoughtSignature = normalized.ThoughtSignature
|
||||
}
|
||||
if normalized.ThoughtSignature == "" {
|
||||
normalized.ThoughtSignature = normalized.Function.ThoughtSignature
|
||||
}
|
||||
}
|
||||
|
||||
return normalized
|
||||
|
||||
Reference in new issue
Block a user