Skip to content
Draft
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
28 changes: 28 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Run Extension",
"type": "extensionHost",
"request": "launch",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}/packages/vscode"
],
"outFiles": [
"${workspaceFolder}/packages/vscode/dist/**/*.js"
],
"preLaunchTask": "build: vscode extension"
},
{
"name": "Run Extension (no build)",
"type": "extensionHost",
"request": "launch",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}/packages/vscode"
],
"outFiles": [
"${workspaceFolder}/packages/vscode/dist/**/*.js"
]
}
]
}
24 changes: 24 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "build: vscode extension",
"type": "shell",
"command": "node",
"args": ["packages/vscode/scripts/build-all.mjs"],
"options": {
"cwd": "${workspaceFolder}"
},
"problemMatcher": ["$tsc"],
"presentation": {
"reveal": "always",
"panel": "dedicated",
"clear": true
},
"group": {
"kind": "build",
"isDefault": true
}
}
]
}
1 change: 1 addition & 0 deletions apps/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"@agentscript/agentforce-dialect": "workspace:*",
"@agentscript/agentscript-dialect": "workspace:*",
"@agentscript/compiler": "workspace:*",
"@agentscript/graph-ui": "workspace:*",
"@agentscript/language": "workspace:*",
"@agentscript/lsp": "workspace:*",
"@agentscript/lsp-browser": "workspace:*",
Expand Down
2 changes: 1 addition & 1 deletion apps/ui/src/components/explorer/TreeView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import { ChevronRight, Folder, FileCode2 } from 'lucide-react';
import * as React from 'react';
import { getBlockTypeConfig } from '~/lib/block-type-config';
import { getBlockTypeConfig } from '@agentscript/graph-ui';
import { cn } from '~/lib/utils';
import {
Empty,
Expand Down
2 changes: 1 addition & 1 deletion apps/ui/src/components/graph/ActionDrawerContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*/

import { useAppStore } from '~/store';
import type { ActionDrawerData } from '~/lib/ast-to-graph';
import type { ActionDrawerData } from '@agentscript/graph-ui';
import { isNamedMap, type Statement } from '@agentscript/language';
import type { AgentScriptAST } from '~/lib/parser';
import { Play, Settings2, Shield, ArrowRight, Equal } from 'lucide-react';
Expand Down
6 changes: 4 additions & 2 deletions apps/ui/src/components/graph/ConditionalBuilderView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@
import { useMemo } from 'react';
import type { Statement } from '@agentscript/language';
import type { AgentScriptAST } from '~/lib/parser';
import { findTopicBlock } from '~/lib/ast-utils';
import type { ConditionalEdgeData } from '~/lib/ast-to-graph';
import {
findTopicBlock,
type ConditionalEdgeData,
} from '@agentscript/graph-ui';
import { useAppStore } from '~/store';
import { IfStatementEditor } from '~/components/builder/statements/IfStatementEditor';

Expand Down
6 changes: 4 additions & 2 deletions apps/ui/src/components/graph/ConditionalCodeView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@
import { useMemo } from 'react';
import type { Statement } from '@agentscript/language';
import type { AgentScriptAST } from '~/lib/parser';
import { findTopicBlock } from '~/lib/ast-utils';
import type { ConditionalEdgeData } from '~/lib/ast-to-graph';
import {
findTopicBlock,
type ConditionalEdgeData,
} from '@agentscript/graph-ui';
import { useAppStore } from '~/store';

interface ConditionalCodeViewProps {
Expand Down
2 changes: 1 addition & 1 deletion apps/ui/src/components/graph/ConditionalDrawerContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*/

import { useState } from 'react';
import type { ConditionalEdgeData } from '~/lib/ast-to-graph';
import type { ConditionalEdgeData } from '@agentscript/graph-ui';
import { ConditionalBuilderView } from './ConditionalBuilderView';
import { ConditionalCodeView } from './ConditionalCodeView';
import { cn } from '~/lib/utils';
Expand Down
2 changes: 1 addition & 1 deletion apps/ui/src/components/graph/NodeDrawerContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
Sparkles,
Zap,
} from 'lucide-react';
import type { NodeDrawerData, PhaseType } from '~/lib/ast-to-graph';
import type { NodeDrawerData, PhaseType } from '@agentscript/graph-ui';
import { useAppStore } from '~/store';

interface NodeDrawerContentProps {
Expand Down Expand Up @@ -277,7 +277,7 @@
}

/** Compute drawer title for a node. */
export function nodeDrawerTitle(data: NodeDrawerData): string {

Check warning on line 280 in apps/ui/src/components/graph/NodeDrawerContent.tsx

View workflow job for this annotation

GitHub Actions / Lint & Type Check

Fast refresh only works when a file only exports components. Use a new file to share constants or functions between components
switch (data.nodeType) {
case 'template':
return 'Template';
Expand All @@ -291,7 +291,7 @@
}

/** Compute drawer subtitle for a node. */
export function nodeDrawerSubtitle(data: NodeDrawerData): string {

Check warning on line 294 in apps/ui/src/components/graph/NodeDrawerContent.tsx

View workflow job for this annotation

GitHub Actions / Lint & Type Check

Fast refresh only works when a file only exports components. Use a new file to share constants or functions between components
switch (data.nodeType) {
case 'phase':
case 'phase-label':
Expand Down
2 changes: 2 additions & 0 deletions apps/ui/src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
@plugin '@tailwindcss/typography';
@plugin 'tailwind-scrollbar';

@source '../../../packages/graph-ui/src/**/*.{ts,tsx}';

/* Syntax highlighting for diff view */
.syntax-keyword {
color: #8250df;
Expand Down
23 changes: 0 additions & 23 deletions apps/ui/src/lib/ast-utils.ts

This file was deleted.

2 changes: 1 addition & 1 deletion apps/ui/src/pages/Builder.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import {
} from '~/components/explorer/astToTreeData';
import { AddBlockMenu } from '~/components/builder/AddBlockMenu';
import { ErrorBoundary } from '~/components/shared/ErrorBoundary';
import { DiagnosticHoverCard } from '~/components/graph/nodes/DiagnosticHoverCard';
import { DiagnosticHoverCard } from '@agentscript/graph-ui';
import { formatFieldName } from '~/lib/schema-introspection';

/**
Expand Down
Loading
Loading