File tree Expand file tree Collapse file tree 5 files changed +15
-10
lines changed
Expand file tree Collapse file tree 5 files changed +15
-10
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ object Commands {
2121 type CommandT = Any => Any
2222 // all the commands here
2323 val cmdShowMenu =
24- (" functorcoder.menu" , quickPick.showQuickPick )
24+ (" functorcoder.menu" , quickPick.showMainMenu )
2525 val cmdAddDocs =
2626 (" functorcoder.addDocumentation" , addDocumentation)
2727
@@ -31,7 +31,7 @@ object Commands {
3131 // list of all commands to be registered
3232 def commandList (llm : llmAgent): Seq [(String , CommandT )] =
3333 Seq (
34- cmdShowMenu,
34+ ( cmdShowMenu._1, cmdShowMenu._2(llm)) ,
3535 cmdAddDocs,
3636 (cmdCreateFiles._1, cmdCreateFiles._2(llm))
3737 )
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ package functorcoder.editorUI
33import typings .vscode .mod as vscode
44import vscextension .facade .vscodeUtils .*
55import vscextension .quickPick
6+ import functorcoder .llm .llmMain .llmAgent
67
78object menu {
89 case class Menu (
@@ -25,8 +26,10 @@ object menu {
2526 )
2627
2728 // the main menu
28- val myMenu = Menu (
29- title = " functorcoder menu" ,
30- menuItems = mainMenuItems
31- )
29+ def getMainMenu (llm : llmAgent) = {
30+ Menu (
31+ title = " functorcoder menu" ,
32+ menuItems = mainMenuItems
33+ )
34+ }
3235}
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ object extensionMain {
2424 vscCommands.registerAllCommands(context, llm)
2525
2626 // show the status bar
27- statusBar.createStatusBarItem(context)
27+ statusBar.createStatusBarItem(context, llm )
2828 // statusBarItem.text = "functorcoder ok"
2929 // show the current language of the document
3030 // documentProps.showProps
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import scala.scalajs.js.JSConverters._
55import scala .concurrent .ExecutionContext .Implicits .global
66
77import typings .vscode .mod as vscode
8+ import functorcoder .llm .llmMain .llmAgent
89
910/** Show a quick pick palette to select items in multiple steps
1011 *
@@ -54,8 +55,8 @@ object quickPick {
5455 quickPick.show()
5556 }
5657
57- def showQuickPick (arg : Any ): Unit = {
58- val mMenu = functorcoder.editorUI.menu.myMenu
58+ def showMainMenu ( llm : llmAgent) (arg : Any ): Unit = {
59+ val mMenu = functorcoder.editorUI.menu.getMainMenu(llm)
5960
6061 val quickPick : vscode.QuickPick [vscode.QuickPickItem ] =
6162 vscode.window.createQuickPick()
Original file line number Diff line number Diff line change @@ -7,10 +7,11 @@ import functorcoder.actions.Commands
77import scala .concurrent .Future
88import scala .scalajs .js .JSConverters .JSRichFutureNonThenable
99import scala .concurrent .ExecutionContext .Implicits .global
10+ import functorcoder .llm .llmMain .llmAgent
1011
1112object statusBar {
1213
13- def createStatusBarItem (context : vscode.ExtensionContext ) = {
14+ def createStatusBarItem (context : vscode.ExtensionContext , llm : llmAgent ) = {
1415 val statusBarItem =
1516 vscode.window.createStatusBarItem(vscode.StatusBarAlignment .Right )
1617
You can’t perform that action at this time.
0 commit comments