Add status bar click handler and centralized project settings for backend configuration #24
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds clickable status bar widget to open the chat window and centralizes backend host/port configuration in PyCharm project settings.
Changes
Status Bar Click Handler
PicoCodeStatusBarWidget.kt: ImplementedgetClickConsumer()to open "PicoCode RAG" tool window viaToolWindowManager, with EDT-compliant invocationCentralized Settings Service
PicoCodeSettings.kt(new): Project-levelPersistentStateComponentstoring host/port in.idea/picocode.xml, defaults tolocalhost:8000PicoCodeConfigurable.kt(new): Settings UI under Tools > PicoCode with host/port text fieldsplugin.xml: RegisteredprojectConfigurableandprojectServiceextensionsIntegration
PicoCodeStatusBarWidget.kt: Replaced hardcodedDEFAULT_HOST/DEFAULT_PORTwith settings service callsPicoCodeToolWindowContent.kt: Removed embedded host/port fields, simplified UI to chat interface onlyExample Usage
Users configure backend once in project settings; status bar click provides quick access to chat.
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
cache-redirector.jetbrains.com/usr/lib/jvm/temurin-17-jdk-amd64/bin/java --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-opens=java.base/java.nio.charset=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED --add-opens=java.xml/javax.xml.namespace=ALL-UNNAMED --add-opens=java.base/java.time=ALL-UNNAMED -XX:MaxMetaspaceSize=384m -XX:+HeapDumpOnOutOfMemoryError -Xms256m -Xmx512m -Dfile.encoding=UTF-8 -Duser.country -Duser.language=en -Duser.variant -cp /usr/share/gradle-9.2.0/lib/gradle-daemon-main-9.2.0.jar -javaagent:/usr/share/gradle-9.2.0/lib/agents/gradle-instrumentation-agent-9.2.0.jar org.gradle.launcher.daemon.bootstrap.GradleDaemon 9.2.0(dns block)download.jetbrains.com/usr/lib/jvm/temurin-17-jdk-amd64/bin/java --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-opens=java.base/java.nio.charset=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED --add-opens=java.xml/javax.xml.namespace=ALL-UNNAMED --add-opens=java.base/java.time=ALL-UNNAMED -XX:MaxMetaspaceSize=384m -XX:+HeapDumpOnOutOfMemoryError -Xms256m -Xmx512m -Dfile.encoding=UTF-8 -Duser.country -Duser.language=en -Duser.variant -cp /usr/share/gradle-9.2.0/lib/gradle-daemon-main-9.2.0.jar -javaagent:/usr/share/gradle-9.2.0/lib/agents/gradle-instrumentation-agent-9.2.0.jar org.gradle.launcher.daemon.bootstrap.GradleDaemon 9.2.0(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
Modifiche richieste (motivazione):
L'utente vuole che cliccando sulla status bar si apra la chat del plugin (tool window "PicoCode RAG") e che ci sia un pannello di opzioni (Settings) in PyCharm per configurare host/port del backend. Inoltre controllare e correggere eventuali registrazioni mancanti in plugin.xml.
Obiettivi tecnici (azione da eseguire nel repo CodeAtCode/PicoCode):
Modificare ide-plugins/src/main/kotlin/com/picocode/PicoCodeStatusBarWidget.kt per aprire il tool window "PicoCode RAG" quando l'utente clicca sulla status bar. Attualmente getClickConsumer() è vuoto. Usare ToolWindowManager.getInstance(project).getToolWindow("PicoCode RAG") e mostrare il tool window; in caso di assenza mostrare un Messages.showInfoMessage. Assicurarsi che invokation avvenga su EDT.
Aggiungere un pannello di configurazione di progetto (Project Settings) che permetta di salvare host e port del server (valori predefiniti localhost:8000). Implementare un servizio Project-level che persiste i valori usando PersistentStateComponent. Creare due file Kotlin nuovi:
Aggiornare ide-plugins/src/main/resources/META-INF/plugin.xml per registrare il projectConfigurable (estensione) in modo che il pannello di opzioni appaia in Settings (Preferences) sotto nome "PicoCode". Aggiungere una entry:
Piccole verifiche e aggiustamenti:
Test da eseguire (manuale / CI):
File da creare/aggiornare (includere contenuto):
--- File: ide-plugins/src/main/kotlin/com/picocode/PicoCodeSettings.kt
--- File: ide-plugins/src/main/kotlin/com/picocode/PicoCodeConfigurable.kt