ui chat bot design changes

This commit is contained in:
2026-09-10 19:28:34 +05:30
parent fd366f7e4a
commit a917c5cefb
5 changed files with 842 additions and 182 deletions

View File

@@ -33,6 +33,7 @@ import { ASSISTANT_CONTEXTS } from './contexts';
const PLACEMENT = {
employer: {
'/admin': 'admin.controlCenter',
'/admin/home': 'admin.controlCenter',
'/admin/positions': 'admin.positions',
/* The authoring form. Owliver belongs here for the same reason it belongs
on Positions: the questions asked while specifying a role — what do these

View File

@@ -424,8 +424,8 @@ async function describeFailure(response) {
* possibilities and the hardest to diagnose.
*/
export function createAssistantProvider() {
const base = import.meta.env?.VITE_AGENT_API;
return base ? createAgentProvider({ baseUrl: base }) : createUnconfiguredProvider();
const base = import.meta.env?.VITE_AGENT_API || '/api/v1';
return createAgentProvider({ baseUrl: base });
}
/**

View File

@@ -224,7 +224,17 @@ export function constrainedAgentAnswer(agent, context, suggestion) {
/* ── Workforce ──────────────────────────────────────────────────────────── */
/** The pages that carry enough context to answer a workforce question. */
const WORKFORCE_CONTEXTS = new Set(['admin.positions']);
const WORKFORCE_CONTEXTS = new Set([
'admin.positions',
'admin.controlCenter',
'admin.candidates',
'admin.candidatesList',
'admin.talentPool',
'admin.analytics',
'employer.overview',
'employer.candidates',
'employer.analytics',
]);
/**
* A workforce question, resolved against the engine.
@@ -996,8 +1006,14 @@ export function preferAgent(intent, { modelBacked = false } = {}) {
return intent;
}
/* If a rich doc was already computed from ground-truth database rows (e.g. matching candidates,
talent pool insights, position review, etc.), return the intent directly so the rich document is rendered. */
if (intent.doc?.blocks?.length) {
return intent;
}
switch (intent.kind) {
/* Pure text. The agent reads the same rows and can be asked a follow-up. */
/* Pure text without doc. The agent reads the same rows and can be asked a follow-up. */
case 'answer-doc':
case 'skill':
case 'workforce':

File diff suppressed because it is too large Load Diff

View File

@@ -407,9 +407,8 @@ function PositionsTable({ rows, onOpen }) {
className="cursor-pointer border-b border-border last:border-0 transition-colors hover:bg-surface-subtle"
>
<td className="px-3 py-2.5">
{p.company && (
<p className="text-[10px] font-semibold uppercase tracking-wide text-krow-blue">{p.company}</p>
)}
{/* Company/client intentionally NOT shown — this surface is
employee-facing; the job title is the opportunity's identity. */}
<p className="font-medium text-ink-1">{p.title}</p>
<p className="text-caption text-ink-4">
{p.role_category}
@@ -461,9 +460,7 @@ function PositionsTable({ rows, onOpen }) {
>
<div className="flex items-start justify-between gap-3">
<div className="min-w-0">
{p.company && (
<p className="truncate text-[10px] font-semibold uppercase tracking-wide text-krow-blue">{p.company}</p>
)}
{/* Company/client intentionally NOT shown — employee-facing. */}
<p className="truncate font-medium text-ink-1">{p.title}</p>
<p className="truncate text-caption text-ink-4">
{p.role_category}
@@ -544,16 +541,9 @@ function PositionCard({ position, onOpen, isRecent = false }) {
<div className="flex items-start gap-3">
<RoleGlyph category={p.role_category} title={p.title} aiGenerated={p.ai_generated} />
{/* Client above title: on a staffing console the company a role is being
filled for is part of its identity, and it is read from the position
record — a position with no client stated simply leads with its
title, as it always did. */}
{/* Company/client intentionally NOT shown on this employee-facing card —
the job title is the opportunity's identity. Do not render p.company. */}
<div className="min-w-0 flex-1">
{p.company && (
<p className="truncate text-[11px] font-semibold uppercase tracking-wide text-krow-blue">
{p.company}
</p>
)}
<h3 className="truncate font-heading text-body font-semibold leading-snug text-ink-1">
{p.title}
</h3>