Skip to content

Commit 413fec2

Browse files
arora-saurabh448claudeSaurabh Arora
authored
feat: replace Query Results welcome tab with Altimate Code product hook (#1907)
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Co-authored-by: Saurabh Arora <saurabh@altimate.ai>
1 parent 25f6ca9 commit 413fec2

3 files changed

Lines changed: 50 additions & 15 deletions

File tree

src/webview_provider/altimateWebviewProvider.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -583,6 +583,17 @@ export class AltimateWebviewProvider implements WebviewViewProvider {
583583
),
584584
),
585585
);
586+
const AltimateCodeBannerUrl = webview.asWebviewUri(
587+
Uri.file(
588+
path.join(
589+
extensionUri.fsPath,
590+
"webview_panels",
591+
"dist",
592+
"assets",
593+
"altimate-code-banner-sml.png",
594+
),
595+
),
596+
);
586597

587598
// Tutorial images - convert URIs to strings for serialization
588599
const GenerateModelFromSourceGif = webview.asWebviewUri(
@@ -799,6 +810,7 @@ export class AltimateWebviewProvider implements WebviewViewProvider {
799810
window.viewPath = "${this.viewPath}";
800811
var spinnerUrl = "${SpinnerUrl}"
801812
var lineageGif = "${LineageGif}"
813+
window.altimateCodeBannerUrl = "${AltimateCodeBannerUrl}";
802814
window.tutorialImages = {
803815
generateModelFromSource: "${GenerateModelFromSourceGif}",
804816
generateModelFromSQL: "${GenerateModelFromSQLGif}",

src/webview_provider/queryResultPanel.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ enum InboundCommand {
102102
OpenCodeInEditor = "openCodeInEditor",
103103
ClearQueryHistory = "clearQueryHistory",
104104
TroubleshootWithAltimate = "troubleshootWithAltimate",
105+
OpenAltimateCodeChat = "openAltimateCodeChat",
105106
}
106107

107108
interface RecInfo {
@@ -523,6 +524,15 @@ export class QueryResultPanel extends AltimateWebviewProvider {
523524
const config = message as RecOpenUrl;
524525
env.openExternal(Uri.parse(config.url));
525526
break;
527+
case InboundCommand.OpenAltimateCodeChat:
528+
try {
529+
await commands.executeCommand("altimate.openChat");
530+
} catch (err) {
531+
window.showErrorMessage(
532+
"Altimate Code is not available. Install the Datamates extension to use chat.",
533+
);
534+
}
535+
break;
526536
case InboundCommand.GetSummary:
527537
const summary = message as RecSummary;
528538
this.eventEmitterService.fire({

webview_panels/src/modules/queryPanel/components/help/HelpContent.tsx

Lines changed: 28 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,34 @@
1+
import { executeRequestInAsync } from "@modules/app/requestExecutor";
2+
import { Button } from "@uicore";
3+
4+
const DOCS_URL = "https://docs.myaltimate.com/teammates/altimate-code/";
5+
16
const HelpContent = (): JSX.Element => {
7+
const openChat = () => {
8+
executeRequestInAsync("openAltimateCodeChat", {});
9+
};
10+
11+
const openDocs = () => {
12+
executeRequestInAsync("openUrl", { url: DOCS_URL });
13+
};
14+
215
return (
3-
<div>
4-
<h2>Previewing Query</h2>
5-
<p>
6-
Press Cmd+Enter (Mac) or Control+Enter (Windows/Linux) to run a query.
7-
Highlight part of a query to preview only selection
8-
</p>
9-
<h2>Default Query Limit</h2>
10-
<p>
11-
Query preview is limited to 500 rows by default, this can be configured
12-
in Settings -&gt; dbt Power User or via changing the input to the left
13-
which is synchronized with the VS Code setting
16+
<div style={{ maxWidth: 640 }}>
17+
<p style={{ fontSize: 13, lineHeight: 1.55, marginBottom: "0.75rem" }}>
18+
We recently launched <strong>Altimate Code</strong> — chat with it right
19+
inside VS Code.
1420
</p>
15-
<h2>Dispatched SQL</h2>
16-
<p>
17-
This tab displays the compiled query sent to the database. You can copy
18-
to run directly in your database.
21+
<div style={{ display: "flex", gap: "0.5rem", marginBottom: "0.75rem" }}>
22+
<Button color="primary" onClick={openChat}>
23+
Open chat
24+
</Button>
25+
<Button color="secondary" onClick={openDocs}>
26+
Learn More
27+
</Button>
28+
</div>
29+
<p style={{ fontSize: 12, opacity: 0.75, margin: 0 }}>
30+
#1 on ADE-Bench · 10M free tokens across GPT-5.4, Opus 4.6 &amp; Sonnet
31+
4.6.
1932
</p>
2033
</div>
2134
);

0 commit comments

Comments
 (0)