refac
This commit is contained in:
1 parent
5d4505c685
commit
35bc831077
3 files changed
+8
No files matched your search
@@ -1679,6 +1679,10 @@ export const renderVegaVisualization = async (spec: string, i18n?: any) => {
|
||||
};
|
||||
|
||||
export const getCodeBlockContents = (content: string): object => {
|
||||
// Strip thinking/reasoning and other detail blocks before extracting code
|
||||
// to prevent code inside <details type="reasoning"> from being treated as artifacts
|
||||
content = removeAllDetails(content);
|
||||
|
||||
const codeBlockContents = content.match(/```[\s\S]*?```/g);
|
||||
|
||||
let codeBlocks = [];
|
||||
|
||||
Reference in new issue
Block a user