env extension api createTerminal api doesnt seem to wait enough for command activation, contributing to issues like: #640 (comment)
Code pointer:
|
const promise = new Promise<void>((resolve) => { |
|
const timer = setTimeout(() => { |
|
traceError(`Shell execution timed out: ${command}`); |
|
resolve(); |
|
}, 2000); |
It seems like we race 2 second, but this is simply not enough since realistic executeCommand for activation command will be 4~
We should wait longer (properly using shell integration timeout) so when we use createTerminal api for both file execution, and Python code execution, we can provide activated terminal before running either of those scenario for command activation type of users.