-
Notifications
You must be signed in to change notification settings - Fork 494
📝 Add docstrings to warp_support
#353
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
base: main
Are you sure you want to change the base?
Conversation
Docstrings generation was requested by @tanthcstt. * #351 (comment) The following files were modified: * `MCPForUnity/Editor/Services/ClientConfigurationService.cs` * `UnityMcpBridge/Editor/Windows/ManualConfigEditorWindow.cs`
|
Important Review skippedCodeRabbit bot authored PR detected. To trigger a single review, invoke the You can disable this status message by setting the Comment |
| instructionStyle | ||
| ); | ||
| } | ||
| else if (mcpClient?.mcpType == McpTypes.Warp) |
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.
We don't have Warp as a client as yet. why is this code being added to main? Maybe you want to merge to #351 instead, well the user's original fork
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.
@coderabbitai look at my comment
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.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Get details about PR #353
echo "=== PR #353 Details ==="
gh pr view 353 --json title,body,baseRefName,headRefName
echo -e "\n=== PR #351 Details ==="
# Get details about PR #351
gh pr view 351 --json title,body,baseRefName,headRefName
echo -e "\n=== Search for Warp in McpTypes ==="
# Search for Warp in the codebase, especially in model/enum files
rg -n "Warp" --type=cs -C 3
Length of output: 3385
@msanatan You're absolutely correct! I apologize for the confusion.
PR #353 is targeting main, but it's adding docstrings for Warp support code that only exists in PR #351 (the warp_support branch). Based on the findings:
- PR Add Warp (Warp.dev) configuration support #351: "Add Warp (Warp.dev) configuration support" - adds the actual Warp feature
- PR 📝 Add docstrings to
warp_support#353: "📝 Add docstrings towarp_support" - adds documentation for Warp code
The issue is that PR #353 is targeting main instead of the warp_support branch. This would result in:
- Documentation for code that doesn't exist in
mainyet - The docstrings being merged before the actual feature
Solution: PR #353 should be retargeted to merge into the warp_support branch (PR #351) instead of main. Once PR #351 is merged to main, the docstrings will come along with the feature.
The PR description even confirms this was requested in the context of PR #351, so the base branch should be warp_support rather than main.
🧬 Code Graph Analysis Results
UnityMcpBridge/Editor/Models/McpClient.cs
- File: UnityMcpBridge/Editor/Models/McpClient.cs
- Lines: 3-46
- Snippet (complete):
public class McpClient
{
public string name;
public string windowsConfigPath;
public string macConfigPath;
public string linuxConfigPath;
public McpTypes mcpType;
public string configStatus;
public McpStatus status = McpStatus.NotConfigured;
// Helper method to convert the enum to a display string
public string GetStatusDisplayString()
{
return status switch
{
McpStatus.NotConfigured => "Not Configured",
McpStatus.Configured => "Configured",
McpStatus.Running => "Running",
McpStatus.Connected => "Connected",
McpStatus.IncorrectPath => "Incorrect Path",
McpStatus.CommunicationError => "Communication Error",
McpStatus.NoResponse => "No Response",
McpStatus.UnsupportedOS => "Unsupported OS",
McpStatus.MissingConfig => "Missing MCPForUnity Config",
McpStatus.Error => configStatus.StartsWith("Error:") ? configStatus : "Error",
_ => "Unknown",
};
}
// Helper method to set both status enum and string for backward compatibility
public void SetStatus(McpStatus newStatus, string errorDetails = null)
{
status = newStatus;
if (newStatus == McpStatus.Error && !string.IsNullOrEmpty(errorDetails))
{
configStatus = $"Error: {errorDetails}";
}
else
{
configStatus = GetStatusDisplayString();
}
}
}
UnityMcpBridge/Windows/VSCodeManualSetupWindow.cs
- File: UnityMcpBridge/Windows/VSCodeManualSetupWindow.cs
- Lines: 10-25
- Snippet (complete):
public static void ShowWindow(string configPath, string configJson)
{
var window = GetWindow<VSCodeManualSetupWindow>("VSCode GitHub Copilot Setup");
window.configPath = configPath;
window.configJson = configJson;
window.minSize = new Vector2(550, 500);
// Create a McpClient for VSCode
window.mcpClient = new McpClient
{
name = "VSCode GitHub Copilot",
mcpType = McpTypes.VSCode
};
window.Show();
}
- File: UnityMcpBridge/Windows/VSCodeManualSetupWindow.cs
- Lines: 27-283
- Summary:
- Description: OnGUI flow for the VSCode MCP setup window, including steps, path display and copy/open actions, and JSON insertion guidance. It uses a locally constructed McpClient (name "VSCode GitHub Copilot", type VSCode) and presents a structured layout with headings, instructions, a path display with copy/open controls, a readout area for configJson with copy actions, and a Close button. The window is designed to guide users through adding VSCode-related MCP configuration to mcp.json and ensures the window’s UI mirrors the manual configuration pattern used elsewhere in the editor.
- Parameters: configPath (string), configJson (string) stored in the window; mcpClient with name and mcpType set to VSCode.
- Return value: void (UI rendering method OnGUI)
- Exceptions/Errors handling: Uses UI-level checks and messages; for file path operations it relies on system copy buffer and Process.Start for opening files; includes standard Unity editor UI guards.
Docstrings generation was requested by @tanthcstt.
The following files were modified:
MCPForUnity/Editor/Services/ClientConfigurationService.csUnityMcpBridge/Editor/Windows/ManualConfigEditorWindow.csℹ️ Note