Skip to content

Conversation

@beatlevic
Copy link
Collaborator

Added ghost context provider that retrieves all relevant context in a comment wrapped style.

Adds the comment wrapped code to the QUERY prompt.

@changeset-bot
Copy link

changeset-bot bot commented Nov 4, 2025

⚠️ No Changeset found

Latest commit: d338310

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@beatlevic beatlevic requested a review from markijbema November 5, 2025 07:36
Copy link
Contributor

@markijbema markijbema left a comment

Choose a reason for hiding this comment

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

I'd expect there to be code to register/deregister the ContextRetrievalService. So either it does it itself, but in that case there is some missing teardown code, or it doesnt, in which case it will always give an empty result.

Either way, even with that this does look way simpler than expected! Very cool

@beatlevic beatlevic marked this pull request as ready for review November 6, 2025 14:42
filepath: filepathUri,
}

const helper = await HelperVars.create(helperInput as any, DEFAULT_AUTOCOMPLETE_OPTS, "codestral", this.ide)
Copy link
Contributor

Choose a reason for hiding this comment

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

what is the codestral doing here? Is it doing something codestral specific?

Copy link
Contributor

Choose a reason for hiding this comment

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

I ended up pushing up a fix to plumb through out model. Verified that the continue helper code ought to work with our model descriptors

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't follow this, alas - why is it safe+desirable to do something codestral specific here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is related to how the HelperVar needs to be initialized, and it does use the model to prune the prefix in certain cases. Let me at the very least pass our actual model name in here.

// Convert all snippet filepaths to URIs
const snippetsWithUris = filteredSnippets.map((snippet: any) => ({
...snippet,
filepath: snippet.filepath?.startsWith("file://")
Copy link
Contributor

Choose a reason for hiding this comment

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

again, why do we have this in two different formats; is this a real thing or just llm slop?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This was actually needed because the continuedev utilities expect URIs

Copy link
Contributor

Choose a reason for hiding this comment

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

If continuedev expects URIS, is there a reason we don't always use uris? why check here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good question, and something we can improve on. I'm not even sure where the non-URIs come from.

Copy link
Contributor

@EamonNerbonne EamonNerbonne left a comment

Choose a reason for hiding this comment

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

A few questions I don't quite understand the answers to.

However most important is that this is going in the right direction, and also that it doesn't make things worse in the interim - the fact that you ran the evals is evidence of that.

Should some of the open questions be effectively techdebt that's hard to solve here and now but worthwhile accepting, I think we should make an issue tracking these choices so we can revisit them after autocomplete is live (and then see how much can or should be fixed once the pieces fit into the puzzle better).

@beatlevic beatlevic enabled auto-merge November 10, 2025 15:51
@beatlevic beatlevic merged commit b18e3f3 into main Nov 10, 2025
12 checks passed
@beatlevic beatlevic deleted the beatlevic/ghost-context-provider branch November 10, 2025 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants