/feedback opens the Kigi GitHub issues page

Feedback about an unofficial community build belongs on its own issue
tracker, not Moonshot's feedback endpoint — and this mirrors the
official kimi-cli, whose /feedback opens its repo's issues page
(ISSUE_URL in ui/shell/slash.py). /feedback now returns
Action::OpenUrl(https://github.com/ZacharyZhang-NY/Kigi-CLI/issues),
the same battle-tested browser path /docs web uses.

The now-dead TUI text-feedback pipeline is excised: PromptInputMode::
Feedback (~ prefix composer mode), Action::{EnterFeedbackMode,
SendFeedback}, Effect::SendFeedback (the kigi/feedback ACP POST),
TaskResult::{FeedbackComplete,FeedbackFailed}, and their dispatchers.
The shell-side kigi/feedback ACP extension stays: it is protocol
surface for editor embeddings, OAuth-gated, and shared with kigi/btw.

Gates: workspace check/clippy --all-targets 0/0, fmt, kigi-tui lib
6621 passed / 0 failed.
This commit is contained in:
ZacharyZhang-NY committed 2026-07-18 11:51:13 -04:00
1 parent 0692198719
commit 0dc98a34a6
11 files changed
+74 -221

No files matched your search

@@ -1,9 +1,14 @@
//! `/feedback` -- send session feedback.
//! `/feedback` -- open the Kigi GitHub issues page.
use crate::app::actions::Action;
use crate::slash::command::{CommandExecCtx, CommandResult, SlashCommand};
/// Send session feedback inline or enter feedback mode.
/// Where feedback goes: the project's own issue tracker. Kigi is a community
/// build, so its feedback belongs on its GitHub 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 {
@@ -12,27 +17,75 @@ impl SlashCommand for FeedbackCommand {
}
fn description(&self) -> &str {
"Send feedback about the current session"
"Report feedback on the Kigi GitHub issues page"
}
fn usage(&self) -> &str {
"/feedback [text]"
"/feedback"
}
fn takes_args(&self) -> bool {
true
fn run(&self, _ctx: &mut CommandExecCtx, _args: &str) -> CommandResult {
CommandResult::Action(Action::OpenUrl(FEEDBACK_ISSUES_URL.into()))
}
}
fn arg_placeholder(&self) -> Option<&str> {
Some("[feedback text]")
#[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()
},
}
}
fn run(&self, _ctx: &mut CommandExecCtx, args: &str) -> CommandResult {
let trimmed = args.trim();
if trimmed.is_empty() {
CommandResult::Action(Action::EnterFeedbackMode)
} else {
CommandResult::Action(Action::SendFeedback(trimmed.to_string()))
#[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());
}
}