@@ -91,31 +91,20 @@ func LoadMCPPrompts() ([]MCPPrompt, error) {
93func buildCommandSources(cfg *config.Config) []commandSource {
93func buildCommandSources(cfg *config.Config) []commandSource {
94− var sources []commandSource
94+ return []commandSource{
96− // XDG config directory
96+ path: filepath.Join(home.Config(), "crush", "commands"),
97− if dir := getXDGCommandsDir(); dir != "" {
98− sources = append(sources, commandSource{
100 prefix: userCommandPrefix,
97 prefix: userCommandPrefix,
105− if home := home.Dir(); home != "" {
106− sources = append(sources, commandSource{
107− path: filepath.Join(home, ".crush", "commands"),
100+ path: filepath.Join(home.Dir(), ".crush", "commands"),
108 prefix: userCommandPrefix,
101 prefix: userCommandPrefix,
104+ path: filepath.Join(cfg.Options.DataDirectory, "commands"),
105+ prefix: projectCommandPrefix,
112− // Project directory
113− sources = append(sources, commandSource{
114− path: filepath.Join(cfg.Options.DataDirectory, "commands"),
115− prefix: projectCommandPrefix,
121func loadAll(sources []commandSource) ([]CustomCommand, error) {
110func loadAll(sources []commandSource) ([]CustomCommand, error) {
@@ -204,19 +193,6 @@ func buildCommandID(path, baseDir, prefix string) string {
204 return prefix + strings.Join(parts, ":")
193 return prefix + strings.Join(parts, ":")
207−func getXDGCommandsDir() string {
208− xdgHome := os.Getenv("XDG_CONFIG_HOME")
210− if home := home.Dir(); home != "" {
211− xdgHome = filepath.Join(home, ".config")
215− return filepath.Join(xdgHome, "crush", "commands")
220func isMarkdownFile(name string) bool {
196func isMarkdownFile(name string) bool {
221 return strings.HasSuffix(strings.ToLower(name), ".md")
197 return strings.HasSuffix(strings.ToLower(name), ".md")