Skip to content

Commit 8b893c4

Browse files
Merge branch 'master' of github.com:Mintplex-Labs/anything-llm into render
2 parents 5787f90 + b6698ff commit 8b893c4

File tree

57 files changed

+2617
-352
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+2617
-352
lines changed

.github/workflows/build-and-push-image.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ on:
1515
branches: ['master'] # master branch only. Do not modify.
1616
paths-ignore:
1717
- '**.md'
18+
- '.gitmodules'
1819
- 'cloud-deployments/**/*'
1920
- 'images/**/*'
2021
- '.vscode/**/*'

.github/workflows/dev-build.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,17 @@ concurrency:
66

77
on:
88
push:
9-
branches: ['chore/anthropic-model-endpoint'] # put your current branch to create a build. Core team only.
9+
branches: ['3157-feat-prompt-variables'] # put your current branch to create a build. Core team only.
1010
paths-ignore:
1111
- '**.md'
1212
- 'cloud-deployments/*'
1313
- 'images/**/*'
1414
- '.vscode/**/*'
1515
- '**/.env.example'
1616
- '.github/ISSUE_TEMPLATE/**/*'
17+
- '.devcontainer/**/*'
1718
- 'embed/**/*' # Embed should be published to frontend (yarn build:publish) if any changes are introduced
19+
- 'browser-extension/**/*' # Chrome extension is submodule
1820
- 'server/utils/agents/aibitat/example/**/*' # Do not push new image for local dev testing of new aibitat images.
1921

2022
jobs:
@@ -43,6 +45,8 @@ jobs:
4345

4446
- name: Set up Docker Buildx
4547
uses: docker/setup-buildx-action@v3
48+
with:
49+
version: v0.19.0
4650

4751
- name: Log in to Docker Hub
4852
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a

.gitmodules

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[submodule "browser-extension"]
22
path = browser-extension
3-
url = git@github.com:Mintplex-Labs/anythingllm-extension.git
3+
url = https://github.com/Mintplex-Labs/anythingllm-extension.git
44
[submodule "embed"]
55
path = embed
6-
url = git@github.com:Mintplex-Labs/anythingllm-embed.git
6+
url = https://github.com/Mintplex-Labs/anythingllm-embed.git
77
branch = main

docker/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,13 +131,13 @@ WORKDIR /app
131131
# Install server layer
132132
# Also pull and build collector deps (chromium issues prevent bad bindings)
133133
FROM build AS backend-build
134-
COPY ./server /app/server/
134+
COPY --chown=anythingllm:anythingllm ./server /app/server/
135135
WORKDIR /app/server
136136
RUN yarn install --production --network-timeout 100000 && yarn cache clean
137137
WORKDIR /app
138138

139139
# Install collector dependencies
140-
COPY ./collector/ ./collector/
140+
COPY --chown=anythingllm:anythingllm ./collector/ ./collector/
141141
WORKDIR /app/collector
142142
ENV PUPPETEER_DOWNLOAD_BASE_URL=https://storage.googleapis.com/chrome-for-testing-public
143143
RUN yarn install --production --network-timeout 100000 && yarn cache clean

frontend/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
"react-device-detect": "^2.2.2",
3434
"react-dom": "^18.2.0",
3535
"react-dropzone": "^14.2.3",
36+
"react-highlight-words": "^0.21.0",
3637
"react-i18next": "^14.1.1",
3738
"react-loading-skeleton": "^3.1.0",
3839
"react-router-dom": "^6.3.0",
@@ -54,6 +55,7 @@
5455
"@vitejs/plugin-react": "^4.0.0-beta.0",
5556
"autoprefixer": "^10.4.14",
5657
"buffer": "^6.0.3",
58+
"cross-env": "^7.0.3",
5759
"eslint": "^8.50.0",
5860
"eslint-config-prettier": "^9.0.0",
5961
"eslint-plugin-ft-flow": "^3.0.0",
@@ -69,7 +71,6 @@
6971
"prettier": "^3.0.3",
7072
"rollup-plugin-visualizer": "^5.9.0",
7173
"tailwindcss": "^3.3.1",
72-
"vite": "^4.3.0",
73-
"cross-env": "^7.0.3"
74+
"vite": "^4.3.0"
7475
}
7576
}

