mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-04-28 11:41:04 +00:00
feat(core): refactor shell execution to use node-pty (#6491)
Co-authored-by: Jacob Richman <jacob314@gmail.com>
This commit is contained in:
parent
0cc2a1e7ef
commit
f1575f6d8d
17 changed files with 1064 additions and 328 deletions
|
|
@ -202,6 +202,7 @@ export interface ConfigParameters {
|
|||
chatCompression?: ChatCompressionSettings;
|
||||
interactive?: boolean;
|
||||
trustedFolder?: boolean;
|
||||
shouldUseNodePtyShell?: boolean;
|
||||
}
|
||||
|
||||
export class Config {
|
||||
|
|
@ -267,6 +268,7 @@ export class Config {
|
|||
private readonly chatCompression: ChatCompressionSettings | undefined;
|
||||
private readonly interactive: boolean;
|
||||
private readonly trustedFolder: boolean | undefined;
|
||||
private readonly shouldUseNodePtyShell: boolean;
|
||||
private initialized: boolean = false;
|
||||
|
||||
constructor(params: ConfigParameters) {
|
||||
|
|
@ -334,6 +336,7 @@ export class Config {
|
|||
this.chatCompression = params.chatCompression;
|
||||
this.interactive = params.interactive ?? false;
|
||||
this.trustedFolder = params.trustedFolder;
|
||||
this.shouldUseNodePtyShell = params.shouldUseNodePtyShell ?? false;
|
||||
|
||||
if (params.contextFileName) {
|
||||
setGeminiMdFilename(params.contextFileName);
|
||||
|
|
@ -728,6 +731,10 @@ export class Config {
|
|||
return this.interactive;
|
||||
}
|
||||
|
||||
getShouldUseNodePtyShell(): boolean {
|
||||
return this.shouldUseNodePtyShell;
|
||||
}
|
||||
|
||||
async getGitService(): Promise<GitService> {
|
||||
if (!this.gitService) {
|
||||
this.gitService = new GitService(this.targetDir);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue