Skip to content

Conversation

@jsibbison-square
Copy link
Contributor

@jsibbison-square jsibbison-square commented Jul 21, 2025

Request from #3489 (comment)

This PR is primarily focused on converting the /recipes endpoints to use openapi schema. This includes converting the frontend types to use the same types as the the api interface. Unfortunately I couldn't go all the way in converting in one go due to how the frontend has bundled a bunch of extra config into recipes (particularly for schedules) and the PR was starting to get to big. So this PR converts the api and some frontend types but TODOs are left for more required refactoring.

Manually tested all the recipe interactions.

@jsibbison-square jsibbison-square force-pushed the jsibbison-20250721-openapi-recipes branch from c3491b9 to f14cdc2 Compare July 21, 2025 05:51
@jsibbison-square jsibbison-square changed the title Use openapi for recipe endpoint types and in frontend refactor: Use openapi for recipe endpoint types and in frontend Jul 21, 2025
@jsibbison-square jsibbison-square requested a review from DOsinga July 21, 2025 06:13
Copy link
Collaborator

@DOsinga DOsinga left a comment

Choose a reason for hiding this comment

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

thanks for doing this. this is so much better

}

if (!recipe.instructions && !recipe.prompt) {
throw new Error('Recipe must have either instructions or prompt');
Copy link
Collaborator

Choose a reason for hiding this comment

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

So nice


// Add common optional fields
if (ext.env_keys && ext.env_keys.length > 0) {
if ('env_keys' in ext && ext.env_keys && ext.env_keys.length > 0) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

if (ext?.env_keys?.length) {

Copy link
Contributor Author

Choose a reason for hiding this comment

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

types seem to be very unhappy with that approach for reasons that make no sense to me. :(

@jsibbison-square jsibbison-square merged commit d085126 into main Jul 21, 2025
8 checks passed
@jsibbison-square jsibbison-square deleted the jsibbison-20250721-openapi-recipes branch July 21, 2025 09:40
// Convert toolCall to match API expectations
...(content.type === 'toolRequest' && 'toolCall' in content
? {
toolCall: content.toolCall as unknown as { [key: string]: unknown },
Copy link
Contributor

Choose a reason for hiding this comment

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

Possibly a runtime risk with this conversion. Is there a way to determine the correct type?

lifeizhou-ap added a commit that referenced this pull request Jul 22, 2025
* main: (32 commits)
  fix: use sequential when sub recipe task is 1. (#3573)
  fix: track message id to keep like with like (#3572)
  Replace mcp_core::prompt with rmcp::model types (#3561)
  feat (ui): close recipe modals with esc key (#3568)
  feat: recipes can retry with success criteria (#3474)
  Env var to set Ollama request timeout (#3516)
  Updating docs to match new UI (#3552)
  Improve Claude Code provider error message for missing CLI (#3363)
  feat: Work around Gemini API tool call quirks (#3328)
  feat(ui): Source CashSans-Bold and improve overall text rendering (#3091)
  refactor: Use openapi for recipe endpoint types and in frontend (#3548)
  Fix Google Analytics error for local dev (#3544)
  Extension Library Improvements (#3541)
  fix(ui): enable selection of zero-config providers in desktop GUI (#3378)
  refactor: Renames recipe route to recipes to be consistent (#3540)
  Blog: Orchestrating 6 Subagents to Build a Collaborative API Playground (#3528)
  Catch json errors a little better (#3437)
  Rust debug (#3510)
  refactor: Centralise deeplink encode and decode into server (#3489)
  feat: deprecate jetbrains extension in favor of public one (#2589)
  ...
michaelneale added a commit that referenced this pull request Jul 22, 2025
* main:
  fix: use sequential when sub recipe task is 1. (#3573)
  fix: track message id to keep like with like (#3572)
  Replace mcp_core::prompt with rmcp::model types (#3561)
  feat (ui): close recipe modals with esc key (#3568)
  feat: recipes can retry with success criteria (#3474)
  Env var to set Ollama request timeout (#3516)
  Updating docs to match new UI (#3552)
  Improve Claude Code provider error message for missing CLI (#3363)
  feat: Work around Gemini API tool call quirks (#3328)
  feat(ui): Source CashSans-Bold and improve overall text rendering (#3091)
  refactor: Use openapi for recipe endpoint types and in frontend (#3548)
  Fix Google Analytics error for local dev (#3544)
atarantino pushed a commit to atarantino/goose that referenced this pull request Aug 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants