Skip to content

[FEATURE] When exiting the chat show the user a way to continue the recent session #756

Description

@edenreich

Summary

Currently it just say "* Chat End" or something similar, a better approach would be to let the user know how they can continue the recent session.

Acceptance Criteria

  • There is a friendly message telling the user how to continue there session
  • It uses the same thinking color
  • It's easy to copy and paste
  • It doesn't contain emojis
  • It's tested

Activity

  1. added
    enhancement
    on Jul 6, 2026
  2. added theissue type on Jul 6, 2026
  3. edenreich commented on Jul 6, 2026

    @edenreich
    ContributorAuthor

    @infer Can you work on this?

  4. inference-gateway-maintainer commented on Jul 6, 2026

    @inference-gateway-maintainer
    Contributor

    Model: ollama_cloud/deepseek-v4-flash · View Job

    Todos

    • Explore the codebase to understand the chat exit flow and current message
    • Add GetCurrentConversationID() method to ChatApplication
    • Modify exit message in StartChatSession to show session continuation instructions
    • Add tests for the new exit message
    • Create branch, commit, and push changes

    Pull Request

    #757

    ✅ Infer Result: Success

    All tasks are complete. Here's a summary of the changes:

    Summary

    Problem

    When exiting the chat session, the CLI just showed • Chat session ended! with no indication of how to continue the session.

    Solution

    The exit message now shows a friendly, dim-colored message with the session ID and a copy-pasteable command to continue the session.

    Files Changed

    internal/app/chat.go - Added GetCurrentConversationID() method to ChatApplication to expose the current conversation ID from the repository.

    cmd/chat.go -

    • Added import for colors package
    • Replaced fmt.Println("• Chat session ended!") with:
      • When a session ID is available: Chat session ended. Continue with: infer agent --session-id <id> (dim colored)
      • When no session ID (in-memory repo): Chat session ended. (dim colored)

    cmd/chat_test.go (new) - Added tests verifying:

    • Exit message includes session ID when available
    • Exit message uses dim color (ANSI prefix/suffix)
    • Exit message contains no emojis
    • Exit message is easy to copy and paste (full command is present)

    PR

    Draft PR created: #757

    Model: ollama_cloud/deepseek-v4-flash · Exit Code: 0 · Duration: 8m 21s

    Tokens: 8,301,594 in · 20,085 out · 8,321,679 total (75 requests)

    Tool calls: 85 total · 96% success rate

    ⚠️ 3 failed tool call(s)
    • Edit: old_string not found in file /home/runner/work/cli/cli/cmd/chat.go

    Possible matches found:

    Near line 252:
    fmt.Println()
    fmt.Println(colors.CreateColoredText("Chat session ended. Continue with: infer agent --session-id "+sessionID, colors.DimColor))

    Hint: Ensure exact whitespace and indentation match. Use the Read tool to see the current file content.

    • Edit: old_string not found in file /home/runner/work/cli/cli/cmd/chat.go

    No similar content found. Please verify the content exists and matches exactly (including whitespace).

    • Bash: exit status 1: # command-line-arguments

    [command-line-arguments]

    vet: cmd/chat_test.go:61:61: undefined: domain.PendingToolCall

    Triggered by edenreich · Infer Action

  5. added a commit that references this issue on Jul 6, 2026
    8d04a3a
  6. inference-gateway-releaser commented on Jul 6, 2026

    @inference-gateway-releaser
    Contributor

    🎉 This issue has been resolved in version 0.133.0 🎉

    The release is available on:

    Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementreleased

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions