feat: preconfigure session sharing with GOOSE_BASE_URL_SHARE (#1885)

Co-authored-by: Lily Delalande <ldelalande@squareup.com>
This commit is contained in:
Salman Mohammed
2025-03-28 18:52:21 -04:00
committed by GitHub
parent 165310bc72
commit 5c605c92e0
2 changed files with 76 additions and 44 deletions
+11
View File
@@ -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,
}),
],