Merge pull request #5410 from continuedev/dallin/mcp-slash-fix
MCP Fixes
This commit is contained in:
commit
87dbcb4171
5 changed files with 24 additions and 16 deletions
|
|
@ -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 (
|
||||
|
|
|
|||
|
|
@ -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}
|
||||
>
|
||||
<div
|
||||
className="border-b-vsc-commandCenter-inactiveBorder m-0 flex cursor-pointer items-center justify-between break-all border-0 border-b-[1px] border-solid px-[5px] py-1.5 hover:opacity-90"
|
||||
|
|
@ -180,11 +181,12 @@ export function ExpandableToolbarPreview(props: ExpandableToolbarPreviewProps) {
|
|||
</div>
|
||||
<div className="flex items-center gap-1">
|
||||
<HeaderButtonWithToolTip text={hidden ? "Show" : "Hide"}>
|
||||
{hidden ? (
|
||||
<EyeIcon className="h-2.5 w-2.5" />
|
||||
) : (
|
||||
<EyeSlashIcon className="h-2.5 w-2.5" />
|
||||
)}
|
||||
{!!props.children &&
|
||||
(hidden ? (
|
||||
<EyeIcon className="h-2.5 w-2.5" />
|
||||
) : (
|
||||
<EyeSlashIcon className="h-2.5 w-2.5" />
|
||||
))}
|
||||
</HeaderButtonWithToolTip>
|
||||
{props.onDelete && (
|
||||
<HeaderButtonWithToolTip
|
||||
|
|
@ -200,7 +202,7 @@ export function ExpandableToolbarPreview(props: ExpandableToolbarPreviewProps) {
|
|||
</div>
|
||||
</div>
|
||||
|
||||
{!hidden && (
|
||||
{!hidden && !!props.children && (
|
||||
<ContentContainer expanded={isExpanded}>
|
||||
<ScrollableContent
|
||||
ref={contentRef}
|
||||
|
|
|
|||
|
|
@ -67,9 +67,11 @@ export const CodeBlockPreview = ({
|
|||
borderColor={selected ? vscBadgeBackground : undefined}
|
||||
onTitleClick={handleTitleClick}
|
||||
>
|
||||
<StyledMarkdownPreview
|
||||
source={`${fence}${getMarkdownLanguageTagForFile(item.name)} ${item.description}\n${content}\n${fence}`}
|
||||
/>
|
||||
{!content ? null : (
|
||||
<StyledMarkdownPreview
|
||||
source={`${fence}${getMarkdownLanguageTagForFile(item.name)} ${item.description}\n${content}\n${fence}`}
|
||||
/>
|
||||
)}
|
||||
</ExpandableToolbarPreview>
|
||||
</NodeViewWrapper>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -42,9 +42,14 @@ export const PromptBlockPreview = ({
|
|||
onDelete={handleDelete}
|
||||
onTitleClick={handleTitleClick}
|
||||
>
|
||||
<div className="whitespace-pre-wrap px-3 py-1 text-xs">
|
||||
{item.content}
|
||||
</div>
|
||||
{!item.content ? null : (
|
||||
<div
|
||||
className="whitespace-pre-wrap px-3 py-1 text-xs"
|
||||
contentEditable={false}
|
||||
>
|
||||
{item.content}
|
||||
</div>
|
||||
)}
|
||||
</ExpandableToolbarPreview>
|
||||
</NodeViewWrapper>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -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: {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue