Conversation
Native plugin that shows latest Vercel deployment status in the status line (▲ ready/building/error). Reads .vercel/project.json for project detection, queries deployments via `vercel api`. Supports configurable URL display, team prefix, and branch info. Uses state-dependent cache TTLs (3s for transient states, 10s for stable). https://claude.ai/code/session_01F8kbw4XrgdJRUZfcGjmQQw
Put vercel plugin on the default second status line alongside spotify. Remove the show_branch config since the deployed branch is redundant with the git plugin's current branch display. https://claude.ai/code/session_01F8kbw4XrgdJRUZfcGjmQQw
Follow three-line layout pattern: - Line 1 (Agent harness): dir, model, context, usage, git - Line 2 (Project tooling): vercel - Line 3 (Auxiliary): spotify https://claude.ai/code/session_01F8kbw4XrgdJRUZfcGjmQQw
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces a new Vercel plugin that enhances the application's status line by providing real-time updates on Vercel deployment statuses. It intelligently fetches deployment information, offers customizable display options for users, and optimizes performance through a sophisticated caching mechanism that adapts to the deployment's current state. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces a new native plugin for displaying Vercel deployment status. The implementation is well-structured, with good use of caching and state-dependent TTLs. The configuration and output formatting are also handled nicely. I've added a few suggestions to improve debuggability by ensuring that error output from the vercel CLI is not discarded. I also noted an opportunity to increase test coverage for the functions that interact with the external CLI.
| cmd := exec.CommandContext(ctx, vercelPath, "api", "/v6/deployments?limit=1&projectId="+projectID) | ||
| var out bytes.Buffer | ||
| cmd.Stdout = &out | ||
| cmd.Stderr = nil |
There was a problem hiding this comment.
By explicitly setting cmd.Stderr to nil, you are redirecting the standard error of the vercel command to /dev/null. This discards potentially useful error messages, making it very difficult to debug issues like authentication failures or API errors. It's better to redirect stderr to the main process's stderr stream for debugging purposes.
| cmd.Stderr = nil | |
| cmd.Stderr = os.Stderr |
| cmd := exec.CommandContext(ctx, vercelPath, "whoami") | ||
| var out bytes.Buffer | ||
| cmd.Stdout = &out | ||
| cmd.Stderr = nil |
There was a problem hiding this comment.
Similar to the other command execution, setting cmd.Stderr to nil discards valuable error information from the vercel whoami command. This can make troubleshooting user- or team-related configuration issues difficult. Redirecting to the main process's stderr would be beneficial for debugging.
| cmd.Stderr = nil | |
| cmd.Stderr = os.Stderr |
| package plugins | ||
|
|
||
| import ( | ||
| "context" | ||
| "os" | ||
| "path/filepath" | ||
| "testing" | ||
| "time" | ||
|
|
||
| "github.com/himattm/prism/internal/cache" | ||
| "github.com/himattm/prism/internal/plugin" | ||
| ) |
There was a problem hiding this comment.
These tests provide good coverage for the parsing and formatting logic. However, the functions that execute external commands (getLatestVercelDeployment and getVercelTeam) are not tested. This means the logic for interacting with the vercel CLI, including command arguments and parsing the output, is not verified. Consider adding tests that mock os/exec to cover these functions. This can be achieved using a test helper that mimics the vercel CLI's behavior.
Native plugin that shows latest Vercel deployment status in the status
line (▲ ready/building/error). Reads .vercel/project.json for project
detection, queries deployments via
vercel api. Supports configurableURL display, team prefix, and branch info. Uses state-dependent cache
TTLs (3s for transient states, 10s for stable).
https://claude.ai/code/session_01F8kbw4XrgdJRUZfcGjmQQw