Skip to content

fix: add autocompleteOptions in the .yaml config #6895

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

panyamkeerthana
Copy link
Contributor

@panyamkeerthana panyamkeerthana commented Jul 30, 2025

Description

-This re-enables the deprecated tabAutocompleteOptions support to the YAML configuration schema on the global level and adds experimental parameters to tabAutocompleteOptions schema to enable overriding default values from parameters.ts via config.yaml files. Did this to keep the context limited to the current opened file.

  • Re-integrated tabAutocompleteOptions into the global YAML config schema.
  • Added .optional() tags to schema properties to allow partial overrides.
  • Updated loadYaml.ts to properly transfer YAML values into the final continueConfig.
  • Updated unroll.ts to ensure proper propagation of tabAutocompleteOptions during config unroll.

To restrict tab autocomplete context to just the currently opened file, add this configuration to config.yaml:

Example config.yaml

tabAutocompleteOptions:
  useRecentlyEdited: false
  useRecentlyOpened: false
  experimental_includeClipboard: false
  experimental_includeRecentlyVisitedRanges: false
  experimental_includeRecentlyEditedRanges: false
  experimental_includeDiff: false
  experimental_enableStaticContextualization: false

This PR is supposed to resolve #6767

@panyamkeerthana panyamkeerthana requested a review from a team as a code owner July 30, 2025 15:25
@panyamkeerthana panyamkeerthana requested review from RomneyDa and removed request for a team July 30, 2025 15:25
@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Jul 30, 2025
@panyamkeerthana panyamkeerthana changed the title Added tabAutocompleteOptions in the .yaml config Add tabAutocompleteOptions in the .yaml config Jul 30, 2025
@panyamkeerthana
Copy link
Contributor Author

Hey @Patrick-Erichsen, here's the PR as discussed!

@panyamkeerthana panyamkeerthana force-pushed the panyamkeerthana/current_file_context branch 2 times, most recently from 90c14c1 to da3c07f Compare July 30, 2025 16:00
@panyamkeerthana panyamkeerthana changed the title Add tabAutocompleteOptions in the .yaml config add tabAutocompleteOptions in the .yaml config Jul 30, 2025
@panyamkeerthana panyamkeerthana changed the title add tabAutocompleteOptions in the .yaml config fix: add tabAutocompleteOptions in the .yaml config Jul 30, 2025
@panyamkeerthana panyamkeerthana force-pushed the panyamkeerthana/current_file_context branch 3 times, most recently from 729263e to a9cdab9 Compare July 30, 2025 19:12
@Patrick-Erichsen
Copy link
Collaborator

The CI errors are here likely related to some recent changes on main looking into it now 👍

@panyamkeerthana
Copy link
Contributor Author

Haha Thank you! @Patrick-Erichsen

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.

@panyamkeerthana there is already an autocompleteOptions property on the model config. It appears to be undocumented. Were you aware of this, or is it missing specific properties?

@github-project-automation github-project-automation bot moved this from Todo to In Progress in Issues and PRs Jul 31, 2025
@panyamkeerthana
Copy link
Contributor Author

panyamkeerthana commented Jul 31, 2025

@RomneyDa Yes, I was aware of this and you're right! It was missing the context restriction properties but so was tabAutocompleteOptions.

I guess, my understanding of it was that context behavior is a user preference that should apply across all models through a single config point. However, I'm open to moving this to a model-level config if you feel that will provide a more modular config design! 😊

@panyamkeerthana panyamkeerthana force-pushed the panyamkeerthana/current_file_context branch 3 times, most recently from 4b933b1 to b4e389c Compare July 31, 2025 17:56
@RomneyDa
Copy link
Collaborator

RomneyDa commented Aug 5, 2025

Got it! A nice thing about YAML is that you can use YAML templating to easily add the same configuration to all models, in an assistant, which isn't fully the single-point effect but pretty close. You were probably already aware of that as well, I think we would prefer the more modular approach

@panyamkeerthana
Copy link
Contributor Author

panyamkeerthana commented Aug 5, 2025

Really good point about YAML templating, appreciate the perspective.😁 I’ll get the changes pushed soon!

added schema properties and tabAutocompleteOptions schema to
to support in YAML config file, allowing proper
override of default values from parameters.ts.

added .optional() tags to tabAutocompleteOptions properties to enable
partial override from the config.yaml file.
 importing from the built config-types package instead of its src/
@panyamkeerthana panyamkeerthana force-pushed the panyamkeerthana/current_file_context branch from b4e389c to d25c0a8 Compare August 6, 2025 15:08
@dosubot dosubot bot removed the size:M This PR changes 30-99 lines, ignoring generated files. label Aug 6, 2025
@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Aug 6, 2025
@panyamkeerthana panyamkeerthana force-pushed the panyamkeerthana/current_file_context branch from d25c0a8 to d7a6b82 Compare August 6, 2025 15:10
@RomneyDa
Copy link
Collaborator

RomneyDa commented Aug 7, 2025

@panyamkeerthana could you revert extraneous package lock and completion provider changes?

@RomneyDa
Copy link
Collaborator

RomneyDa commented Aug 7, 2025

@panyamkeerthana also add docs for the the non-experimental options?
Could take inspiration from @ferenci84's implementation here #6940

@panyamkeerthana panyamkeerthana force-pushed the panyamkeerthana/current_file_context branch from d7a6b82 to 9c5b9d6 Compare August 7, 2025 17:26
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. and removed size:S This PR changes 10-29 lines, ignoring generated files. labels Aug 7, 2025
@panyamkeerthana panyamkeerthana changed the title fix: add tabAutocompleteOptions in the .yaml config fix: add autocompleteOptions in the .yaml config Aug 7, 2025
@panyamkeerthana panyamkeerthana force-pushed the panyamkeerthana/current_file_context branch from 55c91be to d57990b Compare August 7, 2025 18:16
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. and removed size:L This PR changes 100-499 lines, ignoring generated files. labels Aug 7, 2025
@panyamkeerthana
Copy link
Contributor Author

panyamkeerthana commented Aug 7, 2025

@RomneyDa I've added to documentation. Thanks for pointing me to @ferenci84’s implementation, really helpful! 🙌 😊

- added context restriction properties to model autocompleteOptions schema
- discarded changes to add global tabAutocompleteOptions to config schema
- added experimental parameters to both config-types.
- added YAML alternative note to json reference.
- updated YAML configuration example with per-model options.
- added reference documentation with parameters for autocomplete options.
@panyamkeerthana panyamkeerthana force-pushed the panyamkeerthana/current_file_context branch from a12944f to 8fe5077 Compare August 8, 2025 15:50
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Aug 8, 2025
@RomneyDa RomneyDa merged commit 8e0169a into continuedev:main Aug 8, 2025
37 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in Issues and PRs Aug 8, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Aug 8, 2025
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 size:M This PR changes 30-99 lines, ignoring generated files.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

autocomplete context from currently opened file ONLY
3 participants