ac-helper/frontend/src/api/ai.ts
Vadym Samoilenko 72c50b2c92 Initial commit — AC Tool unified application
Merges ac-helper (PHP Activation Calendar) and brief-extractor (Python AI)
into a single Docker app with React/TypeScript frontend.

Features:
- Brief upload → AI extraction → review → Activation Calendar import
- Handsontable v17 spreadsheet with dependent dropdowns (148 categories)
- AI natural language commands via Gemini (YOLO mode, voice input)
- Azure AD MSAL SPA PKCE authentication, user roles (user/admin)
- CSV Activation Calendar export
- Real-time WebSocket job progress
- Admin: user management, dropdown Excel upload
- Multi-stage Dockerfile, docker-compose, nginx proxy instructions

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23 13:24:46 +00:00

14 lines
510 B
TypeScript

import api from './client'
import type { Deliverable } from '../types'
export interface CommandResult {
success: boolean
operation?: 'create' | 'update' | 'batch_update' | 'question'
count?: number
question?: string
data?: Deliverable[]
error?: string
}
export const sendCommand = (sheetId: string, command: string, yoloMode: boolean, history: string): Promise<CommandResult> =>
api.post<CommandResult>(`/sheets/${sheetId}/command`, { command, yolo_mode: yoloMode, history }).then(r => r.data)