feat: preconfigure session sharing with GOOSE_BASE_URL_SHARE (#1885)
Co-authored-by: Lily Delalande <ldelalande@squareup.com>
This commit is contained in:
@@ -122,8 +122,18 @@ const generateSecretKey = () => {
|
||||
return key;
|
||||
};
|
||||
|
||||
const getSharingUrl = () => {
|
||||
// checks app env for sharing url
|
||||
loadShellEnv(app.isPackaged); // will try to take it from the zshrc file
|
||||
// if GOOSE_BASE_URL_SHARE is found, we will set process.env.GOOSE_BASE_URL_SHARE, otherwise we return what it is set
|
||||
// to in the env at bundle time
|
||||
return process.env.GOOSE_BASE_URL_SHARE;
|
||||
};
|
||||
|
||||
let [provider, model] = getGooseProvider();
|
||||
|
||||
let sharingUrl = getSharingUrl();
|
||||
|
||||
let appConfig = {
|
||||
GOOSE_PROVIDER: provider,
|
||||
GOOSE_MODEL: model,
|
||||
@@ -170,6 +180,7 @@ const createChat = async (
|
||||
GOOSE_PORT: port,
|
||||
GOOSE_WORKING_DIR: working_dir,
|
||||
REQUEST_DIR: dir,
|
||||
GOOSE_BASE_URL_SHARE: sharingUrl,
|
||||
botConfig: botConfig,
|
||||
}),
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user