fix: Remove unused code from wisp.go (code review followup)
Remove resolvePartialIDDirect function and context import that became dead code after switching to resolveOrCookFormula in bd-rciw. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"os"
|
||||
@@ -244,28 +243,6 @@ func isProtoIssue(issue *types.Issue) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// resolvePartialIDDirect resolves a partial ID directly from store
|
||||
func resolvePartialIDDirect(ctx context.Context, partial string) (string, error) {
|
||||
// Try direct lookup first
|
||||
if issue, err := store.GetIssue(ctx, partial); err == nil {
|
||||
return issue.ID, nil
|
||||
}
|
||||
// Search by prefix
|
||||
issues, err := store.SearchIssues(ctx, "", types.IssueFilter{
|
||||
IDs: []string{partial + "*"},
|
||||
})
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
if len(issues) == 1 {
|
||||
return issues[0].ID, nil
|
||||
}
|
||||
if len(issues) > 1 {
|
||||
return "", fmt.Errorf("ambiguous ID: %s matches %d issues", partial, len(issues))
|
||||
}
|
||||
return "", fmt.Errorf("not found: %s", partial)
|
||||
}
|
||||
|
||||
var wispListCmd = &cobra.Command{
|
||||
Use: "list",
|
||||
Short: "List all wisps in current context",
|
||||
|
||||
Reference in New Issue
Block a user