mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-19 09:33:53 +00:00
sandbox setting and argument (#243)
This commit is contained in:
@@ -21,18 +21,15 @@ const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = dirname(__filename);
|
||||
|
||||
async function main() {
|
||||
const config = await loadCliConfig();
|
||||
const settings = loadSettings(config);
|
||||
const theme = settings.getMerged().theme;
|
||||
if (theme) {
|
||||
themeManager.setActiveTheme(theme);
|
||||
const settings = loadSettings(process.cwd());
|
||||
const config = await loadCliConfig(settings.merged);
|
||||
if (settings.merged.theme) {
|
||||
themeManager.setActiveTheme(settings.merged.theme);
|
||||
}
|
||||
|
||||
let input = config.getQuestion();
|
||||
|
||||
// hop into sandbox if we are outside and sandboxing is enabled
|
||||
if (!process.env.SANDBOX) {
|
||||
const sandbox = sandbox_command();
|
||||
const sandbox = sandbox_command(config.getSandbox());
|
||||
if (sandbox) {
|
||||
console.log('hopping into sandbox ...');
|
||||
await start_sandbox(sandbox);
|
||||
@@ -40,6 +37,8 @@ async function main() {
|
||||
}
|
||||
}
|
||||
|
||||
let input = config.getQuestion();
|
||||
|
||||
// Render UI, passing necessary config values. Check that there is no command line question.
|
||||
if (process.stdin.isTTY && input?.length === 0) {
|
||||
const readUpResult = await readPackageUp({ cwd: __dirname });
|
||||
|
||||
Reference in New Issue
Block a user