A native macOS / windows / Linux database IDE built with Swift and AppKit. Connect to PostgreSQL, MySQL, SQLite, and Redis from a single app with a fast, keyboard-driven interface.
C++
// AIContextProvider.swift
// Gridex
//
// Protocol for building AI context from database schema.
// Manages token budgeting and smart context selection.
import Foundation
protocol AIContextProvider: Sendable {
func buildContext(
for question: String,
schema: SchemaSnapshot,
tokenBudget: Int
) async throws -> AIContext
func buildSystemPrompt(
databaseType: DatabaseType,
connectionInfo: String,
context: AIContext
) -> String
}