File tree Expand file tree Collapse file tree 3 files changed +8
-1
lines changed Expand file tree Collapse file tree 3 files changed +8
-1
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.7.8 " ,
6+ "version" : " 1.7.9 " ,
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 @@ -4,11 +4,13 @@ import { createChatCompletion as openaiCreateChatCompletion } from './openai';
44import { emitter } from './emitter' ;
55import { getSyncFolder } from './config' ;
66import { showChatGPTView } from '../webview' ;
7+ import { getEnv } from './vscodeEnv' ;
78
89const LLMScript : {
910 createChatCompletion ?: ( options : {
1011 messages : { role : 'system' | 'user' | 'assistant' ; content : string } [ ] ;
1112 handleChunk ?: ( data : { text ?: string } ) => void ;
13+ lowcodeContext : object ;
1214 } ) => Promise < string > ;
1315} = { } ;
1416
@@ -38,6 +40,9 @@ export const createChatCompletion = async (options: {
3840 emitter . emit ( 'chatGPTChunck' , data ) ;
3941 }
4042 } ,
43+ lowcodeContext : {
44+ env : getEnv ( ) ,
45+ } ,
4146 } ) ;
4247 emitter . emit ( 'chatGPTComplete' , res ) ;
4348 return res ;
Original file line number Diff line number Diff line change 11import * as path from 'path' ;
22import { workspace } from 'vscode' ;
33import { getSyncFolder } from './config' ;
4+ import { getExtensionContext } from '../context' ;
45
56export const rootPath = path . join ( workspace . rootPath || '' ) ;
67
@@ -39,6 +40,7 @@ export const getEnv = () => ({
3940 blockMaterialsPath,
4041 snippetMaterialsPath,
4142 privateMaterialsPath : getSyncFolder ( ) ,
43+ extensionContext : getExtensionContext ( ) ,
4244} ) ;
4345
4446export const checkRootPath = ( ) => {
You can’t perform that action at this time.
0 commit comments