Sync excluded field to MCP and CLI

Add excluded boolean to the MCP CookiePattern schema and
UpdateCookiePatternInput. Expose it in CLI cookie-pattern
view, list, and update commands.

Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
Émile Ré
2026-05-01 16:48:55 +04:00
parent 3ed61c6084
commit dd1d0ebffb
6 changed files with 29 additions and 2 deletions

View File

@@ -37,6 +37,7 @@ query($id: ID!, $first: Int, $after: CursorKey) {
matchType
displayName
source
excluded
}
}
pageInfo {
@@ -55,6 +56,7 @@ type cookiePattern struct {
MatchType string `json:"matchType"`
DisplayName string `json:"displayName"`
Source string `json:"source"`
Excluded bool `json:"excluded"`
}
func NewCmdList(f *cmdutil.Factory) *cobra.Command {
@@ -133,10 +135,14 @@ func NewCmdList(f *cmdutil.Factory) *cobra.Command {
rows := make([][]string, 0, len(patterns))
for _, p := range patterns {
rows = append(rows, []string{p.ID, p.Pattern, p.MatchType, p.DisplayName, p.Source})
excluded := ""
if p.Excluded {
excluded = "yes"
}
rows = append(rows, []string{p.ID, p.Pattern, p.MatchType, p.DisplayName, p.Source, excluded})
}
t := cmdutil.NewTable("ID", "PATTERN", "MATCH TYPE", "DISPLAY NAME", "SOURCE").Rows(rows...)
t := cmdutil.NewTable("ID", "PATTERN", "MATCH TYPE", "DISPLAY NAME", "SOURCE", "EXCLUDED").Rows(rows...)
_, _ = fmt.Fprintln(f.IOStreams.Out, t)
if totalCount > len(patterns) {