Skip to content

Conversation

@alex-mcgraw-askSage
Copy link
Contributor

@alex-mcgraw-askSage alex-mcgraw-askSage commented Jan 23, 2026

Description

Refactor some interface imports, and fixed a bug in the CLI tooling. File reads weren't working, but now are.

AI Code Review

  • Team members only: AI review runs automatically when PR is opened or marked ready for review
  • Team members can also trigger a review by commenting @continue-review

Checklist

  • [✅] I've read the contributing guide
  • [NA] The relevant docs, if any, have been updated or created
  • [NA] The relevant tests, if any, have been updated or created

Screen recording or screenshot

Example of file reads in the CLI tool.

image

Tests

NA


Continue Tasks: ▶️ 3 queued — View all


Summary by cubic

Fixed CLI file reading and standardized AskSage type definitions across core and openai-adapters to reduce errors and improve compatibility.

  • Bug Fixes

    • CLI file reads now work as expected.
    • Streaming responses filter malformed tool calls and default missing arguments to an empty string to prevent crashes.
    • Finish_reason now uses valid tool calls instead of raw ones, avoiding incorrect "tool_calls" endings.
  • Refactors

    • Moved AskSage interfaces (Tool, ToolChoice, ToolCall, Response, TokenResponse) to openai-adapters/types and updated imports.
    • Exported AskSage types from openai-adapters index for external use.
    • Replaced generic ToolChoice/TokenResponse with AskSage-specific types in core and adapters.

Written for commit 63a8f8c. Summary will update on new commits.

@alex-mcgraw-askSage alex-mcgraw-askSage requested a review from a team as a code owner January 23, 2026 18:24
@alex-mcgraw-askSage alex-mcgraw-askSage requested review from sestinj and removed request for a team January 23, 2026 18:24
@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Jan 23, 2026
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

1 issue found across 4 files

Prompt for AI agents (all issues)

Check if these issues are valid — if so, understand the root cause of each and fix them.


<file name="packages/openai-adapters/src/apis/AskSage.ts">

<violation number="1" location="packages/openai-adapters/src/apis/AskSage.ts:431">
P2: Streaming finish_reason is derived from raw tool call count, so it can report "tool_calls" even when all tool calls were filtered out and none were emitted.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

Copy link
Collaborator

@RomneyDa RomneyDa left a comment

Choose a reason for hiding this comment

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

Cubic comment seems valid

Copy link
Collaborator

@RomneyDa RomneyDa left a comment

Choose a reason for hiding this comment

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

@alex-mcgraw-askSage noticed the title mentions a fix for CLI file reads, was that intentional?

@github-project-automation github-project-automation bot moved this from Todo to In Progress in Issues and PRs Jan 23, 2026
…en it should have been determined by validToolCalls in case all of the raw tool calls were filtered out because of malformed responses
@alex-mcgraw-askSage
Copy link
Contributor Author

alex-mcgraw-askSage commented Jan 23, 2026

@alex-mcgraw-askSage noticed the title mentions a fix for CLI file reads, was that intentional?

@RomneyDa Thanks for the catch on the rawToolCalls!

In regards to CLI file reads, yes. When testing the updates, I tried reading files, "tell me about this file @", and i was getting an error. A bug got introduced in my last PR with file reads, so needed that fixed.

edit 1: My bad, I'm looking back at the changes and see everything is related to the extensions and none to core. I realized the problem was something with my debugger config, so no need to worry about that. I'll fix that title now.

@alex-mcgraw-askSage alex-mcgraw-askSage changed the title Bug fix with CLI file reads, and refactor imports. Refactor imports. Jan 23, 2026
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Jan 26, 2026
@RomneyDa RomneyDa merged commit 1c7aaca into continuedev:main Jan 26, 2026
55 of 57 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in Issues and PRs Jan 26, 2026
@github-actions github-actions bot locked and limited conversation to collaborators Jan 26, 2026
@sestinj
Copy link
Contributor

sestinj commented Jan 26, 2026

🎉 This PR is included in version 1.9.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Labels

lgtm This PR has been approved by a maintainer released size:L This PR changes 100-499 lines, ignoring generated files.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants