Skip to content

fix(cli): search the index set in ingest.index - #480

Merged
anurag629 merged 2 commits into
codercops:devfrom
prakashNalla:fix/search-config-index
Oct 30, 2026
Merged

anurag629 merged 2 commits into
codercops:devfrom
prakashNalla:fix/search-config-index

Conversation

@prakashNalla

Copy link
Copy Markdown
Collaborator

What does this change?

chatcops search now uses ingest.index from the config when --index isn't passed, so it searches the same index chatcops ingest builds. Before, it fell back to 'default', said the index hadn't been built yet, and skipped the embedder check. Patch changeset for @chatcops/cli.

Closes #479

How I tested this

Added a test to packages/cli/tests/cli.test.ts with ingest.index: 'docs' in the config: it ingests, then searches and checks the JSON reports index: 'docs', finds the pricing page, and doesn't print the "hasn't been built yet" message. It also checks that a config with another embedder now exits 2 for that index. The test fails without the change.

  • pnpm -r build and pnpm -r typecheck: pass
  • pnpm test: 2077 tests passed (65 skipped)
  • pnpm lint: passes

AI assistance

Claude helped me w/ understand the issue

Checklist

  • This PR targets dev
  • I was assigned the linked issue
  • pnpm -r build, pnpm test and pnpm -r typecheck pass locally
  • Tests added or updated where it makes sense
  • For a bug fix: the new test fails without my change
  • Changeset added (pnpm changeset) if this changes core, widget or server
  • Docs updated if behavior or options changed

@anurag629 anurag629 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @prakashNalla, that's the fix, and the test checks both that search finds what ingest wrote under docs and that the embedder check runs against docs too. With current dev merged in, build, typecheck, test:coverage, lint (same as dev) and api:check pass, and the new test fails with the old line. Merging once CI is green.

@anurag629
anurag629 merged commit c0bb930 into codercops:dev Oct 30, 2026
5 checks passed
@anurag629 anurag629 added the hacktoberfest-accepted PR counts for Hacktoberfest label Oct 30, 2026
@anurag629

Copy link
Copy Markdown
Member

Merged, thanks @prakashNalla.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hacktoberfest-accepted PR counts for Hacktoberfest

Projects

None yet

Development

Successfully merging this pull request may close these issues.

chatcops search ignores ingest.index from the config

2 participants