fix: detach all memory tools when enabling memfs (#900)
Co-authored-by: Letta <noreply@letta.com>
This commit is contained in:
@@ -233,6 +233,7 @@ import {
|
||||
import {
|
||||
isFileEditTool,
|
||||
isFileWriteTool,
|
||||
isMemoryTool,
|
||||
isPatchTool,
|
||||
isShellTool,
|
||||
} from "./helpers/toolNameMapping";
|
||||
@@ -2693,8 +2694,7 @@ export default function App({
|
||||
for (const line of buffersRef.current.byId.values()) {
|
||||
if (line.kind !== "tool_call") continue;
|
||||
if (!line.toolCallId || !line.name) continue;
|
||||
if (line.name !== "memory" && line.name !== "memory_apply_patch")
|
||||
continue;
|
||||
if (!isMemoryTool(line.name)) continue;
|
||||
if (memorySyncProcessedToolCallsRef.current.has(line.toolCallId))
|
||||
continue;
|
||||
newToolCallIds.push(line.toolCallId);
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
*/
|
||||
|
||||
import { isInteractiveApprovalTool } from "../../tools/interactivePolicy";
|
||||
import { MEMORY_TOOL_NAMES } from "../../tools/toolset";
|
||||
|
||||
/**
|
||||
* Maps internal tool names to user-friendly display names.
|
||||
@@ -141,7 +142,7 @@ export function alwaysRequiresUserInput(name: string): boolean {
|
||||
* Checks if a tool is a memory tool (server-side memory management)
|
||||
*/
|
||||
export function isMemoryTool(name: string): boolean {
|
||||
return name === "memory" || name === "memory_apply_patch";
|
||||
return MEMORY_TOOL_NAMES.has(name);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user