Skip to content

Add a retry button to LLM conversation - #1497

Draft
kasbah wants to merge 2 commits into
mainfrom
kb/llm-conversation-retry
Draft

kasbah wants to merge 2 commits into
mainfrom
kb/llm-conversation-retry

Conversation

@kasbah

@kasbah kasbah commented Sep 14, 2026

Copy link
Copy Markdown
Member
image

@kasbah
kasbah added this pull request to stack #1498 September 14, 2026 14:16
@kasbah
kasbah requested a review from tslil-topos September 14, 2026 15:27
@kasbah
kasbah force-pushed the kb/llm-conversation-retry branch from 24b9a4a to 2480918 Compare September 14, 2026 15:28
Base automatically changed from kb/llm-conversation-ui-component to main September 14, 2026 15:47
@kasbah
kasbah force-pushed the kb/llm-conversation-retry branch from 2480918 to a502b79 Compare September 14, 2026 15:47

@tslil-topos tslil-topos left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i don't know how to actually force this situation for testing, so it's difficult for me to gauge whether we're honouring the ephemeral display of attempts in the return value of LLMConversationTurnResult.

That aside, seems to me like we're duplicating a check?

);
const result = await run(key);
if (result.tag === "Retryable") {
const latestInteraction = conversation().interactions().at(-1);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i don't think you should need to do this, retryLastLLMConversation already deals with this case

export async function retryLastLLMConversationResponse<...>(...): Promise<LLMConversationTurnResult> {
...
    if (conversation.interactions().at(-1)?.tag !== "user-message") {
        return { tag: "Failed", error: "The latest interaction is not a user message." };
    }
...
}

did you notice a deficiency?

@kasbah
kasbah marked this pull request as draft September 14, 2026 16:04
@epatters epatters added enhancement New feature or request frontend TypeScript frontend and Rust-wasm integrations labels Sep 14, 2026

This branch was successfully deployed

1 active deployment
netlify-preview — 32ae05e6 Deployed Sep 14, 2026 by github-actions[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request frontend TypeScript frontend and Rust-wasm integrations

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants