Skip to content

Commit d2deb60

Browse files
committed
5.1.0 release
1 parent f72aa81 commit d2deb60

File tree

7 files changed

+89
-10
lines changed

7 files changed

+89
-10
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ Compress-Archive -Path ./* -DestinationPath ../manifest.zip
159159
|会議開始後|会議が開始した後に通知する内容を設定します。|
160160
|会議終了前|会議が終了する前に通知する内容を設定します。|
161161
|会議中|会議中に通知する内容を設定します。|
162-
|初期化|この会議のすべての設定を初期化します|
162+
|初期化|この会議のすべての設定を初期状態に戻します|
163163

164164
#### 会議開始後
165165

@@ -246,7 +246,7 @@ Compress-Archive -Path ./* -DestinationPath ../manifest.zip
246246

247247
- 会議開始後 5 分経ったら「こんにちは」と表示してください。
248248
- 会議中 30 分おきに「アンケートにご協力ください」と表示してください。URL は「`https://www.example.com`」です。
249-
- 設定をリセットしてください
249+
- 設定を初期化してください
250250

251251
### タブによる設定
252252

manifest/manifest.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,11 @@
5858
},
5959
{
6060
"title": "初期化",
61-
"description": "この会議のすべての設定を初期化します。"
61+
"description": "この会議のすべての設定を初期状態に戻します。"
62+
},
63+
{
64+
"title": "ヘルプ",
65+
"description": "ヘルプ情報を表示します。"
6266
}
6367
],
6468
"scopes": [

source/server/Karamem0.Commistant.Common/Services/OpenAIService.cs

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,32 +34,37 @@ public class OpenAIService(ChatClient chatClient) : IOpenAIService
3434
{
3535
ChatTool.CreateFunctionTool(
3636
"MeetingStarted",
37-
"Update the schedule, text, and URL of messages sent the start of the meeting.",
37+
"会議が開始した後に通知するスケジュール、テキスト、および URL を設定します。",
3838
MeetingStartedFunctionTool.Create()
3939
),
4040
ChatTool.CreateFunctionTool(
4141
"MeetingEnding",
42-
"Update the schedule, text, and URL of messages sent the end of the meeting.",
42+
"会議が終了する前に通知するスケジュール、テキスト、および URL を設定します。",
4343
MeetingEndingFunctionTool.Create()
4444
),
4545
ChatTool.CreateFunctionTool(
4646
"MeetingInProgress",
47-
"Update the schedule, text, and URL of messages sent during the meeting.",
47+
"会議中に通知するスケジュール、テキスト、および URL を設定します。",
4848
MeetingInProgressFunctionTool.Create()
4949
),
5050
ChatTool.CreateFunctionTool(
5151
"Initialize",
52-
"Initialize all settings.",
52+
"この会議のすべての設定を初期化します。",
5353
InitializeFunctionTool.Create()
5454
),
55+
ChatTool.CreateFunctionTool(
56+
"Help",
57+
"ヘルプ情報を表示します。",
58+
HelpFunctionTool.Create()
59+
)
5560
}
5661
};
5762
var chatCompletion = await this.chatClient.CompleteChatAsync(
5863
[
5964
new SystemChatMessage(
6065
"""
61-
You are an AI assistant generating JSON.
62-
You can only use user input and cannot use your own knowledge.
66+
あなたはユーザーからの入力から JSON を生成する AI アシスタントです。
67+
ユーザーの入力のみを使用し自分の知識を使用してはいけません。
6368
"""
6469
),
6570
new UserChatMessage(text)
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
//
2+
// Copyright (c) 2022-2026 karamem0
3+
//
4+
// This software is released under the MIT License.
5+
//
6+
// https://github.com/karamem0/commistant/blob/main/LICENSE
7+
//
8+
9+
namespace Karamem0.Commistant.Templates;
10+
11+
public static class HelpFunctionTool
12+
{
13+
14+
public static BinaryData Create()
15+
{
16+
return BinaryData.FromString(
17+
"""
18+
{
19+
"type": "object",
20+
"properties": {
21+
"type": {
22+
"type": "string",
23+
"description": "This must be \"ヘルプ\"."
24+
}
25+
}
26+
}
27+
"""
28+
);
29+
}
30+
31+
}

source/server/Karamem0.Commistant.Common/Types/CommandTypes.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,6 @@ public static class CommandTypes
1919

2020
public const string Initialize = "初期化";
2121

22+
public const string Help = "ヘルプ";
23+
2224
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
//
2+
// Copyright (c) 2022-2026 karamem0
3+
//
4+
// This software is released under the MIT License.
5+
//
6+
// https://github.com/karamem0/commistant/blob/main/LICENSE
7+
//
8+
9+
namespace Karamem0.Commistant.Types;
10+
11+
public static class MeetingRoleTypes
12+
{
13+
14+
public const string Organizer = "Organizer";
15+
16+
}

source/server/Karamem0.Commistant.Web/Dialogs/MainDialog.cs

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ private async Task<DialogTurnResult> OnAfterAsync(WaterfallStepContext stepConte
7272
participantId: stepContext.Context.Activity.Recipient.AadObjectId,
7373
cancellationToken: cancellationToken
7474
);
75-
if (participant.Meeting.Role != "Organizer")
75+
if (participant.Meeting.Role != MeetingRoleTypes.Organizer)
7676
{
7777
_ = await stepContext.Context.SendActivityAsync(Messages.UserIsNotOrganizer, cancellationToken: cancellationToken);
7878
_ = await stepContext.EndDialogAsync(cancellationToken: cancellationToken);
@@ -117,6 +117,27 @@ private async Task<DialogTurnResult> OnAfterAsync(WaterfallStepContext stepConte
117117
arguments,
118118
cancellationToken
119119
);
120+
case CommandTypes.Help:
121+
_ = await stepContext.Context.SendActivityAsync(
122+
"""
123+
Commistant は Microsoft Teams 会議によるコミュニティ イベントをサポートするアシスタント ボットです。
124+
会議の開始時、終了時、または会議中に定型のメッセージ通知を送信します。
125+
通知にはテキストおよび QR コードつきの URL を添付することができます。
126+
<br/>
127+
利用可能なコマンド一覧:
128+
- <b>会議開始後</b>: 会議が開始した後に通知する内容を設定します。
129+
- <b>会議終了前</b>: 会議が終了する前に通知する内容を設定します。
130+
- <b>会議中</b>: 会議中に通知する内容を設定します。
131+
- <b>初期化</b>: この会議のすべての設定を初期状態に戻します。
132+
- <b>ヘルプ</b>: ヘルプ情報を表示します。
133+
""",
134+
cancellationToken: cancellationToken);
135+
_ = await stepContext.EndDialogAsync(null, cancellationToken);
136+
return await stepContext.BeginDialogAsync(
137+
nameof(WaterfallDialog),
138+
null,
139+
cancellationToken
140+
);
120141
default:
121142
_ = await stepContext.Context.SendActivityAsync(Messages.CommandIsNotRecognized, cancellationToken: cancellationToken);
122143
_ = await stepContext.EndDialogAsync(null, cancellationToken);

0 commit comments

Comments
 (0)