Skip to content

Commit c087999

Browse files
author
dori
committed
feat: try to fix build
1 parent 91cb5ec commit c087999

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

src/mcp_as_a_judge/db/token_utils.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,7 @@
66
with fallback to character-based approximation.
77
"""
88

9-
from typing import TYPE_CHECKING, Any
10-
11-
if TYPE_CHECKING:
12-
from mcp_as_a_judge.db import ConversationRecord
9+
from typing import Any
1310

1411
from mcp_as_a_judge.db.dynamic_token_limits import get_llm_input_limit
1512
from mcp_as_a_judge.logging_config import get_logger

src/mcp_as_a_judge/server.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import contextlib
1010
import json
1111

12+
from authlib.common.encoding import json_dumps
1213
from mcp.server.fastmcp import Context, FastMCP
1314
from pydantic import ValidationError
1415

@@ -90,9 +91,10 @@ async def build_workflow(
9091

9192
try:
9293
# STEP 1: Load conversation history and format as JSON array
94+
current_prompt = f"task_description: {task_description}, context: {context}"
9395
conversation_history = (
9496
await conversation_service.load_filtered_context_for_enrichment(
95-
session_id, current_prompt, ctx
97+
session_id, json_dumps(current_prompt), ctx
9698
)
9799
)
98100
history_json_array = (
@@ -570,9 +572,10 @@ async def judge_coding_plan(
570572

571573
try:
572574
# STEP 1: Load conversation history and format as JSON array
575+
current_prompt = f"plan: {plan}, user_requirements: {user_requirements}"
573576
conversation_history = (
574577
await conversation_service.load_filtered_context_for_enrichment(
575-
session_id, current_prompt, ctx
578+
session_id, json.dumps(current_prompt), ctx
576579
)
577580
)
578581
history_json_array = (
@@ -658,9 +661,12 @@ async def judge_code_change(
658661

659662
try:
660663
# STEP 1: Load conversation history and format as JSON array
664+
current_prompt = (
665+
f"code_change: {code_change}, user_requirements: {user_requirements}"
666+
)
661667
conversation_history = (
662668
await conversation_service.load_filtered_context_for_enrichment(
663-
session_id, current_prompt, ctx
669+
session_id, json.dumps(current_prompt), ctx
664670
)
665671
)
666672
history_json_array = (

0 commit comments

Comments
 (0)