feat(core): mark reasoning summary as markdown callout (#12176)

Close [AI-75](https://linear.app/affine-design/issue/AI-75)

![截屏2025-05-07 17.40.32.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/sJGviKxfE3Ap685cl5bj/e5e7cf4c-0f80-41de-bb22-79a25fdfef48.png)

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

- **New Features**
  - Improved formatting for AI-generated reasoning and web search results, displaying them as callout blocks for enhanced readability.
  - Expanded support for rendering callout blocks in the text renderer.

- **Style**
  - Adjusted layout to ensure callout blocks retain appropriate spacing and appearance.

- **Refactor**
  - Simplified and unified the integration of web search tools for AI providers.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
akumatus
2025-05-08 03:42:21 +00:00
parent 5d2b3e9c4b
commit f8fada0b10
4 changed files with 98 additions and 53 deletions

View File

@@ -124,8 +124,8 @@ export class TextRenderer extends WithDisposable(ShadowlessElement) {
.ai-answer-text-editor {
.affine-note-block-container {
> .affine-block-children-container {
> :first-child,
> :first-child * {
> :first-child:not(affine-callout),
> :first-child:not(affine-callout) * {
margin-top: 0 !important;
}
> :last-child,
@@ -225,6 +225,7 @@ export class TextRenderer extends WithDisposable(ShadowlessElement) {
'affine:table',
'affine:surface',
'affine:paragraph',
'affine:callout',
'affine:code',
'affine:list',
'affine:divider',