Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
21bfc41
refactor(command): introduce fully typed command invocations
meashgrey Sep 20, 2026
27b7ac8
feat(command): add built-in command language parser
meashgrey Sep 20, 2026
144999d
refactor(command): centralize portable command execution
meashgrey Sep 20, 2026
6540701
feat(shell): add frontend-independent built-in command sessions
meashgrey Sep 20, 2026
ca385b7
feat(desktop): host built-in shell command execution
meashgrey Sep 20, 2026
223aff1
feat(terminal): add structured resizable built-in terminal
meashgrey Sep 20, 2026
9e16d33
chore(theme): revert default theme
meashgrey Sep 20, 2026
f39ce2a
refactor(desktop): host terminal in an overlay bottom dock
meashgrey Sep 21, 2026
e984fc8
refactor(desktop): remove unused blank WGPU panel scene
meashgrey Sep 21, 2026
1bb226e
refactor(command): separate portable and frontend execution
meashgrey Sep 21, 2026
9ddd357
refactor(command): share CLI grammar with built-in shell
meashgrey Sep 21, 2026
1212cd3
refactor(desktop): unify portable command task execution
meashgrey Sep 21, 2026
4b5c204
fix(ui): render multiline terminal spans as separate rows
meashgrey Sep 21, 2026
ca4d8ea
refactor(command): route built-in shell lines by execution domain
meashgrey Sep 21, 2026
b8d1284
refactor(command): consolidate command models and execution modules
meashgrey Sep 21, 2026
68eaf3f
feat(command): add canonical command catalog
meashgrey Sep 21, 2026
08a5bf4
feat(terminal): add native PTY terminal crate and bundled font support
meashgrey Sep 28, 2026
7e4e193
refactor(terminal): unify built-in and system shell profiles
meashgrey Sep 28, 2026
46588b3
feat(ui): extend the select and bottom dock primitives for compact tr…
meashgrey Sep 28, 2026
352af49
feat(terminal): add selectable shell profiles to the session model
meashgrey Sep 28, 2026
d699b83
feat(terminal): host multiple terminal sessions in the bottom dock
meashgrey Sep 28, 2026
c1ebb56
feat(terminal): support input method composition
meashgrey Sep 28, 2026
1f5fa0a
fix(terminal): give double-width glyphs both of their grid columns
meashgrey Sep 28, 2026
6ed9899
refactor(terminal): use the spacing scale for the dock inset
meashgrey Sep 28, 2026
3d393f7
fix(terminal): retire a session whose terminal backend exited
meashgrey Sep 28, 2026
3adbeed
feat(terminal): expose the scrollback viewport
meashgrey Sep 29, 2026
5bbf658
feat(ui): add a draggable scrollbar primitive
meashgrey Sep 29, 2026
b928bea
feat(terminal): scroll the terminal viewport
meashgrey Sep 29, 2026
2438082
feat(terminal): scroll the terminal session tab strip
meashgrey Sep 29, 2026
734f201
refactor(terminal): isolate shell sessions and use event-driven wakeups
meashgrey Sep 29, 2026
29babbc
refactor(terminal): introduce extensible shell session management
meashgrey Sep 29, 2026
132612f
fix(shell): preserve Windows path separators during tokenization
meashgrey Sep 29, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
248 changes: 245 additions & 3 deletions Cargo.lock

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[workspace]
members = [
"crates/chitin-builtin-shell",
"crates/chitin-command",
"crates/chitin-cli",
"crates/chitin-bio",
Expand All @@ -8,6 +9,7 @@ members = [
"crates/chitin-databases",
"crates/chitin-desktop",
"crates/chitin-molecule-renderer",
"crates/chitin-terminal",
"crates/chitin-ui",
"crates/chitin-wgpu",
"crates/chitin-wasm",
Expand Down
Binary file added assets/fonts/cascadia-mono/CascadiaMono-Bold.ttf
Binary file not shown.
Binary file not shown.
94 changes: 94 additions & 0 deletions assets/fonts/cascadia-mono/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
Copyright (c) 2019 - Present, Microsoft Corporation,
with Reserved Font Name Cascadia Code.

This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL


-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------

PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.

The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.

DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.

"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).

"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).

"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.

"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.

PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:

1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.

2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.

3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.

4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.

5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.

TERMINATION
This license becomes null and void if any of the above conditions are
not met.

DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.
3 changes: 3 additions & 0 deletions assets/icons/terminal-add.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions assets/icons/terminal-bash.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions assets/icons/terminal-builtin.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions assets/icons/terminal-fish.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions assets/icons/terminal-nushell.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/icons/terminal-powershell.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions assets/icons/terminal-shell.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions assets/icons/terminal-trash.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions assets/icons/terminal-zsh.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions crates/chitin-builtin-shell/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[package]
name = "chitin-builtin-shell"
version = "0.1.0"
edition.workspace = true
license.workspace = true
repository.workspace = true

[dependencies]
chitin-command = { path = "../chitin-command" }
chitin-databases = { path = "../chitin-databases" }
chitin-terminal = { path = "../chitin-terminal" }
clap = { version = "4.6", features = ["derive"] }
thiserror = "2.0"

[dev-dependencies]
tokio = { version = "1.52", features = ["macros", "rt"] }

[lints]
workspace = true
59 changes: 59 additions & 0 deletions crates/chitin-builtin-shell/src/event.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
//! Observable events emitted by a built-in shell session.

use std::sync::Arc;

use chitin_command::CommandExecutionEvent;

use crate::{ShellCommandId, ShellExecutionRecord, ShellExecutionStatus};

/// A state transition emitted by a built-in shell session.
#[derive(Clone, Debug, PartialEq, Eq)]
pub enum ShellEvent {
/// A parsed command was accepted as the active submission.
Submitted(ShellExecutionRecord),
/// A portable executor emitted progress, a message, or an artifact.
CommandExecution {
/// Shell-local identity of the active submission.
id: ShellCommandId,
/// Frontend-neutral event emitted by the command executor.
event: CommandExecutionEvent,
},
/// The active command entered a new shell lifecycle state.
StateChanged {
/// Shell-local identity of the affected submission.
id: ShellCommandId,
/// Current lifecycle state.
status: ShellExecutionStatus,
},
}

/// Cloneable callback receiving built-in shell events.
#[derive(Clone)]
pub struct ShellEventSink {
callback: Arc<dyn Fn(ShellEvent) + Send + Sync>,
}

impl ShellEventSink {
/// Creates a shell event sink from a thread-safe callback.
pub fn new(callback: impl Fn(ShellEvent) + Send + Sync + 'static) -> Self {
Self {
callback: Arc::new(callback),
}
}

/// Emits one event to the shell host.
pub fn emit(&self, event: ShellEvent) {
(self.callback)(event);
}

/// Creates a sink that deliberately discards every event.
pub fn silent() -> Self {
Self::new(|_| {})
}
}

impl Default for ShellEventSink {
fn default() -> Self {
Self::silent()
}
}
Loading
Loading