-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Open
Labels
bugbugs found in the applicationbugs found in the applicationtheia-aiissues related to TheiaAIissues related to TheiaAI
Description
Bug Description:
Steps to Reproduce:
- Ask Coder to add a file to the context using its relative path. (e.g. open the Theia repo and say something like
@coder can you put examples/api-samples/src/browser/chat/change-set-chat-agent-contribution.ts in context?
- Coder should add it to the context.
- Observe that the chat display shows the relative path as though it were absolute (with an initial
/
).
Behind the scenes, we instruct the agent to provide absolute paths, and we effectively expect absolute paths, but Coder doesn't really know about absolute paths. Fortunately most of the chat machinery works fine with relative paths, so the mismatch doesn't have much practical impact.
theia/packages/ai-ide/src/browser/context-functions.ts
Lines 96 to 106 in c49fd50
description: 'The absolute paths of files to add to the context of the current chat.', | |
items: { type: 'string' } | |
} | |
}, | |
required: ['filesToAdd'] | |
}, | |
description: 'Adds one or more files to the context of the current chat session, and returns the current list of files in the context.', | |
handler: async (arg: string, ctx: MutableChatRequestModel): Promise<string> => { | |
const { filesToAdd } = JSON.parse(arg) as { filesToAdd: string[] }; | |
ctx.session.context.addVariables(...filesToAdd.map(file => ({ arg: file, variable: FILE_VARIABLE }))); |
Additional Information
- Operating System: Mac OSX Sequoia
- Theia Version: c49fd50
Metadata
Metadata
Assignees
Labels
bugbugs found in the applicationbugs found in the applicationtheia-aiissues related to TheiaAIissues related to TheiaAI