add deep evaluation + remove environment React context (passed via typeInfo instead) + improve highlighting of statically unknown values
This commit is contained in:
parent
8576f7cb8d
commit
8385f08923
10 changed files with 223 additions and 79 deletions
|
|
@ -3,7 +3,6 @@ import { memo, useContext, useEffect, useMemo, useRef, useState } from "react";
|
|||
import { trie } from "dope2";
|
||||
|
||||
import { CallContext } from "../../context/CallContext";
|
||||
import { EnvContext } from "../../context/EnvContext";
|
||||
import { GlobalContext } from "../../context/GlobalContext";
|
||||
import { inferTypeInput, type StaticEnvironment, type Type, type TypeInfoInput } from "../../eval/infer_type";
|
||||
import { getActions } from "../app/actions";
|
||||
|
|
@ -88,7 +87,7 @@ const computeSuggestions = (
|
|||
export function InputBlock({ state, setState, score, onCancel, typeInfo }: InputBlockProps) {
|
||||
const {text, focus} = state;
|
||||
const globalContext = useContext(GlobalContext);
|
||||
const env = useContext(EnvContext);
|
||||
const env = typeInfo.env;
|
||||
const callContext = useContext(CallContext);
|
||||
const inputRef = useRef<HTMLInputElement>(null);
|
||||
const [i, setI] = useState(0); // selected suggestion idx
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue