Skip to content

Gemini session resume#810

Open
Harsh9485 wants to merge 7 commits intocoder:mainfrom
Harsh9485:gemini-session-resume
Open

Gemini session resume#810
Harsh9485 wants to merge 7 commits intocoder:mainfrom
Harsh9485:gemini-session-resume

Conversation

@Harsh9485
Copy link
Contributor

Description

Closes: #745

This PR adds the enable_state_persistence variable.

The session resume logic works as follows: when we run the Gemini CLI, it creates a folder with the same name as the directory where the CLI command runs. In the script, we use agentapi, which runs in the $GEMINI_START_DIRECTORY directory. So, I get the directory name and check whether it exists. If it does not exist, a new session is created.

Changes:

  • Added enable_state_persistence variable.
  • Improved AGS passing in start.sh.
  • Added --type gemini in agentapi.
  • Added logic for session resume using --resume.
  • Updated Readme.md file
  • added main.tftest.hcl file.

Type of Change

  • New module
  • New template
  • Bug fix
  • Feature/enhancement
  • Documentation
  • Other

Module Information

Path: registry/coder-labs/modules/gemini
New version: v3.1.0
Breaking change: [ ] Yes [x] No

Testing & Validation

  • Tests pass (bun test)
  • Code formatted (bun fmt)
  • Changes tested locally

Related Issues

#749
#745

@Harsh9485
Copy link
Contributor Author

@mafredri,
I can’t test this because the module requires Node.js, and the user must install it first to use the Gemini module.

If I add the Gemini module but my workspace does not have Node installed, the workspace crashes. If I first don’t add the module, install Node, and then add the module in the template, Coder creates a new workspace, and again Node is not available, so the workspace crashes.

In this PR: #374, the Node installation part was removed, and I don’t see any valid reason for that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

gemini: wire session resume on workspace restart

1 participant