Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions AGENT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
This app uses the gauss formula engine which is in this path /home/chief/gaussformula

Reference it whenever we have engine related issues to address or to provide more context about what we are building
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { describe, expect, it } from 'vitest'

import { deriveAnalysisState, getColumnName } from './analysisState'
import { deriveAnalysisState, getColumnName } from '../../../src/app/analysisState'

describe('analysisState', () => {
it('formats spreadsheet column labels', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import { describe, expect, it } from "vitest";

import { GaussFormulaEngine } from "../lib/formulaEngine";
import { cellAddressToA1 } from "./address";
import type { WorkbookSnapshot } from "./workbookSnapshot";
import { cellAddressToA1 } from "../../../src/assistant/address";
import {
applyAssistantChangesToEngine,
extractAssistantProposalFromText,
stripAssistantProposalFromText,
validateAssistantProposal,
} from "./proposals";
} from "../../../src/assistant/proposals";
import type { WorkbookSnapshot } from "../../../src/assistant/workbookSnapshot";
import { GaussFormulaEngine } from "../../../src/lib/formulaEngine";

const snapshot: WorkbookSnapshot = {
sheetName: "Sheet1",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import { describe, expect, it } from "vitest";

import { GaussFormulaEngine } from "../lib/formulaEngine";
import { cellAddressFromA1, cellAddressToA1 } from "./address";
import { buildWorkbookSnapshot } from "./workbookSnapshot";
import {
cellAddressFromA1,
cellAddressToA1,
} from "../../../src/assistant/address";
import { buildWorkbookSnapshot } from "../../../src/assistant/workbookSnapshot";
import { GaussFormulaEngine } from "../../../src/lib/formulaEngine";

describe("assistant workbook snapshot", () => {
it("converts between zero-based coordinates and A1 addresses", () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
type DistributionChartModelFromDataInput,
type DistributionChartModelInput,
type DistributionQueryState,
} from './distributionChartOptions'
} from '../../../../src/components/charts/distributionChartOptions'

const themeColors: ChartThemeColors = {
textPrimary: '#1f2d2d',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
shouldAutoFitAfterGraphRefresh,
type LayoutEdge,
type LayoutNode,
} from "./useLayoutNodes";
} from "../../../../src/components/flow-diagram/useLayoutNodes";

const node = (id: string): LayoutNode => ({
id,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { describe, expect, it } from 'vitest'

import { formatCellValue } from './cellFormatting'
import { formatCellValue } from '../../../../src/components/spreadsheet/cellFormatting'

const sampledValue = {
samples: [1, 2, 3],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { describe, expect, it } from "vitest";

import { spreadsheetExamples } from "./examples";
import { GaussFormulaEngine } from "../lib/formulaEngine";
import { spreadsheetExamples } from "../../../src/examples/examples";
import { GaussFormulaEngine } from "../../../src/lib/formulaEngine";

const a1ToAddress = (address: string) => {
const match = address.match(/^([A-Z]+)(\d+)$/);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { describe, expect, it } from "vitest";

import { formatFormulaBarCellValue } from "./useFormulaBar";
import { formatFormulaBarCellValue } from "../../../src/hooks/useFormulaBar";

describe("formatFormulaBarCellValue", () => {
it("formats variance-backed summaries as standard deviation", () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { resolve } from 'node:path'

import { describe, expect, it } from 'vitest'

import { GaussFormulaEngine } from '../lib/formulaEngine'
import { GaussFormulaEngine } from '../../../src/lib/formulaEngine'

const packageJson = JSON.parse(
readFileSync(resolve(process.cwd(), 'package.json'), 'utf8'),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import type { streamText } from "ai";
import { describe, expect, it, vi } from "vitest";

import { DEFAULT_ASSISTANT_MODEL_ID } from "../assistant/modelOptions";
import { createAssistantHandler } from "./assistantRoute";
import { DEFAULT_ASSISTANT_MODEL_ID } from "../../../src/assistant/modelOptions";
import { createAssistantHandler } from "../../../src/server/assistantRoute";

type StreamTextOptions = Parameters<typeof streamText>[0];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { join } from "node:path";

import { afterEach, describe, expect, it } from "vitest";

import { getProjectEnvValue } from "./projectEnv";
import { getProjectEnvValue } from "../../../src/server/projectEnv";

const originalOpenAiApiKey = process.env.OPENAI_API_KEY;
let tempDirectories: string[] = [];
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { describe, expect, it } from "vitest";

import type { VisualDependencyGraph } from "../../types/visualDependencyGraph";
import type { VisualDependencyGraph } from "../../../../src/types/visualDependencyGraph";
import {
buildVisualGraphIndex,
getDefaultFocusMode,
getEdgeFocusState,
getFocusCounts,
getFocusState,
} from "./graphQueries";
} from "../../../../src/utils/visual-dependency-graph/graphQueries";

const graph: VisualDependencyGraph = {
nodes: [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { describe, expect, it } from 'vitest'

import type { VisualDependencyGraph } from '../../types/visualDependencyGraph'
import { toFlowDiagramElements } from './visualDependencyGraphAdapter'
import type { VisualDependencyGraph } from '../../../../src/types/visualDependencyGraph'
import { toFlowDiagramElements } from '../../../../src/utils/visual-dependency-graph/visualDependencyGraphAdapter'

describe('toFlowDiagramElements', () => {
it('maps graph payload into React Flow nodes and edges', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { describe, expect, it } from 'vitest'

import { formatVisualDependencyValue } from './visualDependencyGraphFormatter'
import { formatVisualDependencyValue } from '../../../../src/utils/visual-dependency-graph/visualDependencyGraphFormatter'

describe('formatVisualDependencyValue', () => {
it('formats scalar values', () => {
Expand Down
4 changes: 2 additions & 2 deletions vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { defineConfig } from 'vitest/config'
export default defineConfig({
test: {
environment: 'node',
include: ['src/**/*.test.ts'],
include: ['tests/unit/**/*.test.ts'],
passWithNoTests: true,
setupFiles: ['src/test/setup.ts'],
setupFiles: ['tests/setup.ts'],
},
})
Loading