Skip to content

Commit b3471fe

Browse files
authored
Merge pull request #3 from square/session_context
Session context
2 parents 8a92f88 + f92c636 commit b3471fe

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/extension.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ export function activate(context: vscode.ExtensionContext) {
1616
execSync('goose');
1717
} catch (error) {
1818
const installUrl = 'https://github.com/square/goose-vscode';
19-
vscode.window.showErrorMessage('Goose CLI is required to be installed', { modal: true }, 'Install').then(selection => {
19+
vscode.window.showErrorMessage('goose is required to be installed', { modal: true }, 'Install').then(selection => {
2020
if (selection === 'Install') {
2121
vscode.env.openExternal(vscode.Uri.parse(installUrl));
2222
}
2323
});
2424
return; // Exit activation if goose is not installed
2525
}
2626

27-
vscode.window.showInformationMessage('goose agent starting - this may take a minute.. 🕐');
27+
vscode.window.showInformationMessage('goose agent starting, this may take a minute.. 🕐');
2828

2929

3030
const updateOpenFiles = () => {
@@ -35,7 +35,7 @@ export function activate(context: vscode.ExtensionContext) {
3535
fs.writeFileSync(tempFilePathDirty, unsavedChanges, 'utf-8');
3636
};
3737

38-
const initialPrompt = `Please take a look in the current directory to orient yourself for the type of project this is. You are operating inside VSCode, if you need to know what files are open, please look in ${tempFilePath}, which will be updated with whatever the user has open in VSCode, also ${tempFilePathDirty} has a list of files which are not saved, so check with the user if you need to edit one of those files. Provide a brief summary of things with a welcome message, but be brief. No need to open each file yet.`;
38+
const initialPrompt = `Starting up in a new context: you are now running inside vs code, please list files/dirs and look around for directories which may be source code, if there is a .goosehint file read it, can also look at README file for hints on how to navigate the project in this dir. Following is a list of files currently open being edited (updated dynamically you can read when needed): ${tempFilePath} which may be relevant, and following is a list of files which have unsaved changes (be careful to not over write): ${tempFilePathDirty}. Present a short welcome messsage when ready for instruction.`;
3939

4040
// Subscribe to events to update the temp file when open files change
4141
vscode.workspace.onDidOpenTextDocument(updateOpenFiles, null, context.subscriptions);
@@ -46,7 +46,7 @@ export function activate(context: vscode.ExtensionContext) {
4646
name: terminalName,
4747
location: { viewColumn: vscode.ViewColumn.Beside }
4848
});
49-
gooseTerminal.sendText('goose session start');
49+
gooseTerminal.sendText('goose session resume');
5050

5151
setTimeout(() => {
5252
gooseTerminal?.sendText('\n');

0 commit comments

Comments
 (0)