Skip to content

Conversation

@lifeizhou-ap
Copy link
Contributor

Summary

Used common function to list recipes in local machine

Type of Change

  • Feature
  • Bug fix
  • Refactor / Code quality
  • Performance improvement
  • Documentation
  • Tests
  • Security fix
  • Build / Release
  • Other (specify below)

Testing

Manual testing and existing unit tests

@lifeizhou-ap lifeizhou-ap requested a review from DOsinga October 3, 2025 05:41
let mut local_dirs = vec![PathBuf::from(".")];

if let Ok(recipe_path_env) = env::var(GOOSE_RECIPE_PATH_ENV_VAR) {
let path_separator = if cfg!(windows) { ';' } else { ':' };
Copy link
Collaborator

Choose a reason for hiding this comment

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

can we get this from config so you can set that up outside of env variables (desktop doesn't use them)

local_dirs
}

pub fn retrieve_local_recipe_file(recipe_name: &str) -> Result<RecipeFile> {
Copy link
Collaborator

Choose a reason for hiding this comment

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

we should probably unify on naming here and elsewhere. let's call everything load that actually loads & returns? so here, load_local_recipe?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This returns RecipeFile which include file contents, file path, and parent file path. maybe load_local_recipe_file?

))
}

pub fn discover_local_recipes() -> Result<Vec<(PathBuf, Recipe)>> {
Copy link
Collaborator

Choose a reason for hiding this comment

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

list_local_recipes?

Path::new(recipe_name).extension().is_some()
}

fn read_recipe_in_dir(dir: &Path, recipe_name: &str) -> Result<RecipeFile> {
Copy link
Collaborator

Choose a reason for hiding this comment

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

load_recipes_from_dir?

@@ -1,52 +1,9 @@
use crate::config::APP_STRATEGY;
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'd consider just merging this with search_local_recipes and renaming that last one to local_recipes and just do all the local_recipe work there

* main: (22 commits)
  fix: Issue #4540: `goose configure` -> Cursor Agent succeeds (#4942)
  feat: Add advanced data analysis pipeline recipe (#4990) (#5005)
  Create / edit recipe form unification and improvements (#4693)
  feat: add Code Review Mentor recipe with Developer and Memory extensions (#4992) (#5014)
  feat: set custom models for lead/worker (#4598)
  feat: add grok-code-fast-1 support for xAI provider (#4472)
  Persist dynamic extension config so we can resume recipe sessions w/ extensions (#4331)
  fix: show PowerShell PATH instructions for Windows users (#4989)
  feat: add Smart Task Organizer recipe for Hacktoberfest (#4936)
  Fix extension headers (#5000)
  feat: add advanced software project generator initializer recipe (#4767) (#4949)
  Removed unused libs (#4932)
  Platform extensions sketch (#4868)
  Add reply to the routes (#4963)
  feat(cli): add GOOSE_DEBUG environment variable support (#4825)
  docs: Change community page sections (#4984)
  docs: remove temporary Hacktoberfest issue templates (#4982)
  Create multi-channel researcher prompt (#4947)
  docs: Add Community Content section to Community Page (#4964)
  Allow empty API Key when registering custom provider (#4977)
  ...
@lifeizhou-ap lifeizhou-ap merged commit 0df1e07 into main Oct 6, 2025
11 checks passed
@lifeizhou-ap lifeizhou-ap deleted the lifei/common-function-read-recipes branch October 6, 2025 02:16
wpfleger96 added a commit to wpfleger96/goose that referenced this pull request Oct 6, 2025
* main: (130 commits)
  Add new subcommand for opening recipes in desktop app (block#4970)
  Update system.md with softer subagent language (block#5023)
  docs: add new goose tip (block#4941)
  Fix nix flake double copy (block#4976)
  Upgrade electron for macOS Tahoe compatibility (block#5015)
  fix: check server is ready so that we can decode the recipe deeplink (block#5021)
  fix: backwards compatible parsing recipe file (block#5020)
  chore: Used common function to list recipes in local machine (block#4974)
  fix: Issue block#4540: `goose configure` -> Cursor Agent succeeds (block#4942)
  feat: Add advanced data analysis pipeline recipe (block#4990) (block#5005)
  Create / edit recipe form unification and improvements (block#4693)
  feat: add Code Review Mentor recipe with Developer and Memory extensions (block#4992) (block#5014)
  feat: set custom models for lead/worker (block#4598)
  feat: add grok-code-fast-1 support for xAI provider (block#4472)
  Persist dynamic extension config so we can resume recipe sessions w/ extensions (block#4331)
  fix: show PowerShell PATH instructions for Windows users (block#4989)
  feat: add Smart Task Organizer recipe for Hacktoberfest (block#4936)
  Fix extension headers (block#5000)
  feat: add advanced software project generator initializer recipe (block#4767) (block#4949)
  Removed unused libs (block#4932)
  ...
Itz-Agasta pushed a commit to Itz-Agasta/goose that referenced this pull request Oct 7, 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.

3 participants