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:
1 parent
fe1f885bb3
commit
ea0ce9d15f
231 files changed
+4730
-26358
No files matched your search
@@ -3,7 +3,6 @@ use super::auth::{
|
||||
dispatch_cancel_login, dispatch_login, dispatch_logout, dispatch_submit_auth_code,
|
||||
dispatch_switch_account,
|
||||
};
|
||||
use super::billing::dispatch_open_supergrok_url;
|
||||
use super::ctx::{
|
||||
active_agent_session_id, get_active_agent_mut, navigate_clearing_selection,
|
||||
sync_sleep_inhibitor, with_active_agent, with_scrollback,
|
||||
@@ -93,10 +92,9 @@ use super::settings::ui::{
|
||||
dispatch_toggle_vim_mode,
|
||||
};
|
||||
use super::status::{
|
||||
dispatch_copy_session_id, dispatch_open_gboom, dispatch_share_session,
|
||||
dispatch_show_context_info, dispatch_show_privacy_info, dispatch_show_queue,
|
||||
dispatch_copy_session_id, dispatch_open_gboom, dispatch_show_context_info, dispatch_show_queue,
|
||||
dispatch_show_release_notes, dispatch_show_session_info, dispatch_show_tasks,
|
||||
dispatch_show_usage, set_coding_data_sharing,
|
||||
dispatch_show_usage,
|
||||
};
|
||||
use super::task_result::{dispatch_task_result, unregister_all_active_sessions};
|
||||
use super::transcript::{
|
||||
@@ -551,23 +549,7 @@ pub(crate) fn dispatch(action: Action, app: &mut AppView) -> Vec<Effect> {
|
||||
if group_toggled {
|
||||
return vec![];
|
||||
}
|
||||
let mut credit_card: Option<String> = None;
|
||||
with_scrollback(app, |s| {
|
||||
if let Some(idx) = s.selected()
|
||||
&& let Some(entry) = s.entry(idx)
|
||||
&& let crate::scrollback::block::RenderBlock::CreditLimit(ref blk) = entry.block
|
||||
{
|
||||
credit_card = Some(blk.url.clone());
|
||||
}
|
||||
});
|
||||
if let Some(url) = credit_card {
|
||||
crate::app::link_opener::open_url_if_safe(
|
||||
&url,
|
||||
crate::terminal::hyperlinks::SchemeFilter::Standard,
|
||||
);
|
||||
} else {
|
||||
dispatch_open_block_viewer(app);
|
||||
}
|
||||
dispatch_open_block_viewer(app);
|
||||
vec![]
|
||||
}
|
||||
Action::OpenExtensionsModal { tab } => {
|
||||
@@ -789,7 +771,6 @@ pub(crate) fn dispatch(action: Action, app: &mut AppView) -> Vec<Effect> {
|
||||
vec![Effect::FetchCatalogEntry { kind, name }]
|
||||
}
|
||||
Action::CycleMode => dispatch_cycle_mode(app),
|
||||
Action::ShareSession => dispatch_share_session(app),
|
||||
Action::ShowSessionInfo => dispatch_show_session_info(app),
|
||||
Action::ShowReleaseNotes { title, content } => {
|
||||
dispatch_show_release_notes(app, title, content)
|
||||
@@ -809,8 +790,6 @@ pub(crate) fn dispatch(action: Action, app: &mut AppView) -> Vec<Effect> {
|
||||
Action::SaveRememberNoteFromModal => dispatch_save_remember_note_from_modal(app),
|
||||
Action::SendBtw(question) => dispatch_send_btw(app, question),
|
||||
Action::SendRecap { auto } => dispatch_send_recap(app, auto),
|
||||
Action::ShowPrivacyInfo => dispatch_show_privacy_info(app),
|
||||
Action::SetCodingDataSharing { opted_in } => set_coding_data_sharing(app, opted_in),
|
||||
Action::ToggleYolo => dispatch_toggle_yolo(app),
|
||||
Action::ToggleMultiline => dispatch_toggle_multiline(app),
|
||||
Action::ToggleCompactMode => dispatch_toggle_compact_mode(app),
|
||||
@@ -873,8 +852,6 @@ pub(crate) fn dispatch(action: Action, app: &mut AppView) -> Vec<Effect> {
|
||||
Action::PermissionCancel => dispatch_permission_cancel(app),
|
||||
Action::Logout => dispatch_logout(app),
|
||||
Action::SwitchAccount => dispatch_switch_account(app),
|
||||
Action::CheckSubscription => vec![Effect::CheckSubscription { verify: None }],
|
||||
Action::OpenSupergrokUrl => dispatch_open_supergrok_url(app),
|
||||
Action::OpenUrl(url) => {
|
||||
use crate::terminal::hyperlinks::SchemeFilter;
|
||||
if url.starts_with("file://") {
|
||||
@@ -894,7 +871,7 @@ pub(crate) fn dispatch(action: Action, app: &mut AppView) -> Vec<Effect> {
|
||||
}
|
||||
Action::OpenManagedConnectors => {
|
||||
use crate::terminal::hyperlinks::SchemeFilter;
|
||||
let url = crate::views::mcps_modal::managed_connectors_url(app.team_id.as_deref());
|
||||
let url = crate::views::mcps_modal::managed_connectors_url(None);
|
||||
crate::app::link_opener::open_url_if_safe(&url, SchemeFilter::Standard);
|
||||
vec![]
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user