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(core): support chat panel chips and suggest current doc for embedding #9747

Merged
merged 1 commit into from
Jan 18, 2025

Conversation

akumatus
Copy link
Member

@akumatus akumatus commented Jan 17, 2025

Support issue BS-2347.

What Changed?

  • Add chat panel components
    • chat-panel-chips
    • chat-panel-doc-chip
    • chat-panel-file-chip
    • chat-panel-chip
  • Add chips and docs field in ChatContextValue
  • Add extractMarkdownFromDoc function to extract markdown content of a doc
  • Add e2e test

Click a candidate card to add it into AI chat context:

🎥 Video uploaded on Graphite:

@github-actions github-actions bot added test Related to test cases app:core labels Jan 17, 2025
Copy link
Member Author


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

Copy link

codecov bot commented Jan 17, 2025

Codecov Report

Attention: Patch coverage is 0% with 34 lines in your changes missing coverage. Please review.

Project coverage is 53.25%. Comparing base (59611fa) to head (d048ac6).
Report is 1 commits behind head on canary.

Files with missing lines Patch % Lines
...nd/core/src/blocksuite/presets/ai/utils/extract.ts 0.00% 25 Missing ⚠️
...core/src/blocksuite/presets/ai/chat-panel/index.ts 0.00% 6 Missing ⚠️
...ocksuite/presets/ai/chat-panel/chat-panel-input.ts 0.00% 3 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           canary    #9747    +/-   ##
========================================
  Coverage   53.25%   53.25%            
========================================
  Files        2194     2194            
  Lines       98764    98790    +26     
  Branches    16743    16746     +3     
========================================
+ Hits        52592    52612    +20     
+ Misses      44385    44267   -118     
- Partials     1787     1911   +124     
Flag Coverage Δ
server-test 78.52% <ø> (+0.05%) ⬆️
unittest 32.07% <0.00%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@akumatus akumatus force-pushed the feat/support-candidate-chip branch 2 times, most recently from 4c882ca to 096ec6c Compare January 17, 2025 07:27
@akumatus akumatus marked this pull request as ready for review January 17, 2025 07:27
@graphite-app graphite-app bot requested review from a team January 17, 2025 07:27
@akumatus akumatus requested review from darkskygit, donteatfriedrice, L-Sun, pengx17 and a team and removed request for a team January 17, 2025 07:31
@akumatus akumatus force-pushed the feat/support-candidate-chip branch 2 times, most recently from 8f8e8a3 to a388141 Compare January 17, 2025 08:44
@akumatus akumatus requested review from a team and removed request for L-Sun and pengx17 January 17, 2025 10:20
@akumatus akumatus changed the title feat: support chat panel chips and suggest current doc for embedding feat(core): support chat panel chips and suggest current doc for embedding Jan 17, 2025
@akumatus akumatus force-pushed the feat/support-candidate-chip branch from a388141 to b06c054 Compare January 18, 2025 08:15
Copy link

graphite-app bot commented Jan 18, 2025

Merge activity

…dding (#9747)

Support issue [BS-2347](https://linear.app/affine-design/issue/BS-2347).

## What Changed?
- Add chat panel components
  - `chat-panel-chips`
  - `chat-panel-doc-chip`
  - `chat-panel-file-chip`
  - `chat-panel-chip`
- Add `chips` and `docs` field in `ChatContextValue`
- Add `extractMarkdownFromDoc` function to extract markdown content of a doc
- Add e2e test

Click a candidate card to add it into AI chat context:
<div class='graphite__hidden'>
          <div>🎥 Video uploaded on Graphite:</div>
            <a href="https://app.graphite.dev/media/video/sJGviKxfE3Ap685cl5bj/4e6b11ef-f993-4e6a-9f40-b2826af1990c.mov">
              <img src="https://app.graphite.dev/api/v1/graphite/video/thumbnail/sJGviKxfE3Ap685cl5bj/4e6b11ef-f993-4e6a-9f40-b2826af1990c.mov">
            </a>
          </div>
<video src="https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/sJGviKxfE3Ap685cl5bj/4e6b11ef-f993-4e6a-9f40-b2826af1990c.mov">录屏2025-01-17 01.02.04.mov</video>
@akumatus akumatus force-pushed the feat/support-candidate-chip branch from b06c054 to d048ac6 Compare January 18, 2025 08:35
@graphite-app graphite-app bot merged commit d048ac6 into canary Jan 18, 2025
61 checks passed
@graphite-app graphite-app bot deleted the feat/support-candidate-chip branch January 18, 2025 08:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
app:core test Related to test cases
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants