feat(core): add actions to transcription block (#11896)

This commit is contained in:
pengx17
2025-04-22 14:06:12 +00:00
parent 25d17af0ed
commit c17c335f9b
4 changed files with 16 additions and 7 deletions

View File

@@ -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',
});

View File

@@ -2,7 +2,7 @@ import { style } from '@vanilla-extract/css';
export const publicUserLabel = style({
fontSize: 'inherit',
display: 'flex',
display: 'inline-flex',
alignItems: 'center',
});

View File

@@ -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);
};
}

View File

@@ -7,4 +7,5 @@ export interface TranscriptionResult {
end: string;
transcription: string;
}[];
actions?: string;
}