-
Notifications
You must be signed in to change notification settings - Fork 5
feat: add skill-manager skill source switch #7
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -479,7 +479,7 @@ fn default_claude_md_distribution_path() -> ClaudeMdDistributionPath { | |||||||||
| impl Default for AppSettings { | ||||||||||
| fn default() -> Self { | ||||||||||
| Self { | ||||||||||
| skill_source_dir: "~/.cc-workshop/skills".to_string(), | ||||||||||
| skill_source_dir: "/Users/feng/.agents/skill-library".to_string(), | ||||||||||
| mcp_source_dir: "~/.cc-workshop/mcps".to_string(), | ||||||||||
| claude_config_dir: "~/.claude".to_string(), | ||||||||||
| anthropic_api_key: None, | ||||||||||
|
|
@@ -1822,7 +1822,7 @@ mod tests { | |||||||||
| #[test] | ||||||||||
| fn test_app_settings_default() { | ||||||||||
| let settings = AppSettings::default(); | ||||||||||
| assert_eq!(settings.skill_source_dir, "~/.cc-workshop/skills"); | ||||||||||
| assert_eq!(settings.skill_source_dir, "/Users/feng/.agents/skill-library"); | ||||||||||
|
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. Update test assertion to use tilde notation. The test assertion should be updated to expect ✅ Proposed fix let settings = AppSettings::default();
- assert_eq!(settings.skill_source_dir, "/Users/feng/.agents/skill-library");
+ assert_eq!(settings.skill_source_dir, "~/.agents/skill-library");
assert_eq!(settings.mcp_source_dir, "~/.cc-workshop/mcps");📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||
| assert_eq!(settings.mcp_source_dir, "~/.cc-workshop/mcps"); | ||||||||||
| assert_eq!(settings.claude_config_dir, "~/.claude"); | ||||||||||
| assert_eq!(settings.terminal_app, "Terminal"); | ||||||||||
|
|
||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -70,9 +70,12 @@ export interface SettingsState { | |
| hasApiKey: () => boolean; | ||
| } | ||
|
|
||
| export const LOCAL_SKILL_SOURCE_DIR = '~/.cc-workshop/skills'; | ||
| export const SKILL_MANAGER_LIBRARY_DIR = '/Users/feng/.agents/skill-library'; | ||
|
Comment on lines
+73
to
+74
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. Replace hardcoded user-specific path with tilde notation.
🛠️ Proposed fix export const LOCAL_SKILL_SOURCE_DIR = '~/.cc-workshop/skills';
-export const SKILL_MANAGER_LIBRARY_DIR = '/Users/feng/.agents/skill-library';
+export const SKILL_MANAGER_LIBRARY_DIR = '~/.agents/skill-library';🤖 Prompt for AI Agents |
||
|
|
||
| // Default values | ||
| const defaultSettings = { | ||
| skillSourceDir: '~/.cc-workshop/skills', | ||
| skillSourceDir: SKILL_MANAGER_LIBRARY_DIR, | ||
| mcpSourceDir: '~/.cc-workshop/mcps', | ||
| claudeConfigDir: '~/.claude', | ||
| anthropicApiKey: '', | ||
|
|
||
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.
Replace hardcoded user-specific path with tilde notation.
The default
skill_source_dircontains/Users/feng/.agents/skill-library, which is specific to user "feng" and will not work on other machines. Use tilde notation~/.agents/skill-libraryinstead, which will be expanded by the path utilities at runtime.🛠️ Proposed fix
Self { - skill_source_dir: "/Users/feng/.agents/skill-library".to_string(), + skill_source_dir: "~/.agents/skill-library".to_string(), mcp_source_dir: "~/.cc-workshop/mcps".to_string(),As per coding guidelines, use
expand_path()orexpand_tilde()insrc-tauri/src/utils/path.rsfor cross-platform home directory handling.🤖 Prompt for AI Agents