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
2 changes: 1 addition & 1 deletion .env.local
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ SAGITTARIUS_GRAPHQL_URL=http://localhost:80/graphql
SAGITTARIUS_CABLE_URL=http://localhost:80/cable

NEXT_PUBLIC_SCULPTOR_VERSION=0.0.0
NEXT_PUBLIC_PICTOR_VERSION=0.10.9
NEXT_PUBLIC_PICTOR_VERSION=0.11.0
NEXT_PUBLIC_ALLOWED_REDIRECT_DOMAINS=*.code0.tech,*.codezero.build

NEXT_PUBLIC_OTEL_SERVICE_NAME=#"sculptor-client"
Expand Down
134 changes: 126 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
},
"dependencies": {
"@apollo/client": "^4.0.9",
"@code0-tech/pictor": "^0.10.9",
"@code0-tech/triangulum": "^0.25.5",
"@code0-tech/pictor": "^0.11.0",
"@code0-tech/triangulum": "^0.25.6",
"@codemirror/lang-javascript": "^6.2.5",
"@codemirror/lint": "^6.9.5",
"@icons-pack/react-simple-icons": "^13.13.0",
Expand Down
8 changes: 1 addition & 7 deletions src/packages/ce/src/ai/components/AIChatComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -178,13 +178,7 @@ export const AIChatComponent: React.FC<AIChatComponentProps> = (props) => {
boxShadow: "none"
}
}}
placeholder={"Describe what you want to edit..."}
language={StreamLanguage.define({
token(stream) {
stream.next()
return null;
}
})}/>
placeholder={"Describe what you want to edit..."}/>
)
}
<Spacing spacing={"xxs"}/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,48 +34,53 @@ export const DataTypeInputComponent: React.FC<DataTypeInputComponentProps> = (pr
const suggestions = "schema" in (schema ?? {}) ? (schema as NodeSchema)?.schema?.suggestions as (NodeFunction | ReferenceValue | LiteralValue)[] : []
const inputName = "schema" in (schema ?? {}) ? (schema as NodeSchema)?.schema?.input : (schema as Schema)?.input

if ("schema" in (schema ?? {}) && (((schema as NodeSchema).blockedBy?.length ?? 0) > 0) && (rest.formValidation?.valid ?? false)) {
return null
}
return React.useMemo(
() => {
if ("schema" in (schema ?? {}) && (((schema as NodeSchema).blockedBy?.length ?? 0) > 0) && (rest.formValidation?.valid ?? false)) {
return null
}

switch (inputName) {
case "boolean":
return <DataTypeBooleanInputComponent
schema={schema}
suggestions={suggestions}
{...rest}
/>
case "select":
return <DataTypeSelectInputComponent
schema={schema}
suggestions={suggestions}
{...rest}/>
case "number":
return <DataTypeNumberInputComponent
schema={schema}
suggestions={suggestions}
{...rest}/>
case "list":
case "data":
return <DataTypeJSONInputComponent
schema={schema}
suggestions={suggestions}
{...rest}/>
case "generic":
return <DataTypeGenericInputComponent
schema={schema}
suggestions={suggestions}
{...rest}/>
case "sub-flow":
return <DataTypeSubFlowInputComponent
schema={schema}
suggestions={suggestions}
{...rest}/>
default:
return <DataTypeTextInputComponent
suggestions={suggestions}
schema={schema}
{...rest}
/>
}
switch (inputName) {
case "boolean":
return <DataTypeBooleanInputComponent
schema={schema}
suggestions={suggestions}
{...rest}
/>
case "select":
return <DataTypeSelectInputComponent
schema={schema}
suggestions={suggestions}
{...rest}/>
case "number":
return <DataTypeNumberInputComponent
schema={schema}
suggestions={suggestions}
{...rest}/>
case "list":
case "data":
return <DataTypeJSONInputComponent
schema={schema}
suggestions={suggestions}
{...rest}/>
case "generic":
return <DataTypeGenericInputComponent
schema={schema}
suggestions={suggestions}
{...rest}/>
case "sub-flow":
return <DataTypeSubFlowInputComponent
schema={schema}
suggestions={suggestions}
{...rest}/>
default:
return <DataTypeTextInputComponent
suggestions={suggestions}
schema={schema}
{...rest}
/>
}
},
[rest.initialValue, inputName, suggestions?.length ?? 0, rest.formValidation?.valid ?? true, rest.formValidation?.notValidMessage ?? ""]
)
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import React from "react";
import {DataTypeInputComponentProps} from "../DataTypeInputComponent";
import {EditorInput, hashToColor, InputDescription, InputLabel} from "@code0-tech/pictor";
import {StreamLanguage} from "@codemirror/language";
import {tags} from "@lezer/highlight";
import {EditorInput, InputDescription, InputLabel} from "@code0-tech/pictor";
import {useDebouncedCallback} from "use-debounce";
import {
LiteralValue,
Expand Down Expand Up @@ -55,15 +53,6 @@ export const DataTypeNumberInputComponent: React.FC<DataTypeNumberInputComponent
formValidation={{...formValidation, setValue: undefined}}
maw={"100%"}
placeholder={String(title) ?? ""}
language={StreamLanguage.define({
token(stream) {
stream.next()
return null;
}
})}
tokenStyles={[
{tag: tags.keyword, color: hashToColor("bracket")},
]}
right={
<DataTypeInputControlsComponent suggestions={suggestions} onSelect={value => {
formValidation?.setValue?.(value)
Expand Down
Loading