feat(timeline): add entity-direct seeding (issue:N, mr:N syntax)
Adds issue:N / i:N / mr:N / m:N query syntax to bypass hybrid search and seed the timeline directly from a known entity. All discussions for the entity are gathered without needing Ollama. - parse_timeline_query() detects entity-direct patterns - resolve_entity_by_iid() resolves IID to EntityRef with ambiguity handling - seed_timeline_direct() gathers all discussions for the entity - 20 new tests (5 resolve, 6 direct seed, 9 parse) - Updated CLI help text and robot-docs manifest
This commit is contained in:
@@ -10,6 +10,7 @@ use std::io::IsTerminal;
|
||||
#[command(name = "lore")]
|
||||
#[command(version = env!("LORE_VERSION"), about = "Local GitLab data management with semantic search", long_about = None)]
|
||||
#[command(subcommand_required = false)]
|
||||
#[command(infer_subcommands = true)]
|
||||
#[command(after_long_help = "\x1b[1mEnvironment:\x1b[0m
|
||||
GITLAB_TOKEN GitLab personal access token (or name set in config)
|
||||
LORE_ROBOT Enable robot/JSON mode (non-empty, non-zero value)
|
||||
@@ -107,12 +108,19 @@ impl Cli {
|
||||
#[allow(clippy::large_enum_variant)]
|
||||
pub enum Commands {
|
||||
/// List or show issues
|
||||
#[command(visible_alias = "issue")]
|
||||
Issues(IssuesArgs),
|
||||
|
||||
/// List or show merge requests
|
||||
#[command(
|
||||
visible_alias = "mr",
|
||||
alias = "merge-requests",
|
||||
alias = "merge-request"
|
||||
)]
|
||||
Mrs(MrsArgs),
|
||||
|
||||
/// List notes from discussions
|
||||
#[command(visible_alias = "note")]
|
||||
Notes(NotesArgs),
|
||||
|
||||
/// Ingest data from GitLab
|
||||
@@ -122,6 +130,7 @@ pub enum Commands {
|
||||
Count(CountArgs),
|
||||
|
||||
/// Show sync state
|
||||
#[command(visible_alias = "st")]
|
||||
Status,
|
||||
|
||||
/// Verify GitLab authentication
|
||||
@@ -170,9 +179,11 @@ pub enum Commands {
|
||||
},
|
||||
|
||||
/// Search indexed documents
|
||||
#[command(visible_alias = "find", alias = "query")]
|
||||
Search(SearchArgs),
|
||||
|
||||
/// Show document and index statistics
|
||||
#[command(visible_alias = "stat")]
|
||||
Stats(StatsArgs),
|
||||
|
||||
/// Generate searchable documents from ingested data
|
||||
@@ -794,11 +805,14 @@ pub struct EmbedArgs {
|
||||
|
||||
#[derive(Parser)]
|
||||
#[command(after_help = "\x1b[1mExamples:\x1b[0m
|
||||
lore timeline 'deployment' # Events related to deployments
|
||||
lore timeline 'deployment' # Search-based seeding
|
||||
lore timeline issue:42 # Direct: issue #42 and related entities
|
||||
lore timeline i:42 # Shorthand for issue:42
|
||||
lore timeline mr:99 # Direct: MR !99 and related entities
|
||||
lore timeline 'auth' --since 30d -p group/repo # Scoped to project and time
|
||||
lore timeline 'migration' --depth 2 --expand-mentions # Deep cross-reference expansion")]
|
||||
pub struct TimelineArgs {
|
||||
/// Search query (keywords to find in issues, MRs, and discussions)
|
||||
/// Search text or entity reference (issue:N, i:N, mr:N, m:N)
|
||||
pub query: String,
|
||||
|
||||
/// Scope to a specific project (fuzzy match)
|
||||
|
||||
Reference in New Issue
Block a user