diff --git a/apps/beeai-ui/src/modules/home/api/queries/useGitHubRepo.ts b/apps/beeai-ui/src/modules/home/api/queries/useGitHubRepo.ts
index 668bd704..be1db1d9 100644
--- a/apps/beeai-ui/src/modules/home/api/queries/useGitHubRepo.ts
+++ b/apps/beeai-ui/src/modules/home/api/queries/useGitHubRepo.ts
@@ -25,6 +25,9 @@ export function useGitHubRepo(params: GitHubRepoParams) {
queryFn: () => fetchGitHubRepo(params),
staleTime: 1000 * 60 * 5,
retry: 1,
+ meta: {
+ errorToast: false,
+ },
});
return query;
diff --git a/apps/beeai-ui/src/modules/home/components/GitHubStarsButton.tsx b/apps/beeai-ui/src/modules/home/components/GitHubStarsButton.tsx
index d22d7a00..e30988aa 100644
--- a/apps/beeai-ui/src/modules/home/components/GitHubStarsButton.tsx
+++ b/apps/beeai-ui/src/modules/home/components/GitHubStarsButton.tsx
@@ -15,7 +15,7 @@
*/
import { Spinner } from '#components/Spinner/Spinner.tsx';
-import { GITHUB_REPO } from '#utils/constants.ts';
+import { GITHUB_REPO, GITHUB_REPO_LINK } from '#utils/constants.ts';
import { LogoGithub } from '@carbon/icons-react';
import { Button } from '@carbon/react';
import { millify } from 'millify';
@@ -27,13 +27,7 @@ export function GitHubStarsButton() {
const count = data?.stargazers_count && millify(data.stargazers_count);
return (
-
+
{isLoading ? : {count || 'Star'}}
diff --git a/apps/beeai-ui/src/modules/run/api/mutations/useRunAgent.tsx b/apps/beeai-ui/src/modules/run/api/mutations/useRunAgent.tsx
index 166b3a15..cccc7707 100644
--- a/apps/beeai-ui/src/modules/run/api/mutations/useRunAgent.tsx
+++ b/apps/beeai-ui/src/modules/run/api/mutations/useRunAgent.tsx
@@ -14,10 +14,10 @@
* limitations under the License.
*/
-import { useMutation } from '@tanstack/react-query';
+import { useCreateMCPClient } from '#api/mcp-client/useCreateMCPClient.ts';
import { Agent } from '@i-am-bee/acp-sdk/types.js';
+import { useMutation } from '@tanstack/react-query';
import z, { ZodLiteral, ZodObject } from 'zod';
-import { useCreateMCPClient } from '#api/mcp-client/useCreateMCPClient.ts';
interface Props<
NotificationsSchema extends ZodObject<{
diff --git a/apps/beeai-ui/src/modules/run/chat/ChatSettings.module.scss b/apps/beeai-ui/src/modules/run/chat/ChatSettings.module.scss
new file mode 100644
index 00000000..2eb47538
--- /dev/null
+++ b/apps/beeai-ui/src/modules/run/chat/ChatSettings.module.scss
@@ -0,0 +1,33 @@
+/**
+ * Copyright 2025 IBM Corp.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+@use 'styles/common' as *;
+
+.root {
+ position: relative;
+ inline-size: 100%;
+ z-index: z('modal') - 1;
+}
+
+.content {
+ background-color: $layer;
+ border-radius: $border-radius;
+ box-shadow: $box-shadow;
+ padding: $spacing-05;
+ display: flex;
+ flex-direction: column;
+ row-gap: $spacing-06;
+}
diff --git a/apps/beeai-ui/src/modules/run/chat/ChatSettings.tsx b/apps/beeai-ui/src/modules/run/chat/ChatSettings.tsx
new file mode 100644
index 00000000..622bc624
--- /dev/null
+++ b/apps/beeai-ui/src/modules/run/chat/ChatSettings.tsx
@@ -0,0 +1,115 @@
+/**
+ * Copyright 2025 IBM Corp.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { fadeProps } from '#utils/fadeProps.ts';
+import { Settings } from '@carbon/icons-react';
+import { IconButton } from '@carbon/react';
+import {
+ autoUpdate,
+ FloatingFocusManager,
+ FloatingPortal,
+ offset,
+ size,
+ useClick,
+ useDismiss,
+ useFloating,
+ useInteractions,
+ useRole,
+} from '@floating-ui/react';
+import { AnimatePresence, motion } from 'framer-motion';
+import { RefObject, useState } from 'react';
+import classes from './ChatSettings.module.scss';
+import { ChatTools } from './ChatTools';
+
+interface Props {
+ containerRef: RefObject;
+}
+
+export function ChatSettings({ containerRef }: Props) {
+ const [isOpen, setIsOpen] = useState(false);
+
+ const { refs, floatingStyles, context } = useFloating({
+ placement: 'top-start',
+ open: isOpen,
+ onOpenChange: setIsOpen,
+ whileElementsMounted: autoUpdate,
+ middleware: [
+ offset(OFFSET),
+ size({
+ apply({ elements }) {
+ const container = containerRef.current;
+
+ if (container) {
+ Object.assign(elements.floating.style, {
+ maxWidth: `${container.offsetWidth}px`,
+ });
+ }
+ },
+ }),
+ ],
+ });
+
+ const click = useClick(context);
+ const dismiss = useDismiss(context);
+ const role = useRole(context, { role: 'dialog' });
+
+ const { getReferenceProps, getFloatingProps } = useInteractions([click, dismiss, role]);
+
+ return (
+ <>
+
+
+
+
+
+ {isOpen && (
+
+
+
+
+
+
+
+
+
+
+
+ )}
+
+ >
+ );
+}
+
+const OFFSET = {
+ mainAxis: 56,
+ crossAxis: -12,
+};
diff --git a/apps/beeai-ui/src/modules/run/chat/ChatTools.module.scss b/apps/beeai-ui/src/modules/run/chat/ChatTools.module.scss
new file mode 100644
index 00000000..9eef3824
--- /dev/null
+++ b/apps/beeai-ui/src/modules/run/chat/ChatTools.module.scss
@@ -0,0 +1,31 @@
+/**
+ * Copyright 2025 IBM Corp.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+.root {
+ display: flex;
+ flex-direction: column;
+ row-gap: $spacing-05;
+}
+
+.heading {
+ @include type-style(heading-03);
+}
+
+.list {
+ display: flex;
+ flex-direction: column;
+ row-gap: $spacing-04;
+}
diff --git a/apps/beeai-ui/src/modules/run/chat/ChatTools.tsx b/apps/beeai-ui/src/modules/run/chat/ChatTools.tsx
new file mode 100644
index 00000000..c37877e3
--- /dev/null
+++ b/apps/beeai-ui/src/modules/run/chat/ChatTools.tsx
@@ -0,0 +1,83 @@
+/**
+ * Copyright 2025 IBM Corp.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ErrorMessage } from '#components/ErrorMessage/ErrorMessage.tsx';
+import { SkeletonItems } from '#components/SkeletonItems/SkeletonItems.tsx';
+import { useListTools } from '#modules/tools/api/queries/useListTools.ts';
+import { useCallback } from 'react';
+import { useFormContext } from 'react-hook-form';
+import classes from './ChatTools.module.scss';
+import { ChatFormValues } from './InputBar';
+import { ToolToggle } from './ToolToggle';
+import { ChatSupportedTools } from './constants';
+
+export function ChatTools() {
+ const { setValue, watch } = useFormContext();
+ const { data, isPending, error, isRefetching, refetch } = useListTools();
+ const tools = data?.tools.filter(({ name }) => ChatSupportedTools.includes(name));
+ const chatTools = watch('tools');
+
+ const handleToggle = useCallback(
+ ({ tool, checked }: { tool: string; checked: boolean }) => {
+ if (checked) {
+ setValue('tools', chatTools ? [...chatTools, tool] : [tool]);
+ } else {
+ setValue('tools', chatTools ? chatTools.filter((item) => item !== tool) : []);
+ }
+ },
+ [chatTools, setValue],
+ );
+
+ if (error && !tools) {
+ return (
+
+ );
+ }
+
+ return (
+
+ );
+};
diff --git a/apps/beeai-ui/src/modules/run/chat/constants.ts b/apps/beeai-ui/src/modules/run/chat/constants.ts
new file mode 100644
index 00000000..f4c3bd6b
--- /dev/null
+++ b/apps/beeai-ui/src/modules/run/chat/constants.ts
@@ -0,0 +1,19 @@
+/**
+ * Copyright 2025 IBM Corp.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+export const ChatSupportedTools = ['search', 'wikipedia', 'weather'];
+
+export const ChatDefaultTools = [...ChatSupportedTools];
diff --git a/apps/beeai-ui/src/modules/run/chat/types.ts b/apps/beeai-ui/src/modules/run/chat/types.ts
index 05fd79d3..0aa4ad2b 100644
--- a/apps/beeai-ui/src/modules/run/chat/types.ts
+++ b/apps/beeai-ui/src/modules/run/chat/types.ts
@@ -15,7 +15,7 @@
*/
import { AgentRunProgressNotificationSchema, RunAgentResultSchema } from '@i-am-bee/acp-sdk/types.js';
-import { messageOutputSchema } from '@i-am-bee/beeai-sdk/schemas/message';
+import { MessageInput, messageOutputSchema } from '@i-am-bee/beeai-sdk/schemas/message';
import { z } from 'zod';
export const messagesNotificationsSchema = AgentRunProgressNotificationSchema.extend({
@@ -39,3 +39,5 @@ export interface AgentMessage extends MessageBase {
status: 'pending' | 'error' | 'aborted' | 'success';
}
export type ChatMessage = ClientMessage | AgentMessage;
+
+export type SendMessageParams = { input: string; config?: MessageInput['config'] };
diff --git a/apps/beeai-ui/src/modules/run/contexts/ChatProvider.tsx b/apps/beeai-ui/src/modules/run/contexts/ChatProvider.tsx
index 5c3b51e7..f85e2652 100644
--- a/apps/beeai-ui/src/modules/run/contexts/ChatProvider.tsx
+++ b/apps/beeai-ui/src/modules/run/contexts/ChatProvider.tsx
@@ -26,6 +26,7 @@ import {
MessagesNotifications,
messagesNotificationsSchema,
MessagesResult,
+ SendMessageParams,
} from '../chat/types';
import { ChatContext, ChatMessagesContext } from './chat-context';
@@ -70,7 +71,7 @@ export function ChatProvider({ agent, children }: PropsWithChildren) {
}, [getMessages]);
const sendMessage = useCallback(
- async (input: string) => {
+ async ({ input, config }: SendMessageParams) => {
setMessages((messages) => {
messages.push({
key: uuid(),
@@ -92,6 +93,7 @@ export function ChatProvider({ agent, children }: PropsWithChildren) {
const response = (await runAgent({
input: {
messages: getInputMessages(),
+ config,
},
abortController,
})) as MessagesResult;
diff --git a/apps/beeai-ui/src/modules/run/contexts/chat-context.ts b/apps/beeai-ui/src/modules/run/contexts/chat-context.ts
index 54a9ea86..70cc3307 100644
--- a/apps/beeai-ui/src/modules/run/contexts/chat-context.ts
+++ b/apps/beeai-ui/src/modules/run/contexts/chat-context.ts
@@ -17,7 +17,7 @@
import { Updater } from '#hooks/useImmerWithGetter.ts';
import { Agent } from '#modules/agents/api/types.ts';
import { createContext } from 'react';
-import { ChatMessage } from '../chat/types';
+import { ChatMessage, SendMessageParams } from '../chat/types';
export const ChatContext = createContext(null);
@@ -30,5 +30,5 @@ interface ChatContextValue {
onClear: () => void;
onCancel: () => void;
setMessages: Updater;
- sendMessage: (input: string) => Promise;
+ sendMessage: ({ input, config }: SendMessageParams) => Promise;
}
diff --git a/apps/beeai-ui/src/modules/tools/api/types.ts b/apps/beeai-ui/src/modules/tools/api/types.ts
index 18d5c25e..da260a7a 100644
--- a/apps/beeai-ui/src/modules/tools/api/types.ts
+++ b/apps/beeai-ui/src/modules/tools/api/types.ts
@@ -14,6 +14,8 @@
* limitations under the License.
*/
-import { ListToolsRequest } from '@i-am-bee/acp-sdk/types.js';
+import { ListToolsRequest, Tool as SdkTool } from '@i-am-bee/acp-sdk/types.js';
export type ListToolsParams = ListToolsRequest['params'];
+
+export type Tool = SdkTool;
diff --git a/apps/beeai-ui/src/modules/tools/components/ToolIcon.module.scss b/apps/beeai-ui/src/modules/tools/components/ToolIcon.module.scss
new file mode 100644
index 00000000..ef9c1095
--- /dev/null
+++ b/apps/beeai-ui/src/modules/tools/components/ToolIcon.module.scss
@@ -0,0 +1,26 @@
+/**
+ * Copyright 2025 IBM Corp.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+.root {
+ inline-size: rem(24px);
+ block-size: rem(24px);
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ border-radius: 50%;
+ border: 1px solid $border-subtle-00;
+ flex-shrink: 0;
+}
diff --git a/apps/beeai-ui/src/modules/tools/components/ToolIcon.tsx b/apps/beeai-ui/src/modules/tools/components/ToolIcon.tsx
new file mode 100644
index 00000000..8d316dba
--- /dev/null
+++ b/apps/beeai-ui/src/modules/tools/components/ToolIcon.tsx
@@ -0,0 +1,40 @@
+/**
+ * Copyright 2025 IBM Corp.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import Wikipedia from '#svgs/Wikipedia.svg';
+import { IbmWatsonDiscovery, PartlyCloudy, Tools } from '@carbon/icons-react';
+import { Tool } from '../api/types';
+import classes from './ToolIcon.module.scss';
+
+interface Props {
+ name: Tool['name'];
+}
+
+export function ToolIcon({ name }: Props) {
+ const Icon = ICONS_MAP[name as keyof typeof ICONS_MAP] ?? Tools;
+
+ return (
+
+
+
+ );
+}
+
+const ICONS_MAP = {
+ search: IbmWatsonDiscovery,
+ wikipedia: Wikipedia,
+ weather: PartlyCloudy,
+};
diff --git a/apps/beeai-ui/src/modules/tools/components/ToolsView.tsx b/apps/beeai-ui/src/modules/tools/components/ToolName.tsx
similarity index 56%
rename from apps/beeai-ui/src/modules/tools/components/ToolsView.tsx
rename to apps/beeai-ui/src/modules/tools/components/ToolName.tsx
index a8153477..fc1c127c 100644
--- a/apps/beeai-ui/src/modules/tools/components/ToolsView.tsx
+++ b/apps/beeai-ui/src/modules/tools/components/ToolName.tsx
@@ -14,25 +14,18 @@
* limitations under the License.
*/
-import { useListTools } from '../api/queries/useListTools';
+import { Tool } from '../api/types';
-export const ToolsView = () => {
- const { data, isLoading, isSuccess } = useListTools();
+interface Props {
+ name: Tool['name'];
+}
- if (isLoading || !data || !isSuccess) {
- return
Loading...
;
- }
+export function ToolName({ name }: Props) {
+ return NAMES_MAP[name as keyof typeof NAMES_MAP] ?? name;
+}
- return (
- <>
-
Available Tools
-
- {data.tools.map((tool) => (
-
- {tool.name} - {tool.description}
-
- ))}
-
- >
- );
+const NAMES_MAP = {
+ search: 'Search',
+ wikipedia: 'Wikipedia',
+ weather: 'Weather',
};
diff --git a/apps/beeai-ui/src/styles/_theme.scss b/apps/beeai-ui/src/styles/_theme.scss
index bce4b361..beb18538 100644
--- a/apps/beeai-ui/src/styles/_theme.scss
+++ b/apps/beeai-ui/src/styles/_theme.scss
@@ -157,6 +157,7 @@ $border-radius: $spacing-03;
$box-shadow-color: var(--cds-box-shadow-color);
$box-shadow: 0px 2px 8px 0px $box-shadow-color;
+$button-primary: var(--cds-button-primary);
$button-tertiary: var(--cds-button-tertiary);
$button-tertiary-hover: var(--cds-button-tertiary-hover);
diff --git a/apps/beeai-ui/src/styles/components/_data-table.scss b/apps/beeai-ui/src/styles/components/_data-table.scss
index 987a26c7..a3c16fa7 100644
--- a/apps/beeai-ui/src/styles/components/_data-table.scss
+++ b/apps/beeai-ui/src/styles/components/_data-table.scss
@@ -64,3 +64,7 @@
}
}
}
+
+.cds--data-table-container.cds--skeleton {
+ padding-block-start: 0;
+}
diff --git a/apps/beeai-ui/src/styles/components/_index.scss b/apps/beeai-ui/src/styles/components/_index.scss
index c4e6b455..61b61a5f 100644
--- a/apps/beeai-ui/src/styles/components/_index.scss
+++ b/apps/beeai-ui/src/styles/components/_index.scss
@@ -90,7 +90,8 @@
// @forward '@carbon/styles/scss/components/tile';
// @forward '@carbon/styles/scss/components/time-picker';
// @forward '@carbon/styles/scss/components/toggletip';
-// @forward '@carbon/styles/scss/components/toggle';
+@forward '@carbon/styles/scss/components/toggle';
+@forward 'toggle';
// @forward '@carbon/styles/scss/components/tooltip';
// @forward '@carbon/styles/scss/components/treeview';
// @forward '@carbon/styles/scss/components/ui-shell';
diff --git a/apps/beeai-ui/src/styles/components/_input.scss b/apps/beeai-ui/src/styles/components/_input.scss
index 76949178..aca99609 100644
--- a/apps/beeai-ui/src/styles/components/_input.scss
+++ b/apps/beeai-ui/src/styles/components/_input.scss
@@ -19,7 +19,7 @@
.cds--text-area,
.cds--text-input {
border: 1px solid $border-subtle-00;
- border-radius: $spacing-03;
+ border-radius: $border-radius;
background-color: $layer;
&,
.cds--modal & {
diff --git a/apps/beeai-ui/src/styles/components/_toggle.scss b/apps/beeai-ui/src/styles/components/_toggle.scss
new file mode 100644
index 00000000..45f31a47
--- /dev/null
+++ b/apps/beeai-ui/src/styles/components/_toggle.scss
@@ -0,0 +1,33 @@
+/**
+ * Copyright 2025 IBM Corp.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+@use 'styles/common' as *;
+@use 'sass:math';
+
+.cds--toggle {
+ --cds-support-success: #{$text-primary};
+ --cds-icon-on-color: #{$text-inverse};
+ padding-block: 1px;
+}
+
+.cds--toggle__appearance {
+ vertical-align: top;
+}
+
+.cds--toggle__text {
+ line-height: math.div(16, 14);
+ min-inline-size: rem(20px);
+}
diff --git a/apps/beeai-ui/src/svgs/Wikipedia.svg b/apps/beeai-ui/src/svgs/Wikipedia.svg
new file mode 100644
index 00000000..16e6d809
--- /dev/null
+++ b/apps/beeai-ui/src/svgs/Wikipedia.svg
@@ -0,0 +1 @@
+
\ No newline at end of file