-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Add Windsurf IDE support with slash commands #113
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
Changes from 5 commits
19f7357
728243d
36a9751
428545a
1fcdfd1
6f03cfe
260de7b
c0e9668
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 |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| import { SlashCommandConfigurator } from './base.js'; | ||
| import { SlashCommandId } from '../../templates/index.js'; | ||
|
|
||
| const FILE_PATHS: Record<SlashCommandId, string> = { | ||
| proposal: '.windsurf/commands/openspec-proposal.md', | ||
| apply: '.windsurf/commands/openspec-apply.md', | ||
| archive: '.windsurf/commands/openspec-archive.md' | ||
| }; | ||
|
|
||
| const FRONTMATTER: Record<SlashCommandId, string> = { | ||
|
||
| proposal: `--- | ||
| name: /openspec-proposal | ||
| id: openspec-proposal | ||
| category: OpenSpec | ||
| description: Scaffold a new OpenSpec change and validate strictly. | ||
| ---`, | ||
| apply: `--- | ||
| name: /openspec-apply | ||
| id: openspec-apply | ||
| category: OpenSpec | ||
| description: Implement an approved OpenSpec change and keep tasks in sync. | ||
| ---`, | ||
| archive: `--- | ||
| name: /openspec-archive | ||
| id: openspec-archive | ||
| category: OpenSpec | ||
| description: Archive a deployed OpenSpec change and update specs. | ||
| ---` | ||
| }; | ||
|
|
||
| export class WindsurfSlashCommandConfigurator extends SlashCommandConfigurator { | ||
| readonly toolId = 'windsurf'; | ||
| readonly isAvailable = true; | ||
|
|
||
| protected getRelativePath(id: SlashCommandId): string { | ||
| return FILE_PATHS[id]; | ||
| } | ||
|
|
||
| protected getFrontmatter(id: SlashCommandId): string { | ||
| return FRONTMATTER[id]; | ||
| } | ||
| } | ||
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.
I believe this is
.windsurf/workflows/not.windsurf/commands/according to the docs: https://docs.windsurf.com/windsurf/cascade/workflowslet me know if I got something wrong here.