Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit65dc134

Browse files
committed
Pre-release 0.41.136
1 parent1339ef7 commit65dc134

File tree

63 files changed

+1816
-211
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+1816
-211
lines changed

‎Core/Sources/ChatService/ChatService.swift‎

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ public final class ChatService: ChatServiceType, ObservableObject {
9090
@Publishedpublicinternal(set)varisReceivingMessage=false
9191
@Publishedpublicinternal(set)varfileEditMap:OrderedDictionary<URL,FileEdit>=[:]
9292
publicinternal(set)varrequestType:RequestType?=nil
93-
publicletchatTabInfo:ChatTabInfo
93+
publicprivate(set)varchatTabInfo:ChatTabInfo
9494
privateletconversationProvider:ConversationServiceProvider?
9595
privateletconversationProgressHandler:ConversationProgressHandler
9696
privateletconversationContextHandler:ConversationContextHandler=ConversationContextHandlerImpl.shared
@@ -131,6 +131,11 @@ public final class ChatService: ChatServiceType, ObservableObject {
131131
// Memory will be deallocated automatically
132132
}
133133

134+
publicfunc updateChatTabInfo(_ tabInfo:ChatTabInfo){
135+
// Only isSelected need to be updated
136+
chatTabInfo.isSelected= tabInfo.isSelected
137+
}
138+
134139
privatefunc subscribeToNotifications(){
135140
memory.observeHistoryChange{[weak self]in
136141
Task{[weak self]in
@@ -643,7 +648,7 @@ public final class ChatService: ChatServiceType, ObservableObject {
643648
returnURL(fileURLWithPath: chatTabInfo.workspacePath)
644649
}
645650

646-
privatefunc getProjectRootURL()asyncthrows->URL?{
651+
publicfunc getProjectRootURL()->URL?{
647652
guardlet workspaceURL=getWorkspaceURL()else{returnnil}
648653
returnWorkspaceXcodeWindowInspector.extractProjectURL(
649654
workspaceURL: workspaceURL,
@@ -989,8 +994,6 @@ public final class SharedChatService {
989994
}
990995

991996
publicfunc loadChatTemplates()async->[ChatTemplate]?{
992-
guardself.chatTemplates==nilelse{returnself.chatTemplates}
993-
994997
do{
995998
iflet templates=(tryawait conversationProvider?.templates()){
996999
self.chatTemplates= templates
@@ -1163,7 +1166,7 @@ extension ChatService {
11631166
)
11641167
await memory.appendMessage(initialBotMessage)
11651168

1166-
guardlet projectRootURL=tryawaitgetProjectRootURL()
1169+
guardlet projectRootURL=getProjectRootURL()
11671170
else{
11681171
letround=CodeReviewRound.fromError(turnId: turnId, error:"Invalid git repository.")
11691172
awaitappendCodeReviewRound(round)

‎Core/Sources/ChatService/Skills/CurrentEditorSkill.swift‎

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -36,27 +36,27 @@ public class CurrentEditorSkill: ConversationSkill {
3636

3737
publicfunc resolveSkill(request:ConversationContextRequest, completion:JSONRPCResponseHandler){
3838
leturi:String?=self.currentFile.url.absoluteString
39-
varselection:JSONValue?
39+
letresponse:JSONValue
4040

4141
iflet fileSelection= currentFile.selection{
4242
letstart= fileSelection.start
4343
letend= fileSelection.end
44-
selection=.hash([
45-
"start":.hash(["line":.number(Double(start.line)),"character":.number(Double(start.character))]),
46-
"end":.hash(["line":.number(Double(end.line)),"character":.number(Double(end.character))])
44+
response=.hash([
45+
"uri":.string(uri??""),
46+
"selection":.hash([
47+
"start":.hash(["line":.number(Double(start.line)),"character":.number(Double(start.character))]),
48+
"end":.hash(["line":.number(Double(end.line)),"character":.number(Double(end.character))])
49+
])
4750
])
51+
}else{
52+
// No text selection - only include file URI without selection metadata
53+
response=.hash(["uri":.string(uri??"")])
4854
}
4955

5056
completion(
5157
AnyJSONRPCResponse(
5258
id: request.id,
53-
result:JSONValue.array([
54-
JSONValue.hash([
55-
"uri":.string(uri??""),
56-
"selection": selection??.null
57-
]),
58-
JSONValue.null
59-
]))
59+
result:JSONValue.array([response,JSONValue.null]))
6060
)
6161
}
6262
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp