Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ import {
SkillFilesAccessDeniedError,
type SkillFileNode,
} from "@/services/agentConfigService";
import { MarkdownRenderer } from "@/components/ui/markdownRenderer";
import { MarkdownRenderer } from "@/components/common/markdownRenderer";

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MarkdownRenderer@/components/ui/markdownRenderer 移动到 @/components/common/markdownRenderer 是一个重构,但如果有其他文件未更新导入路径,会导致构建失败。建议全局搜索 @/components/ui/markdownRenderer 确保所有导入都已更新。

import log from "@/lib/logger";

const { TextArea } = Input;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
fetchSkillFileContent,
SkillFilesAccessDeniedError,
} from "@/services/agentConfigService";
import { MarkdownRenderer } from "@/components/ui/markdownRenderer";
import { MarkdownRenderer } from "@/components/common/markdownRenderer";
import {
buildTreeData,
collectDirKeys,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ import {
message,
Tag,
Skeleton,
Tooltip
} from "antd";
import { Settings } from "lucide-react";
import { CloseOutlined } from "@ant-design/icons";

import { Skill, SkillParam } from "@/types/agentConfig";
import { KnowledgeBase } from "@/types/knowledgeBase";
import { Tooltip } from "@/components/ui/tooltip";
import { saveSkillInstance } from "@/services/agentConfigService";
import KnowledgeBaseSelectorModal from "@/components/tool-config/KnowledgeBaseSelectorModal";
import {
Expand Down
2 changes: 1 addition & 1 deletion frontend/app/[locale]/chat/components/chatAttachment.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
} from "@/services/storageService";
import { cn } from "@/lib/utils";
import { AttachmentItem, ChatAttachmentProps } from "@/types/chat";
import { FilePreviewDrawer } from "@/components/ui/filePreviewDrawer";
import { FilePreviewDrawer } from "@/components/common/filePreviewDrawer";
import { App } from "antd";

// Selected file state for preview drawer
Expand Down
7 changes: 3 additions & 4 deletions frontend/app/[locale]/chat/components/chatInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,9 @@ import {
} from "@ant-design/icons";

import { Input } from "@/components/ui/input";
import { Button } from "antd";
import { Tooltip } from "@/components/ui/tooltip";
import { Button, Tooltip } from "antd";
import { Textarea } from "@/components/ui/textarea";
import { FilePreviewDrawer } from "@/components/ui/filePreviewDrawer";
import { FilePreviewDrawer } from "@/components/common/filePreviewDrawer";
import { conversationService } from "@/services/conversationService";
import { useConfig } from "@/hooks/useConfig";
import { extractColorsFromUri } from "@/lib/avatar";
Expand All @@ -27,7 +26,7 @@ import { chatConfig } from "@/const/chatConfig";
import { FilePreview } from "@/types/chat";

import { ChatAgentSelector } from "./chatAgentSelector";
import { TokenUsageIndicator } from "@/components/ui/tokenUsageIndicator";
import { TokenUsageIndicator } from "@/components/common/tokenUsageIndicator";
import { TokenMetrics } from "@/types/chat";

// Get file extension
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
ThumbsUp,
} from "lucide-react";

import { MarkdownRenderer } from "@/components/ui/markdownRenderer";
import { MarkdownRenderer } from "@/components/common/markdownRenderer";

/**
* Convert custom code tags to standard markdown code fences
Expand All @@ -30,8 +30,7 @@ const convertToMarkdownCodeFences = (content: string): string => {
});
return content;
};
import { Button } from "antd";
import { Tooltip, TooltipProvider } from "@/components/ui/tooltip";
import { Button, Tooltip } from "antd";
import { ChatMessageType, MaxStepsInfo } from "@/types/chat";
import { chatConfig, Opinion } from "@/const/chatConfig";
import { conversationService } from "@/services/conversationService";
Expand Down Expand Up @@ -403,7 +402,7 @@ function ChatStreamFinalMessageInner({

{/* Tool button */}
<div className="flex items-center space-x-2 mt-1 justify-end">
<TooltipProvider>
<div>
{/* Copy button */}
<Tooltip
title={
Expand Down Expand Up @@ -487,7 +486,7 @@ function ChatStreamFinalMessageInner({
{ttsButtonContent.icon}
</Button>
</Tooltip>
</TooltipProvider>
</div>
</div>
</div>
)}
Expand Down
2 changes: 1 addition & 1 deletion frontend/app/[locale]/chat/streaming/taskWindow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {

import { ScrollArea } from "@/components/ui/scrollArea";
import { Button, message as antdMessage } from "antd";
import { MarkdownRenderer, CodeBlock } from "@/components/ui/markdownRenderer";
import { MarkdownRenderer, CodeBlock } from "@/components/common/markdownRenderer";
import { chatConfig } from "@/const/chatConfig";
import {
ChatMessageType,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import {
Glasses,
CircleOff,
} from "lucide-react";
import { MarkdownRenderer } from "@/components/ui/markdownRenderer";
import { FilePreviewDrawer } from "@/components/ui/filePreviewDrawer";
import { MarkdownRenderer } from "@/components/common/markdownRenderer";
import { FilePreviewDrawer } from "@/components/common/filePreviewDrawer";

import {
UI_CONFIG,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useTranslation } from "react-i18next";

import log from "@/lib/logger";

import { Button, Input, Select } from "antd";
import { Button, Input, Select, Tooltip } from "antd";
import {
SyncOutlined,
PlusOutlined,
Expand All @@ -19,7 +19,6 @@ import {
SquarePen,
CircleOff,
} from "lucide-react";
import { Tooltip } from "@/components/ui/tooltip";
import { Can } from "@/components/permission/Can";
import { useAuthorizationContext } from "@/components/providers/AuthorizationProvider";
import { useGroupList } from "@/hooks/group/useGroupList";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@

<Tabs
defaultActiveKey="users"
className="h-full flex flex-col"
className="h-full flex flex-col overflow-hidden [&_.ant-tabs-contentHolder]:flex-1 [&_.ant-tabs-contentHolder]:overflow-hidden asset-owner-tabs"
items={[
{
key: "users",
Expand Down Expand Up @@ -108,3 +108,17 @@
</div>
);
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

<style jsx global> 需要 Next.js 的 styled-jsx 插件支持。如果项目没有配置 styled-jsx(Next.js 13+ 默认不包含),这段 CSS 不会被编译,Tab 布局的 overflow 修复将不生效。建议改用 CSS Modules 或在 globals.css 中添加这些样式。

<style jsx global>{`
.asset-owner-tabs .ant-tabs-content {
width: 100%;
height: 100%;
}
.asset-owner-tabs .ant-tabs-tabpane {
height: 100%;
overflow: hidden;
}
.asset-owner-tabs .ant-tabs-nav {
flex-shrink: 0;
}
`}</style>

Check warning on line 124 in frontend/app/[locale]/tenant-resources/components/AssetOwnerResourcesComp.tsx

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Expected an assignment or function call and instead saw an expression.

See more on https://sonarcloud.io/project/issues?id=ModelEngine-Group_nexent&issues=AZ61ihkhwh17Ht6457X1&open=AZ61ihkhwh17Ht6457X1&pullRequest=3215
Loading
Loading