feat(webui): show commit and prefill bug report diagnostics (#6080)
* feat(webui): show gateway commit in About settings * feat(webui): prefill revision in bug reports * fix(webui): use parentheses for commit details * feat(webui): prefill gateway diagnostics in bug reports * docs: remove About settings explanation * fix(webui): prefill dedicated issue diagnostic fields * fix(docker): include revision helper in dependency build layer
This commit is contained in:
1 parent
42f06ab1dc
commit
b0d28af321
12 files changed
+274
-56
No files matched your search
@@ -5,6 +5,7 @@ from __future__ import annotations
|
||||
import asyncio
|
||||
import inspect
|
||||
import json
|
||||
import platform
|
||||
import re
|
||||
import time
|
||||
from collections.abc import Callable, Iterable, Mapping
|
||||
@@ -15,6 +16,7 @@ from zoneinfo import ZoneInfo
|
||||
|
||||
from pydantic.alias_generators import to_snake
|
||||
|
||||
from nanobot.build_info import COMMIT
|
||||
from nanobot.channels._setup import channel_setup_spec
|
||||
from nanobot.channels.connect import ChannelConnectError
|
||||
from nanobot.channels.contracts import (
|
||||
@@ -66,12 +68,20 @@ class SystemSettingsOperations:
|
||||
channel_runtime_status: Callable[[], dict[str, Any]] | None = None
|
||||
|
||||
|
||||
class GatewayEnvironmentPayload(TypedDict):
|
||||
python_version: str
|
||||
os: str
|
||||
os_version: str
|
||||
architecture: str
|
||||
|
||||
|
||||
class SystemSettingsPayload(TypedDict):
|
||||
runtime_config: dict[str, Any]
|
||||
runtime: dict[str, Any]
|
||||
usage: dict[str, Any]
|
||||
advanced: dict[str, Any]
|
||||
version: dict[str, Any]
|
||||
environment: GatewayEnvironmentPayload
|
||||
docs: dict[str, Any]
|
||||
|
||||
|
||||
@@ -138,7 +148,13 @@ def system_settings_payload(
|
||||
"exec_path_prepend_set": bool(exec_config.path_prepend),
|
||||
"exec_path_append_set": bool(exec_config.path_append),
|
||||
},
|
||||
"version": {"current": version},
|
||||
"version": {"current": version, "commit": COMMIT},
|
||||
"environment": {
|
||||
"python_version": platform.python_version(),
|
||||
"os": platform.system(),
|
||||
"os_version": platform.release(),
|
||||
"architecture": platform.machine(),
|
||||
},
|
||||
"docs": docs_payload(version),
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user