Skip to content

Commit

Permalink
fix type
Browse files Browse the repository at this point in the history
  • Loading branch information
isamu committed Jun 17, 2024
1 parent cee4745 commit 84fd463
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 5 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Update Build

on:
push:
branches:
- main

permissions:
contents: write

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [20.x]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: yarn install
- run: yarn run build
- run: yarn run eslint
6 changes: 3 additions & 3 deletions src/views/Home.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<script lang="ts">
import { defineComponent, ref, onMounted } from "vue";
import { LGraph, LGraphCanvas, LiteGraph, LGraphNode } from "litegraph.js";
import { LGraph, LGraphCanvas, LiteGraph } from "litegraph.js";
import "litegraph.js/css/litegraph.css";
import { BasicSumAgent, StringInputNode, TextInputAgentNode, OpenAIAgentNode, StringTemplateAgentNode, PropertyFilterAgentNode } from "./nodes";
Expand All @@ -37,7 +37,7 @@ export default defineComponent({
onMounted(() => {
const graph = new LGraph();
const canvas = new LGraphCanvas(canvasRef.value, graph);
new LGraphCanvas(canvasRef.value, graph);
const node_const = LiteGraph.createNode("basic/sum");
node_const.pos = [200, 200];
Expand All @@ -55,7 +55,7 @@ export default defineComponent({
const string_node = LiteGraph.createNode("basic/stringInput");
graph.add(string_node);
string_node.pos = [200, 600];
string_node.connect(0, openai_node, 2)
string_node.connect(0, openai_node, 3)
const string_node2 = LiteGraph.createNode("graphai/StringTemplateAgent");
graph.add(string_node2);
Expand Down
4 changes: 2 additions & 2 deletions src/views/nodes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export class StringInputNode extends LGraphNode {
this.addOutput("Output", "string");
this.properties = { text: "" };
}
onDrawBackground(ctx) {
onDrawBackground(ctx: CanvasRenderingContext2D) {
if (this.flags.collapsed) {
return;
}
Expand Down Expand Up @@ -65,7 +65,7 @@ export class StringTemplateAgentNode extends LGraphNode {
this.addOutput("Output", "string");
}

onPropertyChanged(name, value) {
onPropertyChanged(name: string, value: string) {
this.properties[name] = value;
}
}
Expand Down

0 comments on commit 84fd463

Please sign in to comment.