Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
6bc0bbe
refactor(buildEndpointOption): Improve error logging in middleware, c…
danny-avila Jun 21, 2025
2797aff
refactor: parameter extraction and organization in agent services, mi…
danny-avila Jun 21, 2025
7ad3ef7
refactor(createPayload): streamline all endpoints to agent route
danny-avila Jun 21, 2025
313b455
fix: add `modelLabel` to response sender options for agent initializa…
danny-avila Jun 21, 2025
fe0591d
chore: correct log message context in EditController abort controller…
danny-avila Jun 21, 2025
7001c1a
chore: remove unused abortRequest hook
danny-avila Jun 21, 2025
71e8501
chore: remove unused addToCache module and its dependencies
danny-avila Jun 21, 2025
1b38777
refactor: remove AskController and related routes, update endpoint UR…
danny-avila Jun 21, 2025
8543e1e
chore: remove unused bedrock route and its related imports
danny-avila Jun 21, 2025
d0c6ecb
refactor: simplify response sender logic for Google endpoint
danny-avila Jun 21, 2025
13c977a
chore: add `modelDisplayLabel` handling for agents endpoint
danny-avila Jun 21, 2025
ef7e517
feat: add file search capability to ephemeral agents, update code int…
danny-avila Jun 21, 2025
1d532a8
feat: implement useToolToggle hook for managing tool toggle state, re…
danny-avila Jun 22, 2025
d247e48
feat: add ToolsDropdown component to BadgeRow for enhanced tool options
danny-avila Jun 22, 2025
7a190ee
feat: introduce BadgeRowContext and BadgeRowProvider for managing con…
danny-avila Jun 22, 2025
5ba51d9
feat: implement useMCPSelect hook for managing MCP selection state, r…
danny-avila Jun 22, 2025
01625b1
feat: enhance BadgeRowContext with MCPSelect and tool toggle function…
danny-avila Jun 22, 2025
cf24d66
refactor: streamline useToolToggle hook by integrating setEphemeralAg…
danny-avila Jun 22, 2025
727d4a8
refactor: consolidate codeApiKeyForm and searchApiKeyForm from CodeIn…
danny-avila Jun 22, 2025
9eb6237
refactor: update CheckboxButton to support controlled state and enhan…
danny-avila Jun 22, 2025
9375789
refactor: conditionally render CheckboxButton in CodeInterpreter and …
danny-avila Jun 22, 2025
69b6997
chore: add jotai dependency to package.json and package-lock.json
danny-avila Jun 22, 2025
d3e7134
chore: update brace-expansion package to version 2.0.2 in package-loc…
danny-avila Jun 22, 2025
0bc10ce
Revert "chore: add jotai dependency to package.json and package-lock.…
danny-avila Jun 22, 2025
0515167
refactor: add pinning functionality to CodeInterpreter and WebSearch …
danny-avila Jun 22, 2025
adec408
chore: move MCPIcon to correct location, remove duplicate
danny-avila Jun 22, 2025
07bff51
fix: update MCP import to use type-only import from librechat-data-pr…
danny-avila Jun 22, 2025
41117da
feat: implement MCPSubMenu component and integrate pinning functional…
danny-avila Jun 22, 2025
463c351
fix: cycling to submenu by using parent menu context
danny-avila Jun 22, 2025
dcc6784
feat: add FileSearch component and integrate it into BadgeRow and Too…
danny-avila Jun 22, 2025
77b5fb9
chore: import order
danny-avila Jun 22, 2025
e293bd0
chore: remove agent specific logic that would block functionality for…
danny-avila Jun 22, 2025
214a62a
chore: linting for `createContextHandlers`
danny-avila Jun 22, 2025
0822590
chore: ensure ToolsDropdown doesn't show up for agents
danny-avila Jun 22, 2025
c6b34d3
chore: ensure tool resource is selected when dragged to UI
danny-avila Jun 22, 2025
81f7a88
chore: update file search behavior to simulate legacy functionality
danny-avila Jun 23, 2025
ad5ff19
feat: ToolDialogs with multiple trigger references, add settings to t…
danny-avila Jun 23, 2025
88a8324
refactor: simplify web search and code interpreter settings checks
danny-avila Jun 23, 2025
4d57769
chore: simplify local storage key for pinned state in useToolToggle
danny-avila Jun 23, 2025
529dff4
refactor: reinstate agent check in AttachFileChat component, as indiv…
danny-avila Jun 23, 2025
5099f32
ci: increase timeout for MongoDB connection in Agent tests
danny-avila Jun 23, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions api/app/clients/BaseClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -792,7 +792,8 @@ class BaseClient {

userMessage.tokenCount = userMessageTokenCount;
/*
Note: `AskController` saves the user message, so we update the count of its `userMessage` reference
Note: `AgentController` saves the user message if not saved here
(noted by `savedMessageIds`), so we update the count of its `userMessage` reference
*/
if (typeof opts?.getReqData === 'function') {
opts.getReqData({
Expand All @@ -801,7 +802,8 @@ class BaseClient {
}
/*
Note: we update the user message to be sure it gets the calculated token count;
though `AskController` saves the user message, EditController does not
though `AgentController` saves the user message if not saved here
(noted by `savedMessageIds`), EditController does not
*/
await userMessagePromise;
await this.updateMessageInDatabase({
Expand Down
34 changes: 17 additions & 17 deletions api/app/clients/prompts/createContextHandlers.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,35 +96,35 @@ function createContextHandlers(req, userMessageContent) {
resolvedQueries.length === 0
? '\n\tThe semantic search did not return any results.'
: resolvedQueries
.map((queryResult, index) => {
const file = processedFiles[index];
let contextItems = queryResult.data;
.map((queryResult, index) => {
const file = processedFiles[index];
let contextItems = queryResult.data;

const generateContext = (currentContext) =>
`
const generateContext = (currentContext) =>
`
<file>
<filename>${file.filename}</filename>
<context>${currentContext}
</context>
</file>`;

if (useFullContext) {
return generateContext(`\n${contextItems}`);
}
if (useFullContext) {
return generateContext(`\n${contextItems}`);
}

contextItems = queryResult.data
.map((item) => {
const pageContent = item[0].page_content;
return `
contextItems = queryResult.data
.map((item) => {
const pageContent = item[0].page_content;
return `
<contextItem>
<![CDATA[${pageContent?.trim()}]]>
</contextItem>`;
})
.join('');
})
.join('');

return generateContext(contextItems);
})
.join('');
return generateContext(contextItems);
})
.join('');

if (useFullContext) {
const prompt = `${header}
Expand Down
3 changes: 3 additions & 0 deletions api/models/Agent.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ const loadEphemeralAgent = async ({ req, agent_id, endpoint, model_parameters: _
if (ephemeralAgent?.execute_code === true) {
tools.push(Tools.execute_code);
}
if (ephemeralAgent?.file_search === true) {
tools.push(Tools.file_search);
}
if (ephemeralAgent?.web_search === true) {
tools.push(Tools.web_search);
}
Expand Down
14 changes: 7 additions & 7 deletions api/models/Agent.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ describe('models/Agent', () => {
const mongoUri = mongoServer.getUri();
Agent = mongoose.models.Agent || mongoose.model('Agent', agentSchema);
await mongoose.connect(mongoUri);
});
}, 20000);

afterAll(async () => {
await mongoose.disconnect();
Expand Down Expand Up @@ -413,7 +413,7 @@ describe('models/Agent', () => {
const mongoUri = mongoServer.getUri();
Agent = mongoose.models.Agent || mongoose.model('Agent', agentSchema);
await mongoose.connect(mongoUri);
});
}, 20000);

afterAll(async () => {
await mongoose.disconnect();
Expand Down Expand Up @@ -670,7 +670,7 @@ describe('models/Agent', () => {
const mongoUri = mongoServer.getUri();
Agent = mongoose.models.Agent || mongoose.model('Agent', agentSchema);
await mongoose.connect(mongoUri);
});
}, 20000);

afterAll(async () => {
await mongoose.disconnect();
Expand Down Expand Up @@ -1332,7 +1332,7 @@ describe('models/Agent', () => {
const mongoUri = mongoServer.getUri();
Agent = mongoose.models.Agent || mongoose.model('Agent', agentSchema);
await mongoose.connect(mongoUri);
});
}, 20000);

afterAll(async () => {
await mongoose.disconnect();
Expand Down Expand Up @@ -1514,7 +1514,7 @@ describe('models/Agent', () => {
const mongoUri = mongoServer.getUri();
Agent = mongoose.models.Agent || mongoose.model('Agent', agentSchema);
await mongoose.connect(mongoUri);
});
}, 20000);

afterAll(async () => {
await mongoose.disconnect();
Expand Down Expand Up @@ -1798,7 +1798,7 @@ describe('models/Agent', () => {
const mongoUri = mongoServer.getUri();
Agent = mongoose.models.Agent || mongoose.model('Agent', agentSchema);
await mongoose.connect(mongoUri);
});
}, 20000);

afterAll(async () => {
await mongoose.disconnect();
Expand Down Expand Up @@ -2350,7 +2350,7 @@ describe('models/Agent', () => {
const mongoUri = mongoServer.getUri();
Agent = mongoose.models.Agent || mongoose.model('Agent', agentSchema);
await mongoose.connect(mongoUri);
});
}, 20000);

afterAll(async () => {
await mongoose.disconnect();
Expand Down
Loading