mirror of
https://github.com/DayuanJiang/next-ai-draw-io.git
synced 2026-01-04 15:22:29 +08:00
fix: address code review issues
- Remove verbose debug console.logs (kept only token usage log) - Add basic input validation for messages array - Fix XML comparison using formatXML for consistency - Extract CACHED_TOOL_PREFIX constant to avoid magic string - Fix addToolResult API to use correct tool/output params
This commit is contained in:
@@ -44,7 +44,6 @@ export function DiagramProvider({ children }: { children: React.ReactNode }) {
|
||||
const getLastAgentGeneratedXml = () => lastAgentGeneratedXmlRef.current;
|
||||
|
||||
const markAgentDiagramPending = () => {
|
||||
console.log('[DiagramContext] markAgentDiagramPending called');
|
||||
agentDiagramPendingRef.current = true;
|
||||
};
|
||||
|
||||
@@ -80,7 +79,6 @@ export function DiagramProvider({ children }: { children: React.ReactNode }) {
|
||||
// This ensures we compare apples-to-apples (both formatted the same way)
|
||||
if (agentDiagramPendingRef.current) {
|
||||
const formatted = formatXML(extractedXML);
|
||||
console.log('[DiagramContext] Setting lastAgentGeneratedXml from export, length:', formatted.length);
|
||||
setLastAgentGeneratedXml(formatted);
|
||||
agentDiagramPendingRef.current = false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user