diff options
Diffstat (limited to 'extension')
| -rw-r--r-- | extension/react-app/src/components/TextDialog.tsx | 10 | ||||
| -rw-r--r-- | extension/src/continueIdeClient.ts | 6 | 
2 files changed, 14 insertions, 2 deletions
| diff --git a/extension/react-app/src/components/TextDialog.tsx b/extension/react-app/src/components/TextDialog.tsx index 6b335e00..167e12cf 100644 --- a/extension/react-app/src/components/TextDialog.tsx +++ b/extension/react-app/src/components/TextDialog.tsx @@ -47,7 +47,15 @@ const TextDialog = (props: {        <Dialog>          <P>Thanks for your feedback. We'll get back to you soon!</P>          <TextArea cols={50} rows={10} ref={textAreaRef}></TextArea> -        <Button onClick={() => props.onEnter(text)}>Enter</Button> +        <Button +          onClick={() => { +            if (textAreaRef.current) { +              props.onEnter(textAreaRef.current.value); +            } +          }} +        > +          Enter +        </Button>        </Dialog>      </DialogContainer>    ); diff --git a/extension/src/continueIdeClient.ts b/extension/src/continueIdeClient.ts index 782219dc..3308068a 100644 --- a/extension/src/continueIdeClient.ts +++ b/extension/src/continueIdeClient.ts @@ -121,7 +121,11 @@ class IdeProtocolClient {      }    }    getWorkspaceDirectory() { -    return vscode.workspace.workspaceFolders![0].uri.fsPath; +    if (!vscode.workspace.workspaceFolders) { +      // Return the home directory +      return process.env.HOME || process.env.USERPROFILE || "/"; +    } +    return vscode.workspace.workspaceFolders[0].uri.fsPath;    }    // ------------------------------------ // | 
