fix: more file change fixes, refs NOISSUE

This commit is contained in:
2026-04-11 16:32:19 +02:00
parent 4d050ff527
commit 64fcd2967c
2 changed files with 11 additions and 1 deletions

View File

@@ -96,6 +96,8 @@ class RequestInterpreter:
parsed = json.loads(content) parsed = json.loads(content)
interpreted = self._normalize_interpreted_request(parsed, normalized) interpreted = self._normalize_interpreted_request(parsed, normalized)
routing = self._normalize_routing(parsed.get('routing'), interpreted, compact_context) routing = self._normalize_routing(parsed.get('routing'), interpreted, compact_context)
if routing.get('intent') == 'continue_project' and routing.get('project_name'):
interpreted['name'] = routing['project_name']
naming_trace = None naming_trace = None
if routing.get('intent') == 'new_project': if routing.get('intent') == 'new_project':
interpreted, routing, naming_trace = await self._refine_new_project_identity( interpreted, routing, naming_trace = await self._refine_new_project_identity(
@@ -265,6 +267,14 @@ class RequestInterpreter:
matched_project = project matched_project = project
break break
intent = str(routing.get('intent') or '').strip() or ('continue_project' if matched_project else 'new_project') intent = str(routing.get('intent') or '').strip() or ('continue_project' if matched_project else 'new_project')
if matched_project is None and intent == 'continue_project':
recent_chat_history = context.get('recent_chat_history', [])
recent_project_id = recent_chat_history[0].get('project_id') if recent_chat_history else None
if recent_project_id:
matched_project = next(
(project for project in context.get('projects', []) if project.get('project_id') == recent_project_id),
None,
)
normalized = { normalized = {
'intent': intent, 'intent': intent,
'project_id': matched_project.get('project_id') if matched_project else project_id, 'project_id': matched_project.get('project_id') if matched_project else project_id,

View File

@@ -306,7 +306,7 @@ async def _run_generation(
resolved_prompt_text = prompt_text or _compose_prompt_text(request) resolved_prompt_text = prompt_text or _compose_prompt_text(request)
if preferred_project_id and reusable_history is not None: if preferred_project_id and reusable_history is not None:
project_id = reusable_history.project_id project_id = reusable_history.project_id
elif reusable_history and not is_explicit_new_project and manager.get_open_pull_request(project_id=reusable_history.project_id): elif reusable_history and not is_explicit_new_project:
project_id = reusable_history.project_id project_id = reusable_history.project_id
else: else:
if is_explicit_new_project or prompt_text: if is_explicit_new_project or prompt_text: