дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-12-06 10:07:11 +02:00
feat(agents): reference chips, quote blocks and a richer completion in the composer (#3091)
The agent composer is now a CodeMirror editor: the text stays plain and is what's sent, while @ file references are drawn as chips (icon, name, lines) that move and delete as one piece, open on click and preview on hover; Backspace after a chip opens it as text. Quotes show as blocks, and sent messages get the same chips and quote blocks. The @ completion lists open editors first, highlights matches and shows the folder; the focused editor's file is offered above the text, a pasted project path becomes a reference, and dropping files shows a hint. Lines copied from an editor paste as a reference, terminal output as a terminal block, and code blocks show as cards. The reference trimming regex avoids lookbehind for WebKit before 16.4.
Цей коміт міститься в:
1 джерело
834f9e172c
коміт
89f00a29f9
35 files changed
+3407
-745
No files matched your search
@@ -8,6 +8,7 @@ import {
|
||||
fileDiagnostics,
|
||||
filePaths,
|
||||
mergeDiagnostics,
|
||||
problemsReport,
|
||||
profiledProblems,
|
||||
projectCounts,
|
||||
useProblems,
|
||||
@@ -134,3 +135,19 @@ describe("filePaths", () => {
|
||||
expect(filePaths(map, "/p/none.py")).toEqual([]);
|
||||
});
|
||||
});
|
||||
|
||||
describe("problemsReport", () => {
|
||||
it("lists errors before warnings with their places, leaving out hints, up to a limit", () => {
|
||||
let map = mergeDiagnostics(new Map(), "/p/src/a.ts", "tsc", [d(3, "warning", "ts"), d(0, "hint")]);
|
||||
map = mergeDiagnostics(map, "/p/src/b.ts", "tsc", [d(9, "error"), d(1, "error")]);
|
||||
expect(problemsReport(map, "/p")).toBe(
|
||||
[
|
||||
"src/b.ts:2:1: error: line 1 (tsc)",
|
||||
"src/b.ts:10:1: error: line 9 (tsc)",
|
||||
"src/a.ts:4:1: warning: line 3 (ts)",
|
||||
].join("\n"),
|
||||
);
|
||||
expect(problemsReport(map, "/p", 1)).toBe("src/b.ts:2:1: error: line 1 (tsc)\n… 2 more");
|
||||
expect(problemsReport(mergeDiagnostics(new Map(), "/p/a", "x", [d(0, "info")]), "/p")).toBeNull();
|
||||
});
|
||||
});
|
||||
Reference in new issue
Заблокувати користувача