@@ -20,7 +20,7 @@ export async function sleep(timeout: number) {
2020 * @param timeout The timeout in milliseconds (Optional)
2121 * @returns Promise<WebElement> Returns the element found
2222 */
23- export async function waitForElement ( webview : WebviewView , locator : By , timeout ? : number ) : Promise < WebElement > {
23+ export async function waitForElement ( webview : WebviewView , locator : By , timeout : number = 8000 ) : Promise < WebElement > {
2424 const driver = webview . getDriver ( )
2525 await driver . wait ( until . elementsLocated ( locator ) , timeout )
2626 return await webview . findWebElement ( locator )
@@ -33,7 +33,11 @@ export async function waitForElement(webview: WebviewView, locator: By, timeout?
3333 * @param timeout The timeout in milliseconds (Optional)
3434 * @returns Promise<WebElement[]> Returns an array of elements found
3535 */
36- export async function waitForElements ( webview : WebviewView , locator : By , timeout ?: number ) : Promise < WebElement [ ] > {
36+ export async function waitForElements (
37+ webview : WebviewView ,
38+ locator : By ,
39+ timeout : number = 8000
40+ ) : Promise < WebElement [ ] > {
3741 const driver = webview . getDriver ( )
3842 await driver . wait ( until . elementsLocated ( locator ) , timeout )
3943 return await webview . findWebElements ( locator )
@@ -91,7 +95,7 @@ export async function writeToChat(prompt: string, webview: WebviewView, send = t
9195 * @param timeout The timeout in milliseconds
9296 * @returns Promise<boolean> True if a response was detected, false if timeout occurred
9397 */
94- export async function waitForChatResponse ( webview : WebviewView , timeout = 15000 ) : Promise < boolean > {
98+ export async function waitForChatResponse ( webview : WebviewView , timeout = 8000 ) : Promise < boolean > {
9599 const startTime = Date . now ( )
96100
97101 while ( Date . now ( ) - startTime < timeout ) {
0 commit comments