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 3
3
"displayName" : " lowcode" ,
4
4
"description" : " lowcode tool, support ChatGPT and other LLM" ,
5
5
"author" : " wjkang <ruoxieme@gmail.com>" ,
6
- "version" : " 1.8.1 " ,
6
+ "version" : " 1.8.2 " ,
7
7
"icon" : " asset/icon.png" ,
8
8
"publisher" : " wjkang" ,
9
9
"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';
19
19
import { getLastActiveTextEditor } from '../context' ;
20
20
import { getSyncFolder } from './config' ;
21
21
import { createChatCompletionForScript } from './llm' ;
22
+ import { resetMaterialName } from './name' ;
22
23
23
24
export const genCodeByBlock = async ( data : {
24
25
material : string ;
@@ -36,7 +37,7 @@ export const genCodeByBlock = async (data: {
36
37
data . privateMaterials
37
38
? getPrivateBlockMaterialsPath ( )
38
39
: blockMaterialsPath ,
39
- data . material ,
40
+ resetMaterialName ( data . material ) ,
40
41
) ;
41
42
const schemaFile = path . join ( block , 'config/schema.json' ) ;
42
43
const schama = fs . readJSONSync ( schemaFile ) ;
@@ -161,7 +162,7 @@ export const genCodeBySnippet = async (data: {
161
162
data . privateMaterials
162
163
? getPrivateSnippetMaterialsPath ( )
163
164
: snippetMaterialsPath ,
164
- data . name ,
165
+ resetMaterialName ( data . name ) ,
165
166
) ;
166
167
const scriptFile = path . join ( snippetPath , 'script/index.js' ) ;
167
168
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