-
Notifications
You must be signed in to change notification settings - Fork 2.7k
feat: cli can work with gui generated recipes #3254
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
feat: cli can work with gui generated recipes #3254
Conversation
|
I am just thinking one step back. Why do we have different structures for recipe yaml file? Shall we make them identical? Accept different structure as it may ends with multiple version of recipe file schemas and it will be hard to manage and maintain. Shall we fix this on the GUI to make the schema consistent? |
|
I agree w @lifeizhou-ap that this seems weird that we would have two formats. And these have a name in the root and then in the recipe another name and a title? |
| Ok(serde_json::from_str(content)?) | ||
| } else if serde_yaml::from_str::<serde_yaml::Value>(content).is_ok() { | ||
| Ok(serde_yaml::from_str(content)?) | ||
| if let Ok(json_value) = serde_json::from_str::<serde_json::Value>(content) { |
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.
hmm - @lifeizhou-ap does looks like we reverted the code to trying both json and yaml again. why is that? every json file is also a yaml file, so we shouldn't need to do this twice here
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.
if serde_json::from_str::<serde_json::Value>(content).is_ok() {
Ok(serde_json::from_str(content)?)
} else if serde_yaml::from_str::<serde_yaml::Value>(content).is_ok() {
Ok(serde_yaml::from_str(content)?)
yes, that was me. It was missed out during a refactoring a while ago. will update in another PR
|
Looks like this is where this happened: |
|
We will look to separate the storage of recipe and recipe library metadata so recipes are the same in gui and cli. |
|
eh, I don't know - we already merged the other thing so even if we fix it there, we might still want to have this in for at least a while... Also thanks for spotting this! |
|
I mean |
|
Alright let me get a passing build and I'll merge it |
|
Thanks! |
* update-to-v1.0.35: (57 commits) chore(release): release version 1.0.35 (block#3292) docs: enhanced code editing topic (block#3287) fix cu (block#3291) feat: Add environment variables to override model context limits (block#3260) chore(release): release version 1.0.34 (block#3285) fix(devcontainer): install protoc to fix build (block#3267) Enabling npx command to install on Windows Desktop (block#3283) Fix: Allow native Cmd+Up/Down cursor movement when user has typed text (block#3246) chore(release): release version 1.0.33 (block#3284) fix Windows Env Vars (block#3282) feat: bedrock image content support (block#3266) Add support in goose configure for streaming http mcp tools (block#3256) docs: add Alby MCP tutorial (block#3217) refactor(tests): make logging test in goose-cli less flaky on macos (block#3273) feat: cli can work with gui generated recipes (block#3254) Goose projects docs (block#3272) feat: add support for 'cu' command in extension installation (block#3261) Docs: Add cloudinary mcp tutorial (block#3268) fix: Enable agent to see instruction to use final output tool when it wasn't called (block#3253) Use command line to run sub agent and sub recipe (in sequence or parallel) (block#3190) ...
Signed-off-by: Adam Tarantino <[email protected]>
Signed-off-by: Soroosh <[email protected]>
Signed-off-by: Kyle Santiago <[email protected]>
The gui recipes (ones saved in recipe library) have a nested yaml structure where the actual recipe is under a
recipekey. This PR enables the cli to handle this when loading a recipe.standard format:
gui format