microsoft / TypeChat

TypeChat is a library that makes it easy to build natural language interfaces using types.
https://microsoft.github.io/TypeChat/
MIT License
8.06k stars 378 forks source link

Specify `override` for every TS dotenv call. #211

Closed DanielRosenwasser closed 3 months ago

DanielRosenwasser commented 3 months ago

Fixes issues if (for some reason) environment variables are already specified.

DanielRosenwasser commented 3 months ago

@jakebailey mentions this may not be desirable since users should be able to declare an environment variable before running the program. On the other hand, I wonder how many people do that with a different key?

jakebailey commented 3 months ago

My shell is configured (I think a default in zsh, or maybe just oh-my-zsh?) to not store any command that starts with a space into history, so I can run command with secrets in my terminal without putting them anywhere and that's pretty useful.

PowerShell can do it to with this in profile.ps1:

Set-PSReadLineOption -AddToHistoryHandler {
    param($command)
    if ($command -like ' *') {
        return $false
    }
    return $true
} 

Of course, these are just examples. Not really sure how we are expecting them to be run.

DanielRosenwasser commented 3 months ago

Looks like I needed this because of https://github.com/microsoft/vscode-python/issues/23078