Skip to content

Commit

Permalink
Merge pull request #88 from Code-Inspect/87-display-flowr-version-in-…
Browse files Browse the repository at this point in the history
…bottom-bar-when-using-the-local-shell

feat: display flowr version when using a local shell
  • Loading branch information
EagleoutIce authored Jun 25, 2024
2 parents c591c41 + a1064f4 commit 41771b9
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 54 deletions.
112 changes: 63 additions & 49 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@
"generate-changelog": "git log ...$(git tag | tail -n 1) --pretty=format:'- %s' --reverse"
},
"dependencies": {
"@eagleoutice/flowr": "^2.0.5"
"@eagleoutice/flowr": "^2.0.9"
},
"devDependencies": {
"@types/mocha": "^10.0.6",
Expand Down
11 changes: 7 additions & 4 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { Settings } from './settings'
import { registerSliceCommands } from './slice'
import { registerDiagramCommands } from './diagram'
import type { FlowrSession } from './flowr/utils'
import { flowrVersion } from '@eagleoutice/flowr/util/version'

export const MINIMUM_R_MAJOR = 3
export const BEST_R_MAJOR = 4
Expand Down Expand Up @@ -91,13 +92,15 @@ export function updateStatusBar() {
flowrStatus.show()
flowrStatus.text = `$(cloud) flowR server ${flowrSession.state}`
flowrStatus.tooltip =
flowrSession.state === 'connected'
? `R version ${flowrSession.rVersion}\nflowR version ${flowrSession.flowrVersion}`
: undefined
flowrSession.state === 'connected' ?
`R version ${flowrSession.rVersion}\nflowR version ${flowrSession.flowrVersion}` :
undefined
} else if(flowrSession instanceof FlowrInternalSession) {
flowrStatus.show()
flowrStatus.text = `$(console) flowR shell ${flowrSession.state}`
flowrStatus.tooltip = flowrSession.state === 'active' ? `R version ${flowrSession.rVersion}` : undefined
flowrStatus.tooltip = flowrSession.state === 'active' ?
`R version ${flowrSession.rVersion}\nflowR version ${flowrVersion().toString()}` :
undefined
} else {
flowrStatus.hide()
}
Expand Down

0 comments on commit 41771b9

Please sign in to comment.