Skip to content

Commit 81edfe2

Browse files
authored
Merge branch 'main' into main
2 parents fcb121b + 14888d5 commit 81edfe2

File tree

4 files changed

+17
-4
lines changed

4 files changed

+17
-4
lines changed

bun.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@
172172
},
173173
"integrations/github-files": {
174174
"name": "@gitbook/integration-github-files",
175-
"version": "0.2.4",
175+
"version": "0.2.5",
176176
"dependencies": {
177177
"@gitbook/api": "*",
178178
"@gitbook/runtime": "*",
@@ -204,7 +204,7 @@
204204
},
205205
"integrations/gitlab-files": {
206206
"name": "@gitbook/integration-gitlab-files",
207-
"version": "0.2.3",
207+
"version": "0.2.4",
208208
"dependencies": {
209209
"@gitbook/runtime": "*",
210210
"dotenv": "^16.1.1",

integrations/slack/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# @gitbook/integration-slack
22

3+
## 2.5.1
4+
5+
### Patch Changes
6+
7+
- beb9868: Add logs while querying askAI in slack
8+
39
## 2.5.0
410

511
### Minor Changes

integrations/slack/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@gitbook/integration-slack",
3-
"version": "2.5.0",
3+
"version": "2.5.1",
44
"private": true,
55
"dependencies": {
66
"@gitbook/runtime": "*",

integrations/slack/src/actions/queryAskAI.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ import {
1515
import { slackAPI } from '../slack';
1616
import { QueryDisplayBlock, ShareTools, decodeSlackEscapeChars, Spacer, SourcesBlock } from '../ui';
1717
import { getInstallationApiClient, stripBotName, stripMarkdown } from '../utils';
18+
import { Logger } from '@gitbook/runtime';
19+
20+
const logger = Logger('slack:queryAskAI');
1821

1922
export type RelatedSource = {
2023
id: string;
@@ -160,6 +163,10 @@ export async function queryAskAI({
160163
channelName,
161164
}: IQueryAskAI) {
162165
const { environment, api } = context;
166+
167+
const askText = `_Asking: ${stripMarkdown(text)}_`;
168+
logger.info(`${{ channelId, teamId, threadId }} -> ${askText}`);
169+
163170
const { client, installation } = await getInstallationApiClient(api, teamId);
164171
if (!installation) {
165172
throw new Error('Installation not found');
@@ -181,7 +188,7 @@ export async function queryAskAI({
181188
responseUrl,
182189
payload: {
183190
channel: channelId,
184-
text: `_Asking: ${stripMarkdown(text)}_`,
191+
text: askText,
185192
...(userId ? { user: userId } : {}), // actually shouldn't be optional
186193
...(threadId ? { thread_ts: threadId } : {}),
187194
},

0 commit comments

Comments
 (0)