Implemented output text

This commit is contained in:
Lucas Oliveira 2024-02-26 21:23:16 +01:00
commit 96e5ae65b1
2 changed files with 4 additions and 3 deletions

View file

@ -11,6 +11,7 @@ export default function IOOutputView({
const setNode = useFlowStore((state) => state.setNode);
const flowPool = useFlowStore((state) => state.flowPool);
const node = nodes.find((node) => node.id === outputId);
console.log(flowPool[node!.id][flowPool[node!.id].length - 1])
function handleOutputType() {
if (!node) return "no node found";
switch (outputType) {
@ -18,9 +19,9 @@ export default function IOOutputView({
return (
<Textarea
className="h-full w-full custom-scroll"
placeholder={"Enter text..."}
placeholder={"Empty"}
// update to real value on flowPool
value={flowPool[node.id][flowPool[node.id].length - 1].data.results}
value={flowPool[node.id][flowPool[node.id].length - 1].params}
readOnly
/>
);

View file

@ -681,4 +681,4 @@ export const LANGFLOW_SUPPORTED_TYPES = new Set([
export const priorityFields = new Set(["code", "template"]);
export const INPUT_TYPES = new Set(["ChatInput", "TextInput"]);
export const OUTPUT_TYPES = new Set(["ChatOutput", "PromptTemplate"]);
export const OUTPUT_TYPES = new Set(["ChatOutput", "TextOutput"]);