-
Notifications
You must be signed in to change notification settings - Fork 3
Feat: Add a validating process to inject missing virtual references #71
Conversation
8fe8b0e to
065e759
Compare
065e759 to
62a57c7
Compare
owtaylor
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally looks good - various comments in detail
|
Also, note that this will make granite.writeContinueConfig not work correctly - I'm not sure that fixing it is that worthwhile since it will be non-trivial, but it does make our own lives easier if we want to work on Granite support in the upstream. Maybe make that file an "Not implemented" toast, and file an issue in granite-code/granite-code to fix it. (The toast can even reference the issue.) |
Jazzcort
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the review! Working on it!
8913778 to
cd063ab
Compare
|
@owtaylor Let me know if the test cases looks good to you! 😁 |
558dd8b to
624588c
Compare
|
@fbricon I made those I/O functions asynchronous, but because the constructor function is not an asynchronous function, we can not do |
This feature validates the config.yaml file only once during the activation phase. Default virtual references are treated as existing for both active and commented-out models. Any missing references will be automatically injected at the end of the models section. This behavior supports both flow-style and block-style YAML formats.
624588c to
a2c8e24
Compare
|
@Jazzcort Thanks! I didn't know about the async => void hack. As long as it's consistent with the existing code, it's fine by me. |
|
Thanks for the review and suggestion! @fbricon |
Description
This feature validates the config.yaml file only once during the activation phase. Default virtual references are treated as existing for both active and commented-out models. Any missing references will be automatically injected at the end of the models section. This behavior supports both flow-style and block-style YAML formats.
Screen recording or screenshot
Add missing
$granite-code/models/chatScreen.Recording.2025-08-01.at.3.49.41.PM.mov
Missing models section
Screen.Recording.2025-08-01.at.3.50.30.PM.mov
Empty models section
Screen.Recording.2025-08-01.at.4.50.17.PM.mov
Add missing references (flow-style)
Screen.Recording.2025-08-01.at.3.51.19.PM.mov
Screen.Recording.2025-08-01.at.4.19.35.PM.mov
Tests
Working on writing unit tests for this feature