mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-31 05:39:28 +08:00
feat(core): selected context ui (#13379)
<img width="1133" height="982" alt="截屏2025-07-31 17 56 24" src="https://github.com/user-attachments/assets/5f2d577b-5b25-44ed-896a-17fe212de0f8" /> <img width="1151" height="643" alt="截屏2025-07-31 17 55 32" src="https://github.com/user-attachments/assets/b2320023-ab75-4455-9c24-d133fda1b7e1" /> > CLOSE AF-2771 AF-2772 AF-2778 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added support for sending detailed object information (JSON snapshot and markdown) to AI when using "Continue with AI", enhancing AI's context awareness. * Introduced a new chip type for selected context attachments in the AI chat interface, allowing users to manage and view detailed context fragments. * Added feature flags to enable or disable sending detailed context objects to AI and to require journal confirmation. * New settings and localization for the "Send detailed object information to AI" feature. * **Improvements** * Enhanced chat input and composer to handle context processing states and prevent sending messages while context is being processed. * Improved context management with batch addition and removal of context blobs. * **Bug Fixes** * Fixed UI rendering to properly display and manage new selected context chips. * **Documentation** * Updated localization and settings to reflect new experimental AI features. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -264,6 +264,23 @@ export const AFFINE_FLAGS = {
|
||||
configurable: isCanaryBuild,
|
||||
defaultState: false,
|
||||
},
|
||||
enable_two_step_journal_confirmation: {
|
||||
category: 'affine',
|
||||
displayName: 'Enable Two Step Journal Confirmation',
|
||||
description:
|
||||
'When enabled, you must confirm the journal before you can create a new journal.',
|
||||
configurable: isCanaryBuild,
|
||||
defaultState: isCanaryBuild,
|
||||
},
|
||||
enable_send_detailed_object_to_ai: {
|
||||
category: 'affine',
|
||||
displayName:
|
||||
'com.affine.settings.workspace.experimental-features.enable-ai-send-detailed-object.name',
|
||||
description:
|
||||
'com.affine.settings.workspace.experimental-features.enable-ai-send-detailed-object.description',
|
||||
configurable: true,
|
||||
defaultState: true,
|
||||
},
|
||||
} satisfies { [key in string]: FlagInfo };
|
||||
|
||||
// oxlint-disable-next-line no-redeclare
|
||||
|
||||
Reference in New Issue
Block a user