@@ -8,11 +8,11 @@ import { writeToChat } from '../chat/chatHelper'
88import { sleep , waitForElements } from '../utils/generalHelper'
99
1010/**
11- * Gets all backslash command menu items
11+ * Gets all quick action command menu items
1212 * @param webview The WebviewView instance
1313 * @returns Promise<{items: WebElement[], texts: string[]}> Array of menu items and their text labels
1414 */
15- export async function getBackslashCommands ( webview : WebviewView ) : Promise < { items : WebElement [ ] ; texts : string [ ] } > {
15+ export async function getQuickActionsCommands ( webview : WebviewView ) : Promise < { items : WebElement [ ] ; texts : string [ ] } > {
1616 try {
1717 await writeToChat ( '/' , webview , false )
1818 await sleep ( 2000 )
@@ -35,25 +35,25 @@ export async function getBackslashCommands(webview: WebviewView): Promise<{ item
3535 }
3636 }
3737
38- console . log ( `Found ${ menuItems . length } backslash command items` )
38+ console . log ( `Found ${ menuItems . length } quick action command items` )
3939 return { items : menuItems , texts : menuTexts }
4040 } catch ( e ) {
41- console . error ( 'Error getting backslash commands:' , e )
41+ console . error ( 'Error getting quick action commands:' , e )
4242 return { items : [ ] , texts : [ ] }
4343 }
4444}
4545
4646/**
47- * Clicks a specific backslash command by name
47+ * Clicks a specific quick action command by name
4848 * @param webview The WebviewView instance
4949 * @param commandName The name of the command to click
5050 * @returns Promise<boolean> True if command was found and clicked, false otherwise
5151 */
52- export async function clickBackslashCommand ( webview : WebviewView , commandName : string ) : Promise < boolean > {
52+ export async function clickQuickActionsCommand ( webview : WebviewView , commandName : string ) : Promise < boolean > {
5353 try {
54- const { items, texts } = await getBackslashCommands ( webview )
54+ const { items, texts } = await getQuickActionsCommands ( webview )
5555 if ( items . length === 0 ) {
56- console . log ( 'No backslash commands found to click' )
56+ console . log ( 'No quick action commands found to click' )
5757 return false
5858 }
5959 const indexToClick = texts . findIndex ( ( text ) => text === commandName )
@@ -68,7 +68,7 @@ export async function clickBackslashCommand(webview: WebviewView, commandName: s
6868 console . log ( 'Command clicked successfully' )
6969 return true
7070 } catch ( e ) {
71- console . error ( 'Error clicking backslash command:' , e )
71+ console . error ( 'Error clicking quick action command:' , e )
7272 return false
7373 }
7474}
0 commit comments