diff --git a/core/context/mcp/MCPConnection.ts b/core/context/mcp/MCPConnection.ts index 9abea3e12..c05edcec7 100644 --- a/core/context/mcp/MCPConnection.ts +++ b/core/context/mcp/MCPConnection.ts @@ -139,7 +139,6 @@ class MCPConnection { this.transport = this.constructTransport(this.options); try { await this.client.connect(this.transport); - await this.client.close(); } catch (error) { // Allow the case where for whatever reason is already connected if ( diff --git a/gui/src/components/mainInput/TipTapEditor/components/ExpandableToolbarPreview.tsx b/gui/src/components/mainInput/TipTapEditor/components/ExpandableToolbarPreview.tsx index b7f3d724c..a5b89d0f4 100644 --- a/gui/src/components/mainInput/TipTapEditor/components/ExpandableToolbarPreview.tsx +++ b/gui/src/components/mainInput/TipTapEditor/components/ExpandableToolbarPreview.tsx @@ -134,7 +134,7 @@ export function ExpandableToolbarPreview(props: ExpandableToolbarPreviewProps) { useEffect(() => { const resizeObserver = new ResizeObserver(() => { - setContentDims(prevValue => ({ + setContentDims((prevValue) => ({ width: contentRef.current?.scrollWidth ?? prevValue.width, height: contentRef.current?.scrollHeight ?? prevValue.height, })); @@ -156,6 +156,7 @@ export function ExpandableToolbarPreview(props: ExpandableToolbarPreviewProps) { props.isSelected ? vscBadgeBackground : vscCommandCenterInactiveBorder } className="find-widget-skip !my-0" + contentEditable={false} >
- {hidden ? ( - - ) : ( - - )} + {!!props.children && + (hidden ? ( + + ) : ( + + ))} {props.onDelete && (
- {!hidden && ( + {!hidden && !!props.children && ( - + {!content ? null : ( + + )} ); diff --git a/gui/src/components/mainInput/TipTapEditor/extensions/Prompt/PromptBlockPreview.tsx b/gui/src/components/mainInput/TipTapEditor/extensions/Prompt/PromptBlockPreview.tsx index 8a1095d80..50db13fcd 100644 --- a/gui/src/components/mainInput/TipTapEditor/extensions/Prompt/PromptBlockPreview.tsx +++ b/gui/src/components/mainInput/TipTapEditor/extensions/Prompt/PromptBlockPreview.tsx @@ -42,9 +42,14 @@ export const PromptBlockPreview = ({ onDelete={handleDelete} onTitleClick={handleTitleClick} > -
- {item.content} -
+ {!item.content ? null : ( +
+ {item.content} +
+ )} ); diff --git a/gui/src/redux/slices/uiSlice.ts b/gui/src/redux/slices/uiSlice.ts index 2fb5f4759..4105d3319 100644 --- a/gui/src/redux/slices/uiSlice.ts +++ b/gui/src/redux/slices/uiSlice.ts @@ -1,6 +1,6 @@ import { createSlice, PayloadAction } from "@reduxjs/toolkit"; import { Tool } from "core"; -import { BuiltInToolNames } from "core/tools/builtIn"; +import { BUILT_IN_GROUP_NAME, BuiltInToolNames } from "core/tools/builtIn"; import { defaultOnboardingCardState, OnboardingCardState, @@ -58,7 +58,7 @@ export const uiSlice = createSlice({ [BuiltInToolNames.CreateRuleBlock]: "allowedWithPermission", }, toolGroupSettings: { - BUILT_IN_GROUP_NAME: "include", + [BUILT_IN_GROUP_NAME]: "include", }, } as UIState, reducers: {