dev #31
@@ -78,4 +78,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
- **AUR Package**: Owlen is now available on the Arch User Repository.
|
- **AUR Package**: Owlen is now available on the Arch User Repository.
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
- **Build System**: Switched from OpenSSL to rustls for better cross-platform compatibility.
|
- **Build System**: Switched from OpenSSL to rustls for better cross-platform compatibility.
|
||||||
|
|||||||
1
LICENSE
1
LICENSE
@@ -659,4 +659,3 @@ specific requirements.
|
|||||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||||
For more information on this, and how to apply and follow the GNU AGPL, see
|
For more information on this, and how to apply and follow the GNU AGPL, see
|
||||||
<https://www.gnu.org/licenses/>.
|
<https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
|||||||
1
PKGBUILD
1
PKGBUILD
@@ -47,4 +47,3 @@ package() {
|
|||||||
install -Dm644 "$theme" "$pkgdir/usr/share/$pkgname/themes/$(basename $theme)"
|
install -Dm644 "$theme" "$pkgdir/usr/share/$pkgname/themes/$(basename $theme)"
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -31,4 +31,4 @@ uuid = { workspace = true }
|
|||||||
async-trait = { workspace = true }
|
async-trait = { workspace = true }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
tokio-test = { workspace = true }
|
tokio-test = { workspace = true }
|
||||||
|
|||||||
@@ -1171,14 +1171,8 @@ impl ChatApp {
|
|||||||
let description =
|
let description =
|
||||||
if self.controller.config().storage.generate_descriptions {
|
if self.controller.config().storage.generate_descriptions {
|
||||||
self.status = "Generating description...".to_string();
|
self.status = "Generating description...".to_string();
|
||||||
match self
|
(self.controller.generate_conversation_description().await)
|
||||||
.controller
|
.ok()
|
||||||
.generate_conversation_description()
|
|
||||||
.await
|
|
||||||
{
|
|
||||||
Ok(desc) => Some(desc),
|
|
||||||
Err(_) => None,
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
None
|
None
|
||||||
};
|
};
|
||||||
@@ -1780,7 +1774,7 @@ impl ChatApp {
|
|||||||
stream,
|
stream,
|
||||||
}) => {
|
}) => {
|
||||||
// Step 3: Model loaded, now generating response
|
// Step 3: Model loaded, now generating response
|
||||||
self.status = format!("Model loaded. Generating response... (streaming)");
|
self.status = "Model loaded. Generating response... (streaming)".to_string();
|
||||||
|
|
||||||
self.spawn_stream(response_id, stream);
|
self.spawn_stream(response_id, stream);
|
||||||
match self.controller.mark_stream_placeholder(response_id, "▌") {
|
match self.controller.mark_stream_placeholder(response_id, "▌") {
|
||||||
|
|||||||
@@ -1149,7 +1149,14 @@ fn render_help(frame: &mut Frame<'_>, app: &ChatApp) {
|
|||||||
frame.render_widget(Clear, area);
|
frame.render_widget(Clear, area);
|
||||||
|
|
||||||
let tab_index = app.help_tab_index();
|
let tab_index = app.help_tab_index();
|
||||||
let tabs = vec!["Navigation", "Editing", "Visual", "Commands", "Sessions", "Browsers"];
|
let tabs = [
|
||||||
|
"Navigation",
|
||||||
|
"Editing",
|
||||||
|
"Visual",
|
||||||
|
"Commands",
|
||||||
|
"Sessions",
|
||||||
|
"Browsers",
|
||||||
|
];
|
||||||
|
|
||||||
// Build tab line
|
// Build tab line
|
||||||
let mut tab_spans = Vec::new();
|
let mut tab_spans = Vec::new();
|
||||||
@@ -1284,102 +1291,138 @@ fn render_help(frame: &mut Frame<'_>, app: &ChatApp) {
|
|||||||
3 => vec![
|
3 => vec![
|
||||||
// Commands
|
// Commands
|
||||||
Line::from(""),
|
Line::from(""),
|
||||||
Line::from(vec![
|
Line::from(vec![Span::styled(
|
||||||
Span::styled("COMMAND MODE", Style::default().add_modifier(Modifier::BOLD).fg(theme.info))
|
"COMMAND MODE",
|
||||||
]),
|
Style::default().add_modifier(Modifier::BOLD).fg(theme.info),
|
||||||
|
)]),
|
||||||
Line::from(" Press ':' to enter command mode, then type one of:"),
|
Line::from(" Press ':' to enter command mode, then type one of:"),
|
||||||
Line::from(""),
|
Line::from(""),
|
||||||
Line::from(vec![
|
Line::from(vec![Span::styled(
|
||||||
Span::styled("KEYBINDINGS", Style::default().add_modifier(Modifier::BOLD).fg(theme.user_message_role))
|
"KEYBINDINGS",
|
||||||
]),
|
Style::default()
|
||||||
|
.add_modifier(Modifier::BOLD)
|
||||||
|
.fg(theme.user_message_role),
|
||||||
|
)]),
|
||||||
Line::from(" Enter → execute command"),
|
Line::from(" Enter → execute command"),
|
||||||
Line::from(" Esc → exit command mode"),
|
Line::from(" Esc → exit command mode"),
|
||||||
Line::from(" Tab → autocomplete suggestion"),
|
Line::from(" Tab → autocomplete suggestion"),
|
||||||
Line::from(" ↑/↓ → navigate suggestions"),
|
Line::from(" ↑/↓ → navigate suggestions"),
|
||||||
Line::from(" Backspace → delete character"),
|
Line::from(" Backspace → delete character"),
|
||||||
Line::from(""),
|
Line::from(""),
|
||||||
Line::from(vec![
|
Line::from(vec![Span::styled(
|
||||||
Span::styled("GENERAL", Style::default().add_modifier(Modifier::BOLD).fg(theme.user_message_role))
|
"GENERAL",
|
||||||
]),
|
Style::default()
|
||||||
|
.add_modifier(Modifier::BOLD)
|
||||||
|
.fg(theme.user_message_role),
|
||||||
|
)]),
|
||||||
Line::from(" :h, :help → show this help"),
|
Line::from(" :h, :help → show this help"),
|
||||||
Line::from(" :q, :quit → quit application"),
|
Line::from(" :q, :quit → quit application"),
|
||||||
Line::from(" :reload → reload configuration and themes"),
|
Line::from(" :reload → reload configuration and themes"),
|
||||||
Line::from(""),
|
Line::from(""),
|
||||||
Line::from(vec![
|
Line::from(vec![Span::styled(
|
||||||
Span::styled("CONVERSATION", Style::default().add_modifier(Modifier::BOLD).fg(theme.user_message_role))
|
"CONVERSATION",
|
||||||
]),
|
Style::default()
|
||||||
|
.add_modifier(Modifier::BOLD)
|
||||||
|
.fg(theme.user_message_role),
|
||||||
|
)]),
|
||||||
Line::from(" :n, :new → start new conversation"),
|
Line::from(" :n, :new → start new conversation"),
|
||||||
Line::from(" :c, :clear → clear current conversation"),
|
Line::from(" :c, :clear → clear current conversation"),
|
||||||
Line::from(""),
|
Line::from(""),
|
||||||
Line::from(vec![
|
Line::from(vec![Span::styled(
|
||||||
Span::styled("MODEL & THEME", Style::default().add_modifier(Modifier::BOLD).fg(theme.user_message_role))
|
"MODEL & THEME",
|
||||||
]),
|
Style::default()
|
||||||
|
.add_modifier(Modifier::BOLD)
|
||||||
|
.fg(theme.user_message_role),
|
||||||
|
)]),
|
||||||
Line::from(" :m, :model → open model selector"),
|
Line::from(" :m, :model → open model selector"),
|
||||||
Line::from(" :themes → open theme selector"),
|
Line::from(" :themes → open theme selector"),
|
||||||
Line::from(" :theme <name> → switch to a specific theme"),
|
Line::from(" :theme <name> → switch to a specific theme"),
|
||||||
Line::from(""),
|
Line::from(""),
|
||||||
Line::from(vec![
|
Line::from(vec![Span::styled(
|
||||||
Span::styled("SESSION MANAGEMENT", Style::default().add_modifier(Modifier::BOLD).fg(theme.user_message_role))
|
"SESSION MANAGEMENT",
|
||||||
]),
|
Style::default()
|
||||||
|
.add_modifier(Modifier::BOLD)
|
||||||
|
.fg(theme.user_message_role),
|
||||||
|
)]),
|
||||||
Line::from(" :save [name] → save current session (with optional name)"),
|
Line::from(" :save [name] → save current session (with optional name)"),
|
||||||
Line::from(" :w [name] → alias for :save"),
|
Line::from(" :w [name] → alias for :save"),
|
||||||
Line::from(" :load, :o, :open → browse and load saved sessions"),
|
Line::from(" :load, :o, :open → browse and load saved sessions"),
|
||||||
Line::from(" :sessions, :ls → browse saved sessions"),
|
Line::from(" :sessions, :ls → browse saved sessions"),
|
||||||
],
|
],
|
||||||
4 => vec![ // Sessions
|
4 => vec![
|
||||||
|
// Sessions
|
||||||
Line::from(""),
|
Line::from(""),
|
||||||
Line::from(vec![
|
Line::from(vec![Span::styled(
|
||||||
Span::styled("SESSION MANAGEMENT", Style::default().add_modifier(Modifier::BOLD).fg(theme.info))
|
"SESSION MANAGEMENT",
|
||||||
]),
|
Style::default().add_modifier(Modifier::BOLD).fg(theme.info),
|
||||||
|
)]),
|
||||||
Line::from(""),
|
Line::from(""),
|
||||||
Line::from(vec![
|
Line::from(vec![Span::styled(
|
||||||
Span::styled("SAVING SESSIONS", Style::default().add_modifier(Modifier::BOLD).fg(theme.user_message_role))
|
"SAVING SESSIONS",
|
||||||
]),
|
Style::default()
|
||||||
|
.add_modifier(Modifier::BOLD)
|
||||||
|
.fg(theme.user_message_role),
|
||||||
|
)]),
|
||||||
Line::from(" :save → save with auto-generated name"),
|
Line::from(" :save → save with auto-generated name"),
|
||||||
Line::from(" :save my-session → save with custom name"),
|
Line::from(" :save my-session → save with custom name"),
|
||||||
Line::from(" • AI generates description automatically (configurable)"),
|
Line::from(" • AI generates description automatically (configurable)"),
|
||||||
Line::from(" • Sessions stored in platform-specific directories"),
|
Line::from(" • Sessions stored in platform-specific directories"),
|
||||||
Line::from(""),
|
Line::from(""),
|
||||||
Line::from(vec![
|
Line::from(vec![Span::styled(
|
||||||
Span::styled("LOADING SESSIONS", Style::default().add_modifier(Modifier::BOLD).fg(theme.user_message_role))
|
"LOADING SESSIONS",
|
||||||
]),
|
Style::default()
|
||||||
|
.add_modifier(Modifier::BOLD)
|
||||||
|
.fg(theme.user_message_role),
|
||||||
|
)]),
|
||||||
Line::from(" :load, :o, :open → browse and select session"),
|
Line::from(" :load, :o, :open → browse and select session"),
|
||||||
Line::from(" :sessions, :ls → browse saved sessions"),
|
Line::from(" :sessions, :ls → browse saved sessions"),
|
||||||
Line::from(""),
|
Line::from(""),
|
||||||
Line::from(vec![
|
Line::from(vec![Span::styled(
|
||||||
Span::styled("SESSION BROWSER KEYS", Style::default().add_modifier(Modifier::BOLD).fg(theme.user_message_role))
|
"SESSION BROWSER KEYS",
|
||||||
]),
|
Style::default()
|
||||||
|
.add_modifier(Modifier::BOLD)
|
||||||
|
.fg(theme.user_message_role),
|
||||||
|
)]),
|
||||||
Line::from(" j/k or ↑/↓ → navigate sessions"),
|
Line::from(" j/k or ↑/↓ → navigate sessions"),
|
||||||
Line::from(" Enter → load selected session"),
|
Line::from(" Enter → load selected session"),
|
||||||
Line::from(" d → delete selected session"),
|
Line::from(" d → delete selected session"),
|
||||||
Line::from(" Esc → close browser"),
|
Line::from(" Esc → close browser"),
|
||||||
Line::from(""),
|
Line::from(""),
|
||||||
Line::from(vec![
|
Line::from(vec![Span::styled(
|
||||||
Span::styled("STORAGE LOCATIONS", Style::default().add_modifier(Modifier::BOLD).fg(theme.user_message_role))
|
"STORAGE LOCATIONS",
|
||||||
]),
|
Style::default()
|
||||||
|
.add_modifier(Modifier::BOLD)
|
||||||
|
.fg(theme.user_message_role),
|
||||||
|
)]),
|
||||||
Line::from(" Linux → ~/.local/share/owlen/sessions"),
|
Line::from(" Linux → ~/.local/share/owlen/sessions"),
|
||||||
Line::from(" Windows → %APPDATA%\\owlen\\sessions"),
|
Line::from(" Windows → %APPDATA%\\owlen\\sessions"),
|
||||||
Line::from(" macOS → ~/Library/Application Support/owlen/sessions"),
|
Line::from(" macOS → ~/Library/Application Support/owlen/sessions"),
|
||||||
Line::from(""),
|
Line::from(""),
|
||||||
Line::from(vec![
|
Line::from(vec![Span::styled(
|
||||||
Span::styled("CONTEXT PRESERVATION", Style::default().add_modifier(Modifier::BOLD).fg(theme.assistant_message_role))
|
"CONTEXT PRESERVATION",
|
||||||
]),
|
Style::default()
|
||||||
|
.add_modifier(Modifier::BOLD)
|
||||||
|
.fg(theme.assistant_message_role),
|
||||||
|
)]),
|
||||||
Line::from(" • Full conversation history is preserved when saving"),
|
Line::from(" • Full conversation history is preserved when saving"),
|
||||||
Line::from(" • All context is restored when loading a session"),
|
Line::from(" • All context is restored when loading a session"),
|
||||||
Line::from(" • Continue conversations seamlessly across restarts"),
|
Line::from(" • Continue conversations seamlessly across restarts"),
|
||||||
],
|
],
|
||||||
5 => vec![ // Browsers
|
5 => vec![
|
||||||
|
// Browsers
|
||||||
Line::from(""),
|
Line::from(""),
|
||||||
Line::from(vec![
|
Line::from(vec![Span::styled(
|
||||||
Span::styled("PROVIDER & MODEL BROWSERS", Style::default().add_modifier(Modifier::BOLD).fg(theme.info))
|
"PROVIDER & MODEL BROWSERS",
|
||||||
]),
|
Style::default().add_modifier(Modifier::BOLD).fg(theme.info),
|
||||||
|
)]),
|
||||||
Line::from(" Enter → select item"),
|
Line::from(" Enter → select item"),
|
||||||
Line::from(" Esc → close browser"),
|
Line::from(" Esc → close browser"),
|
||||||
Line::from(" ↑/↓ or j/k → navigate items"),
|
Line::from(" ↑/↓ or j/k → navigate items"),
|
||||||
Line::from(""),
|
Line::from(""),
|
||||||
Line::from(vec![
|
Line::from(vec![Span::styled(
|
||||||
Span::styled("THEME BROWSER", Style::default().add_modifier(Modifier::BOLD).fg(theme.info))
|
"THEME BROWSER",
|
||||||
]),
|
Style::default().add_modifier(Modifier::BOLD).fg(theme.info),
|
||||||
|
)]),
|
||||||
Line::from(" Enter → apply theme"),
|
Line::from(" Enter → apply theme"),
|
||||||
Line::from(" Esc / q → close browser"),
|
Line::from(" Esc / q → close browser"),
|
||||||
Line::from(" ↑/↓ or j/k → navigate themes"),
|
Line::from(" ↑/↓ or j/k → navigate themes"),
|
||||||
@@ -1430,7 +1473,12 @@ fn render_help(frame: &mut Frame<'_>, app: &ChatApp) {
|
|||||||
.add_modifier(Modifier::BOLD),
|
.add_modifier(Modifier::BOLD),
|
||||||
),
|
),
|
||||||
Span::raw(":Switch "),
|
Span::raw(":Switch "),
|
||||||
Span::styled("1-6", Style::default().fg(theme.focused_panel_border).add_modifier(Modifier::BOLD)),
|
Span::styled(
|
||||||
|
"1-6",
|
||||||
|
Style::default()
|
||||||
|
.fg(theme.focused_panel_border)
|
||||||
|
.add_modifier(Modifier::BOLD),
|
||||||
|
),
|
||||||
Span::raw(":Jump "),
|
Span::raw(":Jump "),
|
||||||
Span::styled(
|
Span::styled(
|
||||||
"Esc/q",
|
"Esc/q",
|
||||||
|
|||||||
@@ -4,13 +4,13 @@ This guide documents breaking changes between versions of Owlen and provides ins
|
|||||||
|
|
||||||
As Owlen is currently in its alpha phase (pre-v1.0), breaking changes may occur more frequently. We will do our best to document them here.
|
As Owlen is currently in its alpha phase (pre-v1.0), breaking changes may occur more frequently. We will do our best to document them here.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Migrating from v0.1.x to v0.2.x (Example)
|
## Migrating from v0.1.x to v0.2.x (Example)
|
||||||
|
|
||||||
*This is a template for a future migration. No breaking changes have occurred yet.*
|
*This is a template for a future migration. No breaking changes have occurred yet.*
|
||||||
|
|
||||||
Version 0.2.0 introduces a new configuration structure for providers.
|
Version 0.2.0 introduces a new configuration structure for providers.
|
||||||
|
|
||||||
### Configuration File Changes
|
### Configuration File Changes
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
// This example demonstrates a basic chat interaction without the TUI.
|
// This example demonstrates a basic chat interaction without the TUI.
|
||||||
|
|
||||||
use owlen_core::model::Model;
|
use owlen_core::model::Model;
|
||||||
|
use owlen_core::provider::Provider;
|
||||||
use owlen_core::session::Session;
|
use owlen_core::session::Session;
|
||||||
use owlen_ollama::OllamaProvider; // Assuming you have an Ollama provider
|
use owlen_ollama::OllamaProvider; // Assuming you have an Ollama provider
|
||||||
use owlen_core::provider::Provider;
|
|
||||||
|
|
||||||
#[tokio::main]
|
#[tokio::main]
|
||||||
async fn main() -> Result<(), anyhow::Error> {
|
async fn main() -> Result<(), anyhow::Error> {
|
||||||
|
|||||||
@@ -16,10 +16,16 @@ impl Provider for MyCustomProvider {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async fn chat(&self, session: &Session, model: &Model) -> Result<String, anyhow::Error> {
|
async fn chat(&self, session: &Session, model: &Model) -> Result<String, anyhow::Error> {
|
||||||
println!("Custom provider received chat request for model: {}", model.name);
|
println!(
|
||||||
|
"Custom provider received chat request for model: {}",
|
||||||
|
model.name
|
||||||
|
);
|
||||||
// In a real implementation, you would send the session data to an API.
|
// In a real implementation, you would send the session data to an API.
|
||||||
let message_count = session.get_messages().len();
|
let message_count = session.get_messages().len();
|
||||||
Ok(format!("This is a custom response. You have {} messages in your session.", message_count))
|
Ok(format!(
|
||||||
|
"This is a custom response. You have {} messages in your session.",
|
||||||
|
message_count
|
||||||
|
))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -23,6 +23,8 @@ fn main() {
|
|||||||
println!("\nSession cleared.");
|
println!("\nSession cleared.");
|
||||||
|
|
||||||
let messages_after_clear = session.get_messages();
|
let messages_after_clear = session.get_messages();
|
||||||
println!("Messages in session after clear: {}", messages_after_clear.len());
|
println!(
|
||||||
|
"Messages in session after clear: {}",
|
||||||
|
messages_after_clear.len()
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -20,4 +20,4 @@ selection_fg = "black"
|
|||||||
cursor = "#d95f02"
|
cursor = "#d95f02"
|
||||||
placeholder = "gray"
|
placeholder = "gray"
|
||||||
error = "#c0392b"
|
error = "#c0392b"
|
||||||
info = "green"
|
info = "green"
|
||||||
|
|||||||
@@ -20,4 +20,4 @@ selection_fg = "#212121"
|
|||||||
cursor = "#c2185b"
|
cursor = "#c2185b"
|
||||||
placeholder = "#90a4ae"
|
placeholder = "#90a4ae"
|
||||||
error = "#d32f2f"
|
error = "#d32f2f"
|
||||||
info = "#388e3c"
|
info = "#388e3c"
|
||||||
|
|||||||
Reference in New Issue
Block a user