Skip to content

Commit 3714c96

Browse files
committed
updates
1 parent 9729066 commit 3714c96

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

components/devin/actions/list-sessions/list-sessions.mjs

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,22 @@ export default {
3333
const response = await this.devin.listSessions({
3434
$,
3535
params: {
36-
tags: this.tags,
3736
limit: this.limit,
3837
offset: this.offset,
3938
},
4039
});
4140

42-
$.export("$summary", `Successfully retrieved ${response.sessions?.length || 0} sessions`);
43-
return response;
41+
let sessions = response.sessions;
42+
if (this.tags) {
43+
sessions = sessions.filter((session) => session.tags.some((tag) => this.tags.includes(tag)));
44+
}
45+
46+
let summary = `Retrieved ${response.sessions.length} sessions`;
47+
if (this.tags) {
48+
summary += `, ${sessions.length} matching tags`;
49+
}
50+
51+
$.export("$summary", `${summary}`);
52+
return sessions;
4453
},
4554
};

components/devin/devin.app.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,9 @@ export default {
5757
label: "Secret IDs",
5858
description: "The IDs of the secrets to use",
5959
async options() {
60-
const { secrets } = await this.listSecrets();
60+
const secrets = await this.listSecrets();
6161
return secrets?.map(({
62-
secret_id: value, secret_name: label,
62+
id: value, key: label,
6363
}) => ({
6464
label,
6565
value,

0 commit comments

Comments
 (0)