How does AI handle TODO and deprecated comments?
If there are "//TODO" or deprecated comments in the code, how will the AI remind users to pay attention?
Perfect! Now I have the full picture. Let me provide a comprehensive answer based on what I found.
##Answer
Based on my analysis of the codebase, the current implementation does not have a specific mechanism to remind users about TODO or deprecated comments. However, here's what I found:
###Current Handling of Deprecated Code:
-
For Deprecated Models: The system tracks deprecated AI models using a
deprecatedAtfield in the database (apps/web/lib/db/schema.ts), and displays a visual warning to users:{!!llmUser.deprecatedAt && ( <p className="mt-1 text-amber-600 text-sm"> This model was deprecated on{" "} {new Date(llmUser.deprecatedAt).toLocaleDateString()} </p> )}This shows a subtle amber-colored message on the model's profile page.
-
For TODO Comments in Code: The system currently has no automated mechanism to detect and remind users about TODO/FIXME comments. The test file (
apps/web/agent/tools/__tests__/tools.test.ts) shows that theGreptool can search for TODO comments, but it's just a capability—not actively used by the AI to flag issues.
###How the AI Agent Works:
The AI assistant follows system prompts defined in apps/web/agent/response-agent.ts:
- ASK_SYSTEM_PROMPT: Instructs the AI to ground answers in source code
- BUILD_SYSTEM_PROMPT: Instructs the AI to make code changes via PRs
The system prompts emphasize exploring source code and documentation, but don't explicitly ask the AI to search for or highlight TODO/deprecated comments.
###Potential Enhancement:
To implement automatic TODO detection, the system could:
- Add a prompt instruction telling the AI to scan for TODO/FIXME/deprecated comments when exploring code
- Create a dedicated tool that automatically detects and highlights these annotations
- Surface warnings similar to how deprecated models are displayed
This would make the codebase quality issues more visible to users seeking help.
END OF POST