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({
|
export const error = style({
|
||||||
color: cssVarV2('aI/errorText'),
|
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({
|
export const publicUserLabel = style({
|
||||||
fontSize: 'inherit',
|
fontSize: 'inherit',
|
||||||
display: 'flex',
|
display: 'inline-flex',
|
||||||
alignItems: 'center',
|
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);
|
fillTranscription(result.segments);
|
||||||
await fillSummary(result.summary);
|
await fillSummary(result.summary);
|
||||||
|
await fillActions(result.actions);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,4 +7,5 @@ export interface TranscriptionResult {
|
|||||||
end: string;
|
end: string;
|
||||||
transcription: string;
|
transcription: string;
|
||||||
}[];
|
}[];
|
||||||
|
actions?: string;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user