Skip to content

[docs] Add interaction service support for polyglot app hosts#1248

Open
aspire-repo-bot[bot] wants to merge 2 commits into
release/13.5from
docs/polyglot-interaction-service-98511b2f086f3a2f
Open

[docs] Add interaction service support for polyglot app hosts#1248
aspire-repo-bot[bot] wants to merge 2 commits into
release/13.5from
docs/polyglot-interaction-service-98511b2f086f3a2f

Conversation

@aspire-repo-bot

Copy link
Copy Markdown
Contributor

Documents changes from microsoft/aspire#17959@sebastienros

Targeting release/13.5 based on the source PR milestone 13.5 (exact match on microsoft/aspire.dev).

Why this PR is needed

PR #17959 exposed IInteractionService to polyglot app hosts (TypeScript, Python, Go, Java, and Rust) via the ATS/JSON-RPC surface. The existing interaction service documentation on microsoft/aspire.dev contained an explicit <Aside type="note"> stating:

The IInteractionService API is not yet available in the TypeScript AppHost SDK.

That statement is now incorrect, and users following the docs would not know the API exists or how to use it.

What was changed

Updated src/frontend/src/content/docs/extensibility/interaction-service.mdx:

  • Removed the outdated note that declared the API unavailable in TypeScript.
  • Updated the introduction to state that the interaction service is now available in both C# and polyglot app hosts (TypeScript, Python, Go, Java, Rust).
  • Added a new ## TypeScript app hosts section documenting:
    • Resolving the service via ctx.serviceProvider().getInteractionService()
    • Checking availability with isAvailable()
    • Message-style prompts (promptConfirmation, promptMessageBox, promptNotification)
    • Input factory methods (createTextInput, createSecretInput, createBooleanInput, createNumberInput, createChoiceInput) with builder chaining (.withValue(), .withChoiceOptions())
    • Single and multi-input prompts (promptInput, promptInputs) with result-handle access (result.canceled(), result.inputs().value(name))
    • Dynamic loading via withDynamicLoading and the loadContext pattern
    • Validation callback on the options object using validationContext
  • Added a cross-reference to Multi-language architecture in the See also section.

Files modified

  • src/frontend/src/content/docs/extensibility/interaction-service.mdx (updated)

Generated by PR Documentation Check for issue #17959 · sonnet46 3.9M ·

Document the IInteractionService API now available in TypeScript
(and other polyglot) app hosts via microsoft/aspire#17959.

- Remove outdated note stating the API was unavailable in TypeScript
- Add introductory sentence noting polyglot app host support
- Add 'TypeScript app hosts' section covering:
  - Resolving the service via ctx.serviceProvider().getInteractionService()
  - Availability check with isAvailable()
  - Message-style prompts (promptConfirmation, promptMessageBox, promptNotification)
  - Input factory methods (createTextInput, createSecretInput, etc.)
  - Single and multi-input prompts with result handle access
  - Dynamic loading via withDynamicLoading and loadContext
  - Validation callback on the options object
- Add multi-language architecture cross-reference to See also

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@aspire-repo-bot aspire-repo-bot Bot added the docs-from-code Copilot initiated issue from dotnet/aspire repo label Jun 11, 2026
@aspire-repo-bot aspire-repo-bot Bot requested a review from JamesNK June 11, 2026 23:38
@aspire-repo-bot

Copy link
Copy Markdown
Contributor Author

Frontend HTML artifact ready

The latest frontend build uploaded the frontend-dist artifact for PR #1248. Use the VS Code button below to open this PR with GitHub Artifacts Explorer and browse the built HTML locally.

VS Code: Open PR #1248 artifacts

This comment updates automatically when a new frontend build artifact is uploaded.

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

Updates the Interaction Service documentation to reflect newly added support for polyglot AppHosts (not just C#), and adds TypeScript-specific guidance for resolving and using the interaction service APIs from a command context.

Changes:

  • Removes the outdated note claiming IInteractionService is unavailable in the TypeScript AppHost SDK.
  • Adds a new “TypeScript AppHosts” section covering service resolution, prompts, input builders, dynamic loading, and validation.
  • Adds a “See also” link to the multi-language architecture page.

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

---

import { Aside, Steps } from '@astrojs/starlight/components';
import { Aside, Steps, Tabs, TabItem } from '@astrojs/starlight/components';

This is useful for scenarios where you need to gather information from the user or provide feedback on the status of operations, regardless of how the application is being launched or deployed.

The interaction service is available in both C# an TypeScript AppHosts. In TypeScript AppHosts, the service is resolved through the command context's service provider instead of through the .NET dependency injection container.

### Single and multi-input prompts

Pass one or more input handles to `promptInput` or `promptInputs`. The result is a handle: call `result.canceled()` to check for cancellation, and `result.inputs().value(name)` to read submitted values by name.
@IEvangelist

Copy link
Copy Markdown
Member

[docs-from-code-ci-note] CI has been retriggered multiple times and is still failing due to the current PR changes (not a transient runner issue). Please update the PR changes to fix the failing checks.

@IEvangelist

Copy link
Copy Markdown
Member

We've retriggered CI multiple times, and the current failures appear tied to changes in this PR rather than a transient pipeline issue. This likely needs a fix in the PR branch before CI will pass.

@IEvangelist

Copy link
Copy Markdown
Member

We've retriggered CI several times, and the current failures appear to be caused by changes in this PR rather than a transient runner issue. This likely needs updates in the PR content/code to get green checks.

@IEvangelist

Copy link
Copy Markdown
Member

[docs-from-code-ci] CI has been retriggered multiple times and is still failing. This appears to be due to the current PR changes rather than a transient infrastructure issue.

@IEvangelist

Copy link
Copy Markdown
Member

CI has been retriggered multiple times and is still failing for this PR (latest failures: 'CI' (attempt 8)). This likely needs changes in the PR itself rather than another rerun.

@IEvangelist

Copy link
Copy Markdown
Member

This PR has had CI retriggered multiple times and is still failing on PR-specific checks. It likely needs a change in this PR to pass.

@IEvangelist

Copy link
Copy Markdown
Member

[docs-from-code automation] repeated-rerun-note
CI has been retriggered multiple times and is still failing on this PR. This now looks likely to be caused by the PR changes rather than transient CI flakiness; it probably needs a content/code fix in this branch.

@IEvangelist

Copy link
Copy Markdown
Member

We've retriggered CI many times on this PR and it's still failing. At this point, the failure likely comes from changes in this PR rather than transient CI flakiness, so this probably needs a content/code fix in the PR itself.

@IEvangelist

Copy link
Copy Markdown
Member

CI has failed repeatedly on this docs-from-code PR after multiple reruns, and the failures appear to be related to the changes in this PR. Please review and adjust the PR content so the checks can pass.

@IEvangelist

Copy link
Copy Markdown
Member

CI has been retriggered multiple times on this PR and is still failing. The failures appear tied to the current PR changes rather than a transient runner issue, so this likely needs an update in the PR content before CI will pass.

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

Labels

docs-from-code Copilot initiated issue from dotnet/aspire repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants