refactor(background-agent): standardize loop detector null guards
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
@@ -36,7 +36,7 @@ export function recordToolCall(
|
|||||||
settings: CircuitBreakerSettings,
|
settings: CircuitBreakerSettings,
|
||||||
toolInput?: Record<string, unknown> | null
|
toolInput?: Record<string, unknown> | null
|
||||||
): ToolCallWindow {
|
): ToolCallWindow {
|
||||||
if (toolInput === undefined || toolInput === null) {
|
if (toolInput == null) {
|
||||||
return {
|
return {
|
||||||
lastSignature: `${toolName}::__unknown-input__`,
|
lastSignature: `${toolName}::__unknown-input__`,
|
||||||
consecutiveCount: 1,
|
consecutiveCount: 1,
|
||||||
@@ -78,7 +78,7 @@ export function createToolCallSignature(
|
|||||||
toolName: string,
|
toolName: string,
|
||||||
toolInput?: Record<string, unknown> | null
|
toolInput?: Record<string, unknown> | null
|
||||||
): string {
|
): string {
|
||||||
if (toolInput === undefined || toolInput === null) {
|
if (toolInput == null) {
|
||||||
return toolName
|
return toolName
|
||||||
}
|
}
|
||||||
if (Object.keys(toolInput).length === 0) {
|
if (Object.keys(toolInput).length === 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user