Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 11 additions & 12 deletions internal/config/template/scan_template.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
"role": "user",
"content": "<current_file_path>{{current_file_path}}</current_file_path>\n\n<current_file_content>\n{{file_content}}\n</current_file_content>\n\nCurrent time in the real world: {{current_system_date_time}}\n\n<user_task>\n### Requirement Background (Optional)\n{{requirement_background}}\n\n### Review Checklist\n{{system_rule}}\n\n### Pre-scan Focus Areas\n{{plan_guidance}}\n\nReview the entire source file in <current_file_content> and report all findings via code_comment, then call task_done.\n</user_task>"
}
],
"timeout": 180
]

},
"PLAN_TASK": {
"messages": [
Expand All @@ -22,8 +22,8 @@
"role": "user",
"content": "<current_file_path>{{current_file_path}}</current_file_path>\n\n<current_file_content>\n{{file_content}}\n</current_file_content>\n\nCurrent time: {{current_system_date_time}}\n\n### Review Checklist (project rules)\n{{system_rule}}\n\nProduce the JSON focus checklist now."
}
],
"timeout": 90
]

},
"DEDUP_TASK": {
"messages": [
Expand All @@ -35,8 +35,8 @@
"role": "user",
"content": "<batch_comments>\n{{batch_comments}}\n</batch_comments>\n\nProduce the dedup groups JSON now."
}
],
"timeout": 90
]

},
"PROJECT_SUMMARY_TASK": {
"messages": [
Expand All @@ -48,8 +48,8 @@
"role": "user",
"content": "Total comments: {{comment_count}} across {{file_count}} files.\n\n<all_comments>\n{{all_comments}}\n</all_comments>\n\nProduce the project summary markdown now."
}
],
"timeout": 120
]

},
"MEMORY_COMPRESSION_TASK": {
"messages": [
Expand All @@ -61,8 +61,7 @@
"role": "user",
"content": "{{context}}"
}
],
"timeout": 120
]
},
"RE_LOCATION_TASK": {
"messages": [
Expand All @@ -74,8 +73,8 @@
"role": "user",
"content": "Below is a unified diff and a review comment. Identify the minimal contiguous code range in the diff that the comment targets.\n\nRules:\n1. Copy the relevant lines VERBATIM from the diff — do not rewrite, reformat, or add anything.\n2. Strip leading diff markers (`+`, `-`, ` `) from each line before outputting.\n3. Include only the lines directly related to the issue — no surrounding context.\n4. If multiple disjoint locations apply, pick the single most relevant one.\n5. Output ONLY a fenced code block. No explanation, no commentary.\n\n**Diff:**\n```diff\n{diff}```\n\n**Original code snippet (failed to match):**\n```\n{existing_code}\n```\n\n**Review comment:**\n{suggestion_content}"
}
],
"timeout": 180
]

},
"MAX_TOKENS": 58888,
"MAX_TOOL_REQUEST_TIMES": 60,
Expand Down
6 changes: 3 additions & 3 deletions internal/config/template/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ type manifestMessage struct {
}

type manifestConversation struct {
Timeout int `json:"timeout"`

Messages []manifestMessage `json:"messages"`
}

Expand All @@ -70,7 +70,7 @@ type templateManifest struct {
}

func resolveConversation(m manifestConversation) (LlmConversation, error) {
conv := LlmConversation{Timeout: m.Timeout}
conv := LlmConversation{}
conv.Messages = make([]ChatMessage, len(m.Messages))
for i, mm := range m.Messages {
data, err := templateFS.ReadFile("prompts/" + mm.PromptFile)
Expand Down Expand Up @@ -214,7 +214,7 @@ func (t *ScanTemplate) Validate() error {

// LlmConversation mirrors LlmConversation from the Java side — a preset prompt with settings.
type LlmConversation struct {
Timeout int `json:"timeout"`

Messages []ChatMessage `json:"messages"`
}
Comment on lines 216 to 219

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing the Timeout field from LlmConversation will cause a compilation error in template_test.go at line 68, which references tpl.MainTask.Timeout. The test needs to be updated (the assertion should be removed) before this change can compile.

Additionally, scan_template.json still contains "timeout" values for multiple conversations (MAIN_TASK, PLAN_TASK, DEDUP_TASK, PROJECT_SUMMARY_TASK, MEMORY_COMPRESSION_TASK, RE_LOCATION_TASK). These values will now be silently ignored during JSON unmarshalling. Consider cleaning up the stale "timeout" entries from scan_template.json to avoid confusion.


Expand Down
2 changes: 1 addition & 1 deletion pages/src/components/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const LANG_OPTIONS: { value: Language; label: string }[] = [
];

const navTabs = [
{ path: '/', labelKey: 'navbar.features' },
{ path: '/features', labelKey: 'navbar.features' },
{ path: '/benchmark', labelKey: 'navbar.benchmark' },
{ path: '/quickstart', labelKey: 'navbar.quickstart' },
{ path: '/docs', labelKey: 'navbar.docs' },
Expand Down