|
9 | 9 | import contextlib |
10 | 10 | import json |
11 | 11 |
|
| 12 | +from authlib.common.encoding import json_dumps |
12 | 13 | from mcp.server.fastmcp import Context, FastMCP |
13 | 14 | from pydantic import ValidationError |
14 | 15 |
|
@@ -90,9 +91,10 @@ async def build_workflow( |
90 | 91 |
|
91 | 92 | try: |
92 | 93 | # STEP 1: Load conversation history and format as JSON array |
| 94 | + current_prompt = f"task_description: {task_description}, context: {context}" |
93 | 95 | conversation_history = ( |
94 | 96 | await conversation_service.load_filtered_context_for_enrichment( |
95 | | - session_id, current_prompt, ctx |
| 97 | + session_id, json_dumps(current_prompt), ctx |
96 | 98 | ) |
97 | 99 | ) |
98 | 100 | history_json_array = ( |
@@ -570,9 +572,10 @@ async def judge_coding_plan( |
570 | 572 |
|
571 | 573 | try: |
572 | 574 | # STEP 1: Load conversation history and format as JSON array |
| 575 | + current_prompt = f"plan: {plan}, user_requirements: {user_requirements}" |
573 | 576 | conversation_history = ( |
574 | 577 | await conversation_service.load_filtered_context_for_enrichment( |
575 | | - session_id, current_prompt, ctx |
| 578 | + session_id, json.dumps(current_prompt), ctx |
576 | 579 | ) |
577 | 580 | ) |
578 | 581 | history_json_array = ( |
@@ -658,9 +661,12 @@ async def judge_code_change( |
658 | 661 |
|
659 | 662 | try: |
660 | 663 | # STEP 1: Load conversation history and format as JSON array |
| 664 | + current_prompt = ( |
| 665 | + f"code_change: {code_change}, user_requirements: {user_requirements}" |
| 666 | + ) |
661 | 667 | conversation_history = ( |
662 | 668 | await conversation_service.load_filtered_context_for_enrichment( |
663 | | - session_id, current_prompt, ctx |
| 669 | + session_id, json.dumps(current_prompt), ctx |
664 | 670 | ) |
665 | 671 | ) |
666 | 672 | history_json_array = ( |
|
0 commit comments