Replace D2 rendering with DiagramAgent (Mermaid + Kroki)
- Delete d2-tool.ts and D2_RENDER_URL references - Add diagram-agent.ts: OpenAI generates Mermaid → Kroki renders PNG → Telegram sendPhoto + R2 cache - Update onboarding-agent to use generate_diagram tool with DiagramAgent - Switch wrangler.toml from D2_RENDER_URL to KROKI_URL - Remove D2 from env-validation, api-urls, tools/index Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
import type { Env } from '../types';
|
||||
|
||||
const DEFAULT_OPENAI_GATEWAY = 'https://gateway.ai.cloudflare.com/v1/d8e5997eb4040f8b489f09095c0f623c/telegram-ai-support/openai';
|
||||
const DEFAULT_D2_RENDER_URL = 'http://10.253.100.107:8080';
|
||||
|
||||
/**
|
||||
* OpenAI Chat Completions API URL (AI Gateway 경유)
|
||||
*/
|
||||
@@ -18,9 +16,3 @@ export function getOpenAIBaseUrl(env: Env): string {
|
||||
return env.OPENAI_API_BASE || DEFAULT_OPENAI_GATEWAY;
|
||||
}
|
||||
|
||||
/**
|
||||
* D2 diagram rendering service URL
|
||||
*/
|
||||
export function getD2RenderUrl(env: Env): string {
|
||||
return env.D2_RENDER_URL || DEFAULT_D2_RENDER_URL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user