mirror of
https://github.com/taggart-comet/quill-code.git
synced 2026-07-09 16:08:35 +00:00
init
This commit is contained in:
commit
edf99cb06a
15 changed files with 130 additions and 0 deletions
0
src/domain/prompting/session.rs
Normal file
0
src/domain/prompting/session.rs
Normal file
0
src/domain/prompting/tools.rs
Normal file
0
src/domain/prompting/tools.rs
Normal file
0
src/domain/startup/mod.rs
Normal file
0
src/domain/startup/mod.rs
Normal file
0
src/domain/startup/service.rs
Normal file
0
src/domain/startup/service.rs
Normal file
17
src/domain/tools/change/mod.rs
Normal file
17
src/domain/tools/change/mod.rs
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
pub mod change;
|
||||
mod find_files;
|
||||
mod read_file;
|
||||
mod find_objects;
|
||||
mod structure;
|
||||
|
||||
pub use find_files::FindFiles;
|
||||
pub use find_objects::FindObjects;
|
||||
pub use read_file::ReadFile;
|
||||
pub use structure::Structure;
|
||||
|
||||
pub trait Tool {
|
||||
fn name(&self) -> &'static str;
|
||||
fn work(&self, input: &str) -> &'static str;
|
||||
fn desc(&self) -> &'static str;
|
||||
fn format(&self) -> &'static str;
|
||||
}
|
||||
28
src/domain/tools/change/remove.rs
Normal file
28
src/domain/tools/change/remove.rs
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
use tools::Tool;
|
||||
|
||||
pub struct Insert;
|
||||
|
||||
impl Tool for Insert {
|
||||
fn name(&self) -> &'static str {
|
||||
"change"
|
||||
}
|
||||
|
||||
fn work(&self, _input: &str) -> &'static str {
|
||||
""
|
||||
}
|
||||
|
||||
fn desc(&self) -> &'static str {
|
||||
"Apply an edit to an existing file"
|
||||
}
|
||||
|
||||
fn format(&self) -> &'static str {
|
||||
"
|
||||
input:
|
||||
target_line: string # line in the file where to insert the change
|
||||
insert_content: string # content to insert
|
||||
output:
|
||||
ok: boolean
|
||||
error: string # optional
|
||||
"
|
||||
}
|
||||
}
|
||||
29
src/domain/tools/change/replace.rs
Normal file
29
src/domain/tools/change/replace.rs
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
use crate::domain::tools::Tool;
|
||||
|
||||
pub struct Insert;
|
||||
|
||||
impl Tool for Insert {
|
||||
fn name(&self) -> &'static str {
|
||||
"change_insert"
|
||||
}
|
||||
|
||||
fn work(&self, _input: &str) -> String {
|
||||
String::new()
|
||||
}
|
||||
|
||||
fn desc(&self) -> &'static str {
|
||||
"Apply an edit to an existing file"
|
||||
}
|
||||
|
||||
fn format(&self) -> &'static str {
|
||||
"
|
||||
input:
|
||||
file_name: string # full path to the file
|
||||
target_line: string # line in the file where to insert the change
|
||||
insert_content: string # content to insert
|
||||
output:
|
||||
ok: boolean
|
||||
error: string # optional
|
||||
"
|
||||
}
|
||||
}
|
||||
0
src/domain/tools/finish.rs
Normal file
0
src/domain/tools/finish.rs
Normal file
27
src/domain/tools/list_objects.rs
Normal file
27
src/domain/tools/list_objects.rs
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
use crate::domain::tools::Tool;
|
||||
|
||||
pub struct FindObjects;
|
||||
|
||||
impl Tool for FindObjects {
|
||||
fn name(&self) -> &'static str {
|
||||
"find_objects"
|
||||
}
|
||||
|
||||
fn work(&self, _input: &str) -> &'static str {
|
||||
""
|
||||
}
|
||||
|
||||
fn desc(&self) -> &'static str {
|
||||
"Lists objects by query (stub)"
|
||||
}
|
||||
|
||||
fn format(&self) -> &'static str {
|
||||
"
|
||||
input:
|
||||
file_name: string # full path to the file
|
||||
query: string # what to search for
|
||||
output:
|
||||
results: array[string]
|
||||
"
|
||||
}
|
||||
}
|
||||
29
src/domain/tools/read_objects.rs
Normal file
29
src/domain/tools/read_objects.rs
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
use crate::domain::tools::Tool;
|
||||
|
||||
pub struct ListObjects;
|
||||
|
||||
impl Tool for ListObjects {
|
||||
fn name(&self) -> &'static str {
|
||||
"list_objects"
|
||||
}
|
||||
|
||||
fn work(&self, _input: &str) -> &'static str {
|
||||
""
|
||||
}
|
||||
|
||||
fn desc(&self) -> &'static str {
|
||||
"Lists language-aware-objects in a file (like functions, classes, etc.)"
|
||||
}
|
||||
|
||||
fn format(&self) -> &'static str {
|
||||
"
|
||||
input:
|
||||
file_name: string # full path to the file
|
||||
output:
|
||||
results:
|
||||
classes: [string]
|
||||
functions: [string]
|
||||
constants: [string]
|
||||
"
|
||||
}
|
||||
}
|
||||
0
src/domain/workflow/mod.rs
Normal file
0
src/domain/workflow/mod.rs
Normal file
0
src/domain/workflow/plan.rs
Normal file
0
src/domain/workflow/plan.rs
Normal file
0
src/domain/workflow/step.rs
Normal file
0
src/domain/workflow/step.rs
Normal file
0
src/domain/workflow/toolset.rs
Normal file
0
src/domain/workflow/toolset.rs
Normal file
0
src/domain/workflow/workflow.rs
Normal file
0
src/domain/workflow/workflow.rs
Normal file
Loading…
Add table
Add a link
Reference in a new issue