F3: Kimi inference pipeline + full grok cloud-surface excision
Sampler / inference (PRD F3):
- kimi_compat.rs: single adaptation point for the Kimi chat/completions
dialect (thinking-field mapping, model_id stripping, empty-content
tool-call message fix, stream_options.include_usage), with kimi-cli
source citations
- Rate-limit handling reworked for Kimi/Moonshot semantics; UA kigi/{version}
- /models replaces the xAI models-v2 endpoint everywhere; idle model
refresh carries X-Msh-* device headers only (X-XAI-Token-Auth and
x-grok-client-mode/CLIENT_MODE_HEADER machinery deleted)
Cloud-surface excision (PRD §5, zero-egress):
- remote/ conversations lane, cli-chat-proxy-types crate, prod/ dir,
share command, credit bar: deleted (single local session lane;
paginate() replaces merge_and_paginate)
- Subscription/tier gate stack deleted end-to-end: AppView
gate/tier/team/ZDR fields, app/subscription.rs watch loop,
dispatch/billing.rs paywall + SuperGrok upsell, free-usage-exhausted
chain, tier-restricted commands, GateInfo, RemoteSettings gate fields,
SettingsUpdateNotification gate fields
- /privacy + coding-data-sharing setting deleted (backed by a dead xAI
RPC; Kigi is zero-egress — nothing to share or retain remotely)
Auth UX correctness (user-reported):
- Device-flow fixtures now mirror the live Kimi payload shape
(https://www.kimi.com/code/authorize_device?user_code=..., verified
against auth.kimi.com); the fabricated auth.kimi.com/device?code=...
URLs are gone
- open_browser_detached is a no-op under cfg(test): unit tests drove
wiremock fixture URLs into the real browser (root cause of the
"garbage mock link" ABCD-1234 tabs)
- Welcome/pager-minimal rebrand: Grok Build -> Kigi, grok.com ->
kimi.com, "Sign in to Grok" -> "Sign in to Kimi"
This commit is contained in:
@@ -329,7 +329,6 @@ impl AgentView {
|
||||
let thinking_label = self.scrollback.thinking_fold_label();
|
||||
let selected_is_user_prompt = selected_entry.is_some_and(|e| e.block.is_user_prompt());
|
||||
let selected_is_agent_message = selected_entry.is_some_and(|e| e.block.is_agent_message());
|
||||
let selected_is_credit_limit = selected_entry.is_some_and(|e| e.block.is_credit_limit());
|
||||
let mut hints = agent::build_hints(
|
||||
self.active_pane,
|
||||
&self.prompt,
|
||||
@@ -355,7 +354,6 @@ impl AgentView {
|
||||
!self.visible_queue_is_empty(),
|
||||
selected_is_user_prompt,
|
||||
selected_is_agent_message,
|
||||
selected_is_credit_limit,
|
||||
crate::terminal::terminal_context().shift_enter_unavailable(),
|
||||
self.scrollback_search.as_ref(),
|
||||
);
|
||||
@@ -1300,7 +1298,6 @@ impl AgentView {
|
||||
self.hit_bg_status.rect = areas.get("bg_tasks").copied();
|
||||
self.hit_goal_status.rect = areas.get("goal").copied();
|
||||
self.hit_context.rect = areas.get("context").copied();
|
||||
self.hit_credits.rect = areas.get("credits").copied();
|
||||
self.hit_plan_button.rect = areas.get("plan").copied();
|
||||
self.hit_queue_badge.rect = areas.get("queue").copied();
|
||||
self.hit_badge.rect = areas.get("badge").copied();
|
||||
@@ -2041,23 +2038,6 @@ impl AgentView {
|
||||
}
|
||||
let mode_flags: &[PromptFlag] = &mode_flags_vec;
|
||||
let multiline = self.multiline_mode;
|
||||
let usage_visible = self
|
||||
.prompt
|
||||
.slash_controller
|
||||
.registry()
|
||||
.get("usage")
|
||||
.is_some();
|
||||
let warning = self.credit_balance.as_ref().and_then(|bal| {
|
||||
crate::views::credit_bar::usage_warning_for_session(
|
||||
bal,
|
||||
self.auto_topup.as_ref(),
|
||||
usage_visible,
|
||||
self.chat_kind,
|
||||
)
|
||||
});
|
||||
let usage_warning_text: Option<String> = warning.as_ref().map(|(t, _)| t.clone());
|
||||
let usage_warning = usage_warning_text.as_deref();
|
||||
let usage_warning_critical = warning.is_some_and(|(_, critical)| critical);
|
||||
let model_label = match self.session.models.reasoning_effort {
|
||||
Some(eff) => format!("{model_id} ({eff})"),
|
||||
None => model_id,
|
||||
@@ -2067,8 +2047,6 @@ impl AgentView {
|
||||
model_name: &model_label,
|
||||
flags: mode_flags,
|
||||
multiline,
|
||||
usage_warning,
|
||||
usage_warning_critical,
|
||||
},
|
||||
PromptMode::EditingQueued { id, .. } => {
|
||||
let pos = self.session.queue_position(*id).map(|i| i + 1).unwrap_or(1);
|
||||
@@ -2077,8 +2055,6 @@ impl AgentView {
|
||||
model_name: &editing_label,
|
||||
flags: mode_flags,
|
||||
multiline,
|
||||
usage_warning,
|
||||
usage_warning_critical,
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -2087,8 +2063,6 @@ impl AgentView {
|
||||
model_name: label,
|
||||
flags: &[],
|
||||
multiline: false,
|
||||
usage_warning,
|
||||
usage_warning_critical,
|
||||
}
|
||||
} else {
|
||||
info
|
||||
|
||||
Reference in New Issue
Block a user