This commit is contained in:
1 parent
7b2c43ddaf
commit
0e1a2ad008
8 files changed
+191
-27
No files matched your search
@@ -966,6 +966,11 @@ export interface components {
|
||||
excerpt: string;
|
||||
/** Extraction Id */
|
||||
extraction_id: string;
|
||||
/**
|
||||
* Jev Facet Scores
|
||||
* @default []
|
||||
*/
|
||||
jev_facet_scores: components["schemas"]["JevFacetScore"][];
|
||||
/** Jev Lens */
|
||||
jev_lens?: ("technical" | "conceptual" | "cultural-historical" | "financial-market") | null;
|
||||
/** Jev Lens Confidence */
|
||||
@@ -1020,6 +1025,24 @@ export interface components {
|
||||
/** Token */
|
||||
token: string;
|
||||
};
|
||||
/** JevFacetScore */
|
||||
JevFacetScore: {
|
||||
/**
|
||||
* Facet
|
||||
* @enum {string}
|
||||
*/
|
||||
facet: "tags" | "audience" | "use_for" | "domain";
|
||||
/** Probability */
|
||||
probability: number;
|
||||
/**
|
||||
* Schema Version
|
||||
* @default 1
|
||||
* @constant
|
||||
*/
|
||||
schema_version: 1;
|
||||
/** Value */
|
||||
value: string;
|
||||
};
|
||||
/** KnowledgeNode */
|
||||
KnowledgeNode: {
|
||||
/** Agent Id */
|
||||
|
||||
@@ -25,6 +25,7 @@ type IngestReview = {
|
||||
excerpt: string; lens: string; summary: string; relevance_rationale: string;
|
||||
jev_relation_probability?: number | null; jev_lens?: string | null;
|
||||
jev_lens_confidence?: number | null; jev_model?: string | null;
|
||||
jev_facet_scores?: { facet: 'tags' | 'audience' | 'use_for' | 'domain'; value: string; probability: number }[];
|
||||
relevance: 'borderline' | 'low'; status: string; created_at: string;
|
||||
};
|
||||
|
||||
@@ -67,13 +68,14 @@ function IngestReviewSection({ csrf, projects, onError, onMessage }: {
|
||||
}
|
||||
|
||||
return <section className="admin-card" aria-labelledby="ingest-review-title">
|
||||
<div className="admin-heading"><div><h2 id="ingest-review-title">Ingest review</h2><p className="muted-copy">These flags are recorded alongside normal ingestion and do not hold up proposals or publication. Your decision helps tune future project triage.</p><p className="muted-copy">If configured, Jev sends the project context and excerpt to OpenRouter for a relevance probability and lens suggestion. That signal is advisory.</p></div>
|
||||
<div className="admin-heading"><div><h2 id="ingest-review-title">Ingest review</h2><p className="muted-copy">These flags are recorded alongside normal ingestion and do not hold up proposals or publication. Your decision helps tune future project triage.</p><p className="muted-copy">If configured, Jev sends the project context and excerpt to OpenRouter for relevance, lens and candidate facet suggestions. These signals are advisory.</p></div>
|
||||
<button className="quiet-button" disabled={busyId !== '' || !projectId} onClick={() => void refresh()}>Refresh</button></div>
|
||||
<label>Project<select value={projectId} onChange={event => setProjectId(event.target.value)}><option value="">Choose a project</option>{projects.filter(project => project.status !== 'archived').map(project => <option key={project.project_id} value={project.project_id}>{project.title}</option>)}</select></label>
|
||||
{!projectId ? <p>Select a project to view its review flags.</p> : items.length === 0 ? <p>No review flags need feedback.</p> : <ol className="admin-activity">{items.map(item => <li key={item.review_id}>
|
||||
<strong>{item.lens.replaceAll('-', ' ')} · {item.relevance} relevance · {item.summary}</strong>
|
||||
<p>{item.excerpt}</p><p className="muted-copy">{item.relevance_rationale}</p>
|
||||
{item.jev_relation_probability != null ? <p className="muted-copy">Jev relevance: {Math.round(item.jev_relation_probability * 100)}% · lens: {item.jev_lens ?? 'unknown'} ({item.jev_lens_confidence != null ? `${Math.round(item.jev_lens_confidence * 100)}% confidence` : 'no confidence score'}) · {item.jev_model}</p> : <p className="muted-copy">Jev signal unavailable or not configured.</p>}
|
||||
{!!item.jev_facet_scores?.length && <p className="muted-copy">Facet suggestions: {item.jev_facet_scores.map(score => `${score.facet.replace('_', ' ')} “${score.value}” (${Math.round(score.probability * 100)}%)`).join(' · ')}</p>}
|
||||
<p className="muted-copy">Source {item.source_revision_id} · {item.locator.kind.replaceAll('_', ' ')} {item.locator.page ? `· page ${item.locator.page}` : ''} · run {item.run_id}</p>
|
||||
<label>Decision reason<textarea maxLength={2000} value={rationales[item.review_id] ?? ''} onChange={event => setRationales(value => ({ ...value, [item.review_id]: event.target.value }))} /></label>
|
||||
<label><input type="checkbox" checked={saveGuidance[item.review_id] ?? false} onChange={event => setSaveGuidance(value => ({ ...value, [item.review_id]: event.target.checked }))} /> Save a reusable rule for this project and lens</label>
|
||||
|
||||
Reference in new issue
Block a user