cq back in sync

This commit is contained in:
2024-11-15 00:15:17 -05:00
parent 93a0b65484
commit 1340e807e1
3 changed files with 10 additions and 8 deletions

View File

@@ -55,12 +55,13 @@ async function demonstrateNestedManifold(): Promise<void> {
{ text: 'analyze the results', description: 'Main: Data Analysis' }, { text: 'analyze the results', description: 'Main: Data Analysis' },
{ text: 'transform the output', description: 'Main: Data Transformation' }, { text: 'transform the output', description: 'Main: Data Transformation' },
]; ];
const errorSink = [];
for (const { text, description } of prompts) { for (const { text } of prompts) {
try { try {
const navigated = await mainManifold.navigate(text); await mainManifold.navigate(text);
const executed = await mainManifold.executeWorkflow(text); await mainManifold.executeWorkflow(text);
} catch (error) { } catch (error) {
errorSink.push(error);
// Handle errors silently in demo // Handle errors silently in demo
} }
} }

View File

@@ -1,5 +1,6 @@
import { log } from './logger'; import { log } from './logger';
import "./types";
import { IntentResult, WorkflowState } from './types';
export class DummyIntentMap { export class DummyIntentMap {
async query(prompt: string): Promise<IntentResult> { async query(prompt: string): Promise<IntentResult> {
log.debug(`Processing intent query for prompt: ${prompt}`); log.debug(`Processing intent query for prompt: ${prompt}`);
@@ -63,7 +64,7 @@ export class ManifoldRegion {
region.adjacentRegions.add(this); region.adjacentRegions.add(this);
} }
async getValidOperators(state: WorkflowState): Promise<WorkflowOperator[]> { async getValidOperators(_state: WorkflowState): Promise<WorkflowOperator[]> {
log.debug(`Getting valid operators for region ${this.name}`); log.debug(`Getting valid operators for region ${this.name}`);
return this.operators; return this.operators;
} }

4
src/types.d.ts vendored
View File

@@ -1,5 +1,5 @@
// src/types.d.ts // src/types.d.ts
interface WorkflowState { export interface WorkflowState {
[key: string]: unknown; [key: string]: unknown;
validated?: boolean; validated?: boolean;
cleaned?: boolean; cleaned?: boolean;
@@ -12,7 +12,7 @@ interface WorkflowState {
step2?: boolean; step2?: boolean;
} }
interface IntentResult { export interface IntentResult {
confidence: number; confidence: number;
action: string; action: string;
} }