aKode: comando akode update e avviso di nuova versione
- Nuovo crate akode-update: legge l'ultima release dal repository Gitea configurato ([update] repo_url, predefinito git.difonzo.net/andrea/aKode; 404 = nessun aggiornamento), confronta la semver, scarica akode-<versione>-<target>.tar.gz solo dallo stesso host, verifica lo SHA-256 e sostituisce il binario in modo atomico tenendo akode.old (nel layout a pacchetto aggiorna anche akode-package.json o l'intero pacchetto). - `akode update [--check]` con messaggi in italiano; mai installazioni automatiche. - TUI: controllo in background all'avvio al massimo ogni 24 h (update-check.json in AKODE_HOME), avviso su una riga, disattivabile con [update] check_on_startup = false. - Rimossi il prompt di aggiornamento e le azioni npm/brew/installer di OpenAI ormai inutilizzati; il doctor mostra sorgente e ultimo controllo. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -28,6 +28,7 @@ use crate::types::ShellEnvironmentPolicyToml;
|
||||
use crate::types::SkillsConfig;
|
||||
use crate::types::ToolSuggestConfig;
|
||||
use crate::types::Tui;
|
||||
use crate::types::UpdateConfigToml;
|
||||
use crate::types::UriBasedFileOpener;
|
||||
use crate::types::WindowsToml;
|
||||
use akode_features::FeaturesToml;
|
||||
@@ -547,6 +548,9 @@ pub struct ConfigToml {
|
||||
/// Defaults to `true`.
|
||||
pub feedback: Option<FeedbackConfigToml>,
|
||||
|
||||
/// Release source and startup check for `akode update`.
|
||||
pub update: Option<UpdateConfigToml>,
|
||||
|
||||
/// Settings for app-specific controls.
|
||||
#[serde(default)]
|
||||
pub apps: Option<AppsConfigToml>,
|
||||
|
||||
@@ -237,6 +237,20 @@ pub enum HistoryPersistence {
|
||||
None,
|
||||
}
|
||||
|
||||
/// Public Gitea repository that publishes aKode releases.
|
||||
pub const DEFAULT_UPDATE_REPO_URL: &str = "https://git.difonzo.net/andrea/aKode";
|
||||
|
||||
/// `[update]`: where `akode update` looks for releases and whether the TUI checks on startup.
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, Default, JsonSchema)]
|
||||
#[schemars(deny_unknown_fields)]
|
||||
pub struct UpdateConfigToml {
|
||||
/// Gitea repository URL (`https://host/owner/repo`) whose latest release is checked.
|
||||
/// Defaults to the public aKode repository.
|
||||
pub repo_url: Option<String>,
|
||||
/// When `false`, the TUI never checks for a newer release on startup. Defaults to `true`.
|
||||
pub check_on_startup: Option<bool>,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Default, JsonSchema)]
|
||||
#[schemars(deny_unknown_fields)]
|
||||
pub struct FeedbackConfigToml {
|
||||
|
||||
Reference in New Issue
Block a user