Skip to content

Commit 6b08ba7

Browse files
committed
Included README in lib.rs
1 parent dd9c53c commit 6b08ba7

File tree

4 files changed

+11
-7
lines changed

4 files changed

+11
-7
lines changed

sdks/community/rust/crates/ag-ui-client/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![doc = include_str!("../README.md")]
2+
13
pub mod agent;
24
pub mod event_handler;
35
pub mod http;
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
use thiserror::Error;
22

3-
impl AguiError {
3+
impl AgUiError {
44
pub fn new(message: impl Into<String>) -> Self {
55
Self {
66
message: message.into(),
77
}
88
}
99
}
1010

11-
impl From<serde_json::Error> for AguiError {
11+
impl From<serde_json::Error> for AgUiError {
1212
fn from(err: serde_json::Error) -> Self {
1313
let msg = format!("Failed to parse JSON: {err}");
1414
Self::new(msg)
@@ -17,8 +17,8 @@ impl From<serde_json::Error> for AguiError {
1717

1818
#[derive(Error, Debug)]
1919
#[error("AG-UI Error: {message}")]
20-
pub struct AguiError {
20+
pub struct AgUiError {
2121
pub message: String,
2222
}
2323

24-
pub type Result<T> = std::result::Result<T, AguiError>;
24+
pub type Result<T> = std::result::Result<T, AgUiError>;

sdks/community/rust/crates/ag-ui-core/src/lib.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1+
#![doc = include_str!("../README.md")]
2+
13
pub mod error;
24
pub mod event;
35
mod state;
46
pub mod types;
57

6-
pub use error::{AguiError, Result};
8+
pub use error::{AgUiError, Result};
79
pub use state::{AgentState, FwdProps};
810

911
/// Re-export to ensure the same type is used

sdks/community/rust/crates/ag-ui-core/tests/unit.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#[cfg(test)]
22
mod tests {
3-
use ag_ui_core::error::AguiError;
3+
use ag_ui_core::error::AgUiError;
44
use ag_ui_core::types::{
55
AssistantMessage, Context, DeveloperMessage, FunctionCall, Message, MessageId, Role,
66
RunAgentInput, RunId, SystemMessage, ThreadId, Tool, ToolCall, ToolCallId, ToolMessage,
@@ -92,7 +92,7 @@ mod tests {
9292

9393
#[test]
9494
fn test_agui_error() {
95-
let error = AguiError::new("test error");
95+
let error = AgUiError::new("test error");
9696
assert_eq!(error.to_string(), "AG-UI Error: test error");
9797
}
9898

0 commit comments

Comments
 (0)