File tree Expand file tree Collapse file tree 3 files changed +8
-3
lines changed Expand file tree Collapse file tree 3 files changed +8
-3
lines changed Original file line number Diff line number Diff line change 33 "displayName" : " lowcode" ,
44 "description" : " lowcode tool, support ChatGPT and other LLM" ,
55 "author" :
" wjkang <[email protected] >" ,
6- "version" : " 1.8.1 " ,
6+ "version" : " 1.8.2 " ,
77 "icon" : " asset/icon.png" ,
88 "publisher" : " wjkang" ,
99 "repository" : " https://github.com/lowcoding/lowcode-vscode" ,
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ import { getOutputChannel } from './outputChannel';
1919import { getLastActiveTextEditor } from '../context' ;
2020import { getSyncFolder } from './config' ;
2121import { createChatCompletionForScript } from './llm' ;
22+ import { resetMaterialName } from './name' ;
2223
2324export const genCodeByBlock = async ( data : {
2425 material : string ;
@@ -36,7 +37,7 @@ export const genCodeByBlock = async (data: {
3637 data . privateMaterials
3738 ? getPrivateBlockMaterialsPath ( )
3839 : blockMaterialsPath ,
39- data . material ,
40+ resetMaterialName ( data . material ) ,
4041 ) ;
4142 const schemaFile = path . join ( block , 'config/schema.json' ) ;
4243 const schama = fs . readJSONSync ( schemaFile ) ;
@@ -161,7 +162,7 @@ export const genCodeBySnippet = async (data: {
161162 data . privateMaterials
162163 ? getPrivateSnippetMaterialsPath ( )
163164 : snippetMaterialsPath ,
164- data . name ,
165+ resetMaterialName ( data . name ) ,
165166 ) ;
166167 const scriptFile = path . join ( snippetPath , 'script/index.js' ) ;
167168 const hook = {
Original file line number Diff line number Diff line change 1+ export const resetMaterialName = ( name : string ) => {
2+ const arrayStr = name . split ( '] ' ) ;
3+ return arrayStr [ 1 ] || name ;
4+ } ;
You can’t perform that action at this time.
0 commit comments