fix: Add scope awareness to chat prompt so agents focus on target entities
Pass targetId to buildChatPrompt and add <scope> block that clearly distinguishes primary target files from context files. Context entities may be modified when necessary (e.g. dependency links) but the agent is instructed to focus changes on the primary target.
This commit is contained in:
@@ -96,7 +96,7 @@ export function chatSessionProcedures(publicProcedure: ProcedureBuilder) {
|
||||
input.initiativeId,
|
||||
);
|
||||
|
||||
const prompt = buildChatPrompt(input.targetType, chatHistory, input.message);
|
||||
const prompt = buildChatPrompt(input.targetType, input.targetId, chatHistory, input.message);
|
||||
|
||||
// Create a task for the chat agent
|
||||
const targetName = input.targetType === 'phase'
|
||||
|
||||
Reference in New Issue
Block a user