Skip to content

{Find} Refine its logic based on feedback#33796

Open
necusjz wants to merge 10 commits into
Azure:devfrom
necusjz:refine-az-find
Open

{Find} Refine its logic based on feedback#33796
necusjz wants to merge 10 commits into
Azure:devfrom
necusjz:refine-az-find

Conversation

@necusjz

@necusjz necusjz commented Jul 27, 2026

Copy link
Copy Markdown
Member

🤖 PR Validation — ️✔️ All clear

Breaking Changes Tests
️✔️ None ️✔️ 130/130

Related command

Description

as commits state.

Testing Guide

History Notes

[Component Name 1] BREAKING CHANGE: az command a: Make some customer-facing breaking change
[Component Name 2] az command b: Add some customer-facing feature


This checklist is used to make sure that common guidelines for a pull request are followed.

@necusjz necusjz self-assigned this Jul 27, 2026
Copilot AI review requested due to automatic review settings July 27, 2026 07:11
@necusjz
necusjz requested review from a team as code owners July 27, 2026 07:11
@azure-client-tools-bot-prd

Copy link
Copy Markdown

Hi @necusjz,
Since the current milestone time is less than 7 days, this pr will be reviewed in the next milestone.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@a0x1ab

a0x1ab commented Jul 27, 2026

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR refines the az find command module’s Microsoft Learn search and formatting logic to improve result relevance and presentation (keyword extraction/stemming, CLI-focused doc scoring, summary extraction, deduping, and command extraction), and updates unit tests accordingly.

Changes:

  • Improve relevance filtering via keyword stemming, stop-word removal, and CLI-specific doc query hints + ranking.
  • Refactor result formatting to dedupe by URL/title and handle “no usable results” scenarios more cleanly.
  • Enhance summary extraction (markdown cleanup + truncation marker) and expand tests for the new behaviors.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/azure-cli/azure/cli/command_modules/find/custom.py Implements updated query keyword logic, CLI doc scoping/ranking, summary/command extraction, deduping, and refactored output formatting.
src/azure-cli/azure/cli/command_modules/find/tests/latest/test_find.py Updates and expands unit tests to validate the refined relevance, summary, command extraction, and formatting behaviors.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 455 to +457
for line in lines[start:]:
if not line.strip():
line = line.strip()
if not line:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants