update Markdown skills
This commit is contained in:
@@ -2,6 +2,7 @@ import * as React from 'react';
|
||||
import { Sparkles } from 'lucide-react';
|
||||
import { cn } from '@/lib/utils';
|
||||
import { ResponseDocument } from './ResponseBlocks';
|
||||
import OwliverAvatar from '@/components/krow/OwliverAvatar';
|
||||
|
||||
/**
|
||||
* The thinking state, shown between sending and the first block arriving.
|
||||
@@ -12,9 +13,7 @@ import { ResponseDocument } from './ResponseBlocks';
|
||||
export function ThinkingIndicator() {
|
||||
return (
|
||||
<div className="flex items-center gap-2">
|
||||
<span className="grid h-6 w-6 shrink-0 place-items-center rounded-lg bg-krow-blue-tint text-krow-blue">
|
||||
<Sparkles className="h-3 w-3" aria-hidden="true" />
|
||||
</span>
|
||||
<OwliverAvatar className="h-6 w-6" rounded="rounded-full" />
|
||||
<span className="inline-flex items-center gap-1 rounded-xl rounded-tl-sm border border-border bg-surface px-2.5 py-2 shadow-xs">
|
||||
{[0, 1, 2].map((i) => (
|
||||
<span
|
||||
@@ -53,9 +52,7 @@ export const Message = React.memo(
|
||||
return (
|
||||
<div className="animate-slide-up">
|
||||
<div className="mb-2 flex items-center gap-1.5">
|
||||
<span className="grid h-5 w-5 shrink-0 place-items-center rounded-md bg-krow-blue-tint text-krow-blue">
|
||||
<Sparkles className="h-2.5 w-2.5" aria-hidden="true" />
|
||||
</span>
|
||||
<OwliverAvatar className="h-5 w-5" rounded="rounded-full" />
|
||||
<span className="text-[10px] font-semibold uppercase tracking-wide text-ink-4">Owliver</span>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ import { cn } from '@/lib/utils';
|
||||
import KrowAssistant from './KrowAssistant';
|
||||
import { useAssistantPanel } from './AssistantPanelContext';
|
||||
import { ResizeDivider } from './ResizeDivider';
|
||||
import OwliverAvatar from '@/components/krow/OwliverAvatar';
|
||||
|
||||
const EXPANDED_WIDTH = 620;
|
||||
/**
|
||||
@@ -68,9 +69,7 @@ function CollapsedTrigger({ page, onRestore }) {
|
||||
hover:border-krow-blue/40 hover:shadow-lg
|
||||
focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-krow-blue/50"
|
||||
>
|
||||
<span className="grid h-7 w-7 shrink-0 place-items-center rounded-full bg-white overflow-hidden shadow-brand border border-border">
|
||||
<img src="/krow logo.jpeg" alt="KROW Logo" className="h-full w-full object-cover" />
|
||||
</span>
|
||||
<OwliverAvatar className="h-7 w-7" rounded="rounded-full" />
|
||||
<span className="text-body-sm font-semibold text-ink-1">Owliver</span>
|
||||
<PanelLeftOpen className="h-3.5 w-3.5 shrink-0 text-ink-4 group-hover:text-krow-blue" aria-hidden="true" />
|
||||
</button>
|
||||
|
||||
@@ -23,6 +23,7 @@ import { useAssistantPanel } from './AssistantPanelContext';
|
||||
import { usePageContext } from './PageContext';
|
||||
import { useAssistantFacts, useConversation, useCurrentUserName } from './useAssistant';
|
||||
import { buildIntro, buildPrompts } from './dynamic';
|
||||
import OwliverAvatar from '@/components/krow/OwliverAvatar';
|
||||
import { Message, ThinkingIndicator, TurnDivider } from './AssistantMessage';
|
||||
import { PromptInput } from './PromptInput';
|
||||
import { PromptChips } from './PromptChips';
|
||||
@@ -613,9 +614,7 @@ export default function KrowAssistant({
|
||||
>
|
||||
{/* Header */}
|
||||
<div className="flex shrink-0 items-center gap-2.5 border-b border-white/60 px-3.5 py-2.5">
|
||||
<span className="grid h-7 w-7 shrink-0 place-items-center rounded-lg bg-white overflow-hidden shadow-brand border border-border">
|
||||
<img src="/krow logo.jpeg" alt="KROW Logo" className="h-full w-full object-cover" />
|
||||
</span>
|
||||
<OwliverAvatar className="h-7 w-7" rounded="rounded-lg" />
|
||||
|
||||
<div className="min-w-0 flex-1">
|
||||
<h2 className="font-heading text-body-sm font-semibold leading-tight text-ink-1">Owliver</h2>
|
||||
|
||||
@@ -12,8 +12,9 @@ import {
|
||||
resolveDraft, weightsFromQuestion, weightsReply, weightsUnchangedReply, whichDraftReply,
|
||||
} from '@/lib/skills/draftFlow';
|
||||
import {
|
||||
appliedToday, askWhichPosition, assignmentPreview, assignmentToExecute, availability,
|
||||
candidateDetail, candidateMatches, candidateRoute, interviewReady, matchWorkforceIntent,
|
||||
appliedToday, askHeadcount, askWhichPosition, assignmentPreview, assignmentToExecute,
|
||||
availability, candidateDetail, candidateMatches, candidateRoute, headcountFrom,
|
||||
interviewReady, matchWorkforceIntent,
|
||||
namedAssignmentPreview,
|
||||
interviewPreview, interviewToExecute,
|
||||
namedAssignmentToExecute, positionPriority, resolveCandidate, resolvePosition,
|
||||
@@ -303,6 +304,22 @@ function resolveWorkforce(question, workforce) {
|
||||
: { kind: 'answer-doc', ...assignmentPreview(position, context) };
|
||||
}
|
||||
|
||||
/**
|
||||
* The answer to "how many people do you need?".
|
||||
*
|
||||
* The only write in the workforce path that is not an assignment, and it
|
||||
* follows the same contract: the routing layer decides *what* should happen
|
||||
* and hands it back, and `useAssistant` performs it through the mutation the
|
||||
* Create Position form already uses. A sentence with no number in it is not a
|
||||
* failure — it is the question being asked again.
|
||||
*/
|
||||
if (intent === 'set_headcount') {
|
||||
const count = headcountFrom(question);
|
||||
return count
|
||||
? { kind: 'workforce', headcount: { position, count } }
|
||||
: { kind: 'answer-doc', ...askHeadcount(position, context) };
|
||||
}
|
||||
|
||||
/**
|
||||
* Interview setup, for one named person against this role. Both steps resolve
|
||||
* the name the same way assignment does, so the conversation stays on the same
|
||||
|
||||
@@ -15,7 +15,8 @@ import {
|
||||
publishedReply, weightsSetReply, weightsUnchangedReply,
|
||||
} from '@/lib/skills/draftFlow';
|
||||
import {
|
||||
assignmentDone, assignmentFailed, assignmentFollowUp, interviewDone, interviewFailed,
|
||||
assignmentDone, assignmentFailed, assignmentFollowUp, headcountFailed, headcountSet,
|
||||
interviewDone, interviewFailed,
|
||||
} from '@/lib/skills/workforceFlow';
|
||||
import {
|
||||
newConversationId, readHistory, removeConversation, saveConversation,
|
||||
@@ -517,6 +518,34 @@ export function useConversation({
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* The headcount a position never stated, supplied by the reader.
|
||||
*
|
||||
* Written through `useUpdateJobPosting` — the same mutation the Create
|
||||
* Position form and the Positions page call — so there is one position
|
||||
* record and one demand figure, not a number the panel remembers. The reply
|
||||
* is the assignment proposal the reader originally asked for, re-derived
|
||||
* against the saved record rather than against the number they typed, so
|
||||
* what they see is what was actually stored.
|
||||
*/
|
||||
if (intent.kind === 'workforce' && intent.headcount) {
|
||||
const { position: target, count } = intent.headcount;
|
||||
let saved = null;
|
||||
try {
|
||||
saved = await onUpdatePosition?.(target.id, { headcount: count });
|
||||
} catch {
|
||||
saved = null;
|
||||
}
|
||||
|
||||
intent = {
|
||||
...intent,
|
||||
kind: 'answer-doc',
|
||||
...(saved
|
||||
? headcountSet(saved, workforce?.context || {})
|
||||
: headcountFailed(target)),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* The interview step. Same contract as the assignment above: it runs before
|
||||
* the reply, only on a confirmed turn, and through the app's existing
|
||||
|
||||
Reference in New Issue
Block a user