fix(core): slash ask ai returns make it real action result (#10349)

Fix issue [AF-2252](https://linear.app/affine-design/issue/AF-2252).

## What Changed?
- Remove useless `generateAnswer` configuration for inline ask ai
- Refactor the common `updateAIPanelConfig` function
- Use empty string instead of meaningless `placeholder` string
- Remove unnecessary high-order function wrappers
This commit is contained in:
akumatus
2025-02-21 12:52:53 +00:00
parent 55651503df
commit 07cbf5affe
4 changed files with 75 additions and 112 deletions

View File

@@ -278,7 +278,7 @@ export class AffineAIPanelWidget extends WidgetComponent {
input?: string,
shouldTriggerCallback?: boolean
) => {
if (input) {
if (typeof input === 'string') {
this._inputText = input;
this.generate();
} else {