diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 723196d..c5d27fc 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -69,6 +69,9 @@ jobs: - name: Publish to vsce run: npx vsce publish --pat ${{ secrets.VSCODE_PUBLISH_PAT }} + - name: Publish to OpenVSIX + run: npx ovsx publish --pat ${{ secrets.OPENVSIX_PUBLISH_TOKEN }} + - name: Extract version from package.json id: get_version run: | diff --git a/media/webview.js b/media/webview.js index 59e052f..8825041 100644 --- a/media/webview.js +++ b/media/webview.js @@ -10,6 +10,7 @@ class TestDriverWebview { this.emptyState = document.getElementById('emptyState'); this.isRunning = false; this.streamingMessages = new Map(); + this.showSuggestedAfterExample = false; // Track if we should show suggested prompts after example this.init(); } @@ -223,6 +224,9 @@ class TestDriverWebview { case 'showInputAndRunButton': this.showInputAndRunButton(); break; + case 'showSuggestedPromptsAfterExample': + this.showSuggestedPromptsAfterExample(); + break; case 'error': this.addMessage(message.data, 'error', '❌'); this.isRunning = false; @@ -252,7 +256,11 @@ class TestDriverWebview { } addMessage(content, type = 'assistant', _avatar = '🤖') { - this.hideEmptyState(); + // Only hide empty state if we're not showing suggested prompts after example + // or if this is a user message (which should always hide empty state) + if (!this.showSuggestedAfterExample || type === 'user') { + this.hideEmptyState(); + } const messageDiv = document.createElement('div'); messageDiv.className = `message ${type}`; @@ -328,6 +336,12 @@ class TestDriverWebview { return; } + // If we're showing suggested prompts after example, hide them now on first user message + if (this.showSuggestedAfterExample) { + this.hideEmptyState(); + this.showSuggestedAfterExample = false; + } + this.addMessage(message, 'user'); this.chatInput.value = ''; this.isRunning = true; @@ -670,6 +684,28 @@ class TestDriverWebview { } } + showSuggestedPromptsAfterExample() { + // Set flag to show suggested prompts and keep them visible until first user message + this.showSuggestedAfterExample = true; + + // Ensure the empty state is visible with suggested prompts + if (this.emptyState) { + this.emptyState.style.display = 'flex'; + + // Restore the complete empty state HTML with the correct suggested prompts + this.emptyState.innerHTML = ` + TestDriver +

Example copied successfully!

+

Your test file has been created. Try one of these prompts to get started:

+
+ + + +
+ `; + } + } + focusInput() { this.chatInput.focus(); } diff --git a/package.json b/package.json index d7ac36b..575cef4 100644 --- a/package.json +++ b/package.json @@ -110,7 +110,7 @@ "testdriver-activity": [ { "id": "testdriver-sidebar", - "name": "Chat", + "name": "Agent", "type": "webview", "icon": "$(comment-discussion)" } diff --git a/src/commands/chat.ts b/src/commands/chat.ts index 8e84eff..b0d360c 100644 --- a/src/commands/chat.ts +++ b/src/commands/chat.ts @@ -573,6 +573,11 @@ async function copyExampleToWorkspace(exampleName: string, workspaceFolder: vsco fileName: mainFileName }); + // Show suggested prompts after copying example + webview.postMessage({ + command: 'showSuggestedPromptsAfterExample' + }); + webview.postMessage({ command: 'chatResponse' }); diff --git a/src/utils/sidebarProvider.ts b/src/utils/sidebarProvider.ts index 617e8e4..029c4af 100644 --- a/src/utils/sidebarProvider.ts +++ b/src/utils/sidebarProvider.ts @@ -714,6 +714,7 @@ export class TestDriverSidebarProvider implements vscode.WebviewViewProvider { overflow-y: hidden; white-space: pre; max-width: 100%; + color: #b3d334 !important; word-wrap: normal; /* Don't break words in code */ } @@ -729,7 +730,7 @@ export class TestDriverSidebarProvider implements vscode.WebviewViewProvider { padding: 0 !important; margin: 0 !important; font-family: inherit !important; - color: var(--vscode-editor-foreground) !important; + color: #b3d334 !important; white-space: pre; overflow-wrap: normal; } @@ -745,7 +746,7 @@ export class TestDriverSidebarProvider implements vscode.WebviewViewProvider { .code-block code[class*="language-"] { background: none !important; - color: var(--vscode-editor-foreground) !important; + color: #b3d334 !important; } /* Override Prism.js tokens to use VS Code colors */ @@ -763,7 +764,7 @@ export class TestDriverSidebarProvider implements vscode.WebviewViewProvider { .token.constant, .token.symbol, .token.deleted { - color: var( #b3d334) !important; + color: #b3d334 !important; } .token.selector, @@ -772,7 +773,7 @@ export class TestDriverSidebarProvider implements vscode.WebviewViewProvider { .token.char, .token.builtin, .token.inserted { - color: var(#34d3d3) !important; + color: #b3d334 !important; } .token.operator, @@ -786,18 +787,18 @@ export class TestDriverSidebarProvider implements vscode.WebviewViewProvider { .token.atrule, .token.attr-value, .token.keyword { - color: var(#34d3d3) !important; + color: #34d3d3 !important; } .token.function, .token.class-name { - color: var(#DCDCAA) !important; + color: #DCDCAA !important; } .token.regex, .token.important, .token.variable { - color: var(#9CDCFE) !important; + color: #9CDCFE !important; } /* VS Code icon styling */ @@ -1101,7 +1102,7 @@ export class TestDriverSidebarProvider implements vscode.WebviewViewProvider {

Welcome to TestDriver.ai

Your AI-powered testing assistant. Describe what you want to test and I'll help you create automated test steps.

- +
diff --git a/testdriver/testdriver.yaml b/testdriver/testdriver.yaml new file mode 100644 index 0000000..f0d00e8 --- /dev/null +++ b/testdriver/testdriver.yaml @@ -0,0 +1,13 @@ +version: 6.0.20 +session: 68a3851d07c3e65375e906fe +steps: + - prompt: Assert the app loads proplerly + commands: + - command: hover-text + text: Google Chrome + description: >- + Google Chrome shortcut icon on the desktop with a circular red, green, + yellow, and blue icon + action: double-click + - command: wait + timeout: 3000