💄 Optimize the AI agent experience

This commit is contained in:
2025-10-26 12:10:10 +08:00
parent cf6e534d02
commit 92cd6b5f7e
7 changed files with 136 additions and 26 deletions

View File

@@ -79,7 +79,7 @@ public class DeveloperController(
try
{
var pubResponse = await ps.GetPublisherAsync(new GetPublisherRequest { Name = name });
pub = SnPublisher.FromProto(pubResponse.Publisher);
pub = SnPublisher.FromProtoValue(pubResponse.Publisher);
} catch (RpcException ex)
{
return NotFound(ex.Status.Detail);

View File

@@ -13,7 +13,7 @@ public class DeveloperService(
public async Task<SnDeveloper> LoadDeveloperPublisher(SnDeveloper developer)
{
var pubResponse = await ps.GetPublisherAsync(new GetPublisherRequest { Id = developer.PublisherId.ToString() });
developer.Publisher = SnPublisher.FromProto(pubResponse.Publisher);
developer.Publisher = SnPublisher.FromProtoValue(pubResponse.Publisher);
return developer;
}
@@ -25,7 +25,7 @@ public class DeveloperService(
var pubRequest = new GetPublisherBatchRequest();
pubIds.ForEach(x => pubRequest.Ids.Add(x.ToString()));
var pubResponse = await ps.GetPublisherBatchAsync(pubRequest);
var pubs = pubResponse.Publishers.ToDictionary(p => Guid.Parse(p.Id), SnPublisher.FromProto);
var pubs = pubResponse.Publishers.ToDictionary(p => Guid.Parse(p.Id), SnPublisher.FromProtoValue);
return enumerable.Select(d =>
{