feat(hub-client): forward locale to FetchModuleDocs
Some checks failed
Security / Security check (push) Failing after 1s

Hub now accepts a locale field on FetchModuleDocsRequest so
README.<locale>.md (e.g. README.de.md) gets tried before the
generic README.md. SDK passes it via an optional named param;
empty string keeps the previous behaviour.

Signed-off-by: flemming-it <stefan.a.flemming@googlemail.com>
This commit is contained in:
flemming-it 2026-05-24 22:07:16 +02:00
parent ab2205466a
commit b8bcae4b14
3 changed files with 27 additions and 3 deletions

View file

@ -240,8 +240,13 @@ class HubClient {
/// when set, so Studio doesn't have to handle credentials.
/// Errors come back inside [FetchModuleDocsResponse.errorKind]
/// (not as exceptions) so the UI can render fallbacks.
Future<FetchModuleDocsResponse> fetchModuleDocs(String name) {
return _admin.fetchModuleDocs(pb.FetchModuleDocsRequest(name: name));
Future<FetchModuleDocsResponse> fetchModuleDocs(
String name, {
String locale = '',
}) {
return _admin.fetchModuleDocs(
pb.FetchModuleDocsRequest(name: name, locale: locale),
);
}
/// List every configured MCP server with the last-discovery