Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: suggestion 建议组件 #87

Merged
merged 16 commits into from
Sep 14, 2024
Merged

feat: suggestion 建议组件 #87

merged 16 commits into from
Sep 14, 2024

Conversation

ONLY-yours
Copy link
Contributor

@ONLY-yours ONLY-yours commented Aug 22, 2024

Summary by CodeRabbit

  • 新功能

    • 引入了多个新组件,包括“ThoughtChain”、“Sender”、“Prompts”、“Conversations”和“Bubble”,以增强用户交互和沟通功能。
    • 新增“建议”组件,支持上下文建议,提升用户输入体验。
  • 增强

    • 对“Bubble”组件进行了增强,支持方向性功能,并新增“Bubble.List”子组件以管理多个气泡。
    • “Sender”组件新增了可选的onKeyDown属性,增强了交互性。
  • 文档

    • 为“建议”组件添加了中英文双语文档,创建了全面使用指南,提高了开发者的可访问性。
  • 样式

    • 为“建议”组件引入了样式模块,以支持模块化和主题感知的设计方法。

Copy link

github-actions bot commented Aug 22, 2024

Preview failed

Copy link
Contributor

coderabbitai bot commented Aug 22, 2024

Walkthrough

Walkthrough

最近的更改引入了多个新组件和功能,特别是“建议”组件,旨在增强用户交互体验。这些更新包括在 JSON 文件中添加新键,创建新的 React 组件,以及更新现有接口和文档,以支持新功能的集成和使用。

Changes

文件 更改摘要
.dumi/preset/components-changelog-*.json 在现有 JSON 结构中添加了新键 "ThoughtChain""Bubble.List",允许包含新的组件数据。
components/index.ts 引入了新的导出 Suggestion 以及类型 SuggestionProps
components/theme/components.ts 更新了 ComponentTokenMap 接口以包括 SuggestionComponentToken
components/prompts/index.en-US.md 对 Prompts 组件的描述进行了小的语法修正。
components/suggestion/__tests__/*.test.ts 新增了多个测试文件,以增强对建议组件及其功能的测试覆盖。
components/suggestion/demo/*.tsx 新增了多个演示文件,展示如何使用建议组件。
components/suggestion/index.en-US.md 新增了关于建议组件的文档,详细说明了其用途和 API 属性。
components/suggestion/style/index.ts 引入了样式逻辑,定义了 SuggestionToken 接口和样式生成函数。

Sequence Diagram(s)

sequenceDiagram
    participant 用户
    participant SuggestionsComponent
    participant AutoComplete
    participant SuggestionsList

    用户->>SuggestionsComponent: 输入内容
    SuggestionsComponent->>AutoComplete: 触发建议
    AutoComplete->>SuggestionsList: 获取过滤后的建议
    SuggestionsList-->>AutoComplete: 返回建议
    AutoComplete-->>SuggestionsComponent: 显示建议
    用户->>SuggestionsList: 选择建议
    SuggestionsList-->>SuggestionsComponent: 确认选择
Loading

🐰 在绿野中,创意绽放,
建议跳入,驱散阴霾。
伴随舞动的文字与闪亮的选择,
一起构建,编织梦想!
🌼 让我们沿着这条光明的道路跳跃,
新功能萌芽,愉悦的喜悦!

Tip

OpenAI O1 model for chat
  • We have deployed OpenAI's latest O1 model for chat.
  • OpenAI claims that this model has superior reasoning capabilities than their GPT-4o model.
  • Please share any feedback with us in the discussions post.

Recent review details
Commits

Files that changed from the base of the PR and between 40efb49 and 239168d.

Files selected for processing (6)
  • components/suggestion/tests/index.test.tsx (1 hunks)
  • components/suggestion/demo/basic.tsx (1 hunks)
  • components/suggestion/demo/block.tsx (1 hunks)
  • components/suggestion/index.en-US.md (1 hunks)
  • components/suggestion/index.tsx (1 hunks)
  • components/suggestion/index.zh-CN.md (1 hunks)

Note

Summarized by CodeRabbit Free

Your organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login.

Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@ONLY-yours ONLY-yours changed the title 「WIP」:feat: suggestion 建议点 组件 「Draft」:feat: suggestion 建议点 组件 Aug 22, 2024
Copy link

cloudflare-workers-and-pages bot commented Aug 26, 2024

Deploying x with  Cloudflare Pages  Cloudflare Pages

Latest commit: 239168d
Status: ✅  Deploy successful!
Preview URL: https://167271b5.x-73x.pages.dev
Branch Preview URL: https://feat-suggestion.x-73x.pages.dev

View logs

@ONLY-yours ONLY-yours changed the title 「Draft」:feat: suggestion 建议点 组件 feat: suggestion 建议组件 Aug 27, 2024
components/suggestion/index.tsx Outdated Show resolved Hide resolved
components/suggestion/index.tsx Outdated Show resolved Hide resolved
components/suggestion/index.tsx Outdated Show resolved Hide resolved
components/suggestion/index.tsx Outdated Show resolved Hide resolved
components/index.ts Outdated Show resolved Hide resolved
Copy link

socket-security bot commented Sep 12, 2024

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@biomejs/[email protected] shell 0 152 kB dominionl
npm/@codesandbox/[email protected] eval, network Transitive: environment +23 73.1 MB alexnm, christianalfoni, compuives, ...1 more
npm/@types/[email protected] None 0 78.7 kB types
npm/@types/[email protected] None 0 2.2 MB types
npm/@types/[email protected] None 0 7.34 kB types
npm/[email protected] environment +29 8.24 MB arvinxx

🚮 Removed packages: npm/@biomejs/[email protected], npm/@codesandbox/[email protected], npm/@types/[email protected], npm/@types/[email protected], npm/@types/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected]

View full report↗︎

@zombieJ zombieJ merged commit 0c8dc8f into main Sep 14, 2024
9 checks passed
@zombieJ zombieJ deleted the feat/suggestion branch September 14, 2024 09:07
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.

3 participants