frontend/src/App.jsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ const LiveDocumentSyncManage = lazy(
6868
() => import("@/pages/Admin/ExperimentalFeatures/Features/LiveSync/manage")
6969
);
7070
const AgentBuilder = lazy(() => import("@/pages/Admin/AgentBuilder"));
71-
7271
const CommunityHubTrending = lazy(
7372
() => import("@/pages/GeneralSettings/CommunityHub/Trending")
7473
);
@@ -78,6 +77,9 @@ const CommunityHubAuthentication = lazy(
7877
const CommunityHubImportItem = lazy(
7978
() => import("@/pages/GeneralSettings/CommunityHub/ImportItem")
8079
);
80+
const SystemPromptVariables = lazy(
81+
() => import("@/pages/Admin/SystemPromptVariables")
82+
);
8183

8284
export default function App() {
8385
return (
@@ -195,6 +197,10 @@ export default function App() {
195197
path="/settings/api-keys"
196198
element={<AdminRoute Component={GeneralApiKeys} />}
197199
/>
200+
<Route
201+
path="/settings/system-prompt-variables"
202+
element={<AdminRoute Component={SystemPromptVariables} />}
203+
/>
198204
<Route
199205
path="/settings/browser-extension"
200206
element={

frontend/src/components/SettingsSidebar/index.jsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -354,6 +354,12 @@ const SidebarOptions = ({ user = null, t }) => (
354354
flex: true,
355355
roles: ["admin"],
356356
},
357+
{
358+
btnText: t("settings.system-prompt-variables"),
359+
href: paths.settings.systemPromptVariables(),
360+
flex: true,
361+
roles: ["admin"],
362+
},
357363
{
358364
btnText: t("settings.browser-extension"),
359365
href: paths.settings.browserExtension(),

frontend/src/components/WorkspaceChat/ChatContainer/PromptInput/SlashCommands/SlashPresets/index.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { DotsThree, Plus } from "@phosphor-icons/react";
88
import showToast from "@/utils/toast";
99

1010
export const CMD_REGEX = new RegExp(/[^a-zA-Z0-9_-]/g);
11-
export default function SlashPresets({ setShowing, sendCommand }) {
11+
export default function SlashPresets({ setShowing, sendCommand, promptRef }) {
1212
const isActiveAgentSession = useIsAgentSessionActive();
1313
const {
1414
isOpen: isAddModalOpen,
@@ -84,6 +84,7 @@ export default function SlashPresets({ setShowing, sendCommand }) {
8484
onClick={() => {
8585
setShowing(false);
8686
sendCommand(`${preset.command} `, false);
87+
promptRef?.current?.focus();
8788
}}
8889
className="border-none w-full hover:cursor-pointer hover:bg-theme-action-menu-item-hover px-2 py-2 rounded-xl flex flex-row justify-start"
8990
>

frontend/src/components/WorkspaceChat/ChatContainer/PromptInput/SlashCommands/index.jsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export default function SlashCommandsButton({ showing, setShowSlashCommand }) {
3232
);
3333
}
3434

35-
export function SlashCommands({ showing, setShowing, sendCommand }) {
35+
export function SlashCommands({ showing, setShowing, sendCommand, promptRef }) {
3636
const cmdRef = useRef(null);
3737
useEffect(() => {
3838
function listenForOutsideClick() {
@@ -58,7 +58,11 @@ export function SlashCommands({ showing, setShowing, sendCommand }) {
5858
>
5959
<ResetCommand sendCommand={sendCommand} setShowing={setShowing} />
6060
<EndAgentSession sendCommand={sendCommand} setShowing={setShowing} />
61-
<SlashPresets sendCommand={sendCommand} setShowing={setShowing} />
61+
<SlashPresets
62+
sendCommand={sendCommand}
63+
setShowing={setShowing}
64+
promptRef={promptRef}
65+
/>
6266
</div>
6367
</div>
6468
</div>

frontend/src/components/WorkspaceChat/ChatContainer/PromptInput/index.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,7 @@ export default function PromptInput({
237237
showing={showSlashCommand}
238238
setShowing={setShowSlashCommand}
239239
sendCommand={sendCommand}
240+
promptRef={textareaRef}
240241
/>
241242
<AvailableAgents
242243
showing={showAgents}

0 commit comments

Comments
 (0)