fix rules section border

This commit is contained in:
Dallin Romney 2025-06-02 11:58:52 -07:00
parent ceb2e52560
commit f5a06b158f

View file

@ -6,13 +6,12 @@ import {
} from "@heroicons/react/24/outline";
import { RuleWithSource } from "core";
import {
DEFAULT_AGENT_SYSTEM_MESSAGE,
DEFAULT_AGENT_SYSTEM_MESSAGE_URL,
DEFAULT_CHAT_SYSTEM_MESSAGE,
DEFAULT_CHAT_SYSTEM_MESSAGE_URL,
DEFAULT_AGENT_SYSTEM_MESSAGE,
DEFAULT_AGENT_SYSTEM_MESSAGE_URL
} from "core/llm/constructMessages";
import { useContext, useMemo } from "react";
import { defaultBorderRadius, vscCommandCenterActiveBorder } from "../../..";
import { useAuth } from "../../../../context/Auth";
import { IdeMessengerContext } from "../../../../context/IdeMessenger";
import { useAppDispatch, useAppSelector } from "../../../../redux/hooks";
@ -91,13 +90,7 @@ const RuleCard: React.FC<RuleCardProps> = ({ rule }) => {
const smallFont = useFontSize(-2);
const tinyFont = useFontSize(-3);
return (
<div
style={{
borderRadius: defaultBorderRadius,
border: `1px solid ${vscCommandCenterActiveBorder}`,
}}
className="flex flex-col px-2 py-1.5 transition-colors"
>
<div className="border-border flex flex-col rounded-sm px-2 py-1.5 transition-colors">
<div className="flex flex-col">
<div className="flex flex-row justify-between gap-1">
<span
@ -112,7 +105,8 @@ const RuleCard: React.FC<RuleCardProps> = ({ rule }) => {
<HeaderButtonWithToolTip onClick={onClickExpand} text="Expand">
<ArrowsPointingOutIcon className="h-3 w-3 text-gray-400" />
</HeaderButtonWithToolTip>{" "}
{rule.source === "default-chat" || rule.source === "default-agent" ? (
{rule.source === "default-chat" ||
rule.source === "default-agent" ? (
<HeaderButtonWithToolTip onClick={handleOpen} text="View">
<EyeIcon className="h-3 w-3 text-gray-400" />
</HeaderButtonWithToolTip>
@ -195,24 +189,24 @@ export function RulesSection() {
rules.unshift({
rule: config.selectedModelByRole.chat?.baseAgentSystemMessage,
source: "model-agent-options",
})
});
} else {
rules.unshift({
rule: DEFAULT_AGENT_SYSTEM_MESSAGE,
source: "default-agent",
})
});
}
} else {
if (config.selectedModelByRole.chat?.baseChatSystemMessage) {
rules.unshift({
rule: config.selectedModelByRole.chat?.baseChatSystemMessage,
source: "model-chat-options",
})
});
} else {
rules.unshift({
rule: DEFAULT_CHAT_SYSTEM_MESSAGE,
source: "default-chat",
})
});
}
}