fix: add missing FILE_WRITE_TOOL_NAME import + poorMode stub (regressions from P2 cherry-picks)
This commit is contained in:
parent
eaa6199f22
commit
a308aa8fcc
|
|
@ -5,6 +5,7 @@ import { isEnvDefinedFalsy, isEnvTruthy } from 'src/utils/envUtils.js'
|
|||
import { isTeammate } from 'src/utils/teammate.js'
|
||||
import { isInProcessTeammate } from 'src/utils/teammateContext.js'
|
||||
import { FILE_READ_TOOL_NAME } from '../FileReadTool/prompt.js'
|
||||
import { FILE_WRITE_TOOL_NAME } from '../FileWriteTool/prompt.js'
|
||||
import { GLOB_TOOL_NAME } from '../GlobTool/prompt.js'
|
||||
import { SEND_MESSAGE_TOOL_NAME } from '../SendMessageTool/constants.js'
|
||||
import { AGENT_TOOL_NAME } from './constants.js'
|
||||
|
|
|
|||
|
|
@ -82,6 +82,8 @@ export async function* handleStopHooks(
|
|||
StopHookResult
|
||||
> {
|
||||
const hookStartTime = Date.now()
|
||||
// CCP: poor mode module not present — always false
|
||||
const poorMode = false
|
||||
|
||||
const stopHookContext: REPLHookContext = {
|
||||
messages: [...messagesForQuery, ...assistantMessages],
|
||||
|
|
@ -150,7 +152,9 @@ export async function* handleStopHooks(
|
|||
// but before gracefulShutdownSync (see drainPendingExtraction).
|
||||
void extractMemoriesModule!.executeExtractMemories(
|
||||
stopHookContext,
|
||||
toolUseContext.appendSystemMessage as ((msg: import('../types/message.js').SystemMessage) => void) | undefined,
|
||||
toolUseContext.appendSystemMessage as
|
||||
| ((msg: import('../types/message.js').SystemMessage) => void)
|
||||
| undefined,
|
||||
)
|
||||
}
|
||||
if (!toolUseContext.agentId && !poorMode) {
|
||||
|
|
@ -225,7 +229,8 @@ export async function* handleStopHooks(
|
|||
) {
|
||||
if (attachment.type === 'hook_non_blocking_error') {
|
||||
hookErrors.push(
|
||||
(attachment.stderr as string) || `Exit code ${attachment.exitCode}`,
|
||||
(attachment.stderr as string) ||
|
||||
`Exit code ${attachment.exitCode}`,
|
||||
)
|
||||
// Non-blocking errors always have output
|
||||
hasOutput = true
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user