Implements Phases 1-8 of the TFTSR implementation plan. Rust backend (Tauri 2.x, src-tauri/): - Multi-provider AI: OpenAI-compatible, Anthropic, Gemini, Mistral, Ollama - PII detection engine: 11 regex patterns with overlap resolution - SQLCipher AES-256 encrypted database with 10 versioned migrations - 28 Tauri IPC commands for triage, analysis, document, and system ops - Ollama: hardware probe, model recommendations, pull/delete with events - RCA and blameless post-mortem Markdown document generators - PDF export via printpdf - Audit log: SHA-256 hash of every external data send - Integration stubs for Confluence, ServiceNow, Azure DevOps (v0.2) Frontend (React 18 + TypeScript + Vite, src/): - 9 pages: full triage workflow NewIssue→LogUpload→Triage→Resolution→RCA→Postmortem→History+Settings - 7 components: ChatWindow, TriageProgress, PiiDiffViewer, DocEditor, HardwareReport, ModelSelector, UI primitives - 3 Zustand stores: session, settings (persisted), history - Type-safe tauriCommands.ts matching Rust backend types exactly - 8 IT domain system prompts (Linux, Windows, Network, K8s, DB, Virt, HW, Obs) DevOps: - .woodpecker/test.yml: rustfmt, clippy, cargo test, tsc, vitest on every push - .woodpecker/release.yml: linux/amd64 + linux/arm64 builds, Gogs release upload Verified: - cargo check: zero errors - tsc --noEmit: zero errors - vitest run: 13/13 unit tests passing Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
34 lines
848 B
JavaScript
34 lines
848 B
JavaScript
import {charCodes} from "./charcodes";
|
|
|
|
// https://tc39.github.io/ecma262/#sec-white-space
|
|
export const WHITESPACE_CHARS = [
|
|
0x0009,
|
|
0x000b,
|
|
0x000c,
|
|
charCodes.space,
|
|
charCodes.nonBreakingSpace,
|
|
charCodes.oghamSpaceMark,
|
|
0x2000, // EN QUAD
|
|
0x2001, // EM QUAD
|
|
0x2002, // EN SPACE
|
|
0x2003, // EM SPACE
|
|
0x2004, // THREE-PER-EM SPACE
|
|
0x2005, // FOUR-PER-EM SPACE
|
|
0x2006, // SIX-PER-EM SPACE
|
|
0x2007, // FIGURE SPACE
|
|
0x2008, // PUNCTUATION SPACE
|
|
0x2009, // THIN SPACE
|
|
0x200a, // HAIR SPACE
|
|
0x202f, // NARROW NO-BREAK SPACE
|
|
0x205f, // MEDIUM MATHEMATICAL SPACE
|
|
0x3000, // IDEOGRAPHIC SPACE
|
|
0xfeff, // ZERO WIDTH NO-BREAK SPACE
|
|
];
|
|
|
|
export const skipWhiteSpace = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g;
|
|
|
|
export const IS_WHITESPACE = new Uint8Array(65536);
|
|
for (const char of WHITESPACE_CHARS) {
|
|
IS_WHITESPACE[char] = 1;
|
|
}
|