mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 04:18:54 +00:00
feat(core): add actions to transcription block (#11896)
This commit is contained in:
@@ -30,9 +30,3 @@ export const notesButtonIcon = style({
|
||||
export const error = style({
|
||||
color: cssVarV2('aI/errorText'),
|
||||
});
|
||||
|
||||
export const publicUserLabel = style({
|
||||
fontSize: cssVar('fontXs'),
|
||||
fontWeight: 500,
|
||||
userSelect: 'none',
|
||||
});
|
||||
|
||||
@@ -2,7 +2,7 @@ import { style } from '@vanilla-extract/css';
|
||||
|
||||
export const publicUserLabel = style({
|
||||
fontSize: 'inherit',
|
||||
display: 'flex',
|
||||
display: 'inline-flex',
|
||||
alignItems: 'center',
|
||||
});
|
||||
|
||||
|
||||
@@ -242,7 +242,21 @@ export class AudioAttachmentBlock extends Entity<AttachmentBlockModel> {
|
||||
);
|
||||
};
|
||||
|
||||
const fillActions = async (actions: TranscriptionResult['actions']) => {
|
||||
if (!actions) {
|
||||
return;
|
||||
}
|
||||
const calloutId = addCalloutBlock('🎯', 'Todo');
|
||||
await insertFromMarkdown(
|
||||
undefined,
|
||||
actions ?? '',
|
||||
this.props.doc,
|
||||
calloutId,
|
||||
1
|
||||
);
|
||||
};
|
||||
fillTranscription(result.segments);
|
||||
await fillSummary(result.summary);
|
||||
await fillActions(result.actions);
|
||||
};
|
||||
}
|
||||
|
||||
@@ -7,4 +7,5 @@ export interface TranscriptionResult {
|
||||
end: string;
|
||||
transcription: string;
|
||||
}[];
|
||||
actions?: string;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user