fix(kiro): use neutral placeholder for tool-result-only user turns
Replace the literal 'continue' placeholder on tool-result-only user turns with 'Tool results provided.' to prevent models from treating it as a new user instruction.
This commit is contained in:
@@ -34,6 +34,7 @@ import { ROLE, CLAUDE_BLOCK } from "../schema/index.js";
|
||||
import {
|
||||
canonicalizeKiroConversation,
|
||||
normalizeKiroToolSpecs,
|
||||
kiroEmptyUserContent,
|
||||
} from "../concerns/kiroConversation.js";
|
||||
|
||||
/**
|
||||
@@ -53,7 +54,8 @@ function convertClaudeMessagesToKiro(messages, model) {
|
||||
|
||||
const flushPending = () => {
|
||||
if (currentRole === ROLE.USER) {
|
||||
const content = pendingUserContent.join("\n\n").trim() || "continue";
|
||||
const content = pendingUserContent.join("\n\n").trim()
|
||||
|| kiroEmptyUserContent(pendingToolResults.length > 0);
|
||||
const userMsg = { userInputMessage: { content, modelId: model } };
|
||||
|
||||
if (pendingImages.length > 0) {
|
||||
|
||||
@@ -23,6 +23,7 @@ import { ROLE, OPENAI_BLOCK, CLAUDE_BLOCK } from "../schema/index.js";
|
||||
import {
|
||||
canonicalizeKiroConversation,
|
||||
normalizeKiroToolSpecs,
|
||||
kiroEmptyUserContent,
|
||||
} from "../concerns/kiroConversation.js";
|
||||
|
||||
/**
|
||||
@@ -51,7 +52,8 @@ function convertMessages(messages, model) {
|
||||
|
||||
const flushPending = () => {
|
||||
if (currentRole === "user") {
|
||||
const content = pendingUserContent.join("\n\n").trim() || "continue";
|
||||
const content = pendingUserContent.join("\n\n").trim()
|
||||
|| kiroEmptyUserContent(pendingToolResults.length > 0);
|
||||
const userMsg = {
|
||||
userInputMessage: {
|
||||
content: content,
|
||||
|
||||
Reference in New Issue
Block a user