refactor: remove redundant comments and docstrings (#6527)

* refactor: remove redundant comments and docstrings

* fix(signal): annotate async context manager as a generator
This commit is contained in:
chengyongru authored and GitHub committed 2026-10-30 13:07:03 +08:00
1 parent cb3ba45317
commit a4d2430140
922 files changed
+406 -7738

No files matched your search

-11
View File
@@ -46,13 +46,11 @@ import type {
interface MessageBubbleProps {
message: UIMessage;
/** Give temporary-chat user turns the dashed private-mode treatment. */
temporary?: boolean;
cliApps?: CliAppInfo[];
mcpPresets?: McpPresetInfo[];
slashCommands?: SlashCommand[];
onOpenFilePreview?: (path: string) => void;
/** Context-menu trigger positioned against this message's visual block. */
contextMenu?: ReactNode;
}
@@ -116,7 +114,6 @@ function messageCopyContent(message: UIMessage, t: (key: string) => string) {
: message.content;
}
/** The same copy behavior in the desktop menu and the mobile reply footer. */
export function MessageCopyButton({ message, className }: { message: UIMessage; className?: string }) {
const { t } = useTranslation();
const content = messageCopyContent(message, t);
@@ -151,7 +148,6 @@ interface MessageBlockMenuActionsProps {
sheet?: boolean;
}
/** Actions and metadata shown after opening a visual message block's context panel. */
export function MessageBlockMenuActions({
message,
isTurnStreaming = false,
@@ -405,7 +401,6 @@ function IncomingSessionMessage({
);
}
/** Render user turns as compact bubbles and assistant turns as document-like prose. */
export function MessageBubble({
message,
temporary = false,
@@ -706,7 +701,6 @@ function MessageMedia({
);
}
/** Quiet pre-token state that occupies a stable line in the answer column. */
function ThinkingState() {
const { t } = useTranslation();
return (
@@ -748,11 +742,6 @@ interface TraceGroupProps {
message: UIMessage;
}
/**
* Collapsible group of tool-call / progress breadcrumbs. Defaults to
* collapsed because tool traces are supporting evidence, not the answer.
* A single click expands the exact calls when the user wants details.
*/
function TraceGroup({ message }: TraceGroupProps) {
const { t } = useTranslation();
const lines = message.traces ?? [message.content];