Shared task board where people and AI coding agents work as teammates. Source-available, self-hostable.
Go
fix(cli): add pagination metadata to issue list JSON output and update agent prompt
Naiyuan Qing08c3513eeffc
diff --git a/server/cmd/multica/cmd_issue.go b/server/cmd/multica/cmd_issue.goindex ecef9c1125..e8aa8db6ec 100644--- a/server/cmd/multica/cmd_issue.go+++ b/server/cmd/multica/cmd_issue.go@@ -138,6 +138,7 @@ func init() {issueListCmd.Flags().String("assignee", "", "Filter by assignee name")issueListCmd.Flags().String("project", "", "Filter by project ID")issueListCmd.Flags().Int("limit", 50, "Maximum number of issues to return")+ issueListCmd.Flags().Int("offset", 0, "Number of issues to skip (for pagination)")// issue getissueGetCmd.Flags().String("output", "json", "Output format: table or json")@@ -236,6 +237,9 @@ func runIssueList(cmd *cobra.Command, _ []string) error {}params.Set("assignee_id", aID)}+ if v, _ := cmd.Flags().GetInt("offset"); v > 0 {+ params.Set("offset", fmt.Sprintf("%d", v))+ }if v, _ := cmd.Flags().GetString("project"); v != "" {params.Set("project_id", v)}@@ -254,7 +258,18 @@ func runIssueList(cmd *cobra.Command, _ []string) error {output, _ := cmd.Flags().GetString("output")if output == "json" {- return cli.PrintJSON(os.Stdout, issuesRaw)+ total, _ := result["total"].(float64)+ limit, _ := cmd.Flags().GetInt("limit")+ offset, _ := cmd.Flags().GetInt("offset")+ hasMore := offset+len(issuesRaw) < int(total)+ wrapped := map[string]any{+ "issues": issuesRaw,+ "total": int(total),+ "limit": limit,+ "offset": offset,+ "has_more": hasMore,+ }+ return cli.PrintJSON(os.Stdout, wrapped)}headers := []string{"ID", "TITLE", "STATUS", "PRIORITY", "ASSIGNEE", "DUE DATE"}diff --git a/server/internal/daemon/execenv/runtime_config.go b/server/internal/daemon/execenv/runtime_config.goindex 92dbe73cc2..3ac8bc7e87 100644--- a/server/internal/daemon/execenv/runtime_config.go+++ b/server/internal/daemon/execenv/runtime_config.go@@ -64,7 +64,7 @@ func buildMetaSkillContent(provider string, ctx TaskContextForEnv) string {b.WriteString("**Always use `--output json` for all read commands** to get structured data with full IDs.\n\n")b.WriteString("### Read\n")b.WriteString("- `multica issue get <id> --output json` — Get full issue details (title, description, status, priority, assignee)\n")- b.WriteString("- `multica issue list [--status X] [--priority X] [--assignee X] --output json` — List issues in workspace\n")+ b.WriteString("- `multica issue list [--status X] [--priority X] [--assignee X] [--limit N] [--offset N] --output json` — List issues in workspace (default limit: 50; JSON output includes `total`, `has_more` — use offset to paginate when `has_more` is true)\n")b.WriteString("- `multica issue comment list <issue-id> [--limit N] [--offset N] [--since <RFC3339>] --output json` — List comments on an issue (supports pagination; includes id, parent_id for threading)\n")b.WriteString("- `multica workspace get --output json` — Get workspace details and context\n")b.WriteString("- `multica workspace members [workspace-id] --output json` — List workspace members (user IDs, names, roles)\n")@@ -180,6 +180,7 @@ func buildMetaSkillContent(provider string, ctx TaskContextForEnv) string {b.WriteString("Keep comments concise and natural — state the outcome, not the process.\n")b.WriteString("Good: \"Fixed the login redirect. PR: https://...\"\n")b.WriteString("Bad: \"1. Read the issue 2. Found the bug in auth.go 3. Created branch 4. ...\"\n")+ b.WriteString("When referencing issues in comments, **always** use the mention format `[MUL-123](mention://issue/<issue-id>)` so they render as clickable links.\n")return b.String()}