Feat : allow referencing files (#1648)
I implemented file referencing feature mentioned in issue #1591 <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Adds support for referencing app files in chat using @file:<path>. The input now autocompletes files, and the backend validates and surfaces referenced files in the chat context as read-only. - **New Features** - Chat input autocompletes @ mentions for apps, prompts, and files. - Recognizes @file:<path> and converts it to a structured mention on submit. - Backend parses @file mentions, checks file existence, and adds a “Referenced Files” section to the system message. - New get-app-files IPC handler and useAppFiles hook to load file paths for the selected app (appFilesAtom added). - e2e test for mentioning a file and capturing server dump. <!-- End of auto-generated description by cubic. -->
This commit is contained in:
committed by
GitHub
parent
a8f3c97396
commit
a3997512d2
15
e2e-tests/mention_files.spec.ts
Normal file
15
e2e-tests/mention_files.spec.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { test } from "./helpers/test_helper";
|
||||
|
||||
test("mention file", async ({ po }) => {
|
||||
await po.setUp({ autoApprove: true });
|
||||
|
||||
await po.importApp("minimal-with-ai-rules");
|
||||
await po.goToAppsTab();
|
||||
await po.getChatInput().click();
|
||||
await po.getChatInput().fill("[dump] @");
|
||||
await po.page.getByRole("menuitem", { name: "Choose AI_RULES.md" }).click();
|
||||
await po.page.getByRole("button", { name: "Send message" }).click();
|
||||
await po.waitForChatCompletion();
|
||||
|
||||
await po.snapshotServerDump("all-messages");
|
||||
});
|
||||
Reference in New Issue
Block a user