-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Create / edit recipe form unification and improvements #4693
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
Merged
Merged
Changes from 46 commits
Commits
Show all changes
53 commits
Select commit
Hold shift + click to select a range
a9d4be5
Initial refactoring to shared create form
zanesq 3365a36
Fix recipe not cleared when starting from home and no messages sent
zanesq 4bd54e2
clean up recipe form fields display, formatting and messaging
zanesq e5911b6
fix enable save recipe button
zanesq e6ecc6f
update form text
zanesq 1ed7797
update action icons and added deeplink copy to clipboard
zanesq ad72537
hide create recipe while analyzing/creating recipe in backend
zanesq 158e94a
revert setmessages removal for now
zanesq c6f80a5
remove console debugs
zanesq 1449bf0
Merge branch 'main' of github.com:block/goose into zane/create-recipe…
zanesq f05ade7
Merge branch 'main' of github.com:block/goose into zane/create-recipe…
zanesq ad67dff
fix recipe instructions from session metadata not being injected
zanesq c66d934
Merge branch 'main' of github.com:block/goose into zane/create-recipe…
zanesq ba9b4f3
fix recipe issues from upstream changes and regenerate types
zanesq 866bdc6
Save recipe parameter values to session and value substitution with r…
zanesq 7459c55
fix session_metadata missing
zanesq 667065d
fix session_metadata missing
zanesq ae1866a
Merge branch 'main' of github.com:block/goose into zane/create-recipe…
zanesq 10cd55a
trigger param addition for activities onblur and extend check for new…
zanesq b0dd839
merged in main
zanesq 0ebc710
cleanup
zanesq 525d43e
rename ViewRecipeModal to CreateEditRecipeModal
zanesq 20227e3
Merge branch 'main' of github.com:block/goose into zane/create-recipe…
zanesq 7c04df5
delete empty file from merge deleted upstream
zanesq dacc13d
change to or_default
zanesq f6d7d24
just return 500 error
zanesq 7b39480
remove comment
zanesq 78e23ed
remove comment
zanesq a55cba7
add throwOnError
zanesq 4f65ec5
move to finally
zanesq 518917d
rename recipeConfig to recipe
zanesq d782390
remove unnecessary array check and change to flatmap
zanesq 93bb300
remove shallow api wrapper
zanesq 7b4fd5d
tests less brittle
zanesq 17af21e
tests less brittle put back isArray
zanesq fe28b24
Merge branch 'main' of github.com:block/goose into zane/create-recipe…
zanesq 1841373
await promise ref before clearing
zanesq 713e761
rename recipe_parameters to user_recipe_values
zanesq d2af3ec
remove unnecessary isArray check
zanesq 2b182d4
Merge branch 'main' of github.com:block/goose into zane/create-recipe…
zanesq 9ca67c4
merging in main
zanesq 13ffa45
merge in main
zanesq c40b5e2
change to not use save dialog for create and edit and add save and la…
zanesq 9c4c587
revert changes to launch recipe in same window
zanesq 2339804
merge in main
zanesq 945261e
remove extra line from merge
zanesq 7847f3c
rename recipeConfig to recipe everywhere
zanesq dac5617
put back setChat state
zanesq 67aab50
Merge branch 'main' of github.com:block/goose into zane/create-recipe…
zanesq d50c0e5
finish renaming recipeConfig to recipe
zanesq 6707948
remove unnecessary run recipe secondary state from create from session
zanesq 57c3dd3
fix recipe name not pre-filled in edit form
zanesq ff19530
update test
zanesq File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1591,9 +1591,31 @@ impl Agent { | |
| extension_configs.len() | ||
| ); | ||
|
|
||
| let (title, description) = | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the comment is saying the same as the code this is good though. I do wonder if we should move this to recipe.rs or some such. it really has no place in this file that already has > 2000 lines |
||
| if let Ok(json_content) = serde_json::from_str::<Value>(&clean_content) { | ||
| let title = json_content | ||
| .get("title") | ||
| .and_then(|t| t.as_str()) | ||
| .unwrap_or("Custom recipe from chat") | ||
| .to_string(); | ||
|
|
||
| let description = json_content | ||
| .get("description") | ||
| .and_then(|d| d.as_str()) | ||
| .unwrap_or("a custom recipe instance from this chat session") | ||
| .to_string(); | ||
|
|
||
| (title, description) | ||
| } else { | ||
| ( | ||
| "Custom recipe from chat".to_string(), | ||
| "a custom recipe instance from this chat session".to_string(), | ||
| ) | ||
| }; | ||
|
|
||
| let recipe = Recipe::builder() | ||
| .title("Custom recipe from chat") | ||
| .description("a custom recipe instance from this chat session") | ||
| .title(title) | ||
| .description(description) | ||
| .instructions(instructions) | ||
| .activities(activities) | ||
| .extensions(extension_configs) | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.