Keep Tailwind's scan off the server-side folders
The task work added ref strings ([file:ID], [bot:3]) in new prompt and tool files, so the warning about "file" not being a known CSS property came back: Tailwind read them as arbitrary-property utilities and emitted `file: ID`. The exclusion list now covers every server-side directory whole instead of one file at a time (none of them holds a className, so nothing is lost), and `dict` stays scanned for the static hue classes. The ref literals that must live in scanned files are reworded in comments, and task-file-row builds its chip through `fileRef` rather than its own template literal.
This commit is contained in:
@@ -3,6 +3,7 @@ import Link from "@moduletrace/twui/layout/Link";
|
||||
import { FileText, Image as ImageIcon } from "lucide-react";
|
||||
import Span from "@moduletrace/twui/layout/Span";
|
||||
import type { TaskFile } from "@/src/types";
|
||||
import fileRef from "@/src/utils/file-ref";
|
||||
|
||||
type Props = {
|
||||
file: TaskFile;
|
||||
@@ -15,8 +16,9 @@ type Props = {
|
||||
|
||||
/**
|
||||
* One file on a task: its name, opening the bytes at
|
||||
* `/media/private/<id>`, and its `[file:ID]` chip when it lives in a bot's
|
||||
* or workspace's folder (so the file's real home is reachable too).
|
||||
* `/media/private/<id>`, and its file ref (built by `fileRef`) when it
|
||||
* lives in a bot's or workspace's folder (so the file's real home is
|
||||
* reachable too).
|
||||
*/
|
||||
export default function TaskFileRow({ file, onDetach, busy }: Props) {
|
||||
if (file.missing) {
|
||||
@@ -51,7 +53,7 @@ export default function TaskFileRow({ file, onDetach, busy }: Props) {
|
||||
) : null}
|
||||
{file.bot_file_id ? (
|
||||
<Span className="shrink-0 text-[11px] leading-4 text-ink-secondary">
|
||||
{`[file:${file.bot_file_id}]`}
|
||||
{fileRef({ id: file.bot_file_id })}
|
||||
</Span>
|
||||
) : null}
|
||||
{onDetach ? (
|
||||
|
||||
Reference in New Issue
Block a user