feat: enhance project-specific slash commands management

- Add scopeFilter prop to SlashCommandsManager for filtering by scope
- Replace browser confirm() with proper delete confirmation dialog
- Fix slash_command_delete to handle project commands with project_path param
- Add Slash Commands tab to ProjectSettings as the default tab
- Add Commands button to ClaudeCodeSession for quick access
- Improve error handling and user feedback for delete operations
- Better UI text when showing project-specific commands only
This commit is contained in:
Vivek R
2025-07-07 23:56:09 +05:30
parent e6662bf0c9
commit cee71343f5
5 changed files with 213 additions and 46 deletions

View File

@@ -1825,11 +1825,12 @@ export const api = {
/**
* Deletes a slash command
* @param commandId - Unique identifier of the command to delete
* @param projectPath - Optional project path for deleting project commands
* @returns Promise resolving to deletion message
*/
async slashCommandDelete(commandId: string): Promise<string> {
async slashCommandDelete(commandId: string, projectPath?: string): Promise<string> {
try {
return await invoke<string>("slash_command_delete", { commandId });
return await invoke<string>("slash_command_delete", { commandId, projectPath });
} catch (error) {
console.error("Failed to delete slash command:", error);
throw error;