mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-17 01:56:27 +08:00
fix: ai ppt preview with toolbar widget (#8882)
Fix issue [AF-1716](https://linear.app/affine-design/issue/AF-1716).
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { BlockStdScope, type EditorHost } from '@blocksuite/affine/block-std';
|
||||
import {
|
||||
type AffineAIPanelWidgetConfig,
|
||||
EdgelessEditorBlockSpecs,
|
||||
SpecProvider,
|
||||
} from '@blocksuite/affine/blocks';
|
||||
import { AffineSchemas } from '@blocksuite/affine/blocks/schemas';
|
||||
import { WithDisposable } from '@blocksuite/affine/global/utils';
|
||||
@@ -208,7 +208,8 @@ export class AISlidesRenderer extends WithDisposable(LitElement) {
|
||||
>
|
||||
${new BlockStdScope({
|
||||
doc: this._doc,
|
||||
extensions: EdgelessEditorBlockSpecs,
|
||||
extensions:
|
||||
SpecProvider.getInstance().getSpec('edgeless:preview').value,
|
||||
}).render()}
|
||||
</div>
|
||||
<div class="mask"></div>
|
||||
|
||||
+2
-1
@@ -438,12 +438,13 @@ Could you make a new website based on these notes and send back just the html fi
|
||||
const url = new URL(getBaseUrl() + '/api/copilot/unsplash/photos');
|
||||
url.searchParams.set('query', options.query);
|
||||
const result: {
|
||||
results: {
|
||||
results?: {
|
||||
urls: {
|
||||
regular: string;
|
||||
};
|
||||
}[];
|
||||
} = await fetch(url.toString()).then(res => res.json());
|
||||
if (!result.results) return [];
|
||||
return result.results.map(r => {
|
||||
const url = new URL(r.urls.regular);
|
||||
url.searchParams.set('fit', 'crop');
|
||||
|
||||
Reference in New Issue
Block a user