Skip to content

Conversation

YyumeiZhang
Copy link
Collaborator

中文模板 / Chinese Template

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Test Case
  • TypeScript definition update
  • Document improve
  • CI/CD improve
  • Branch sync
  • Other, please describe:

PR description

Fixes #

Changelog

🇨🇳 Chinese

  • Feat: 新增加 AIChatInput 组件

🇺🇸 English

  • Feat: Newly added AIChatInput component

Checklist

  • Test or no need
  • Document or no need
  • Changelog or no need

Other

  • Skip Changelog

Additional information

onMessageSend?: (props: MessageContent) => void;
onStopGenerate?: () => void;
uploadTipProps?: TooltipProps;
isGenerating: boolean;
Copy link
Collaborator

Choose a reason for hiding this comment

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

api 规范中强调了不需要用 isXXX 命名布尔属性,直接以效果命名即可,如 visible、multiple

@@ -0,0 +1,146 @@
// Colors
$color-ai-chat-input-border: var(--semi-color-border); // AI Chat 输入框的边框颜色
Copy link
Collaborator

Choose a reason for hiding this comment

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

参考之前的组件和规范说明,这里命名应该为 $color-aiChatInput-border 比较合适,如 autoComplete 的 variables 的命名$color-autoComplete_option_keyword-text

$color-ai-chat-input_references-text: var(--semi-color-text-2); // AI Chat 输入框引用项的文本颜色
$color-ai-chat-input_reference-bg: var(--semi-color-fill-0); // AI Chat 输入框引用项的背景色
$color-ai-chat-input_footer_send-bg: var(--semi-color-primary); // AI Chat 输入框底部发送按钮的背景颜色
$color-ai-chat-input_footer_send-text: rgba(var(--semi-white), 1); // AI Chat 输入框底部发送按钮的内容颜色
Copy link
Collaborator

Choose a reason for hiding this comment

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

多数基础态未加 -default,建议统一补齐。比如 $color-ai-chat-input_footer_send-bg 存在 hover active 等状态,默认的状态应该加上 default 关键字

$spacing-ai-chat-input_attachment_content_size-columnGap: 4px; // AI Chat 输入框附件项类型和大小的间距
$spacing-ai-chat-input_attachment_scroll_wrapper-marginBottom: 8px; // AI Chat 输入框附件项滚动区域的底部外边距
$spacing-ai-chat-input_attachment_scroll_container: 8px; // AI Chat 输入框附件项滚动区域的内间距
$spacing-ai-chat-input_attachment_scroll_button-x: 10px; // AI Chat 输入框附件项滚动按钮的和滚动区域的水平距离
Copy link
Collaborator

Choose a reason for hiding this comment

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

应该以具体 CSS 属性 camelCase 结尾(如 -paddingX、-marginRight、-top…),不应以抽象名或 -x 结尾

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants