Skip to content

Commit 5a94c25

Browse files
RiverSoongourai
andauthored
feat: add AI assistant
Merge commits below into one: * feat: add AI assistant * fix: update script to next Script --------- Co-authored-by: RiverSoong <RiverSoonger@gmail.com> Co-authored-by: Ourai L. <ourairyu@gmail.com>
1 parent 49b659a commit 5a94c25

File tree

3 files changed

+41
-1
lines changed

3 files changed

+41
-1
lines changed

next.config.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ module.exports = withBundleAnalyzer({
4343
's1.ax1x.com',
4444
'imgse.com',
4545
's3.us-west-1.amazonaws.com',
46-
'file-cdn.openbuild.xyz'
46+
'file-cdn.openbuild.xyz',
47+
'api.runllm.com'
4748
],
4849
},
4950
webpack: config => {

src/app/layout.js

+4
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ import { getConfigs } from '#/services/common';
3434
// import { StartOnOpenBuild } from '@/components/StartOnOpenBuild'
3535

3636
import ClientEntry from '../entry';
37+
import { RunLLM } from '../entry/components/Widget/RunLLM';
3738
import DefaultLayout from '../entry/layouts/default';
3839

3940
export const metadata = {
@@ -106,6 +107,9 @@ export default async function RootLayout({ children }) {
106107

107108
return (
108109
<html lang="en" data-theme="light" className={`${nunito_sans.className} light`} suppressHydrationWarning>
110+
<head>
111+
<RunLLM />
112+
</head>
109113
<body>
110114
<ClientEntry config={{ static: getAppConfig(), dynamic: configRes }}>
111115
<DefaultLayout>{children}</DefaultLayout>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
/**
2+
* Copyright 2024 OpenBuild
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
import Script from 'next/script';
18+
19+
export function RunLLM() {
20+
return (
21+
<Script
22+
type="module"
23+
id="runllm-widget-script"
24+
src="https://widget.runllm.com"
25+
version="stable"
26+
runllm-theme-color="#64d88b"
27+
runllm-brand-logo="/favicon.svg"
28+
runllm-keyboard-shortcut="Mod+j"
29+
runllm-name="OpenBuild"
30+
runllm-position="BOTTOM_RIGHT"
31+
runllm-assistant-id="328"
32+
async
33+
/>
34+
);
35+
}

0 commit comments

Comments
 (0)