Skip to content

Commit 45ca77a

Browse files
committed
chore: code review comments
Signed-off-by: Tomas Weiss <tomas.weiss2@gmail.com>
1 parent cb7047e commit 45ca77a

4 files changed

Lines changed: 6 additions & 36 deletions

File tree

apps/agentstack-cli/src/agentstack_cli/commands/agent.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1209,9 +1209,9 @@ async def list_feedback(
12091209
rating_icon = "✓" if item.rating == 1 else "✗"
12101210
agent_name = item.agent_name or str(item.provider_id)[:8]
12111211
task_id_short = str(item.task_id)[:8]
1212-
comment = (item.comment or "")[:50]
1213-
if len(item.comment or "") > 50:
1214-
comment += "..."
1212+
comment = item.comment or ""
1213+
if len(comment) > 50:
1214+
comment = comment[:50] + "..."
12151215
tags = ", ".join(item.comment_tags or []) if item.comment_tags else "-"
12161216
created_at = item.created_at.strftime("%Y-%m-%d")
12171217

apps/agentstack-server/src/agentstack_server/api/routes/user_feedback.py

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -54,21 +54,7 @@ async def list_user_feedback(
5454
after_cursor=after_cursor,
5555
)
5656
return ListUserFeedbackResponse(
57-
items=[
58-
UserFeedbackResponse(
59-
id=feedback.id,
60-
provider_id=feedback.provider_id,
61-
task_id=feedback.task_id,
62-
context_id=feedback.context_id,
63-
rating=feedback.rating,
64-
message=feedback.message,
65-
comment=feedback.comment,
66-
comment_tags=feedback.comment_tags,
67-
created_at=feedback.created_at,
68-
agent_name=feedback.agent_name,
69-
)
70-
for feedback in feedback_list
71-
],
57+
items=[UserFeedbackResponse.model_validate(dict(feedback)) for feedback in feedback_list],
7258
total_count=total,
7359
has_more=has_more,
7460
)

apps/agentstack-server/src/agentstack_server/infrastructure/persistence/repositories/user_feedback.py

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -83,22 +83,6 @@ async def list(
8383
order="desc",
8484
)
8585

86-
feedback_list = [
87-
UserFeedback(
88-
id=row.id,
89-
provider_id=row.provider_id,
90-
task_id=row.task_id,
91-
context_id=row.context_id,
92-
trace_id=row.trace_id,
93-
rating=row.rating,
94-
message=row.message,
95-
comment=row.comment,
96-
comment_tags=row.comment_tags,
97-
created_at=row.created_at,
98-
created_by=row.created_by,
99-
agent_name=row.agent_name,
100-
)
101-
for row in result.items
102-
]
86+
feedback_list = [UserFeedback.model_validate(dict(row._mapping)) for row in result.items]
10387

10488
return feedback_list, result.total_count, result.has_more

docs/development/agent-integration/mcp.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: "Learn how Agent Stack helps with authentication when using MCP."
55

66
## What are Connectors?
77

8-
A connector is an MCP endpoint exposed by the Agent Stack that forwards MCP requests to a remote MCP server, acting as a proxy and handling authenticationon.
8+
A connector is an MCP endpoint exposed by the Agent Stack that forwards MCP requests to a remote MCP server, acting as a proxy and handling authentication.
99

1010
It allows users to set up a connection to a third-party service (like GitHub, Box etc.) and then exposes a local MCP server that can be consumed by agents. This architecture eliminates the need for user authentication in your agent code. The connector handles authentication with the third-party service on behalf of the authenticated user, and the MCP interface is properly scoped to that user's permissions and data.
1111

0 commit comments

Comments
 (0)