Files
Kigi-CLI/crates/codegen/kigi-tui/src/slash/commands/feedback.rs
T
ZacharyZhang-NY f7a4cb64ab
Release / build (x86_64-unknown-linux-gnu) (push) Failing after 6s
Release / build (aarch64-apple-darwin) (push) Canceled after 0s
Release / build (aarch64-unknown-linux-gnu) (push) Canceled after 0s
Release / build (x86_64-apple-darwin) (push) Canceled after 0s
Release / build (x86_64-pc-windows-msvc) (push) Canceled after 0s
Release / publish GitHub Release (push) Canceled after 0s
Return the forge to GitHub: releases, self-update, links, CI
The GitHub account is restored, so github.com/ZacharyZhang-NY/Kigi-CLI is
the canonical repo again. Reverse the 2026-08 Gitea migration:

- .github/workflows/{release,warm-cache}.yml: restore the GitHub-hosted
  pipeline dropped in 3e1652c, unchanged — hosted runners, rust-cache,
  softprops release with every asset attached atomically.
- .gitea/workflows/release.yml: retire the Gitea edition (the runners are
  being deregistered; git.zacharyzhang.com keeps the v0.1.12/v0.1.13
  releases for old clients).
- kigi-env: update_base_url now defaults to the GitHub Releases API. The
  updater already speaks GitHub wire format and sends a User-Agent; v0.1.14
  is published to BOTH forges with identical assets so pre-0.1.14 installs
  polling Gitea self-update onto the GitHub channel.
- install.sh / install.ps1: resolve releases from api.github.com.
- feedback, /docs, SECURITY.md, frontend worker + site: repo, issues and
  raw-file links point at github.com / raw.githubusercontent.com.
- docs/RELEASE.md: GitHub edition of the checklist; Gitea runner sections
  retired.
- version: 0.1.13 -> 0.1.14 (the cross-forge transition release).

Claude-Session: https://claude.ai/code/session_01A6RcwHhhsFYYrNdQB4ASuP
2026-09-01 01:05:22 -04:00

93 lines
2.7 KiB
Rust

//! `/feedback` -- open the Kigi issues page.
use crate::app::actions::Action;
use crate::slash::command::{CommandExecCtx, CommandResult, SlashCommand};
/// Where feedback goes: the project's own issue tracker. Kigi is a community
/// build, so its feedback belongs on its own repo — mirroring the official
/// kimi-cli, whose `/feedback` opens its repo's issues page.
pub const FEEDBACK_ISSUES_URL: &str =
"https://github.com/ZacharyZhang-NY/Kigi-CLI/issues";
/// Open the Kigi issue tracker in the browser.
pub struct FeedbackCommand;
impl SlashCommand for FeedbackCommand {
fn name(&self) -> &str {
"feedback"
}
fn description(&self) -> &str {
"Report feedback on the Kigi issues page"
}
fn usage(&self) -> &str {
"/feedback"
}
fn run(&self, _ctx: &mut CommandExecCtx, _args: &str) -> CommandResult {
CommandResult::Action(Action::OpenUrl(FEEDBACK_ISSUES_URL.into()))
}
}
#[cfg(test)]
mod tests {
use super::*;
use crate::acp::model_state::ModelState;
static DEFAULT_BUNDLE_STATE: crate::app::bundle::BundleState =
crate::app::bundle::BundleState {
has_cache: false,
version: String::new(),
personas: Vec::new(),
roles: Vec::new(),
agents: Vec::new(),
skills: Vec::new(),
persona_details: Vec::new(),
role_details: Vec::new(),
};
fn make_ctx<'a>(models: &'a ModelState) -> CommandExecCtx<'a> {
CommandExecCtx {
models,
session_id: None,
bundle_state: &DEFAULT_BUNDLE_STATE,
screen_mode: crate::app::ScreenMode::Inline,
pager_state: crate::settings::PagerLocalSnapshot {
multiline_mode: false,
yolo_mode: false,
..crate::settings::PagerLocalSnapshot::default()
},
}
}
#[test]
fn feedback_opens_github_issues() {
let models = ModelState::default();
let mut ctx = make_ctx(&models);
match FeedbackCommand.run(&mut ctx, "") {
CommandResult::Action(Action::OpenUrl(url)) => {
assert_eq!(url, FEEDBACK_ISSUES_URL);
}
other => panic!("expected OpenUrl, got {other:?}"),
}
}
#[test]
fn feedback_ignores_stray_args() {
let models = ModelState::default();
let mut ctx = make_ctx(&models);
assert!(matches!(
FeedbackCommand.run(&mut ctx, "some typed text"),
CommandResult::Action(Action::OpenUrl(_))
));
}
#[test]
fn feedback_metadata() {
let cmd = FeedbackCommand;
assert_eq!(cmd.name(), "feedback");
assert!(!cmd.takes_args());
}
}