@@ -45,8 +44,7 @@ function MetricCard({ icon: Icon, label, value, detail, highlight }) {
);
}
-/** @param {any} props */
-export function AgentInsightsPanel({ agentId, agentName }) {
+export function AgentInsightsPanel({ agentId, agentName }: any) {
const preferences = usePreferences();
const [records] = React.useState(() => readHistory());
diff --git a/src/components/agents/AgentTestPanel.jsx b/src/components/agents/AgentTestPanel.tsx
similarity index 99%
rename from src/components/agents/AgentTestPanel.jsx
rename to src/components/agents/AgentTestPanel.tsx
index 9c0867f..98b9a7d 100644
--- a/src/components/agents/AgentTestPanel.jsx
+++ b/src/components/agents/AgentTestPanel.tsx
@@ -46,8 +46,7 @@ const CLASSIFICATION_COPY = {
combined: 'Requires both structured records and knowledge retrieval.',
};
-/** @param {any} props */
-export function AgentTestPanel({ fields, dirty, customSkills = [], onRunLive }) {
+export function AgentTestPanel({ fields, dirty, customSkills = [], onRunLive }: any) {
const [contextId, setContextId] = React.useState(
() => CONTEXT_OPTIONS.find((o) => fields.pages.includes(pageKeyForContext(o.contextId)))?.contextId
|| CONTEXT_OPTIONS[0].contextId
diff --git a/src/components/agents/icons.js b/src/components/agents/icons.ts
similarity index 100%
rename from src/components/agents/icons.js
rename to src/components/agents/icons.ts
diff --git a/src/components/agents/skills/AgentSkillWorkspace.jsx b/src/components/agents/skills/AgentSkillWorkspace.tsx
similarity index 99%
rename from src/components/agents/skills/AgentSkillWorkspace.jsx
rename to src/components/agents/skills/AgentSkillWorkspace.tsx
index 55cf1e7..7cf791e 100644
--- a/src/components/agents/skills/AgentSkillWorkspace.jsx
+++ b/src/components/agents/skills/AgentSkillWorkspace.tsx
@@ -43,7 +43,6 @@ import { SkillDetails } from './SkillDetails';
const OWLIVER = 'owliver';
const BOARD = 'board';
-/** @param {any} props */
export function AgentSkillWorkspace({
fields,
customSkills = [],
@@ -55,7 +54,7 @@ export function AgentSkillWorkspace({
busy = false,
pendingId = null,
dirty = false,
-}) {
+}: any) {
const [kind, setKind] = React.useState(OWLIVER);
const [query, setQuery] = React.useState('');
const [boardQuery, setBoardQuery] = React.useState('');
diff --git a/src/components/agents/skills/AgentTree.jsx b/src/components/agents/skills/AgentTree.tsx
similarity index 99%
rename from src/components/agents/skills/AgentTree.jsx
rename to src/components/agents/skills/AgentTree.tsx
index 336ba38..5fc30da 100644
--- a/src/components/agents/skills/AgentTree.jsx
+++ b/src/components/agents/skills/AgentTree.tsx
@@ -174,7 +174,6 @@ function StaticLeaf({ icon: Icon, label, detail = null }) {
);
}
-/** @param {any} props */
export function AgentTree({
agentName,
agentIcon,
@@ -191,7 +190,7 @@ export function AgentTree({
onToggleBranch,
busy = false,
className,
-}) {
+}: any) {
const Glyph = agentIconFor(agentIcon);
return (
diff --git a/src/components/agents/skills/BoardSkillList.jsx b/src/components/agents/skills/BoardSkillList.tsx
similarity index 99%
rename from src/components/agents/skills/BoardSkillList.jsx
rename to src/components/agents/skills/BoardSkillList.tsx
index f4a6922..a40c604 100644
--- a/src/components/agents/skills/BoardSkillList.jsx
+++ b/src/components/agents/skills/BoardSkillList.tsx
@@ -159,11 +159,10 @@ function BoardCard({ entry, enabled, onToggle, onSurfaces, busy, attached = fals
);
}
-/** @param {any} props */
export function BoardSkillList({
entries, agentPages = [], disabledIds, onToggle, busy = false, query, onQueryChange, total,
attachedIds = null, onAttach = null,
-}) {
+}: any) {
const searchId = React.useId();
const onSurfaces = React.useMemo(() => new Set(agentPages), [agentPages]);
diff --git a/src/components/agents/skills/SkillCard.jsx b/src/components/agents/skills/SkillCard.tsx
similarity index 99%
rename from src/components/agents/skills/SkillCard.jsx
rename to src/components/agents/skills/SkillCard.tsx
index 7b1711b..f8f7323 100644
--- a/src/components/agents/skills/SkillCard.jsx
+++ b/src/components/agents/skills/SkillCard.tsx
@@ -25,9 +25,9 @@ import { glyphForGroup } from './glyphs';
*/
/** @type {any} */
-export const SkillCard = React.memo(/** @param {any} props */ ({
+export const SkillCard = React.memo(({
entry, enabled, onOpen, onAddAgent, onTest, canTest = false, busy = false, isPending = false,
-}) => {
+}: any) => {
const Glyph = glyphForGroup(entry.group);
const samplePrompt = entry.suggestions?.[0]?.label;
diff --git a/src/components/agents/skills/SkillCatalog.jsx b/src/components/agents/skills/SkillCatalog.tsx
similarity index 97%
rename from src/components/agents/skills/SkillCatalog.jsx
rename to src/components/agents/skills/SkillCatalog.tsx
index ba04d21..33e139b 100644
--- a/src/components/agents/skills/SkillCatalog.jsx
+++ b/src/components/agents/skills/SkillCatalog.tsx
@@ -23,8 +23,7 @@ import { SkillCard } from './SkillCard';
* has, at every width, with no media query to get wrong.
*/
-/** @param {any} props */
-function CategoryFilter({ groups, value, onChange, total }) {
+function CategoryFilter({ groups, value, onChange, total }: any) {
return (
OPTIONS.filter((o) => o.supported(type)).map((o) => o.id);
-/** @param {any} props */
-export function SurfaceSelect({ type, value, onChange, name }) {
+export function SurfaceSelect({ type, value, onChange, name }: any) {
return (
{OPTIONS.map((option) => {
diff --git a/src/components/agents/skills/glyphs.js b/src/components/agents/skills/glyphs.ts
similarity index 100%
rename from src/components/agents/skills/glyphs.js
rename to src/components/agents/skills/glyphs.ts
diff --git a/src/components/skills/SkillSections.jsx b/src/components/skills/SkillSections.tsx
similarity index 99%
rename from src/components/skills/SkillSections.jsx
rename to src/components/skills/SkillSections.tsx
index b404587..2e8cdf3 100644
--- a/src/components/skills/SkillSections.jsx
+++ b/src/components/skills/SkillSections.tsx
@@ -133,7 +133,7 @@ function ListSection({ data }) {
function TimelineSection({ data }) {
const items = [...(data.items || [])]
.filter((item) => item.at)
- .sort((a, b) => new Date(b.at) - new Date(a.at));
+ .sort((a, b) => (new Date(b.at) as any) - (new Date(a.at) as any));
if (data.empty || !items.length) return
{data.emptyNote};
return (
@@ -308,7 +308,7 @@ function WeightsSection({ data, section, onApply, compact = false }) {
if (data?.empty || !rows.length) return
{data?.emptyNote};
const current = draft || Object.fromEntries(rows.map((r) => [r.id, Number(r.value) || 0]));
- const total = Object.values(current).reduce((a, b) => a + b, 0);
+ const total = Object.values
(current).reduce((a, b) => a + b, 0);
const balanced = total === 100;
const dirty = draft !== null && rows.some((r) => (Number(r.value) || 0) !== current[r.id]);
diff --git a/src/components/skills/SkillSurface.jsx b/src/components/skills/SkillSurface.tsx
similarity index 99%
rename from src/components/skills/SkillSurface.jsx
rename to src/components/skills/SkillSurface.tsx
index 288b96a..8ab45a4 100644
--- a/src/components/skills/SkillSurface.jsx
+++ b/src/components/skills/SkillSurface.tsx
@@ -49,7 +49,7 @@ import { agentPermitsSkill } from '@/lib/agents/runtime';
* from one resolution, or the two would disagree about what a page carries.
* Called with no placement it returns every section on the page.
*/
-export function useSkillSections(page, placement) {
+export function useSkillSections(page, placement?) {
const preferences = usePreferences();
/**
* Who is answering here.
@@ -217,7 +217,6 @@ function SkillSection({ skill, section, context }) {
);
}
-/** @param {any} props */
export function SkillSurface({
page = '',
placement = '',
@@ -231,7 +230,7 @@ export function SkillSurface({
_customSources = [],
_email = '',
_onOpenTraining = null,
-}) {
+}: any) {
const sections = useSkillSections(page, placement);
const resolved = useSkillDataContext(context);