Spaces:
Runtime error
Runtime error
Commit History
-
feat(i18n): localize system UI and move Ctrl+K to overflow
Tan +1: CopilotCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>d106179 -
fix(i18n): wire locale behavior and restyle language picker
Tan +1: CopilotCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>24c7751
-
feat(wave6): voice TTS, share comments, tags+favorites, export+shortcuts
Đào Minh Tú +1: Copilot- /voice: Web Speech API TTS settings (voice/rate/pitch picker) - /export: download sessions as Markdown - /shortcuts: keyboard cheat-sheet - /tags + /favorites: filter views over ChatSession - share comments mounted on /share/[id] via Gist+local fallback Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1de385f -
feat(wave5): mind-map, templates, personas marketplace, meeting mode, pinned, notes, link-preview
Đào Minh Tú +1: Copilot- /mind-map: SVG tree view of branch sessions - /templates: 12 built-in Vietnamese prompt templates + CRUD - /personas-mp: persona marketplace via shared Gist + 6 seeds - /meeting + /meeting/[roomId]: multi-user chat polling 5s - /pinned: cross-session pinned messages list - /notes: per-session markdown notes drawer - components/link-preview: Microlink-based URL preview card Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>26c925a -
feat(wave4): 8 features — slash cmds, search, qr-share, /help, image gen, code sandbox, debate, cost tracker
Đào Minh Tú +1: CopilotSolo: - /search page + chat-search-dialog with Ctrl+K UX - /help page with slash command reference - lib/slash-commands.ts: /help /clear /summarize /translate /code /explain /rewrite - lib/auto-title.ts: AI-regen session title via Groq after 4 turns (module ready) - components/qr-share-dialog.tsx: QR code via qrserver.com Agents: - image-gen: /api/image + Pollinations.ai + composer btn + chat.appendImageMessage - code-sandbox: ▶ Chạy button on code blocks (JS/Python via Pyodide CDN, HTML/CSS srcdoc) - debate: /debate page, side-by-side 2 models + synthesizer - cost-tracker: lib/cost-estimator.ts pricing table, /stats card, usage log ring buffer Build ✓ 26 routes, TS clean Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>19a950f -
feat: message branching + team workspace (Gist-based collab)
Đào Minh Tú +1: Copilot- ux-branching: Add GitBranch button on every AI message → fork session with messages[0..=i], parentId set. Sidebar shows 🔱 for branched sessions. - col-team-sync: New /team page with own GH PAT (scope:gist), team Gist ID + nickname. Pull/push/import/remove team sessions. Dedupe by (id, sharedBy), max 100 sessions per gist. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>bad9b69 -
feat: 10+ features — voice/dragdrop/shortcuts, Ollama+RAG citations, workflows+scheduled, share password+TTL, auto-memory, export-md
Đào Minh Tú +1: CopilotUX: - Voice input (vi-VN webkitSpeechRecognition) + drag-drop upload + ?-shortcuts dialog - Composer revamp with mic button and dropzone overlay AI superpowers: - Ollama local provider + /api/ollama/models discovery - RAG with <Citations> render under assistant messages - Auto-memory fact extraction (Groq llama-3.1-8b, debounced 5s) module - /workflows builder with {{prev}} substitution - /scheduled chats page Collaboration: - Share API: SHA-256 password gate (Web Crypto) + custom TTL 1-90d - ShareView client component with password form - Markdown export with YAML frontmatter Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>70e3124
-
feat: doc editor + offline mode + stats trio + i18n framework
Đào Minh Tú +1: Copilot- Tiptap doc editor at /doc with 4 AI actions (continue/rewrite/summarize/translate) autosave to localStorage, streaming into editor - Offline mode: service worker SWR for static + network-only /api, IndexedDB queue with toast on drain when back online - Stats: TTFT leaderboard per provider (p50/p95), A/B winners win-rate table, usage by day (14d) - A/B picker now records winner with normalized prompt key for future model auto-suggestion - i18n framework (vi/en/ja) + LocaleSwitcher component, not yet wired into header - Deps: @tiptap/react @tiptap/starter-kit @tiptap/pm Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>f102ffd -
feat(tools): 3 new tools - Jina Reader URL fetch + YouTube transcript + SQL/CSV analysis
Đào Minh Tú +1: CopilotfetchUrl upgrade: - Primary: r.jina.ai Reader (clean markdown, handles SPA/JS-rendered pages) - Uses JINA_API_KEY when set, free tier otherwise - Fallback to raw HTML strip if Jina fails - Configurable maxChars (500-40000) youtubeTranscript (new): - Accepts youtu.be/ID, youtube.com/watch?v=ID, or raw 11-char ID - Extracts caption track via ytInitialPlayerResponse parsing - Returns transcript text + language + title (cap 20k chars) - Preferred language fallback chain runSql (new): - alasql in-memory engine on inline JSON array or CSV string - Read-only: rejects INSERT/UPDATE/DELETE/DROP/etc - CSV parser with quote handling and numeric coercion - 50k row cap, 5s timeout, top 200 results returned Build: - next.config.js: alias react-native and react-native-fs to false so alasql.fs.js node adapter doesn't pull native deps - Added alasql ^4.17.2 dependency Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>f4e061f -
feat(webSearch): multi-provider chain (Brave/Tavily/Serper/Jina) + free fallback
Đào Minh Tú +1: CopilotProblem: HF Space datacenter IP gets blocked by DDG html/lite -> falls through to Wikipedia which is useless for news/current events. Fix: extend webSearch tool with proper search providers: - BRAVE_SEARCH_API_KEY (existing) - TAVILY_API_KEY (free 1k/mo, AI-optimized) - SERPER_API_KEY (free 2.5k once) - JINA_API_KEY (free 1M tokens, no CC required) -> via s.jina.ai Fallback chain unchanged: DDG html -> DDG lite -> Wikipedia. Any one of these keys makes search work reliably from HF Space. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>fd49bd4 -
fix(tools): currentTime accepts timezone+locale, fixes Gemini null-args bug
Đào Minh Tú +1: CopilotGemini and some models emit 'arguments: null' when tool schema is empty z.object({}). AI SDK Zod validator then rejects null with 'Expected object, received null'. Adding optional fields makes the schema non-empty AND lets the model directly query Tokyo/NY time without manual offset math. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>291fa79 -
feat(providers): add OpenRouter + Cerebras + Mistral free providers
Đào Minh Tú +1: Copilot- 3 new OpenAI-compatible providers wired (createOpenAI + custom baseURL) - OpenRouter: 50+ free models behind one key (:free suffix) - Cerebras: ultra-fast inference (>2000 t/s), 14400 RPD free - Mistral La Plateforme: free tier 1 RPS / 1B tokens/month - New /api/{openrouter,cerebras,mistral}/models discovery routes - Rate-limit table extended; OpenRouter (epoch ms) + Cerebras header parsers - API keys dialog + .env.local.example updated - usage-tracker fingerprint resolution extended for new providers Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>3204b1b -
fix(rate-limits): correct Groq + GitHub Models entries against official docs
Đào Minh Tú +1: CopilotAudit toàn bảng sau khi sửa Gemma. Sources: - Groq: console.groq.com/docs/rate-limits - GitHub: docs.github.com/.../prototyping-with-ai-models#rate-limits GitHub Models fixes (Copilot Free tier): - DeepSeek-R1 / MAI-DS-R1: 50 -> 8 RPD (1 RPM, reasoning models) - xAI Grok-3: missing -> 15 RPD; Grok-3-Mini -> 30 RPD - GPT-5 family: 25 -> 8-12 RPD (require Copilot Pro - free unavailable) - o1 / o3 / o4 series: 25-50 -> 8-12 RPD (Pro only) - Splitted Llama/Mistral: large = High tier 50 RPD, small = Low 150 RPD - Default catch-all: 50 -> 150 (assume Low tier, safer) Groq fixes: - llama-3.1-8b-instant tightened regex (was matching 8b-* generally) - Added deepseek + gpt-oss patterns explicitly with RPM context - Added inline note that headers override this fallback Google (from prev commit): Gemma rpd=null, Gemini RPM context added. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>b5b4a41 -
fix(rate-limits): Gemma is unlimited on Google free tier (RPM/TPM only)
Đào Minh Tú +1: CopilotGoogle AI Studio rate-limit dashboard lists Gemma models without a daily cap on free tier - only RPM/TPM throttle. Static table previously hardcoded Gemma to 14,400 RPD which was wrong; users saw a finite quota badge in the model picker even though Gemma is effectively unlimited per day. - gemma-* now returns rpd: null (renders as InfinityIcon, emerald badge) - Added source comment explaining Google has no headers, so this table is the sole source of truth for Google models - Added explicit per-model notes for Gemini 2.5/2.0 with RPM context Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>2f23749 -
feat(generateImage): auto-enhance short/non-English prompts via Groq
Đào Minh Tú +1: CopilotPollinations gives much higher quality output with detailed English prompts. When the calling LLM passes a tiny prompt ('méo', 'cat') or non-ASCII text, we now do a fast Groq llama-3.1-8b-instant rewrite (6s timeout, free) into a 40-70 word descriptive English prompt covering subject/style/lighting/mood. Also strengthened tool description with bad/good examples + explicit translate instruction so well-behaved models build a rich prompt themselves on first try. Falls back to original prompt if Groq is unavailable or the rewrite times out. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>a7a1528 -
fix: drop generateImage pre-warm + add loading skeleton
Đào Minh Tú +1: Copilot- Pre-warm fetch (12s GET+drain) was blocking the LLM SSE stream idle for 15-30s, causing iOS Safari + Vercel edge to abort with 'Load failed' before the model could output the markdown. - Now: tool returns URL+markdown instantly. Image loads via browser <img> with a 'Đang tạo ảnh 15-30s' skeleton overlay that hides on onLoad, shows error state with tap-through link on onError. - min-height on wrapper so skeleton is visible during render. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>0fad258 -
feat: real provider rate-limit data via response headers
Đào Minh Tú +1: Copilot- Parse x-ratelimit-* from Groq + GitHub response.headers in onFinish - Cache RateLimitInfo in Upstash keyed by SHA-256(api_key) (cross-device) - /api/usage returns real {remaining, limit, resetSeconds} per model - ModelPicker shows REAL number from provider when available (sky badge + dot) falls back to local estimate for Google Gemini (no headers) - Refresh on dropdown open with in-flight dedupe - Hover tooltip clarifies data source (provider/local) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1f07029 -
fix(generateImage): pre-warm Pollinations cache + better instructions
Đào Minh Tú +1: CopilotBug: 'Có lỗi khi gọi AI: Load failed' after generateImage succeeded. Pollinations.ai renders images on-demand first GET to a fresh URL takes 1530s. The tool was returning the URL instantly, the model replied with markdown, the browser <img src=...> kicked off the actual render, and on iOS Safari that long-poll combined with the streaming SSE connection sometimes triggered 'Load failed' (generic fetch abort). Two fixes: 1. Pre-warm: tool now does a GET to the URL with a 12s timeout, drains up to 1MB of the response body so Pollinations finishes rendering server-side and caches the result. By the time the model finishes its reply and the user's browser fetches the URL, it's a CDN hit. - On HTTP error tool returns { error } (model retries / explains) - On timeout/network error returns URL anyway with a 'warning' field (URL still works, image will eventually render) 2. Description hint: model now told to reply with the markdown field exactly as-is and NOT call …648c489 -
fix(model-store): replace state ref on each notify so React re-renders
Đào Minh Tú +1: CopilotRoot cause of 'spinner never shows' bug: useSyncExternalStore uses Object.is(prev, next) to skip re-renders. The store was returning the SAME state object reference forever and only mutating fields in place + bumping a rev counter but Object.is(state, state) is always true, so React happily skipped every single re-render. The discovering flag, the new discovered list, the usage counter changes, NONE of them were visible in the UI until the next render triggered by something else (like opening/closing the dropdown, which is why people saw the new list 'after the fact' but never saw the spinner). Fix: state is now a 'let' that gets reassigned to a fresh object on every notify(): { ...state, rev: rev + 1 }. Setters keep mutating fields for simplicity; notify spreads them into the new outer object. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>a3fc6b8 -
feat(model-picker): shared store + rate-limit badges
Đào Minh Tú +1: CopilotTwo related fixes: 1. Cross-component sync of live-scanned models. Previously each ModelPicker instance held its own useState for 'discovered' so scanning in the navbar header didn't propagate to the A/B compare pickers. Lifted state into a module-level ModelStore (subscribers + useSyncExternalStore + localStorage persist + cross-tab storage listener). All pickers now share one source of truth and auto-rerender on scan / usage tick. 2. Per-model rate-limit badge next to each id: - Unlimited (or unknown-but-generous): emerald ∞ icon - Limited: '<remaining>/<total>' with amber when ≤5 left, red when 0 - Tooltip explains the source (e.g. 'Free tier: 250 req/day') Backed by lib/rate-limits.ts (regex-keyed table for google/groq/github free tiers as of 2026-05) and a localStorage usage counter keyed by provider:model:YYYY-MM-DD (auto-GC after 7 days). Usage counter is bumped: - onFinish of useChat (single-model path) — uses current provider/model - onDo…70bea94
-
fix(mobile): lock body to dvh + min-h-0 main to stop composer scroll-up
Đào Minh Tú +1: Copilot- html/body height: 100dvh + overflow:hidden so document doesn't scroll (root cause: body was h-full=100vh while chat root was 100dvh; on mobile with URL bar visible, body had ~80px overflow that scrolled the entire page including the sticky composer up off-screen) - main: add min-h-0 (flex-1 needs this to shrink) + overscroll-contain so rubber-band bounce doesn't propagate - composer: shrink-0 (was sticky bottom-0, now anchored as flex sibling) + safe-area-inset-bottom padding for iOS home-indicator devices Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>8da7101 -
feat(cloud-sync): GitHub OAuth + Upstash Redis cross-device sync (LWW)
Đào Minh Tú- /api/auth/[...nextauth] (NextAuth GitHub provider, JWT session) - /api/sync GET/PUT with scope param (sessions/settings/collections) - lib/sync-keys.ts allowlist of localStorage keys per scope - hooks/use-cloud-sync: patch setItem to detect mutations + debounced 3s push + initial pull + pull on focus/visibility - components/cloud-sync-button: sign in/out + status + manual pull/push - Sidebar footer integration - README + .env.local.example updated with setup stepse58a028 -
fix(tools+models): repair UTF-8 mojibake in tool descriptions; trim model list to verified-working set; filter non-chat models from Google live discovery
Đào Minh Tú671888a -
fix(google): remove unsupported Gemma static IDs; rely on live discovery
Đào Minh Tú53fa8ad -
feat(google): expand model list w/ Gemma-3 + live discovery /api/google/models
Đào Minh Tú521a523 -
fix(critique): strip <think> reasoning blocks from self-critique output
Đào Minh Tú250a8e2 -
feat(tools): webSearch fallback chain (Brave -> DDG html -> DDG lite -> Wikipedia)
Đào Minh Tú227138e -
feat(wave10): A/B compare + diff view + self-critique + z-index hierarchy fix
Đào Minh Tú500cd91 -
feat(server): smart context compaction when near limit
Đào Minh Tú +1: CopilotCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>f9b0358 -
feat(composer): image markup with canvas draw tools
Đào Minh Tú +1: CopilotCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>5f4587a -
feat(ui): density toggle + reading mode
Đào Minh Tú +1: CopilotCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>4acb47a -
feat(rag): client-side context prefetch from active collection
Đào Minh Tú +1: CopilotCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>7af3098 -
feat(tools): add runJs, crypto, stock, translate, github, email tools
Đào Minh Tú +1: CopilotCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>5b864ab -
feat(rag): document collections with mini-RAG via transformers.js
Đào Minh Tú +1: CopilotCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>9df054d -
feat(snippets): reusable text macros with variable expansion
Đào Minh Tú +1: CopilotCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>ad2e3d4 -
feat(themes): custom accent color picker
Đào Minh Tú +1: CopilotCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>73ba09a -
feat(tools): runPython with Pyodide WASM
Đào Minh Tú +1: CopilotCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>a8568ea -
feat(message): citations, code enhancements, reactions, chart/mermaid wiring
Đào Minh Tú +1: CopilotCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>6376aab -
feat(voice): hands-free voice mode with auto STT/TTS
Đào Minh Tú +1: CopilotAdds a root-mounted VoiceMode panel with continuous Web Speech recognition, 2s silence auto-send, Vietnamese-first speech synthesis, and listening/speaking indicators. Bridge: VoiceMode dispatches window event tans:voice-send with { text } and also uses a DOM composer fallback to fill the current textarea and submit. Wave 2 should add a first-class composer/chat listener for tans:voice-send to call the normal send path directly. TTS trigger: until chat/message can emit tans:assistant-finished or add data-role=assistant, VoiceMode observes the latest .prose-chat node and speaks when it is no longer streaming. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>fe5434c -
feat(router): add auto model router based on prompt heuristics
Đào Minh Tú +1: CopilotCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>833e205 -
feat(tools): add chartGen + mermaid tools
Đào Minh Tú +1: CopilotCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>b222a3d -
feat(phase1-wave5): SSE streaming + share-link + BYOK + analytics + branching + a11y + nav-bar fix
Đào Minh Tú +1: Copilot- True SSE endpoint /api/chat-sse (text/event-stream, OpenAI-compatible) - useSseChat hook + /sse-test demo page (reference: Code/docs/js/ai-agent.js) - Public share link /share/[id] + sidebar menu - BYOK dialog (Key icon header) + per-request key override in route - Analytics dashboard /stats (events, top models, tool usage donut) - Branching: edit user message fork session (parentId/branches) - Accessibility pass (aria-label on 8 dialog/UI primitives) - Fix nav bar overflow when persona label is long - Fix webSearch DDG HTML scrape (HTML body POST) actual results now Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>9343c92 -
feat(phase1-wave4): voice + tool-toggle + prompt-library + error-log + fix webSearch DDG
Đào Minh Tú +1: Copilot- Voice STT (Mic, vi-VN) in composer + TTS (Volume2) in messages - Per-session tool toggle dialog from sidebar - Prompt library CRUD + /prompts slash command + Library header button - Error replay log dialog + Bug header button + onError capture - FIX: webSearch DDG instant-answer API replaced by HTML scrape (always returns results now) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>daaf946 -
feat(phase1-wave3): pin/tags/FTS + file upload + personas + memory
Đào Minh Tú +1: Copilot- Pin sessions (sao), tags + filter, full-text search across messages - File/image upload (composer + drag-drop + experimental_attachments) - Persona presets (Default/Coder/Writer/Translator/Researcher) - Long-term memory (about + facts) injected via system prompt Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>ea2a8ac -
feat(phase1-wave2): export chat + token counter + shortcuts + PWA + adaptive typewriter
Đào Minh Tú +1: Copilot- Export current chat to Markdown/JSON via sidebar menu - Live token counter + USD cost estimate in composer (gpt-tokenizer) - Keyboard shortcuts dialog (Cmd/Ctrl+K, ?, N, /, etc.) - PWA: manifest, service worker, install prompt - Adaptive typewriter streaming inspired by SSE reference (60fps rAF, burst on backlog) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>6fc648c -
feat(phase1): theme toggle + slash commands + continue button + 4 new tools
Copilot +1: Copilot- theme-toggle: next-themes provider, system/light/dark via sidebar footer - slash-commands: /code /explain /translate /summarize /image /search popover in composer - stop-continue: client heuristic detects truncated answer, 'Tiếp tục' button appends nudge - tools: weather (Open-Meteo), wikipedia, fetchUrl, generateImage (Pollinations) - webSearch upgraded: Brave Search API w/ DDG fallback (BRAVE_SEARCH_API_KEY) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>3e306e5 -
fix(models): drop GitHub Llama-3.1 (no tool-calling via Azure endpoint)
Copilot +1: CopilotAudit (scripts/test-tools.mjs) of all 15 configured models against the calculator tool found: - 9 OK: gemini-2.5-flash, all 6 Groq, gpt-4o-mini, gpt-4o - 4 quota-exhausted today (Gemini free-tier, retry tomorrow) - 2 broken: github Meta-Llama-3.1-8B/405B-Instruct never emit tool-call, they only output prose 'tôi sẽ dùng calculator', so agent flows fail. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>d67f090 -
fix(models): purge decommissioned models, only keep verified-working list
Tan +1: CopilotVerified live against Groq /v1/models and GitHub Models /models endpoints: - groq: removed mixtral-8x7b-32768, gemma2-9b-it (decommissioned) added openai/gpt-oss-{120b,20b}, qwen/qwen3-32b, llama-4-scout-17b - github: removed Phi-3.5-mini-instruct, Mistral-Nemo (no longer listed) added Meta-Llama-3.1-{8B,405B}-Instruct - google: reordered default to gemini-2.5-flash-lite (most generous free quota); other 4 models kept (work when daily quota available) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>4ff5f15 -
feat: rebuild UI with Next.js 15 + shadcn/ui + Vercel AI SDK
Tan +1: Copilot- Beautiful chat interface using shadcn/ui (New York style, dark mode) - Multi-provider switcher: Gemini, Groq, GitHub Models - Streaming responses with tool-call badges via Vercel AI SDK - Edge runtime API route at /api/chat - Tools: webSearch (DuckDuckGo), calculator (safe parser), currentTime - Move Python/Gradio version to python/ subfolder - Vercel deploy config + updated CI for both Node and Python - Updated README with one-click Vercel deploy button Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>77ce963