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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user