anchor.diff:  open Ionide.VSCode.Helpers
   
   module Fsi =
  +    [<Emit("setTimeout($0,$1)")>]
  +    let setTimeout(cb, delay) : obj = failwith "JS Only"
  +
       let mutable fsiOutput : Terminal option = None
   
       let isPowershell () =
           let t = workspace.getConfiguration().get("terminal.integrated.shell.windows", "")
           t.ToLower().Contains "powershell"
  +
  +    let sendCd () =
  +        let editor = window.activeTextEditor
  +        let file,dir =
  +            if  JS.isDefined editor then
  +                let file = editor.document.fileName
  +                let dir = path.dirname file
  +                file,dir
  +            else
  +                let dir = workspace.rootPath
  +                path.join(dir, "tmp.fsx"), dir
  +        let msg1 = sprintf "# silentCd @\"%s\";;\n" dir
  +        let msg2 = (sprintf "# %d @\"%s\" \n" 1 file)
  +
  +
  +        fsiOutput |> Option.iter (fun n ->
  +            n.sendText(msg1, false)
  +            n.sendText(msg2, false)
  +            n.sendText(";;\n", false)
  +        )
   
       let private start () =
           try
  
positive.code:                         sprintf "\"%s\" --fsi-server-input-codepage:65001" Environment.fsi, "cls"
                  else
                      Environment.fsi, "clear"
              terminal.sendText(clear, true)
              terminal.sendText(fsi, true)
              terminal.show(true)
          with
          | _ ->
              window.showErrorMessage "Failed to spawn FSI, please ensure it's in PATH" |> ignore
  
  
      let private send (msg : string) file =
  
          if fsiOutput.IsNone then start ()
          let msg = msg + ";;\n"
          let msg' =
              try
                  let dir = path.dirname file
                  "\n"
                  + (sprintf "# silentCd @\"%s\" ;; " dir) + "\n"
                  + (sprintf "# %d @\"%s\" " 1 file) + "\n"
                  + msg
              with
              | _ -> msg
  
          fsiOutput |> Option.iter (fun fp -> fp.sendText(msg,false) )
  
  
  
negative.code:         let file = editor.document.fileName
          let pos = editor.selection.start
          let line = editor.document.lineAt pos
          send line.text
          commands.executeCommand "cursorDown" |> ignore
  
      let private sendSelection () =
  