Skip to content

Update samples and Teams SDK related changes in define-search-command.md#14241

Open
Pranjal-MSFT wants to merge 9 commits intomainfrom
pranjalb-teamssdk-sample-code-updation-4
Open

Update samples and Teams SDK related changes in define-search-command.md#14241
Pranjal-MSFT wants to merge 9 commits intomainfrom
pranjalb-teamssdk-sample-code-updation-4

Conversation

@Pranjal-MSFT
Copy link
Copy Markdown
Collaborator

No description provided.

@microsoft-production-github-app

This comment was marked as outdated.

@learn-build-service-prod

This comment was marked as duplicate.

@microsoft-production-github-app

This comment was marked as duplicate.

@learn-build-service-prod

This comment was marked as duplicate.

@learn-build-service-prod

This comment was marked as duplicate.

@microsoft-production-github-app

This comment was marked as duplicate.

@learn-build-service-prod

This comment was marked as outdated.

@learn-build-service-prod

This comment was marked as duplicate.

@microsoft-production-github-app

This comment was marked as duplicate.

@learn-build-service-prod

This comment was marked as duplicate.

@learn-build-service-prod

This comment was marked as duplicate.

AjayJ12-MSFT
AjayJ12-MSFT previously approved these changes Apr 2, 2026
Copy link
Copy Markdown

@Mohammed-MSFT Mohammed-MSFT left a comment

Choose a reason for hiding this comment

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

Looks good to me - approved.

Copy link
Copy Markdown

@Harikrishnan-MSFT Harikrishnan-MSFT left a comment

Choose a reason for hiding this comment

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

Kindly review the comments on the PR and make the necessary updates.

@microsoft-production-github-app

This comment was marked as duplicate.

@learn-build-service-prod

This comment was marked as outdated.

@learn-build-service-prod

This comment was marked as outdated.

AjayJ12-MSFT
AjayJ12-MSFT previously approved these changes Apr 10, 2026
@SukanyaDas-MSFT SukanyaDas-MSFT self-requested a review April 13, 2026 12:49
@microsoft-production-github-app

This comment was marked as outdated.

@learn-build-service-prod

This comment was marked as duplicate.

@learn-build-service-prod

This comment was marked as duplicate.

@microsoft-production-github-app
Copy link
Copy Markdown

Acrolinx Scorecards

We currently enforce a minimum score of 80.

Click the scorecard links for each article to review the Acrolinx feedback on grammar, spelling, punctuation, writing style, and terminology:

Article Score Issues Scorecard Processed
msteams-platform/messaging-extensions/how-to/search-commands/define-search-command.md 91 8 link

More info about Acrolinx

Use the Acrolinx extension, or sidebar, in Visual Studio Code to check spelling, grammar, style, tone, clarity, and key terminology when you're creating or updating content. For more information, see Use the Visual Studio Code extension to run Acrolinx locally.

@learn-build-service-prod
Copy link
Copy Markdown
Contributor

PoliCheck Scan Report

The following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans.

✅ No issues found

More information about PoliCheck

Information: PoliCheck | Severity Guidance | Term
For any questions: Try searching the learn.microsoft.com contributor guides or post your question in the Learn support channel.

@learn-build-service-prod
Copy link
Copy Markdown
Contributor

Learn Build status updates of commit 5005b2c:

✅ Validation status: passed

File Status Preview URL Details
msteams-platform/messaging-extensions/how-to/search-commands/define-search-command.md ✅Succeeded View

For more details, please refer to the build report.

* [Sample code reference](https://github.com/OfficeDev/Microsoft-Teams-Samples/blob/main/samples/TeamsSDK/bot-message-extensions/python/bot-message-extensions/main.py)

```python
async def on_teams_messaging_extension_query(self, context, query):
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Update the code snippet

@app.on_message_ext_query
async def handle_query(ctx: ActivityContext[MessageExtensionQueryInvokeActivity]):
command_id = ctx.activity.value.command_id
params = ctx.activity.value.parameters or []
query = params[0].value if params else ""

print(f"Query: command={command_id}, query={query}")

# Route to appropriate search
if command_id == "wikipediaSearch":
    results = await search_wikipedia(query)
    attachments = [
        create_attachment(
            create_wikipedia_card(r),
            r['title'],
            re.sub(r'<[^>]+>', '', r.get('snippet', ''))
        )
        for r in results
    ]

if not attachments:
    return MessagingExtensionResponse(
        compose_extension=MessagingExtensionResult(
            type=MessagingExtensionResultType.MESSAGE,
            text=f"No results found for '{query}'"
        )
    )

return MessagingExtensionResponse(
    compose_extension=MessagingExtensionResult(
        type=MessagingExtensionResultType.RESULT,
        attachment_layout=MessagingExtensionAttachmentLayout.LIST,
        attachments=attachments
    )
)

@microsoft-production-github-app
Copy link
Copy Markdown

Acrolinx Scorecards

We currently enforce a minimum score of 80.

Click the scorecard links for each article to review the Acrolinx feedback on grammar, spelling, punctuation, writing style, and terminology:

Article Score Issues Scorecard Processed
msteams-platform/messaging-extensions/how-to/search-commands/define-search-command.md 91 8 link

More info about Acrolinx

Use the Acrolinx extension, or sidebar, in Visual Studio Code to check spelling, grammar, style, tone, clarity, and key terminology when you're creating or updating content. For more information, see Use the Visual Studio Code extension to run Acrolinx locally.

@learn-build-service-prod
Copy link
Copy Markdown
Contributor

PoliCheck Scan Report

The following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans.

✅ No issues found

More information about PoliCheck

Information: PoliCheck | Severity Guidance | Term
For any questions: Try searching the learn.microsoft.com contributor guides or post your question in the Learn support channel.

@learn-build-service-prod
Copy link
Copy Markdown
Contributor

Learn Build status updates of commit f20cf85:

✅ Validation status: passed

File Status Preview URL Details
msteams-platform/messaging-extensions/how-to/search-commands/define-search-command.md ✅Succeeded View

For more details, please refer to the build report.

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.

7 participants