little ui stuff
This commit is contained in:
parent
f52f108e97
commit
3ca5c52e83
2 changed files with 5 additions and 9 deletions
|
|
@ -378,7 +378,8 @@ const ComboBox = React.forwardRef((props: ComboBoxProps, ref) => {
|
|||
</Ul>
|
||||
</div>
|
||||
{highlightedCodeSections.length === 0 &&
|
||||
(downshiftProps.inputValue?.startsWith("/edit") || metaKeyPressed) && (
|
||||
(downshiftProps.inputValue?.startsWith("/edit") ||
|
||||
(metaKeyPressed && downshiftProps.inputValue?.length > 0)) && (
|
||||
<div className="text-trueGray-400 pr-4 text-xs text-right">
|
||||
Inserting at cursor
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -170,6 +170,7 @@ function GUI(props: GUIProps) {
|
|||
const waitingForSteps =
|
||||
state.active &&
|
||||
state.history.current_index < state.history.timeline.length &&
|
||||
state.history.timeline[state.history.current_index] &&
|
||||
state.history.timeline[
|
||||
state.history.current_index
|
||||
].step.description?.trim() === "";
|
||||
|
|
@ -236,14 +237,14 @@ function GUI(props: GUIProps) {
|
|||
history.current_index < history.timeline.length
|
||||
) {
|
||||
if (
|
||||
history.timeline[history.current_index].step.name ===
|
||||
history.timeline[history.current_index]?.step.name ===
|
||||
"Waiting for user input"
|
||||
) {
|
||||
if (input.trim() === "") return;
|
||||
onStepUserInput(input, history!.current_index);
|
||||
return;
|
||||
} else if (
|
||||
history.timeline[history.current_index].step.name ===
|
||||
history.timeline[history.current_index]?.step.name ===
|
||||
"Waiting for user confirmation"
|
||||
) {
|
||||
onStepUserInput("ok", history!.current_index);
|
||||
|
|
@ -350,12 +351,6 @@ function GUI(props: GUIProps) {
|
|||
</div>
|
||||
|
||||
<ComboBox
|
||||
// disabled={
|
||||
// history?.timeline.length
|
||||
// ? history.timeline[history.current_index].step.name ===
|
||||
// "Waiting for user confirmation"
|
||||
// : false
|
||||
// }
|
||||
ref={mainTextInputRef}
|
||||
onEnter={(e) => {
|
||||
onMainTextInput(e);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue