From cfb76d5b248733c393fdac1ffb1a4f582de8a717 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 11 Feb 2026 07:09:29 +0000 Subject: [PATCH 1/2] Initial plan From a8c778ba8b4c93c6526a46fcf9086df08b91fa53 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 11 Feb 2026 07:16:00 +0000 Subject: [PATCH 2/2] Mark latest message explicitly in conversation history Co-authored-by: DimaBir <28827735+DimaBir@users.noreply.github.com> --- .github/workflows/issue-assistant.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/issue-assistant.yml b/.github/workflows/issue-assistant.yml index 75f4e6a5..4543ecfd 100644 --- a/.github/workflows/issue-assistant.yml +++ b/.github/workflows/issue-assistant.yml @@ -386,9 +386,12 @@ Keep responses concise (50-150 words). No signatures.`; userPrompt += `Turns so far: ${conversationHistory.length}\n\n`; userPrompt += `--- CONVERSATION HISTORY ---\n`; - for (const turn of conversationHistory) { + for (let i = 0; i < conversationHistory.length; i++) { + const turn = conversationHistory[i]; const role = turn.role === 'assistant' ? 'BOT' : 'USER'; - userPrompt += `[${role}] ${turn.content}\n\n`; + const isLatest = (i === conversationHistory.length - 1); + const marker = isLatest ? ' ⬅ RESPOND TO THIS' : ''; + userPrompt += `[${role}]${marker} ${turn.content}\n\n`; } if (wikiContext) { @@ -396,7 +399,6 @@ Keep responses concise (50-150 words). No signatures.`; } userPrompt += `--- YOUR TASK ---\n`; - userPrompt += `Respond to the user's latest message. `; userPrompt += `If wiki answers their question, provide the solution. `; userPrompt += `Wiki URL: ${wikiUrl}\n`;