mirror of
https://github.com/tiennm99/serena.git
synced 2026-10-12 16:15:33 +00:00
Show Serena version in dashboard #1078
This commit is contained in:
1 parent
7d9e0508d6
commit
554be85201
3 files changed
+8
-2
No files matched your search
+4
-2
@@ -269,6 +269,8 @@ class SerenaAgent:
|
||||
:param memory_log_handler: a MemoryLogHandler instance from which to read log messages; if None, a new one will be created
|
||||
if necessary.
|
||||
"""
|
||||
self.version = serena_version()
|
||||
|
||||
# obtain serena configuration using the decoupled factory function
|
||||
self.serena_config = serena_config or SerenaConfig.from_config_file()
|
||||
|
||||
@@ -334,7 +336,7 @@ class SerenaAgent:
|
||||
|
||||
# log fundamental information
|
||||
log.info(
|
||||
f"Starting Serena server (version={serena_version()}, process id={os.getpid()}, parent process id={os.getppid()}; "
|
||||
f"Starting Serena server (version={self.version}, process id={os.getpid()}, parent process id={os.getppid()}; "
|
||||
f"language backend={self.serena_config.language_backend.name}); Python version={platform.python_version()}, platform={platform.platform()}"
|
||||
)
|
||||
log.info("Configuration file: %s", self.serena_config.config_file_path)
|
||||
@@ -875,7 +877,7 @@ class SerenaAgent:
|
||||
:return: a string overview of the current configuration, including the active and available configuration options
|
||||
"""
|
||||
result_str = "Current configuration:\n"
|
||||
result_str += f"Serena version: {serena_version()}\n"
|
||||
result_str += f"Serena version: {self.version}\n"
|
||||
result_str += f"Loglevel: {self.serena_config.log_level}, trace_lsp_communication={self.serena_config.trace_lsp_communication}\n"
|
||||
if self._active_project is not None:
|
||||
result_str += f"Active project: {self._active_project.project_name}\n"
|
||||
|
||||
@@ -60,6 +60,7 @@ class ResponseConfigOverview(BaseModel):
|
||||
languages: list[str]
|
||||
encoding: str | None
|
||||
current_client: str | None
|
||||
serena_version: str
|
||||
|
||||
|
||||
class ResponseAvailableLanguages(BaseModel):
|
||||
@@ -537,6 +538,7 @@ class SerenaDashboardAPI:
|
||||
languages=languages,
|
||||
encoding=encoding,
|
||||
current_client=Tool.get_last_tool_call_client_str(),
|
||||
serena_version=self._agent.version,
|
||||
)
|
||||
|
||||
def _shutdown(self) -> None:
|
||||
|
||||
@@ -637,6 +637,8 @@ class Dashboard {
|
||||
|
||||
let html = '<div class="config-grid">';
|
||||
|
||||
html += '<div class="config-label">Version:</div><div class="config-value">' + config.serena_version + '</div>';
|
||||
|
||||
// Project info
|
||||
html += '<div class="config-label">Active Project:</div>';
|
||||
if (config.active_project.name && config.active_project.path) {
|
||||
|
||||
Reference in new issue
Block a user