Skip to content

Commit

Permalink
fix: ai ppt preview with toolbar widget
Browse files Browse the repository at this point in the history
  • Loading branch information
akumatus committed Nov 21, 2024
1 parent c408d73 commit 309ca9c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down

0 comments on commit 309ca9c

Please sign in to comment.