pub enum HarnessKind {
ClaudeCode,
OpenCode,
GeminiCli,
Codex,
KimiCode,
QwenCode,
AntigravityIde,
}Expand description
A harness QCode can build a profile image for.
Variants§
ClaudeCode
Claude Code.
OpenCode
opencode.
GeminiCli
Gemini CLI.
Codex
Codex CLI.
KimiCode
Kimi Code CLI.
QwenCode
Qwen Code.
AntigravityIde
Antigravity IDE, which opens a window instead of drawing in a terminal.
Implementations§
Source§impl HarnessKind
impl HarnessKind
Sourcepub fn history_script(self) -> Option<&'static str>
pub fn history_script(self) -> Option<&'static str>
The Node script that prints this harness’s conversations in the workspace whose folder is
its first argument, in the shape parse reads.
None for a harness whose conversations QCode cannot list: the window harness keeps its
own, under HarnessKind::conversation_paths, in a shape that was never read, and a list
guessed at would offer conversations that do not open.
Sourcepub fn conversation_paths(self) -> &'static [&'static str]
pub fn conversation_paths(self) -> &'static [&'static str]
Where this harness keeps its conversations, relative to the home directory: the folders and files the scripts above read, and nothing beside them.
This is what a backup of a profile’s conversations takes, and it is a list of what may go rather than of what may not: the backup is a plain folder on the machine, and a new harness version that puts its login somewhere new would slip past a list of what to leave out, never past this one. opencode’s list is its database and the two journals SQLite keeps beside it, because the three only make one database together.
Sourcepub fn conversation_database(self) -> Option<&'static str>
pub fn conversation_database(self) -> Option<&'static str>
The database this harness keeps its conversations in, when it keeps them in one, relative
to the home directory. Its journals are the same path with -wal and -shm after it.
A database copied while the harness writes to it can be a torn copy, and its journal only fits the database it was written with; so a harness with one is only backed up and brought back while it is stopped.
Source§impl HarnessKind
impl HarnessKind
Sourcepub const ALL: [Self; 7]
pub const ALL: [Self; 7]
Every harness, in the order the profile wizard offers them. The ones that draw in a terminal come first, because that is what nearly every profile is.
Sourcepub const TERMINAL: [Self; 6]
pub const TERMINAL: [Self; 6]
The harnesses that draw in the tab’s own terminal, in the same order.
Most of what QCode knows about a harness — the install from a registry, the unattended arguments, the conversation script, the login file it carries — is only true of these.
Sourcepub fn desktop(self) -> Option<&'static Desktop>
pub fn desktop(self) -> Option<&'static Desktop>
The window this harness opens, when it opens one rather than drawing in a terminal.
Sourcepub fn offered_offline(self) -> bool
pub fn offered_offline(self) -> bool
Whether a profile whose containers reach no network is offered for this harness.
Antigravity IDE is not: it does not open without signing in to Google, and every answer it gives comes from Google’s servers, so a container without the network holds a window that can do nothing. Every other harness here can at least be pointed at a provider on this machine, or carries a login made once and kept.
Sourcepub fn supports(self, account: AccountKind) -> bool
pub fn supports(self, account: AccountKind) -> bool
Whether the harness can sign in with account.
Sourcepub fn withdrawn(self, account: AccountKind) -> bool
pub fn withdrawn(self, account: AccountKind) -> bool
Whether account is one the harness no longer offers to new profiles.
Sourcepub fn command_line(self, conversation: Option<&str>) -> Vec<String>
pub fn command_line(self, conversation: Option<&str>) -> Vec<String>
The program and arguments a tab runs inside the profile’s container: the harness in
unattended mode, opening conversation when one is given and a new one otherwise.
An id that history::is_safe_id would not have let through
is not passed on: a word starting with - would be read as an option, so the harness is
started as if none had been asked for rather than with an argument nobody chose. Nor is one
given to a harness that has no way of being told to open a conversation again.
Trait Implementations§
Source§impl Clone for HarnessKind
impl Clone for HarnessKind
impl Copy for HarnessKind
Source§impl Debug for HarnessKind
impl Debug for HarnessKind
impl Eq for HarnessKind
Source§impl PartialEq for HarnessKind
impl PartialEq for HarnessKind
impl StructuralPartialEq for HarnessKind
Auto Trait Implementations§
impl Freeze for HarnessKind
impl RefUnwindSafe for HarnessKind
impl Send for HarnessKind
impl Sync for HarnessKind
impl Unpin for HarnessKind
impl UnsafeUnpin for HarnessKind
impl UnwindSafe for HarnessKind
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more