[FEATURE]: VSCode, group context attachments as pills above the chat input (files, folders, and pasted links)
Feature hasn't been suggested before.
- [x] I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
Problem
When I add context to Kilo, it goes inline into the chat text. That bloats the input, mixes attachment metadata with what I'm actually typing, and gets worse the more context I add. Two specific pain points:
- Context files aren't grouped. Other tools keep attached files/folders as compact "pills" in a row above the input, visually separated from the prompt text. Kilo doesn't, so the input area gets noisy as soon as I attach a few things.
- Pasting a long external link dumps the whole URL into the input. When I'm investigating an issue I'll often paste a long web search / docs URL (query strings can be hundreds of chars). The full URL takes over the chat window instead of collapsing to something readable.
Both are the same underlying idea: context should be represented as pills either outside or inline to the prompt text, not as full content paths.
What other tools do
- Copilot in VSCode groups attached files as removable pills in a row above the input, with a
+button to add more.
- Cursor does the same for folders, files, and pasted links — a long URL becomes a truncated pill (
www.google.com/search?hl=en&…) instead of filling the window.
Proposed behavior
- Pill row above the input. Render each attached file/folder/link as a compact pill in a dedicated row above the chat text area, each with an
×to remove. Keep the prompt text area clean. +add-context button. A simple+(or paperclip) affordance above/beside the input to attach new context files, feeding into the same pill row — no need to type@-mentions inline if you don't want to.- Truncate pasted links into pills. When a URL is pasted (especially long ones), collapse it into a truncated, hover-to-expand pill rather than inserting the full string into the prompt. The full URL is still sent as context; only the display is truncated.
Why
Pure QoL, but it compounds: cleaner input, easier to see/remove what context is attached, and long links stop hijacking the chat window during investigation work. It also brings Kilo to parity with the attachment UX people are used to from Copilot/Cursor.
Hey, ill add a row above the prompt input that expands as context is attached and also show compact links, gonna post a pr very soon!
Thanks @tazsq, if it's not too much trouble while you're implementing the request, I noticed one more pill type to suggest: Specific lines of a file.
You can see in Kilo today when you select a few lines and right-click to "Add to context" it places it directly in the chat window, another form of chat bloat.
Compare this to other editors that add it as another pill to the rest
Feasibility
This could be a small, localized change, however you're going to implement for the other changes, to deliver the selected range through pill-seeding path vs raw appendChatBoxMessage.
A quick investigation appears that there's some representation in the composer; "Add to Context" just doesn't route through it.
- The action builds its text from a single template —
filePath:startLine-endLinefollowed by a fenced code block of the raw selection:ADD_TO_CONTEXTtemplate. - The
kilo-code.new.addToContextcommand posts that whole string to the webview viaappendChatBoxMessage: register-code-actions.ts. - The composer's
appendChatBoxMessagehandler just concatenates that raw string into the textarea — no pill/mention seeding: PromptInput.tsx.
No worries, let me know if more changes are needed, ill open a pr soon!
All good, I linked another separate but related / same category but still different. Appreciate your time taking on this request!
hey been working on this lately, just a suggestion i want - should the inline @ mentions or pasted links disappear from the prompt input box and appear only as pills? or both? im thinking that the add context button should open a file picker like the copilot one in vscode, let me know if that sounds good, this will take time though.
I'm most familiar with Cursor's method, where they convert every reference into the same pill style with different "logos" prepending the pill (for folder, file (with logo for type like JS or Ruby etc but that's a bit fancy), link, etc). But yes your suggestion makes the most simple sense for the best quality of both worlds.
I think you can sort of see this in the screenshots above.
In my mind if you use a file picker then those get added on top. And if you @- reference in the chat box then it's just a styled pill inline without the long file path or full url.
inline pills make sense but would be an overkill for now IG. I'll make a pr with the basic features first!
Well I still think "inline @ mentions or pasted links" could be shortened for QoL UI, but thanks and will take a look when you get a branch open, I could try to review.
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please reopen it or create a fresh new one.