Skip to content

Commit b84ef44

Browse files
committed
https://github.com/dstackai/dstack-cloud/issues/296
1 parent e44751e commit b84ef44

4 files changed

Lines changed: 145 additions & 2 deletions

File tree

frontend/public/index.html

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,19 @@
2222
<noscript>You need to enable JavaScript to run this app.</noscript>
2323
<div class="b-page-header" id="header"></div>
2424
<div id="root"></div>
25+
26+
<script src="https://widget.kapa.ai/kapa-widget.bundle.js"
27+
data-website-id="1c028b8e-609e-40e3-b792-f3939a461850"
28+
data-project-name="dstack"
29+
data-project-color="rgba(0, 0, 0, 0.87)"
30+
data-font-size-lg="0.78rem"
31+
data-button-hide="true"
32+
data-modal-image="/logo-notext.svg"
33+
data-modal-z-index="1100"
34+
data-modal-title="Ask me anything"
35+
data-project-logo="/assets/images/kapa.svg"
36+
data-modal-disclaimer="This is a custom LLM for dstack with access to Documentation, API references and GitHub issues. This feature is experimental - Give it a try!"
37+
data-user-analytics-fingerprint-enabled="true"
38+
async></script>
2539
</body>
2640
</html>

frontend/public/logo-notext.svg

Lines changed: 116 additions & 0 deletions
Loading

frontend/src/layouts/AppLayout/index.tsx

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,11 @@ const AppLayout: React.FC<{ children: React.ReactNode }> = ({ children }) => {
137137

138138
const ThemeIcon = THEME_ICON_MAP[systemMode];
139139

140+
const askAi = () => {
141+
window.document.body.focus();
142+
window?.Kapa?.open();
143+
};
144+
140145
return (
141146
<AnnotationContext>
142147
<HeaderPortal>
@@ -150,7 +155,7 @@ const AppLayout: React.FC<{ children: React.ReactNode }> = ({ children }) => {
150155
utilities={[
151156
process.env.UI_VERSION === 'sky' && {
152157
type: 'button',
153-
iconName: 'gen-ai',
158+
iconName: 'suggestions',
154159
title: t('common.tutorial_other'),
155160
onClick: toggleTutorialPanel,
156161
},
@@ -172,6 +177,13 @@ const AppLayout: React.FC<{ children: React.ReactNode }> = ({ children }) => {
172177
iconSvg: <ThemeIcon />,
173178
onClick: onChangeSystemModeToggle,
174179
},
180+
process.env.UI_VERSION === 'sky' && {
181+
type: 'button',
182+
iconName: 'gen-ai',
183+
text: t('common.ask_ai'),
184+
title: t('common.ask_ai'),
185+
onClick: askAi,
186+
},
175187
{
176188
'data-class': 'user-menu',
177189
type: 'menu-dropdown',

frontend/src/locale/en.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@
4848
"danger_zone": "Danger Zone",
4949
"control_plane": "Control plane",
5050
"refresh": "Refresh",
51-
"quickstart": "Quickstart"
51+
"quickstart": "Quickstart",
52+
"ask_ai": "Ask AI"
5253
},
5354

5455
"auth": {

0 commit comments

Comments
 (0)