-
Notifications
You must be signed in to change notification settings - Fork 8
feat(codeagent): update Dockerfiles and refactor session management for improved container handling #20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…or improved container handling
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR enhances session handling by adding a dedicated SessionPath
, refactors in-memory session management to use string keys, and updates Docker integrations to run containers persistently rather than interactively.
- Add
SessionPath
toWorkspace
and create a corresponding directory. - Change
SessionManager
map keys fromint
tostring
to support multi-field identifiers. - Update Gemini and Claude Docker runners to launch detached containers and adjust Dockerfiles to use
tail -f /dev/null
.
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.
Show a summary per file
File | Description |
---|---|
pkg/models/workspace.go | Added SessionPath field to track per-session directory. |
internal/workspace/manager.go | Initialize and create sessionPath , include it in returned struct. |
internal/code/session.go | Switched session map to map[string]Code and updated key logic. |
internal/code/gemini_docker.go | Removed interactive pipes, added container naming, and exec-based prompts. |
internal/code/claude.go | Mirror Gemini changes for Claude containers. |
Dockerfile.gemini & Dockerfile.claude | Changed CMD to keep containers alive by tailing /dev/null . |
Comments suppressed due to low confidence (3)
internal/workspace/manager.go:170
- New
sessionPath
creation logic should be covered by unit tests to ensure directory creation errors are handled correctly.
sessionPath := filepath.Join(m.baseDir, session)
internal/code/session.go:26
- The
Workspace
type has noPullRequest
field, so referencingworkspace.PullRequest
will not compile. Consider usingworkspace.Issue.GetNumber()
or adding aPullRequest
field.
key := fmt.Sprintf("%s-%d", workspace.Repository, workspace.PullRequest.GetNumber())
internal/code/gemini_docker.go:24
- Using
workspace.Repository
directly in container names may introduce invalid characters (e.g., slashes). Sanitize or replace non-alphanumeric characters.
containerName := fmt.Sprintf("gemini-%s-%d", workspace.Repository, workspace.PullRequest.GetNumber())
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
No description provided.