Open source Grok Bot alternative, Bring your own agent and subscription: message Claude Code, Codex, Gemini CLI, Cursor, Copilot and 40+ AI agents as bots on your own computer, from iPhone, Mac, Windows, Linux or terminal. Agent-agnostic and free. Also a Muse and Dots alternative. Built in Rust.
Rust acpagent-client-protocolai-agentsai-assistantclaudeclaude-codecodexcoding-agentscursorgeminigemini-cligrok-bot-alternativeiosiphonelinuxmacosmcpopen-sourcerustself-hosted
feat: drop the cancel action from chat request cards
leepokai6b66e96ffd0b
diff --git a/apps/desktop/src/renderer/views/marketplace/ConnectionRequestCard.tsx b/apps/desktop/src/renderer/views/marketplace/ConnectionRequestCard.tsxindex 9da398c0..ec0650b4 100644--- a/apps/desktop/src/renderer/views/marketplace/ConnectionRequestCard.tsx+++ b/apps/desktop/src/renderer/views/marketplace/ConnectionRequestCard.tsx@@ -1,6 +1,6 @@import { useState } from 'react'import type { Backend, Entry } from '@shared/models'-import { Button, IconButton, Spinner } from '../../components/Controls'+import { Button, Spinner } from '../../components/Controls'import { Icon } from '../../components/Icon'import { font } from '../../lib/fonts'import { useStore } from '../../store/context'@@ -64,19 +64,6 @@ export function ConnectionRequestCard({ entry }: { entry: Entry }) {setBusy(false)}- const cancel = async () => {- const client = store.client- if (!client) return- setBusy(true)- try {- await market.finishConnectionRequest(client, entry.id, { cancel: true })- setValue('')- } catch (e) {- setError(errorText(e))- }- setBusy(false)- }-const pending = request.status === 'pending'return (<div style={{ display: 'flex', flexDirection: 'column', gap: 12, width: '100%', maxWidth: 480, boxSizing: 'border-box', alignSelf: 'flex-start', padding: '14px 16px', border: '1px solid var(--border)', borderRadius: 20 }}>@@ -88,7 +75,7 @@ export function ConnectionRequestCard({ entry }: { entry: Entry }) {</div>{pending ? (<div style={{ display: 'flex', alignItems: 'center', gap: 6, flex: 'none' }}>- {busy ? <Spinner /> : <IconButton title="Cancel request" icon="xmark" onClick={() => void cancel()} />}+ {busy ? <Spinner /> : null}<Button disabled={busy || ((isSecret || isLogin) && !value)} onClick={() => void connect()}>{isAgent ? 'Sign in' : isLogin ? 'Save' : 'Connect'}</Button>diff --git a/apps/desktop/src/renderer/views/marketplace/market-models.ts b/apps/desktop/src/renderer/views/marketplace/market-models.tsindex 59f68af3..77a32032 100644--- a/apps/desktop/src/renderer/views/marketplace/market-models.ts+++ b/apps/desktop/src/renderer/views/marketplace/market-models.ts@@ -215,8 +215,8 @@ export const market = {skillDetails: async (c: HostClient, which: { id: string } | { source: string }) => (await c.call<{ markdown: string }>('skillDetails', which, s(60))).markdown,connectorInfo: (c: HostClient, registryName: string) => c.call<MarketConnector>('connectorInfo', { registryName }, s(60)),verifyConnector: (c: HostClient, id: string) => c.call<{ status: string }>('connectorVerify', { id }, s(120)),- finishConnectionRequest: (c: HostClient, entryId: string, opts: { connectorId?: string; value?: string; username?: string; cancel?: boolean } = {}) =>- c.call('connectorRequestFinish', { entryId, connectorId: opts.connectorId ?? null, value: opts.value ?? null, username: opts.username ?? null, cancel: opts.cancel ?? false }, s(120)),+ finishConnectionRequest: (c: HostClient, entryId: string, opts: { connectorId?: string; value?: string; username?: string } = {}) =>+ c.call('connectorRequestFinish', { entryId, connectorId: opts.connectorId ?? null, value: opts.value ?? null, username: opts.username ?? null }, s(120)),logins: async (c: HostClient) => (await c.call<{ items: SavedLogin[] }>('credentialLogins', {}, s(60))).items,saveLogin: (c: HostClient, site: string, username: string, password: string) => c.call('credentialSaveLogin', { site, username, password }, s(60)),removeLogin: (c: HostClient, id: string) => c.call('credentialRemoveLogin', { id }, s(60)),diff --git a/apps/ios/Kit/Sources/CodyncKit/Models/Market.swift b/apps/ios/Kit/Sources/CodyncKit/Models/Market.swiftindex 36fdf126..934d45da 100644--- a/apps/ios/Kit/Sources/CodyncKit/Models/Market.swift+++ b/apps/ios/Kit/Sources/CodyncKit/Models/Market.swift@@ -274,10 +274,10 @@ public extension HostClient {let _: Verified = try await call("connectorVerify", ["id": id], timeout: 120)}- func finishConnectionRequest(_ entryId: String, connectorId: String? = nil, value: String? = nil, username: String? = nil, cancel: Bool = false) async throws {- struct Body: Encodable { var entryId: String; var connectorId: String?; var value: String?; var username: String?; var cancel: Bool }+ func finishConnectionRequest(_ entryId: String, connectorId: String? = nil, value: String? = nil, username: String? = nil) async throws {+ struct Body: Encodable { var entryId: String; var connectorId: String?; var value: String?; var username: String? }struct Response: Decodable { var entry: Entry }- let _: Response = try await call("connectorRequestFinish", Body(entryId: entryId, connectorId: connectorId, value: value, username: username, cancel: cancel), timeout: 120)+ let _: Response = try await call("connectorRequestFinish", Body(entryId: entryId, connectorId: connectorId, value: value, username: username), timeout: 120)}func logins() async throws -> [SavedLogin] {diff --git a/apps/ios/Kit/Sources/CodyncUI/Marketplace/ConnectionRequestCard.swift b/apps/ios/Kit/Sources/CodyncUI/Marketplace/ConnectionRequestCard.swiftindex f5bf172c..5a58f298 100644--- a/apps/ios/Kit/Sources/CodyncUI/Marketplace/ConnectionRequestCard.swift+++ b/apps/ios/Kit/Sources/CodyncUI/Marketplace/ConnectionRequestCard.swift@@ -87,7 +87,7 @@ struct ConnectionRequestCard: View {@ViewBuilder private var trailing: some View {if pending {HStack(spacing: 6) {- if busy { Spinner() } else { IconButton("Cancel request", systemImage: "xmark") { cancel() } }+ if busy { Spinner() }Button(connectTitle) { connect() }.buttonStyle(PrimaryButtonStyle()).disabled(busy || (["secret", "login"].contains(request.kind) && value.isEmpty))@@ -153,16 +153,6 @@ struct ConnectionRequestCard: View {} catch { self.error = error.localizedDescription }}}-- private func cancel() {- guard let client = model.client else { return }- busy = true- Task {- defer { busy = false }- do { try await client.finishConnectionRequest(entry.id, cancel: true); value = "" }- catch { self.error = error.localizedDescription }- }- }}struct CredentialsView: View {diff --git a/docs/design/ui-conventions.md b/docs/design/ui-conventions.mdindex 20048eb2..3dc3269e 100644--- a/docs/design/ui-conventions.md+++ b/docs/design/ui-conventions.md@@ -123,12 +123,14 @@ and states.- TUI keeps text and attachments in the composer until sending succeeds. A failedsend can be retried with Enter; it reuses the nonce. A late response must not erasea draft edited while the request was running.-- TUI **C** opens a pending connection request in the current lane; selecting a request- and pressing Enter opens that request. Credentials, connector installation/sign-in- and hosted apps use the secure setup APIs. Ctrl+X cancels the request; Escape closes- the editor without cancelling. Secrets are masked and never sent as chat text. An- agent sign-in request opens that agent's sign-in sheet instead (it always checks the- sign-in again); Ctrl+X there cancels the request.+- Connection requests in the chat are cards shaped like an Extensions row (logo, name,+ reason, one action on the right; at most 480 pt wide), with no dismiss button: a+ request just stays until it's done. TUI **C** opens a pending connection request in+ the current lane; selecting a request and pressing Enter opens that request.+ Credentials, connector installation/sign-in and hosted apps use the secure setup+ APIs; Escape closes the editor. Secrets are masked and never sent as chat text. An+ agent sign-in request opens that agent's sign-in sheet instead, which always checks+ the sign-in again.- A bot-to-bot exchange is a compact centered row ("Messaged [avatar] Owen" / "Message from[avatar] Egan"; same verbs for asks; the TUI draws one ` · ` line), never a bubble. Only afailure is marked: danger color, a warning mark (triangle icon; the TUI uses adiff --git a/docs/features/connector-credentials.md b/docs/features/connector-credentials.mdindex 9a05fc62..98153e36 100644--- a/docs/features/connector-credentials.md+++ b/docs/features/connector-credentials.md@@ -60,8 +60,10 @@ Clients submit values through connectorRequestFinish. The host validates therequest, destination, requesting bot and 24-hour expiry, stores credentials,verifies availability, enables the connector for that bot, and queues a non-secretacknowledgement in the original conversation/thread. Repeated completed submissions-return the completed entry. Cancelled requests reject submissions. Verification-failures remain pending so the user can correct credentials and retry.+return the completed entry. Verification failures remain pending so the user can+correct credentials and retry. Current clients offer no way to cancel a request+(it stays until it's done); `cancel: true` remains for older clients, and a+cancelled request rejects submissions.The host posts one more kind itself, `agent`: when a bot's own agent (Claude Code…)refuses a turn because it needs signing in, the chat gets a card naming the agentdiff --git a/host/src/tui/app/forms.rs b/host/src/tui/app/forms.rsindex 6aab6625..0b9d24e3 100644--- a/host/src/tui/app/forms.rs+++ b/host/src/tui/app/forms.rs@@ -222,7 +222,7 @@ impl App {KeyCode::Enter if field == Field::Agent => {let backend = f.backend.clone();self.overlays.push(Overlay::Form(f));- self.open_agent(&backend, None);+ self.open_agent(&backend, false);return None;}KeyCode::Char('i') if field == Field::Skills => {diff --git a/host/src/tui/connections.rs b/host/src/tui/connections.rsindex dc0eb719..ed80dbb2 100644--- a/host/src/tui/connections.rs+++ b/host/src/tui/connections.rs@@ -52,7 +52,7 @@ pub fn fields(entry: &Entry) -> Fields {};Fields {title: request["title"].as_str().unwrap_or("Connect service").into(),- note: "Saved securely; never added to chat. Ctrl+X cancels the request; Esc closes.".into(),+ note: "Saved securely; never added to chat. Esc closes.".into(),choices: vec![],choice: 0,inputs,@@ -102,7 +102,7 @@ impl App {let request = &entry.data["connectionRequest"];if request["kind"] == "agent" {// The host completes the request and resends the messages once a check finds it signed in.- self.open_agent(request["backend"].as_str().unwrap_or_default(), Some(entry.id.clone()));+ self.open_agent(request["backend"].as_str().unwrap_or_default(), true);} else {self.overlays.push(Overlay::Fields(Box::new(fields(&entry))));}@@ -332,7 +332,7 @@ mod tests {}#[tokio::test]- async fn credentials_submit_exact_secret_and_cancel_is_explicit() {+ async fn credentials_submit_the_exact_secret_and_esc_sends_nothing() {use crossterm::event::{KeyCode, KeyModifiers};let (mut app, mut rx, calls, server) = fixture().await;open(&mut app, &json!({"kind":"login","status":"pending"}));@@ -349,10 +349,6 @@ mod tests {open(&mut app, &json!({"kind":"secret","status":"pending"}));key(&mut app, KeyCode::Esc, KeyModifiers::NONE);assert_eq!(calls.lock().unwrap().len(), 1);- open(&mut app, &json!({"kind":"secret","status":"pending"}));- key(&mut app, KeyCode::Char('x'), KeyModifiers::CONTROL);- reply(&mut app, &mut rx).await;- assert_eq!(calls.lock().unwrap()[1]["body"], json!({"entryId":"request","cancel":true}));server.abort();}@@ -400,8 +396,7 @@ mod tests {}#[tokio::test]- async fn agent_sign_in_request_opens_the_agent_sheet_and_cancels_from_it() {- use crossterm::event::{KeyCode, KeyModifiers};+ async fn agent_sign_in_request_opens_the_agent_sheet_checking_again() {let (mut app, mut rx, calls, server) = fixture().await;let request = json!({"kind":"agent","status":"pending","title":"Claude Code","backend":"claude"});let e = Entry {@@ -419,17 +414,8 @@ mod tests {app.backends = vec![json!({"id":"claude","signedIn":true})];app.open_connection();let Some(Overlay::Agent(a)) = app.overlays.last() else { panic!("agent sheet") };- assert_eq!((a.backend.as_str(), a.request.as_deref(), a.busy), ("claude", Some("card"), true));+ assert_eq!((a.backend.as_str(), a.busy), ("claude", true));reply(&mut app, &mut rx).await;- key(&mut app, KeyCode::Char('x'), KeyModifiers::CONTROL);- assert!(app.overlays.is_empty());- let cancel = json!({"method":"connectorRequestFinish","body":{"entryId":"card","cancel":true}});- let sent = tokio::time::timeout(std::time::Duration::from_secs(3), async {- while !calls.lock().unwrap().contains(&cancel) {- tokio::time::sleep(std::time::Duration::from_millis(20)).await;- }- });- sent.await.expect("the request is cancelled");assert_eq!(calls.lock().unwrap()[0], json!({"method":"agentAuth","body":{"backend":"claude"}}));server.abort();}diff --git a/host/src/tui/manage/agent.rs b/host/src/tui/manage/agent.rsindex 655a7afe..509c353e 100644--- a/host/src/tui/manage/agent.rs+++ b/host/src/tui/manage/agent.rs@@ -7,14 +7,13 @@ use super::super::app::{After, App, Editor, Overlay};use super::{AgentSetup, Fields, Input, Reply, SetupRow, Submit, ctrl, s};impl App {- /// `request`: the chat's sign-in request it's opened from, whose agent refused a turn: that- /// always asks the agent again, however signed in it looked.- pub fn open_agent(&mut self, backend: &str, request: Option<String>) {+ /// `recheck`: opened from a chat's sign-in request, whose agent refused a turn, so the agent+ /// is asked again however signed in it looked.+ pub fn open_agent(&mut self, backend: &str, recheck: bool) {let b = self.backends.iter().find(|b| b["id"] == backend);// An agent without its Node.js can't start, so there's nothing to ask it yet.- let known = b.is_some_and(|b| (b["signedIn"] == true && request.is_none()) || b["node"] == "missing");- let mut a =- AgentSetup { backend: backend.to_owned(), auth: None, busy: false, cursor: 0, error: None, request };+ let known = b.is_some_and(|b| (b["signedIn"] == true && !recheck) || b["node"] == "missing");+ let mut a = AgentSetup { backend: backend.to_owned(), auth: None, busy: false, cursor: 0, error: None };if !known {a.busy = true;self.sheet("agentAuth", json!({"backend": backend}), Reply::Auth(backend.to_owned()));@@ -49,12 +48,6 @@ impl App {let rows = self.agent_rows(&a);match k.code {KeyCode::Esc | KeyCode::Char('q') => return None,- KeyCode::Char('x') if ctrl(k) && a.request.is_some() => {- let entry = a.request.take();- self.call("connectorRequestFinish", json!({"entryId": entry, "cancel": true}), After::Nothing);- self.flash("Sign-in request cancelled");- return None;- }KeyCode::Down | KeyCode::Char('j') => a.cursor = (a.cursor + 1).min(rows.len().saturating_sub(1)),KeyCode::Up | KeyCode::Char('k') => a.cursor = a.cursor.saturating_sub(1),KeyCode::Enter if !a.busy => {diff --git a/host/src/tui/manage/fields.rs b/host/src/tui/manage/fields.rsindex ec90c4fd..6487531a 100644--- a/host/src/tui/manage/fields.rs+++ b/host/src/tui/manage/fields.rs@@ -3,7 +3,7 @@use crossterm::event::{KeyCode, KeyEvent};use serde_json::{Value, json};-use super::super::app::{After, App, Overlay};+use super::super::app::{App, Overlay};use super::market::connector_inputs;use super::{Fields, Reply, Submit, ctrl, newline};@@ -17,16 +17,6 @@ impl App {let multiline = f.current().is_some_and(|i| i.multiline);match k.code {KeyCode::Esc => return None,- KeyCode::Char('x') if ctrl(k) && matches!(f.submit, Submit::Connection(_)) => {- if let Submit::Connection(c) = &f.submit {- f.saving = true;- self.call(- "connectorRequestFinish",- json!({"entryId":c.entry,"cancel":true}),- After::Connection(c.entry.clone(), super::super::connections::Step::Finish),- );- }- }_ if newline(k) && multiline => {if let Some(i) = f.current() {i.ed.insert("\n");diff --git a/host/src/tui/manage/market.rs b/host/src/tui/manage/market.rsindex db89f449..3df997dc 100644--- a/host/src/tui/manage/market.rs+++ b/host/src/tui/manage/market.rs@@ -168,7 +168,7 @@ impl App {}Act::Agent(id) => {self.overlays.push(Overlay::Market(m));- self.open_agent(&id, None);+ self.open_agent(&id, false);return None;}Act::SignIn(id) => {diff --git a/host/src/tui/manage/mod.rs b/host/src/tui/manage/mod.rsindex 84e69f93..1f98ef15 100644--- a/host/src/tui/manage/mod.rs+++ b/host/src/tui/manage/mod.rs@@ -143,8 +143,6 @@ pub struct AgentSetup {pub busy: bool,pub cursor: usize,pub error: Option<String>,- /// The chat's sign-in request this was opened from (Ctrl+X cancels it).- pub request: Option<String>,}pub enum SetupRow {diff --git a/host/src/tui/sheets.rs b/host/src/tui/sheets.rsindex 7a1a18ad..e7a2c625 100644--- a/host/src/tui/sheets.rs+++ b/host/src/tui/sheets.rs@@ -325,12 +325,7 @@ pub fn agent(buf: &mut Buffer, area: Rect, app: &App, a: &AgentSetup) {);y += 1;}- let keys = if a.request.is_some() {- "↑↓ move · ↵ run · ^x cancel request · esc back"- } else {- "↑↓ move · ↵ run · esc back"- };- footer(buf, inner, a.error.as_deref(), keys);+ footer(buf, inner, a.error.as_deref(), "↑↓ move · ↵ run · esc back");}pub fn fields(buf: &mut Buffer, area: Rect, f: &Fields) {@@ -407,7 +402,7 @@ pub fn fields(buf: &mut Buffer, area: Rect, f: &Fields) {) + 1;put(buf, x, by, 12, " esc Cancel ", t.text.patch(t.btn).add_modifier(Modifier::BOLD));let hint = if matches!(f.submit, Submit::Connection(_)) {- "^x cancel request · tab next · esc close"+ "tab next · esc close"} else if tall {"⇧↵ new line · paste works"} else {diff --git a/host/src/tui/view/transcript.rs b/host/src/tui/view/transcript.rsindex 8f18d90b..25f389d5 100644--- a/host/src/tui/view/transcript.rs+++ b/host/src/tui/view/transcript.rs@@ -288,11 +288,7 @@ fn entry_lines(return;}let text = if let Some(status) = e.data["connectionRequest"]["status"].as_str() {- let hint = if e.data["connectionRequest"]["kind"] == "agent" {- "C signs in / cancels"- } else {- "C connects / cancels"- };+ let hint = if e.data["connectionRequest"]["kind"] == "agent" { "C signs in" } else { "C connects" };format!("{} · {} · {}",e.data["connectionRequest"]["title"].as_str().unwrap_or("Connect service"),