Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: ai ppt preview with toolbar widget #8882

Merged
merged 1 commit into from
Nov 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading