- Add Cloudflare Workers AI as third provider alongside Claude and Ollama - New cloudflare.js API handler with format conversion - Tool converter functions for Cloudflare's OpenAI-compatible format - Handle [TOOL_CALLS] and [Called tool:] text formats from Mistral - Robust parser that handles truncated JSON responses - Add usage tracking with cost display - New usageTracker.js service for tracking token usage per session - UsageDetailModal component showing per-request breakdown - Cost display in ChatPanel header - Add new diagram manipulation features - Entity scale and rotation support via modify_entity tool - Wikipedia search tool for researching topics before diagramming - Clear conversation tool to reset chat history - JSON import from hamburger menu (moved from ChatPanel) - Fix connection label rotation in billboard mode - Labels no longer have conflicting local rotation when billboard enabled - Update rotation when rendering mode changes - Improve tool calling reliability - Add MAX_TOOL_ITERATIONS safety limit - Break loop after model switch to prevent context issues - Increase max_tokens to 4096 to prevent truncation 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
31 lines
685 B
JavaScript
31 lines
685 B
JavaScript
import { Router } from "express";
|
|
import claudeRouter from "./claude.js";
|
|
import ollamaRouter from "./ollama.js";
|
|
import cloudflareRouter from "./cloudflare.js";
|
|
import sessionRouter from "./session.js";
|
|
import userRouter from "./user.js";
|
|
|
|
const router = Router();
|
|
|
|
// Session management
|
|
router.use("/session", sessionRouter);
|
|
|
|
// User features
|
|
router.use("/user", userRouter);
|
|
|
|
// Claude API proxy
|
|
router.use("/claude", claudeRouter);
|
|
|
|
// Ollama API proxy
|
|
router.use("/ollama", ollamaRouter);
|
|
|
|
// Cloudflare Workers AI proxy
|
|
router.use("/cloudflare", cloudflareRouter);
|
|
|
|
// Health check
|
|
router.get("/health", (req, res) => {
|
|
res.json({ status: "ok" });
|
|
});
|
|
|
|
export default router;
|