|
|
|
@ -25,7 +25,7 @@ function Infoview({ editor, editorApi, leanClient } : {editor: monaco.editor.ISt
|
|
|
|
const [globalDiagnostics, setGlobalDiagnostics] = useState<any[]>(undefined)
|
|
|
|
const [globalDiagnostics, setGlobalDiagnostics] = useState<any[]>(undefined)
|
|
|
|
|
|
|
|
|
|
|
|
const [uri, setUri] = useState<string>()
|
|
|
|
const [uri, setUri] = useState<string>()
|
|
|
|
console.log(rpcSession)
|
|
|
|
|
|
|
|
const fetchInteractiveGoals = () => {
|
|
|
|
const fetchInteractiveGoals = () => {
|
|
|
|
if (editor && rpcSession) {
|
|
|
|
if (editor && rpcSession) {
|
|
|
|
const pos = toLanguageServerPosition(editor.getPosition())
|
|
|
|
const pos = toLanguageServerPosition(editor.getPosition())
|
|
|
|
@ -84,6 +84,7 @@ function Infoview({ editor, editorApi, leanClient } : {editor: monaco.editor.ISt
|
|
|
|
checkCompleted()
|
|
|
|
checkCompleted()
|
|
|
|
const t = editor.onDidChangeModel((ev) => {
|
|
|
|
const t = editor.onDidChangeModel((ev) => {
|
|
|
|
if (ev.newModelUrl) {
|
|
|
|
if (ev.newModelUrl) {
|
|
|
|
|
|
|
|
editorApi.closeRpcSession(rpcSession)
|
|
|
|
setRpcSession(undefined)
|
|
|
|
setRpcSession(undefined)
|
|
|
|
setUri(ev.newModelUrl.toString())
|
|
|
|
setUri(ev.newModelUrl.toString())
|
|
|
|
editorApi.createRpcSession(ev.newModelUrl.toString()).then((rpcSession) => {
|
|
|
|
editorApi.createRpcSession(ev.newModelUrl.toString()).then((rpcSession) => {
|
|
|
|
|