Synced from monorepo
Synced from monorepo Changes: - grok-shell: send an expired external-provider credential to the sign-in flow, not a 401 loop - pager: clickable ▲ jumps to the top of the response being read - grok-shell: keep a large task log from making the completion message too long - Plan viewer scrollbar: widen grab zone to the border column; fix striped thumb in Terminal.app - pager: poll the tmux probe teardown grace instead of sleeping it - security: vendor-compat MCP kill switch is now actually enforced when reported as on - grok-shell: restore session eviction when a leader client disconnects - Bump rust-toolchain to 1.93.0 - workspace: lexical-normalize permission path patterns before glob matching - pager: reject garbage Enter in the /resume picker - pager: show Mermaid affordances in plan mode preview - pager: drop manage-account link from /session-info - workspace: auto-approve read-only git queries; defer write floor to auto classifier - Add free-form pattern editor to the "Always allow" command prompt - grok-shell: fix /btw caching - pager: Tab walks answers in the ask_user_question card - External-provider auth refresh: single 7s attempt instead of 3×5s - pager: don't resurrect finished background tasks as Running when completion arrives first - pager: report tmux truecolor clamping in Doctor - Fix plan viewer scrollbar click+drag hijacked by comment gutter - pager/shell: stop double Recap after the same last turn - sampler: preserve x-should-retry through stream collection - pager: clear plan-mode indicator immediately when the user approves a plan - pager: tmux does not re-read its config on reattach Source-Revision: 64c4de99cc822b25ce9c54ab5a4f372093d0885d
This commit is contained in:
parent
a422116582
commit
780d1388ff
323 changed files with 12258 additions and 7226 deletions
|
|
@ -2338,10 +2338,7 @@ fn format_session_info_session_auth_ignores_api_key_env() {
|
|||
let info = make_session_info("auto", None, 1000, 10000);
|
||||
let text = format_session_info(&info, None, false, false, true);
|
||||
assert!(text.contains("Auth method: OAuth"), "{text}");
|
||||
assert!(
|
||||
text.contains("Manage account and credits: https://grok.com/?_s=billing"),
|
||||
"{text}"
|
||||
);
|
||||
assert!(!text.contains("Manage account and credits"), "{text}");
|
||||
assert!(!text.contains("Also present: XAI_API_KEY"), "{text}");
|
||||
assert!(!text.contains("console.x.ai"), "{text}");
|
||||
assert!(!text.contains("grok login"), "{text}");
|
||||
|
|
@ -2352,10 +2349,7 @@ fn format_session_info_api_key_without_env() {
|
|||
let text = format_session_info(&info, None, false, true, false);
|
||||
assert!(text.contains("Auth method: API key\n"), "{text}");
|
||||
assert!(!text.contains("XAI_API_KEY"), "{text}");
|
||||
assert!(
|
||||
text.contains("Manage account and credits: console.x.ai"),
|
||||
"{text}"
|
||||
);
|
||||
assert!(!text.contains("Manage account and credits"), "{text}");
|
||||
assert!(
|
||||
text.contains("Run `grok login` to use your SuperGrok subscription instead."),
|
||||
"{text}"
|
||||
|
|
@ -2363,30 +2357,25 @@ fn format_session_info_api_key_without_env() {
|
|||
assert!(!text.contains("grok.com"), "{text}");
|
||||
}
|
||||
#[test]
|
||||
fn format_session_info_api_key_auth_notes_console_billing() {
|
||||
fn format_session_info_api_key_auth_suggests_grok_login() {
|
||||
let info = make_session_info("auto", None, 1000, 10000);
|
||||
let text = format_session_info(&info, None, false, true, true);
|
||||
assert!(text.contains("Auth method: API key (XAI_API_KEY)"), "{text}");
|
||||
assert!(
|
||||
text.contains("Manage account and credits: console.x.ai"),
|
||||
"{text}"
|
||||
);
|
||||
assert!(!text.contains("Manage account and credits"), "{text}");
|
||||
assert!(
|
||||
text.contains("Run `grok login` to use your SuperGrok subscription instead."),
|
||||
"{text}"
|
||||
);
|
||||
assert!(!text.contains("Also present: XAI_API_KEY"), "{text}");
|
||||
assert!(!text.contains("console.x.ai"), "{text}");
|
||||
assert!(!text.contains("grok.com"), "{text}");
|
||||
}
|
||||
#[test]
|
||||
fn format_session_info_session_only_manage_at_grok_com() {
|
||||
fn format_session_info_session_only_shows_oauth() {
|
||||
let info = make_session_info("auto", None, 1000, 10000);
|
||||
let text = format_session_info(&info, None, false, false, false);
|
||||
assert!(text.contains("Auth method: OAuth"), "{text}");
|
||||
assert!(
|
||||
text.contains("Manage account and credits: https://grok.com/?_s=billing"),
|
||||
"{text}"
|
||||
);
|
||||
assert!(!text.contains("Manage account and credits"), "{text}");
|
||||
assert!(!text.contains("Also present: XAI_API_KEY"), "{text}");
|
||||
assert!(!text.contains("console.x.ai"), "{text}");
|
||||
assert!(!text.contains("grok login"), "{text}");
|
||||
|
|
|
|||
Loading…
Reference in a new issue