Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Proposal: global `search` command across conversations, contacts, messages, and articles

未关闭
#22 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
35/100
Issue 类型
功能
描述清晰度
需要澄清
活跃度
活跃
技术栈
go
领域
api, cli

调研方向

首先检查现有的按资源划分的搜索命令和 internal/cmd/*_test.go,然后检查 dashboard 搜索端点以及 internal/sdk/testdata/application_swagger.json。确定 /search 是否是受支持的 API 接口,以及在实现之前这应该是顶级命令还是 flag。方向达成一致,并且跨资源命令由基于 httptest 的测试覆盖,即视为完成。

由索引模型根据 Issue 内容生成。

描述

Summary

I'd like to add a top-level chatwoot search "<query>" command that returns matches across conversations, contacts, messages, and help-center articles in one call, with --only=<bucket> to restrict the output. This complements the existing per-resource search (contacts --search, convs --query) with a single cross-resource entry point.

Endpoint

It would call the account-scoped dashboard search endpoint:

GET /api/v1/accounts/{account_id}/search          # all four buckets

This is what the Chatwoot dashboard's global search uses (Api::V1::Accounts::SearchController). Two questions before I open the PR:

  1. Is /search a supported API surface for the CLI to depend on? It isn't in the published OpenAPI spec (internal/sdk/testdata/application_swagger.json only lists /contacts/search), so I'd cover it with httptest-based tests rather than the swagger contract harness — matching the existing internal/cmd/*_test.go. Happy to add the path to the bundled spec instead if you'd prefer to treat it as official.
  2. Top-level command vs. flag? A new top-level search reads naturally for cross-bucket search, but it overlaps conceptually with contacts --search / convs --query. Would you prefer a top-level command, or a different shape?

Follow-up (separate PR)

A second, optional PR adds date-range filtering (--after / --before / --on, --tz) mapping to since / until query params on /search. Heads-up: those params are also dashboard-internal (not in the published spec) and only take effect when the account has the advanced_search feature — so it's cleanly separable and easy to defer.

Both PRs are ready to open once you confirm the direction. Thanks!

主要语言
Go
星标
9
派生
5
平均合并
2 分钟
30 天内合并 PR
2

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

chatwoot/cli 的其他 Issue

查看 chatwoot/cli 的全部 Issue

相似的 Issue

更多 Go Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。