updates on the lint errors and more stuffs
This commit is contained in:
@@ -4,7 +4,7 @@ import { motion } from 'framer-motion';
|
||||
import {
|
||||
Activity, Bell, Bike, Car, ChevronDown, Coins, FileSpreadsheet,
|
||||
FileText, ListTodo, LogOut, Menu, Search, Settings, Shield,
|
||||
ShieldAlert, User, UserCheck, Users, Warehouse,
|
||||
ShieldAlert, User, UserCheck, Warehouse,
|
||||
} from 'lucide-react';
|
||||
import { cn } from '@/lib/utils';
|
||||
import { DOORMILE_MARK_URL } from '@/assets/brand';
|
||||
|
||||
@@ -2,7 +2,7 @@ import React, { useMemo, useState } from 'react';
|
||||
import { Pencil, Plus, ShieldCheck, Trash2, Users } from 'lucide-react';
|
||||
import {
|
||||
Avatar, Button, ConfirmModal, DataTable, EmptyState, Field, Grid, IconButton, Input,
|
||||
KpiCard, Modal, PageHeader, Select, SelectContent, SelectItem, SelectTrigger,
|
||||
KpiCard, Modal, Select, SelectContent, SelectItem, SelectTrigger,
|
||||
SelectValue, Stack, StatusBadge,
|
||||
} from '@/components/ds';
|
||||
import { ListToolbar } from '@/components/doormile/ListToolbar';
|
||||
|
||||
@@ -8,7 +8,7 @@ import {
|
||||
|
||||
import {
|
||||
Alert, Button, DataTable, Drawer, EmptyState, Grid, KpiCard,
|
||||
Modal, PageHeader, Stack, StatusBadge, Surface, Tabs,
|
||||
Modal, Stack, StatusBadge, Surface, Tabs,
|
||||
Select, SelectContent, SelectItem, SelectTrigger, SelectValue,
|
||||
} from '@/components/ds';
|
||||
import { ListToolbar } from '@/components/doormile/ListToolbar';
|
||||
|
||||
@@ -6,7 +6,7 @@ import {
|
||||
} from 'lucide-react';
|
||||
import {
|
||||
Button, DataTable, Drawer, EmptyState, Field, Grid, IconButton, Input, KpiCard,
|
||||
Modal, PageHeader, SearchInput, Select, SelectContent, SelectItem, SelectTrigger, SelectValue,
|
||||
Modal, SearchInput, Select, SelectContent, SelectItem, SelectTrigger, SelectValue,
|
||||
Stack, StatusBadge, Surface, Switch, Tabs,
|
||||
} from '@/components/ds';
|
||||
import {
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
import React, { useState } from 'react';
|
||||
import { Building2, Pencil, Plus, Radar, Trash2 } from 'lucide-react';
|
||||
import {
|
||||
Button, ConfirmModal, DataTable, EmptyState, Field, IconButton, Input, Modal,
|
||||
PageHeader, Pagination, Stack, Surface, Tabs,
|
||||
Button, ConfirmModal, DataTable, EmptyState, Field, IconButton, Input, Modal, Pagination, Stack, Surface, Tabs,
|
||||
} from '@/components/ds';
|
||||
import {
|
||||
useCarrierPricing, useCompetitorBranches, useCreateCarrierPricing,
|
||||
|
||||
@@ -3,7 +3,7 @@ import { useNavigate } from 'react-router-dom';
|
||||
import { Mail, Package, Pencil, Phone, Plus, Users } from 'lucide-react';
|
||||
import {
|
||||
Avatar, Button, DataTable, EmptyState, Field, Grid, IconButton, Input, KpiCard,
|
||||
Modal, PageHeader, Stack,
|
||||
Modal, Stack,
|
||||
} from '@/components/ds';
|
||||
import { ListToolbar } from '@/components/doormile/ListToolbar';
|
||||
import { useTenantCustomers, useUpdateTenantCustomer } from '@/lib/doormileHooks';
|
||||
|
||||
@@ -2,8 +2,7 @@ import React, { useEffect, useMemo, useState } from 'react';
|
||||
import dayjs from 'dayjs';
|
||||
import { Ban, Bell, Bike, Clock, FileSpreadsheet, PackageSearch, Truck } from 'lucide-react';
|
||||
import {
|
||||
Alert, Button, DataTable, DatePicker, Drawer, EmptyState, Field, IconButton,
|
||||
PageHeader, SearchInput, Select, SelectContent, SelectItem, SelectTrigger, SelectValue, Modal,
|
||||
Alert, Button, DataTable, DatePicker, Drawer, EmptyState, Field, IconButton, SearchInput, Select, SelectContent, SelectItem, SelectTrigger, SelectValue, Modal,
|
||||
Stack, StatusBadge, Surface, Tabs, Textarea, ZoneSelector,
|
||||
} from '@/components/ds';
|
||||
import {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React, { useMemo, useState } from 'react';
|
||||
import { AlertTriangle, CheckCircle2, ClipboardList, Flame, Plus } from 'lucide-react';
|
||||
import {
|
||||
Button, DataTable, EmptyState, Field, Grid, Input, KpiCard, Modal, PageHeader,
|
||||
Button, DataTable, EmptyState, Field, Grid, Input, KpiCard, Modal,
|
||||
Select, SelectContent, SelectItem, SelectTrigger, SelectValue, Stack, StatusBadge,
|
||||
Textarea,
|
||||
} from '@/components/ds';
|
||||
|
||||
@@ -2008,42 +2008,23 @@ export default function Home() {
|
||||
</span>
|
||||
</Link>
|
||||
|
||||
{/* All Agents.
|
||||
{/* "All Agents" was here, and is gone with the Agent Studio it
|
||||
pointed at.
|
||||
|
||||
This used to ask the assistant to "Summarize status across all
|
||||
9 specialized agents". Nothing in the intent catalogue matches
|
||||
the word "agents", so every click landed on the honest
|
||||
"I could not answer that from live data" fallback — a control
|
||||
that reliably fails, on the page where an operator forms their
|
||||
impression of whether the AI works at all.
|
||||
Its history in one line: it originally asked the assistant to
|
||||
"Summarize status across all 9 specialized agents", which no
|
||||
intent matches, so every click produced "I could not answer
|
||||
that from live data". It was then repointed at Settings →
|
||||
Skills & Tools, which turned out to be a localStorage-only
|
||||
drawing and has now been removed too.
|
||||
|
||||
It could not have worked. Agent telemetry lives in AI_engine's
|
||||
command centre (FastAPI, port 8600) and the console has no
|
||||
base URL for it, no env var, and nothing deployed to point at;
|
||||
the console itself holds no agent state to summarise. The one
|
||||
thing NOT done here is synthesising a number from console
|
||||
data — see the note on the fallback branch above, where a
|
||||
previous version forged a sourceCalls entry claiming
|
||||
"46 milers scanned" for a call that was never made.
|
||||
|
||||
So it now opens the page that really is about agents. When the
|
||||
audit tables in docs/agent-platform-plan.md §11 land, agent
|
||||
status becomes an ordinary query and this can become a
|
||||
question again. */}
|
||||
<Link
|
||||
to="/doormile/settings?tab=skills"
|
||||
className="flex flex-col items-center group focus:outline-none w-18 text-center cursor-pointer"
|
||||
>
|
||||
<div className="relative w-12 h-12 rounded-2xl bg-indigo-50 border border-indigo-200/90 flex items-center justify-center text-indigo-600 group-hover:scale-105 group-hover:bg-indigo-100 group-hover:shadow-sm transition-all duration-200">
|
||||
<Sparkles className="w-5 h-5" />
|
||||
<span className="absolute -top-1.5 -right-1 px-1 py-0.5 bg-indigo-600 text-white font-bold text-[8px] rounded-full leading-none shadow-xs uppercase">
|
||||
AI
|
||||
</span>
|
||||
</div>
|
||||
<span className="text-[11px] sm:text-xs font-medium text-slate-700 group-hover:text-slate-900 mt-2 text-center truncate w-full transition-colors">
|
||||
All Agents
|
||||
</span>
|
||||
</Link>
|
||||
There is no third target. The console holds no agent state:
|
||||
telemetry lives in AI_engine's command centre on port 8600,
|
||||
which nothing here is configured to reach. Rather than point a
|
||||
button at a third thing that cannot answer, it is out until
|
||||
there is something real behind it — the audit tables in
|
||||
docs/agent-platform-plan.md §11, after which agent status is
|
||||
an ordinary query against our own database. */}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ import React, { useMemo, useState } from 'react';
|
||||
import { CheckCircle2, MapPin, Pencil, Plus, Trash2, Warehouse } from 'lucide-react';
|
||||
import {
|
||||
Button, ConfirmModal, DataTable, EmptyState, Field, Grid, IconButton, Input, KpiCard,
|
||||
Modal, PageHeader, Select, SelectContent, SelectItem, SelectTrigger, SelectValue,
|
||||
Modal, Select, SelectContent, SelectItem, SelectTrigger, SelectValue,
|
||||
Stack, StatusBadge,
|
||||
} from '@/components/ds';
|
||||
import { ListToolbar } from '@/components/doormile/ListToolbar';
|
||||
|
||||
@@ -3,7 +3,7 @@ import { useNavigate, useSearchParams } from 'react-router-dom';
|
||||
import { motion } from 'framer-motion';
|
||||
import dayjs from 'dayjs';
|
||||
import { Ban, Bike, FileSpreadsheet, MapPin, Package, Plus, Upload, UserCheck } from 'lucide-react';
|
||||
import { Button, ConfirmModal, DataTable, DatePicker, EmptyState, Modal, PageHeader, SearchInput, Stack, StatusBadge, Tabs, ZoneSelector } from '@/components/ds';
|
||||
import { Button, ConfirmModal, DataTable, DatePicker, EmptyState, Modal, SearchInput, Stack, StatusBadge, Tabs, ZoneSelector } from '@/components/ds';
|
||||
import { useBulkCancelBookings, useCustomers, useFlowAnchors, useRiderOptions } from '@/lib/doormileHooks';
|
||||
import { useZone } from '@/lib/ZoneContext';
|
||||
import { assignMilerToBooking, notifyMiler } from '@/api/doormile/endpoints';
|
||||
|
||||
@@ -4,7 +4,7 @@ import { useMutation } from '@tanstack/react-query';
|
||||
import { useQueryClient } from '@tanstack/react-query';
|
||||
import { ArrowLeft, Bike, Package, Send } from 'lucide-react';
|
||||
import {
|
||||
Button, DataTable, EmptyState, Grid, KpiCard, PageHeader, Select, SelectContent,
|
||||
Button, DataTable, EmptyState, Grid, KpiCard, Select, SelectContent,
|
||||
SelectItem, SelectTrigger, SelectValue, Stack, StatusBadge,
|
||||
} from '@/components/ds';
|
||||
import { finalCreatedeliveries, notifyRider } from '@/api/doormile';
|
||||
|
||||
@@ -2,7 +2,7 @@ import React, { useMemo, useState } from 'react';
|
||||
import { Building2, Calculator, IndianRupee, MapPin, Pencil, Plus, Tag, Trash2 } from 'lucide-react';
|
||||
import {
|
||||
Button, ConfirmModal, DataTable, EmptyState, Field, Grid, IconButton, Input, KpiCard,
|
||||
Modal, PageHeader, Select, SelectContent, SelectItem, SelectTrigger, SelectValue,
|
||||
Modal, Select, SelectContent, SelectItem, SelectTrigger, SelectValue,
|
||||
Stack, StatusBadge, Surface,
|
||||
} from '@/components/ds';
|
||||
import { ListToolbar } from '@/components/doormile/ListToolbar';
|
||||
|
||||
@@ -9,7 +9,6 @@ import {
|
||||
FileSpreadsheet,
|
||||
Calendar,
|
||||
Loader2,
|
||||
Check,
|
||||
} from 'lucide-react';
|
||||
import { cn } from '@/lib/utils';
|
||||
import {
|
||||
|
||||
@@ -9,7 +9,7 @@ import {
|
||||
} from 'lucide-react';
|
||||
import {
|
||||
Avatar, Button, ConfirmModal, DataTable, Drawer, EmptyState, Field, Grid, IconButton,
|
||||
Input, KpiCard, Modal, PageHeader, SearchInput, Select, SelectContent, SelectItem, SelectTrigger,
|
||||
Input, KpiCard, Modal, SearchInput, Select, SelectContent, SelectItem, SelectTrigger,
|
||||
SelectValue, Stack, StatusBadge, Surface, Tabs, Textarea, ZoneSelector,
|
||||
} from '@/components/ds';
|
||||
import {
|
||||
|
||||
@@ -1,28 +1,44 @@
|
||||
import React, { useState, useEffect } from 'react';
|
||||
import { useSearchParams, useNavigate } from 'react-router-dom';
|
||||
import { useSearchParams } from 'react-router-dom';
|
||||
import { motion, AnimatePresence } from 'framer-motion';
|
||||
import dayjs from 'dayjs';
|
||||
import { TrendingUp, Users, Plus, Sparkles } from 'lucide-react';
|
||||
import { TrendingUp, Users, Sparkles } from 'lucide-react';
|
||||
import { cn } from '@/lib/utils';
|
||||
import { Button, Input } from '@/components/ds';
|
||||
import { Input } from '@/components/ds';
|
||||
import Customers from '@/pages/doormile/customers/Customers';
|
||||
import Profitability from '@/pages/doormile/reports/Profitability';
|
||||
import AgentStudio from './agentStudio/AgentStudio';
|
||||
|
||||
// ⚠️ Skills & Tools (Agent Studio) is a PREVIEW. It does not configure
|
||||
// anything yet.
|
||||
//
|
||||
// It reads and writes browser localStorage and nothing else: no endpoint, no
|
||||
// table, and no importer outside its own folder. A skill added here exists on
|
||||
// one machine, in one browser, and is invisible to colleagues and to the
|
||||
// assistant. The Home assistant runs on the regex catalogue in
|
||||
// lib/assistant/intents.js and has never heard of a "skill".
|
||||
//
|
||||
// It is kept deliberately — the shape is right and it is what Phase 6 of
|
||||
// docs/agent-platform-plan.md wires to the real tool registry in
|
||||
// doormile_backend/internal/ai/tools. Until then, do not read a change made
|
||||
// here as a change to the agent's behaviour.
|
||||
//
|
||||
// It is NOT the default tab. Landing on a section that does nothing is how an
|
||||
// operator concludes the AI is broken; Profitability leads instead.
|
||||
const TABS = [
|
||||
{ id: 'skills', label: 'Skills & Tools', icon: Sparkles },
|
||||
{ id: 'profitability', label: 'Profitability', icon: TrendingUp },
|
||||
{ id: 'customers', label: 'Customers', icon: Users },
|
||||
{ id: 'skills', label: 'Skills & Tools', icon: Sparkles },
|
||||
];
|
||||
|
||||
export default function Settings() {
|
||||
const [searchParams, setSearchParams] = useSearchParams();
|
||||
const navigate = useNavigate();
|
||||
const tabParam = searchParams.get('tab');
|
||||
|
||||
// Default to 'skills' or respect ?tab=
|
||||
// Default to the first tab, or respect ?tab=. A stale ?tab=skills link now
|
||||
// falls through to this default rather than rendering nothing.
|
||||
const [activeTab, setActiveTab] = useState(
|
||||
tabParam && TABS.some((t) => t.id === tabParam) ? tabParam : 'skills'
|
||||
tabParam && TABS.some((t) => t.id === tabParam) ? tabParam : TABS[0].id
|
||||
);
|
||||
|
||||
// Maintain shared date for Profitability
|
||||
@@ -89,6 +105,11 @@ export default function Settings() {
|
||||
<Input
|
||||
type="date"
|
||||
value={reportDate}
|
||||
// Profitability reports on a day that has happened. Profitability.jsx
|
||||
// has its own bounded input for the standalone page; this is the
|
||||
// embedded copy, and it was missed — a future date here returns an
|
||||
// empty report that reads as "no profit" rather than "no data".
|
||||
max={dayjs().format('YYYY-MM-DD')}
|
||||
onChange={(e) => e.target.value && setReportDate(e.target.value)}
|
||||
aria-label="Report date"
|
||||
className="w-44 bg-white shadow-xs"
|
||||
|
||||
@@ -3,9 +3,6 @@ import {
|
||||
Sliders,
|
||||
BarChart3,
|
||||
ShieldCheck,
|
||||
CheckCircle2,
|
||||
Clock,
|
||||
Zap,
|
||||
TrendingUp,
|
||||
Cpu,
|
||||
Save,
|
||||
|
||||
@@ -1,16 +1,13 @@
|
||||
import React, { useState, useEffect } from 'react';
|
||||
import {
|
||||
Sparkles,
|
||||
Play,
|
||||
Wrench,
|
||||
Bot,
|
||||
Send,
|
||||
CheckCircle2,
|
||||
Terminal,
|
||||
RotateCcw,
|
||||
Layers,
|
||||
} from 'lucide-react';
|
||||
import { cn } from '@/lib/utils';
|
||||
|
||||
export default function AgentPlayground({
|
||||
activeAgent,
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
import React, { useState, useEffect } from 'react';
|
||||
import React, { useState } from 'react';
|
||||
import {
|
||||
Sliders,
|
||||
Zap,
|
||||
Wrench,
|
||||
Bot,
|
||||
BarChart3,
|
||||
ExternalLink,
|
||||
Sparkles,
|
||||
} from 'lucide-react';
|
||||
import { cn } from '@/lib/utils';
|
||||
import {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import React, { useState } from 'react';
|
||||
import { X, Plus, Sparkles, Layers, Wrench, Check } from 'lucide-react';
|
||||
import { X, Plus, Sparkles, Wrench, Check } from 'lucide-react';
|
||||
import { cn } from '@/lib/utils';
|
||||
|
||||
const CATEGORIES = ['Authoring', 'Workforce', 'Logistics', 'Dispatch', 'Custom'];
|
||||
|
||||
@@ -5,10 +5,7 @@ import {
|
||||
Play,
|
||||
Layers,
|
||||
Wrench,
|
||||
Check,
|
||||
CheckCircle2,
|
||||
Code,
|
||||
ShieldCheck,
|
||||
ChevronDown,
|
||||
ChevronRight,
|
||||
} from 'lucide-react';
|
||||
|
||||
@@ -7,8 +7,6 @@ import {
|
||||
ShieldCheck,
|
||||
ChevronDown,
|
||||
ChevronRight,
|
||||
Layers,
|
||||
Plus,
|
||||
} from 'lucide-react';
|
||||
import { cn } from '@/lib/utils';
|
||||
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
import React, { useMemo, useState } from 'react';
|
||||
import { ArrowRight, ListPlus, PackageCheck, PlaneLanding, PlaneTakeoff, Plus, Truck } from 'lucide-react';
|
||||
import {
|
||||
Button, DataTable, EmptyState, Field, Grid, IconButton, Input, KpiCard, Modal,
|
||||
PageHeader, Select, SelectContent, SelectItem, SelectTrigger, SelectValue, Stack,
|
||||
Button, DataTable, EmptyState, Field, Grid, IconButton, Input, KpiCard, Modal, Select, SelectContent, SelectItem, SelectTrigger, SelectValue, Stack,
|
||||
StatusBadge,
|
||||
} from '@/components/ds';
|
||||
import { ListToolbar } from '@/components/doormile/ListToolbar';
|
||||
|
||||
@@ -2,7 +2,7 @@ import React, { useMemo, useState } from 'react';
|
||||
import { BatteryLow, BatteryFull, Car, CheckCircle2, Pencil, Plus, Trash2 } from 'lucide-react';
|
||||
import {
|
||||
Button, ConfirmModal, DataTable, EmptyState, Field, Grid, IconButton, Input, KpiCard,
|
||||
Modal, PageHeader, Select, SelectContent, SelectItem, SelectTrigger, SelectValue,
|
||||
Modal, Select, SelectContent, SelectItem, SelectTrigger, SelectValue,
|
||||
Stack, StatusBadge,
|
||||
} from '@/components/ds';
|
||||
import { ListToolbar } from '@/components/doormile/ListToolbar';
|
||||
|
||||
Reference in New Issue
Block a user