Refactor: move shared classes to `common` package

Classes shared between "stateless" and "stateful" modes have been
relocated to the `mode.common` package.

Change-Id: I1cc999ffdd94374ecf8eedaefe1c12dfb3bdceff
Signed-off-by: Patrizio <patrizio.gelosi@amarulasolutions.com>
diff --git a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/PatchSetReviewer.java b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/PatchSetReviewer.java
index bb996d6..b05f1d8 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/PatchSetReviewer.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/PatchSetReviewer.java
@@ -2,19 +2,19 @@
 
 import com.google.gson.Gson;
 import com.google.inject.Inject;
-import com.googlesource.gerrit.plugins.chatgpt.client.api.chatgpt.ChatGptClient;
-import com.googlesource.gerrit.plugins.chatgpt.client.api.gerrit.GerritChange;
-import com.googlesource.gerrit.plugins.chatgpt.client.api.gerrit.GerritClient;
-import com.googlesource.gerrit.plugins.chatgpt.client.api.gerrit.GerritClientReview;
-import com.googlesource.gerrit.plugins.chatgpt.client.messages.DebugMessages;
-import com.googlesource.gerrit.plugins.chatgpt.client.patch.comment.GerritCommentRange;
 import com.googlesource.gerrit.plugins.chatgpt.config.Configuration;
-import com.googlesource.gerrit.plugins.chatgpt.model.api.chatgpt.ChatGptReplyItem;
-import com.googlesource.gerrit.plugins.chatgpt.model.api.chatgpt.ChatGptResponseContent;
-import com.googlesource.gerrit.plugins.chatgpt.model.api.gerrit.GerritCodeRange;
-import com.googlesource.gerrit.plugins.chatgpt.model.api.gerrit.GerritComment;
-import com.googlesource.gerrit.plugins.chatgpt.model.review.ReviewBatch;
-import com.googlesource.gerrit.plugins.chatgpt.model.settings.Settings;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.client.api.chatgpt.ChatGptClient;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.client.api.gerrit.GerritChange;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.client.api.gerrit.GerritClient;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.client.api.gerrit.GerritClientReview;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.client.messages.DebugMessages;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.client.patch.comment.GerritCommentRange;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.model.api.chatgpt.ChatGptReplyItem;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.model.api.chatgpt.ChatGptResponseContent;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.model.api.gerrit.GerritCodeRange;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.model.api.gerrit.GerritComment;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.model.review.ReviewBatch;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.model.settings.Settings;
 import com.googlesource.gerrit.plugins.chatgpt.settings.DynamicSettings;
 import lombok.extern.slf4j.Slf4j;
 
diff --git a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/listener/EventListenerHandler.java b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/listener/EventListenerHandler.java
index b7256b8..c842c61 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/listener/EventListenerHandler.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/listener/EventListenerHandler.java
@@ -8,10 +8,10 @@
 import com.google.gerrit.server.events.Event;
 import com.google.inject.Inject;
 import com.googlesource.gerrit.plugins.chatgpt.PatchSetReviewer;
-import com.googlesource.gerrit.plugins.chatgpt.client.api.gerrit.GerritChange;
-import com.googlesource.gerrit.plugins.chatgpt.client.api.gerrit.GerritClient;
 import com.googlesource.gerrit.plugins.chatgpt.config.Configuration;
-import com.googlesource.gerrit.plugins.chatgpt.model.settings.Settings;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.client.api.gerrit.GerritChange;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.client.api.gerrit.GerritClient;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.model.settings.Settings;
 import com.googlesource.gerrit.plugins.chatgpt.settings.DynamicSettings;
 import lombok.Getter;
 import lombok.extern.slf4j.Slf4j;
diff --git a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/ClientBase.java b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/client/ClientBase.java
similarity index 76%
rename from src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/ClientBase.java
rename to src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/client/ClientBase.java
index 95f7025..58e158b 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/ClientBase.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/client/ClientBase.java
@@ -1,4 +1,4 @@
-package com.googlesource.gerrit.plugins.chatgpt.client;
+package com.googlesource.gerrit.plugins.chatgpt.mode.common.client;
 
 import com.googlesource.gerrit.plugins.chatgpt.config.Configuration;
 
diff --git a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/HttpClientWithRetry.java b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/client/HttpClientWithRetry.java
similarity index 96%
rename from src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/HttpClientWithRetry.java
rename to src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/client/HttpClientWithRetry.java
index ca3af28..4f6502b 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/HttpClientWithRetry.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/client/HttpClientWithRetry.java
@@ -1,4 +1,4 @@
-package com.googlesource.gerrit.plugins.chatgpt.client;
+package com.googlesource.gerrit.plugins.chatgpt.mode.common.client;
 
 import com.github.rholder.retry.*;
 import com.google.inject.Singleton;
diff --git a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/UriResourceLocator.java b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/client/UriResourceLocator.java
similarity index 96%
rename from src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/UriResourceLocator.java
rename to src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/client/UriResourceLocator.java
index 4273038..c05a6ec 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/UriResourceLocator.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/client/UriResourceLocator.java
@@ -1,4 +1,4 @@
-package com.googlesource.gerrit.plugins.chatgpt.client;
+package com.googlesource.gerrit.plugins.chatgpt.mode.common.client;
 
 import java.net.URLEncoder;
 import java.nio.charset.StandardCharsets;
diff --git a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/api/chatgpt/ChatGptClient.java b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/client/api/chatgpt/ChatGptClient.java
similarity index 92%
rename from src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/api/chatgpt/ChatGptClient.java
rename to src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/client/api/chatgpt/ChatGptClient.java
index 8acfb5f..88188d0 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/api/chatgpt/ChatGptClient.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/client/api/chatgpt/ChatGptClient.java
@@ -1,15 +1,15 @@
-package com.googlesource.gerrit.plugins.chatgpt.client.api.chatgpt;
+package com.googlesource.gerrit.plugins.chatgpt.mode.common.client.api.chatgpt;
 
 import com.google.common.net.HttpHeaders;
 import com.google.gson.Gson;
 import com.google.gson.GsonBuilder;
 import com.google.inject.Singleton;
-import com.googlesource.gerrit.plugins.chatgpt.client.HttpClientWithRetry;
-import com.googlesource.gerrit.plugins.chatgpt.client.UriResourceLocator;
-import com.googlesource.gerrit.plugins.chatgpt.client.api.gerrit.GerritChange;
-import com.googlesource.gerrit.plugins.chatgpt.client.prompt.ChatGptPrompt;
 import com.googlesource.gerrit.plugins.chatgpt.config.Configuration;
-import com.googlesource.gerrit.plugins.chatgpt.model.api.chatgpt.*;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.client.HttpClientWithRetry;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.client.UriResourceLocator;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.client.api.gerrit.GerritChange;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.client.prompt.ChatGptPrompt;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.model.api.chatgpt.*;
 import lombok.Getter;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.http.entity.ContentType;
diff --git a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/api/chatgpt/ChatGptParameters.java b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/client/api/chatgpt/ChatGptParameters.java
similarity index 88%
rename from src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/api/chatgpt/ChatGptParameters.java
rename to src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/client/api/chatgpt/ChatGptParameters.java
index 87ce4d6..4670a67 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/api/chatgpt/ChatGptParameters.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/client/api/chatgpt/ChatGptParameters.java
@@ -1,7 +1,7 @@
-package com.googlesource.gerrit.plugins.chatgpt.client.api.chatgpt;
+package com.googlesource.gerrit.plugins.chatgpt.mode.common.client.api.chatgpt;
 
-import com.googlesource.gerrit.plugins.chatgpt.client.ClientBase;
 import com.googlesource.gerrit.plugins.chatgpt.config.Configuration;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.client.ClientBase;
 
 import java.util.concurrent.ThreadLocalRandom;
 
diff --git a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/api/chatgpt/ChatGptTools.java b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/client/api/chatgpt/ChatGptTools.java
similarity index 78%
rename from src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/api/chatgpt/ChatGptTools.java
rename to src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/client/api/chatgpt/ChatGptTools.java
index 5006fff..cb86332 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/api/chatgpt/ChatGptTools.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/client/api/chatgpt/ChatGptTools.java
@@ -1,7 +1,7 @@
-package com.googlesource.gerrit.plugins.chatgpt.client.api.chatgpt;
+package com.googlesource.gerrit.plugins.chatgpt.mode.common.client.api.chatgpt;
 
 import com.google.gson.Gson;
-import com.googlesource.gerrit.plugins.chatgpt.model.api.chatgpt.ChatGptRequest;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.model.api.chatgpt.ChatGptRequest;
 import com.googlesource.gerrit.plugins.chatgpt.utils.FileUtils;
 
 import java.io.IOException;
diff --git a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/api/gerrit/GerritChange.java b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/client/api/gerrit/GerritChange.java
similarity index 96%
rename from src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/api/gerrit/GerritChange.java
rename to src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/client/api/gerrit/GerritChange.java
index 8ebee44..770ea70 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/api/gerrit/GerritChange.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/client/api/gerrit/GerritChange.java
@@ -1,4 +1,4 @@
-package com.googlesource.gerrit.plugins.chatgpt.client.api.gerrit;
+package com.googlesource.gerrit.plugins.chatgpt.mode.common.client.api.gerrit;
 
 import com.google.gerrit.entities.BranchNameKey;
 import com.google.gerrit.entities.Change;
diff --git a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/api/gerrit/GerritClient.java b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/client/api/gerrit/GerritClient.java
similarity index 89%
rename from src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/api/gerrit/GerritClient.java
rename to src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/client/api/gerrit/GerritClient.java
index 8a6427e..60ec451 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/api/gerrit/GerritClient.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/client/api/gerrit/GerritClient.java
@@ -1,10 +1,10 @@
-package com.googlesource.gerrit.plugins.chatgpt.client.api.gerrit;
+package com.googlesource.gerrit.plugins.chatgpt.mode.common.client.api.gerrit;
 
 import com.google.inject.Singleton;
-import com.googlesource.gerrit.plugins.chatgpt.client.patch.diff.FileDiffProcessed;
 import com.googlesource.gerrit.plugins.chatgpt.config.Configuration;
-import com.googlesource.gerrit.plugins.chatgpt.model.api.gerrit.GerritPermittedVotingRange;
-import com.googlesource.gerrit.plugins.chatgpt.model.data.GerritClientData;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.client.patch.diff.FileDiffProcessed;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.model.api.gerrit.GerritPermittedVotingRange;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.model.data.GerritClientData;
 import com.googlesource.gerrit.plugins.chatgpt.utils.SingletonManager;
 import lombok.extern.slf4j.Slf4j;
 
diff --git a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/api/gerrit/GerritClientAccount.java b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/client/api/gerrit/GerritClientAccount.java
similarity index 95%
rename from src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/api/gerrit/GerritClientAccount.java
rename to src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/client/api/gerrit/GerritClientAccount.java
index dee1693..27ac2c1 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/api/gerrit/GerritClientAccount.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/client/api/gerrit/GerritClientAccount.java
@@ -1,8 +1,8 @@
-package com.googlesource.gerrit.plugins.chatgpt.client.api.gerrit;
+package com.googlesource.gerrit.plugins.chatgpt.mode.common.client.api.gerrit;
 
 import com.google.gson.JsonArray;
-import com.googlesource.gerrit.plugins.chatgpt.client.UriResourceLocator;
 import com.googlesource.gerrit.plugins.chatgpt.config.Configuration;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.client.UriResourceLocator;
 import lombok.extern.slf4j.Slf4j;
 
 import java.net.URI;
diff --git a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/api/gerrit/GerritClientBase.java b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/client/api/gerrit/GerritClientBase.java
similarity index 86%
rename from src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/api/gerrit/GerritClientBase.java
rename to src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/client/api/gerrit/GerritClientBase.java
index ce21c39..e11797b 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/api/gerrit/GerritClientBase.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/client/api/gerrit/GerritClientBase.java
@@ -1,13 +1,13 @@
-package com.googlesource.gerrit.plugins.chatgpt.client.api.gerrit;
+package com.googlesource.gerrit.plugins.chatgpt.mode.common.client.api.gerrit;
 
 import com.google.common.net.HttpHeaders;
 import com.google.gson.Gson;
 import com.google.gson.JsonArray;
 import com.google.gson.JsonObject;
-import com.googlesource.gerrit.plugins.chatgpt.client.ClientBase;
-import com.googlesource.gerrit.plugins.chatgpt.client.HttpClientWithRetry;
-import com.googlesource.gerrit.plugins.chatgpt.client.patch.diff.FileDiffProcessed;
 import com.googlesource.gerrit.plugins.chatgpt.config.Configuration;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.client.ClientBase;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.client.HttpClientWithRetry;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.client.patch.diff.FileDiffProcessed;
 import lombok.Getter;
 import lombok.extern.slf4j.Slf4j;
 
diff --git a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/api/gerrit/GerritClientComments.java b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/client/api/gerrit/GerritClientComments.java
similarity index 92%
rename from src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/api/gerrit/GerritClientComments.java
rename to src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/client/api/gerrit/GerritClientComments.java
index c099579..edd0e05 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/api/gerrit/GerritClientComments.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/client/api/gerrit/GerritClientComments.java
@@ -1,12 +1,12 @@
-package com.googlesource.gerrit.plugins.chatgpt.client.api.gerrit;
+package com.googlesource.gerrit.plugins.chatgpt.mode.common.client.api.gerrit;
 
 import com.google.gerrit.server.events.CommentAddedEvent;
 import com.google.gson.reflect.TypeToken;
-import com.googlesource.gerrit.plugins.chatgpt.client.UriResourceLocator;
-import com.googlesource.gerrit.plugins.chatgpt.client.messages.ClientMessage;
 import com.googlesource.gerrit.plugins.chatgpt.config.Configuration;
-import com.googlesource.gerrit.plugins.chatgpt.model.api.gerrit.GerritComment;
-import com.googlesource.gerrit.plugins.chatgpt.model.data.CommentData;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.client.UriResourceLocator;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.client.messages.ClientMessage;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.model.api.gerrit.GerritComment;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.model.data.CommentData;
 import lombok.Getter;
 import lombok.extern.slf4j.Slf4j;
 
diff --git a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/api/gerrit/GerritClientDetail.java b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/client/api/gerrit/GerritClientDetail.java
similarity index 83%
rename from src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/api/gerrit/GerritClientDetail.java
rename to src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/client/api/gerrit/GerritClientDetail.java
index b59840a..3b5fb24 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/api/gerrit/GerritClientDetail.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/client/api/gerrit/GerritClientDetail.java
@@ -1,10 +1,10 @@
-package com.googlesource.gerrit.plugins.chatgpt.client.api.gerrit;
+package com.googlesource.gerrit.plugins.chatgpt.mode.common.client.api.gerrit;
 
-import com.googlesource.gerrit.plugins.chatgpt.client.UriResourceLocator;
 import com.googlesource.gerrit.plugins.chatgpt.config.Configuration;
-import com.googlesource.gerrit.plugins.chatgpt.model.api.gerrit.GerritComment;
-import com.googlesource.gerrit.plugins.chatgpt.model.api.gerrit.GerritPatchSetDetail;
-import com.googlesource.gerrit.plugins.chatgpt.model.api.gerrit.GerritPermittedVotingRange;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.client.UriResourceLocator;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.model.api.gerrit.GerritComment;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.model.api.gerrit.GerritPatchSetDetail;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.model.api.gerrit.GerritPermittedVotingRange;
 import com.googlesource.gerrit.plugins.chatgpt.settings.DynamicSettings;
 import lombok.extern.slf4j.Slf4j;
 
diff --git a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/api/gerrit/GerritClientFacade.java b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/client/api/gerrit/GerritClientFacade.java
similarity index 85%
rename from src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/api/gerrit/GerritClientFacade.java
rename to src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/client/api/gerrit/GerritClientFacade.java
index ae41055..6c33fcf 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/api/gerrit/GerritClientFacade.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/client/api/gerrit/GerritClientFacade.java
@@ -1,9 +1,9 @@
-package com.googlesource.gerrit.plugins.chatgpt.client.api.gerrit;
+package com.googlesource.gerrit.plugins.chatgpt.mode.common.client.api.gerrit;
 
-import com.googlesource.gerrit.plugins.chatgpt.client.patch.diff.FileDiffProcessed;
 import com.googlesource.gerrit.plugins.chatgpt.config.Configuration;
-import com.googlesource.gerrit.plugins.chatgpt.model.api.gerrit.GerritPermittedVotingRange;
-import com.googlesource.gerrit.plugins.chatgpt.model.data.GerritClientData;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.client.patch.diff.FileDiffProcessed;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.model.api.gerrit.GerritPermittedVotingRange;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.model.data.GerritClientData;
 import lombok.extern.slf4j.Slf4j;
 
 import java.util.HashMap;
diff --git a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/api/gerrit/GerritClientPatchSet.java b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/client/api/gerrit/GerritClientPatchSet.java
similarity index 92%
rename from src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/api/gerrit/GerritClientPatchSet.java
rename to src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/client/api/gerrit/GerritClientPatchSet.java
index dce50dd..05dfd13 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/api/gerrit/GerritClientPatchSet.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/client/api/gerrit/GerritClientPatchSet.java
@@ -1,14 +1,14 @@
-package com.googlesource.gerrit.plugins.chatgpt.client.api.gerrit;
+package com.googlesource.gerrit.plugins.chatgpt.mode.common.client.api.gerrit;
 
 import com.google.gson.Gson;
 import com.google.gson.GsonBuilder;
 import com.google.gson.JsonElement;
 import com.google.gson.JsonObject;
-import com.googlesource.gerrit.plugins.chatgpt.client.UriResourceLocator;
-import com.googlesource.gerrit.plugins.chatgpt.client.patch.diff.FileDiffProcessed;
 import com.googlesource.gerrit.plugins.chatgpt.config.Configuration;
-import com.googlesource.gerrit.plugins.chatgpt.model.api.gerrit.GerritPatchSetFileDiff;
-import com.googlesource.gerrit.plugins.chatgpt.model.api.gerrit.GerritReviewFileDiff;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.client.UriResourceLocator;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.client.patch.diff.FileDiffProcessed;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.model.api.gerrit.GerritPatchSetFileDiff;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.model.api.gerrit.GerritReviewFileDiff;
 import com.googlesource.gerrit.plugins.chatgpt.settings.DynamicSettings;
 import lombok.Getter;
 import lombok.extern.slf4j.Slf4j;
diff --git a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/api/gerrit/GerritClientReview.java b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/client/api/gerrit/GerritClientReview.java
similarity index 87%
rename from src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/api/gerrit/GerritClientReview.java
rename to src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/client/api/gerrit/GerritClientReview.java
index 0ebdbaa..13f2b99 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/api/gerrit/GerritClientReview.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/client/api/gerrit/GerritClientReview.java
@@ -1,11 +1,11 @@
-package com.googlesource.gerrit.plugins.chatgpt.client.api.gerrit;
+package com.googlesource.gerrit.plugins.chatgpt.mode.common.client.api.gerrit;
 
 import com.google.common.net.HttpHeaders;
-import com.googlesource.gerrit.plugins.chatgpt.client.UriResourceLocator;
 import com.googlesource.gerrit.plugins.chatgpt.config.Configuration;
-import com.googlesource.gerrit.plugins.chatgpt.model.api.gerrit.GerritComment;
-import com.googlesource.gerrit.plugins.chatgpt.model.api.gerrit.GerritReview;
-import com.googlesource.gerrit.plugins.chatgpt.model.review.ReviewBatch;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.client.UriResourceLocator;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.model.api.gerrit.GerritComment;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.model.api.gerrit.GerritReview;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.model.review.ReviewBatch;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.http.entity.ContentType;
 
@@ -17,7 +17,7 @@
 import java.util.List;
 import java.util.Map;
 
-import static com.googlesource.gerrit.plugins.chatgpt.client.prompt.MessageSanitizer.sanitizeChatGptMessage;
+import static com.googlesource.gerrit.plugins.chatgpt.mode.common.client.prompt.MessageSanitizer.sanitizeChatGptMessage;
 import static com.googlesource.gerrit.plugins.chatgpt.settings.StaticSettings.EMPTY_REVIEW_MESSAGE;
 import static java.net.HttpURLConnection.HTTP_OK;
 
diff --git a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/commands/ClientCommands.java b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/client/commands/ClientCommands.java
similarity index 92%
rename from src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/commands/ClientCommands.java
rename to src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/client/commands/ClientCommands.java
index 7b4cd8f..b30bef0 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/commands/ClientCommands.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/client/commands/ClientCommands.java
@@ -1,8 +1,8 @@
-package com.googlesource.gerrit.plugins.chatgpt.client.commands;
+package com.googlesource.gerrit.plugins.chatgpt.mode.common.client.commands;
 
-import com.googlesource.gerrit.plugins.chatgpt.client.api.gerrit.GerritChange;
-import com.googlesource.gerrit.plugins.chatgpt.client.prompt.Directives;
-import com.googlesource.gerrit.plugins.chatgpt.model.settings.Settings;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.client.api.gerrit.GerritChange;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.client.prompt.Directives;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.model.settings.Settings;
 import com.googlesource.gerrit.plugins.chatgpt.settings.DynamicSettings;
 import lombok.Getter;
 import lombok.extern.slf4j.Slf4j;
diff --git a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/messages/ClientMessage.java b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/client/messages/ClientMessage.java
similarity index 89%
rename from src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/messages/ClientMessage.java
rename to src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/client/messages/ClientMessage.java
index c3b521f..a3b0bfc 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/messages/ClientMessage.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/client/messages/ClientMessage.java
@@ -1,9 +1,9 @@
-package com.googlesource.gerrit.plugins.chatgpt.client.messages;
+package com.googlesource.gerrit.plugins.chatgpt.mode.common.client.messages;
 
-import com.googlesource.gerrit.plugins.chatgpt.client.ClientBase;
-import com.googlesource.gerrit.plugins.chatgpt.client.api.gerrit.GerritChange;
-import com.googlesource.gerrit.plugins.chatgpt.client.commands.ClientCommands;
 import com.googlesource.gerrit.plugins.chatgpt.config.Configuration;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.client.ClientBase;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.client.api.gerrit.GerritChange;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.client.commands.ClientCommands;
 import lombok.Getter;
 import lombok.extern.slf4j.Slf4j;
 
diff --git a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/messages/DebugMessages.java b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/client/messages/DebugMessages.java
similarity index 86%
rename from src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/messages/DebugMessages.java
rename to src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/client/messages/DebugMessages.java
index 08429e8..1492896 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/messages/DebugMessages.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/client/messages/DebugMessages.java
@@ -1,6 +1,6 @@
-package com.googlesource.gerrit.plugins.chatgpt.client.messages;
+package com.googlesource.gerrit.plugins.chatgpt.mode.common.client.messages;
 
-import com.googlesource.gerrit.plugins.chatgpt.model.api.chatgpt.ChatGptReplyItem;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.model.api.chatgpt.ChatGptReplyItem;
 
 import java.util.ArrayList;
 import java.util.regex.Matcher;
diff --git a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/patch/code/CodeFinder.java b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/client/patch/code/CodeFinder.java
similarity index 93%
rename from src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/patch/code/CodeFinder.java
rename to src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/client/patch/code/CodeFinder.java
index 00349e7..2267261 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/patch/code/CodeFinder.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/client/patch/code/CodeFinder.java
@@ -1,9 +1,9 @@
-package com.googlesource.gerrit.plugins.chatgpt.client.patch.code;
+package com.googlesource.gerrit.plugins.chatgpt.mode.common.client.patch.code;
 
-import com.googlesource.gerrit.plugins.chatgpt.model.api.chatgpt.ChatGptReplyItem;
-import com.googlesource.gerrit.plugins.chatgpt.model.api.gerrit.GerritCodeRange;
-import com.googlesource.gerrit.plugins.chatgpt.model.patch.code.CodeFinderDiff;
-import com.googlesource.gerrit.plugins.chatgpt.model.patch.diff.DiffContent;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.model.api.chatgpt.ChatGptReplyItem;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.model.api.gerrit.GerritCodeRange;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.model.patch.code.CodeFinderDiff;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.model.patch.diff.DiffContent;
 import lombok.extern.slf4j.Slf4j;
 
 import java.lang.reflect.Field;
diff --git a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/patch/code/InlineCode.java b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/client/patch/code/InlineCode.java
similarity index 84%
rename from src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/patch/code/InlineCode.java
rename to src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/client/patch/code/InlineCode.java
index 349b474..ae41d44 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/patch/code/InlineCode.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/client/patch/code/InlineCode.java
@@ -1,9 +1,9 @@
-package com.googlesource.gerrit.plugins.chatgpt.client.patch.code;
+package com.googlesource.gerrit.plugins.chatgpt.mode.common.client.patch.code;
 
-import com.googlesource.gerrit.plugins.chatgpt.client.patch.diff.FileDiffProcessed;
-import com.googlesource.gerrit.plugins.chatgpt.model.api.chatgpt.ChatGptReplyItem;
-import com.googlesource.gerrit.plugins.chatgpt.model.api.gerrit.GerritCodeRange;
-import com.googlesource.gerrit.plugins.chatgpt.model.api.gerrit.GerritComment;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.client.patch.diff.FileDiffProcessed;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.model.api.chatgpt.ChatGptReplyItem;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.model.api.gerrit.GerritCodeRange;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.model.api.gerrit.GerritComment;
 import lombok.extern.slf4j.Slf4j;
 
 import java.util.ArrayList;
diff --git a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/patch/comment/GerritCommentRange.java b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/client/patch/comment/GerritCommentRange.java
similarity index 69%
rename from src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/patch/comment/GerritCommentRange.java
rename to src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/client/patch/comment/GerritCommentRange.java
index d66f4b7..e1edde5 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/patch/comment/GerritCommentRange.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/client/patch/comment/GerritCommentRange.java
@@ -1,11 +1,11 @@
-package com.googlesource.gerrit.plugins.chatgpt.client.patch.comment;
+package com.googlesource.gerrit.plugins.chatgpt.mode.common.client.patch.comment;
 
-import com.googlesource.gerrit.plugins.chatgpt.client.api.gerrit.GerritChange;
-import com.googlesource.gerrit.plugins.chatgpt.client.api.gerrit.GerritClient;
-import com.googlesource.gerrit.plugins.chatgpt.client.patch.code.InlineCode;
-import com.googlesource.gerrit.plugins.chatgpt.client.patch.diff.FileDiffProcessed;
-import com.googlesource.gerrit.plugins.chatgpt.model.api.chatgpt.ChatGptReplyItem;
-import com.googlesource.gerrit.plugins.chatgpt.model.api.gerrit.GerritCodeRange;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.client.api.gerrit.GerritChange;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.client.api.gerrit.GerritClient;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.client.patch.code.InlineCode;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.client.patch.diff.FileDiffProcessed;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.model.api.chatgpt.ChatGptReplyItem;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.model.api.gerrit.GerritCodeRange;
 import lombok.extern.slf4j.Slf4j;
 
 import java.util.HashMap;
diff --git a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/patch/diff/FileDiffProcessed.java b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/client/patch/diff/FileDiffProcessed.java
similarity index 93%
rename from src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/patch/diff/FileDiffProcessed.java
rename to src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/client/patch/diff/FileDiffProcessed.java
index fe14a82..75206de 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/patch/diff/FileDiffProcessed.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/client/patch/diff/FileDiffProcessed.java
@@ -1,9 +1,9 @@
-package com.googlesource.gerrit.plugins.chatgpt.client.patch.diff;
+package com.googlesource.gerrit.plugins.chatgpt.mode.common.client.patch.diff;
 
-import com.googlesource.gerrit.plugins.chatgpt.model.api.gerrit.GerritPatchSetFileDiff;
-import com.googlesource.gerrit.plugins.chatgpt.model.patch.code.CodeFinderDiff;
-import com.googlesource.gerrit.plugins.chatgpt.model.patch.diff.DiffContent;
 import com.googlesource.gerrit.plugins.chatgpt.config.Configuration;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.model.api.gerrit.GerritPatchSetFileDiff;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.model.patch.code.CodeFinderDiff;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.model.patch.diff.DiffContent;
 import lombok.Getter;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.RandomStringUtils;
diff --git a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/prompt/ChatGptComment.java b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/client/prompt/ChatGptComment.java
similarity index 73%
rename from src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/prompt/ChatGptComment.java
rename to src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/client/prompt/ChatGptComment.java
index 3618f76..c7bd0ad 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/prompt/ChatGptComment.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/client/prompt/ChatGptComment.java
@@ -1,10 +1,10 @@
-package com.googlesource.gerrit.plugins.chatgpt.client.prompt;
+package com.googlesource.gerrit.plugins.chatgpt.mode.common.client.prompt;
 
-import com.googlesource.gerrit.plugins.chatgpt.client.ClientBase;
-import com.googlesource.gerrit.plugins.chatgpt.client.api.gerrit.GerritChange;
-import com.googlesource.gerrit.plugins.chatgpt.client.messages.ClientMessage;
 import com.googlesource.gerrit.plugins.chatgpt.config.Configuration;
-import com.googlesource.gerrit.plugins.chatgpt.model.api.gerrit.GerritComment;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.client.ClientBase;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.client.api.gerrit.GerritChange;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.client.messages.ClientMessage;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.model.api.gerrit.GerritComment;
 import com.googlesource.gerrit.plugins.chatgpt.settings.DynamicSettings;
 import lombok.extern.slf4j.Slf4j;
 
diff --git a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/prompt/ChatGptHistory.java b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/client/prompt/ChatGptHistory.java
similarity index 91%
rename from src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/prompt/ChatGptHistory.java
rename to src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/client/prompt/ChatGptHistory.java
index a56c853..ebcf592 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/prompt/ChatGptHistory.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/client/prompt/ChatGptHistory.java
@@ -1,11 +1,11 @@
-package com.googlesource.gerrit.plugins.chatgpt.client.prompt;
+package com.googlesource.gerrit.plugins.chatgpt.mode.common.client.prompt;
 
-import com.googlesource.gerrit.plugins.chatgpt.client.api.gerrit.GerritChange;
 import com.googlesource.gerrit.plugins.chatgpt.config.Configuration;
-import com.googlesource.gerrit.plugins.chatgpt.model.api.chatgpt.ChatGptRequestMessage;
-import com.googlesource.gerrit.plugins.chatgpt.model.api.gerrit.GerritComment;
-import com.googlesource.gerrit.plugins.chatgpt.model.data.CommentData;
-import com.googlesource.gerrit.plugins.chatgpt.model.data.GerritClientData;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.client.api.gerrit.GerritChange;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.model.api.chatgpt.ChatGptRequestMessage;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.model.api.gerrit.GerritComment;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.model.data.CommentData;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.model.data.GerritClientData;
 import com.googlesource.gerrit.plugins.chatgpt.settings.StaticSettings;
 import lombok.extern.slf4j.Slf4j;
 
diff --git a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/prompt/ChatGptPrompt.java b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/client/prompt/ChatGptPrompt.java
similarity index 98%
rename from src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/prompt/ChatGptPrompt.java
rename to src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/client/prompt/ChatGptPrompt.java
index f72923a..3be9c26 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/prompt/ChatGptPrompt.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/client/prompt/ChatGptPrompt.java
@@ -1,9 +1,9 @@
-package com.googlesource.gerrit.plugins.chatgpt.client.prompt;
+package com.googlesource.gerrit.plugins.chatgpt.mode.common.client.prompt;
 
 import com.google.gson.Gson;
 import com.google.gson.reflect.TypeToken;
 import com.googlesource.gerrit.plugins.chatgpt.config.Configuration;
-import com.googlesource.gerrit.plugins.chatgpt.model.settings.Settings;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.model.settings.Settings;
 import com.googlesource.gerrit.plugins.chatgpt.settings.DynamicSettings;
 import com.googlesource.gerrit.plugins.chatgpt.utils.FileUtils;
 import lombok.Setter;
diff --git a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/prompt/ChatGptUserPrompt.java b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/client/prompt/ChatGptUserPrompt.java
similarity index 74%
rename from src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/prompt/ChatGptUserPrompt.java
rename to src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/client/prompt/ChatGptUserPrompt.java
index ce7df88..fc61d63 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/prompt/ChatGptUserPrompt.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/client/prompt/ChatGptUserPrompt.java
@@ -1,10 +1,10 @@
-package com.googlesource.gerrit.plugins.chatgpt.client.prompt;
+package com.googlesource.gerrit.plugins.chatgpt.mode.common.client.prompt;
 
 import com.google.gson.Gson;
-import com.googlesource.gerrit.plugins.chatgpt.client.api.gerrit.GerritChange;
 import com.googlesource.gerrit.plugins.chatgpt.config.Configuration;
-import com.googlesource.gerrit.plugins.chatgpt.model.api.chatgpt.ChatGptMessageItem;
-import com.googlesource.gerrit.plugins.chatgpt.model.data.GerritClientData;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.client.api.gerrit.GerritChange;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.model.api.chatgpt.ChatGptMessageItem;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.model.data.GerritClientData;
 import lombok.extern.slf4j.Slf4j;
 
 import java.util.List;
diff --git a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/prompt/ChatGptUserPromptBase.java b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/client/prompt/ChatGptUserPromptBase.java
similarity index 72%
rename from src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/prompt/ChatGptUserPromptBase.java
rename to src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/client/prompt/ChatGptUserPromptBase.java
index d227eec..6c273a8 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/prompt/ChatGptUserPromptBase.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/client/prompt/ChatGptUserPromptBase.java
@@ -1,14 +1,14 @@
-package com.googlesource.gerrit.plugins.chatgpt.client.prompt;
+package com.googlesource.gerrit.plugins.chatgpt.mode.common.client.prompt;
 
-import com.googlesource.gerrit.plugins.chatgpt.client.api.gerrit.GerritChange;
-import com.googlesource.gerrit.plugins.chatgpt.client.patch.code.InlineCode;
-import com.googlesource.gerrit.plugins.chatgpt.client.patch.diff.FileDiffProcessed;
 import com.googlesource.gerrit.plugins.chatgpt.config.Configuration;
-import com.googlesource.gerrit.plugins.chatgpt.model.api.chatgpt.ChatGptMessageItem;
-import com.googlesource.gerrit.plugins.chatgpt.model.api.chatgpt.ChatGptRequestMessage;
-import com.googlesource.gerrit.plugins.chatgpt.model.api.gerrit.GerritComment;
-import com.googlesource.gerrit.plugins.chatgpt.model.data.CommentData;
-import com.googlesource.gerrit.plugins.chatgpt.model.data.GerritClientData;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.client.api.gerrit.GerritChange;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.client.patch.code.InlineCode;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.client.patch.diff.FileDiffProcessed;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.model.api.chatgpt.ChatGptMessageItem;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.model.api.chatgpt.ChatGptRequestMessage;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.model.api.gerrit.GerritComment;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.model.data.CommentData;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.model.data.GerritClientData;
 import lombok.Getter;
 import lombok.extern.slf4j.Slf4j;
 
diff --git a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/prompt/ChatGptUserPromptRequests.java b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/client/prompt/ChatGptUserPromptRequests.java
similarity index 70%
rename from src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/prompt/ChatGptUserPromptRequests.java
rename to src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/client/prompt/ChatGptUserPromptRequests.java
index 8a2b6ef..2b4fdf1 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/prompt/ChatGptUserPromptRequests.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/client/prompt/ChatGptUserPromptRequests.java
@@ -1,10 +1,10 @@
-package com.googlesource.gerrit.plugins.chatgpt.client.prompt;
+package com.googlesource.gerrit.plugins.chatgpt.mode.common.client.prompt;
 
-import com.googlesource.gerrit.plugins.chatgpt.client.api.gerrit.GerritChange;
 import com.googlesource.gerrit.plugins.chatgpt.config.Configuration;
-import com.googlesource.gerrit.plugins.chatgpt.model.api.chatgpt.ChatGptMessageItem;
-import com.googlesource.gerrit.plugins.chatgpt.model.api.chatgpt.ChatGptRequestMessage;
-import com.googlesource.gerrit.plugins.chatgpt.model.data.GerritClientData;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.client.api.gerrit.GerritChange;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.model.api.chatgpt.ChatGptMessageItem;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.model.api.chatgpt.ChatGptRequestMessage;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.model.data.GerritClientData;
 import lombok.extern.slf4j.Slf4j;
 
 import java.util.List;
diff --git a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/prompt/ChatGptUserPromptReview.java b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/client/prompt/ChatGptUserPromptReview.java
similarity index 69%
rename from src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/prompt/ChatGptUserPromptReview.java
rename to src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/client/prompt/ChatGptUserPromptReview.java
index 7eaa5dc..0baea6c 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/prompt/ChatGptUserPromptReview.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/client/prompt/ChatGptUserPromptReview.java
@@ -1,10 +1,10 @@
-package com.googlesource.gerrit.plugins.chatgpt.client.prompt;
+package com.googlesource.gerrit.plugins.chatgpt.mode.common.client.prompt;
 
-import com.googlesource.gerrit.plugins.chatgpt.client.api.gerrit.GerritChange;
 import com.googlesource.gerrit.plugins.chatgpt.config.Configuration;
-import com.googlesource.gerrit.plugins.chatgpt.model.api.chatgpt.ChatGptMessageItem;
-import com.googlesource.gerrit.plugins.chatgpt.model.api.chatgpt.ChatGptRequestMessage;
-import com.googlesource.gerrit.plugins.chatgpt.model.data.GerritClientData;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.client.api.gerrit.GerritChange;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.model.api.chatgpt.ChatGptMessageItem;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.model.api.chatgpt.ChatGptRequestMessage;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.model.data.GerritClientData;
 import lombok.extern.slf4j.Slf4j;
 
 import java.util.ArrayList;
diff --git a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/prompt/Directives.java b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/client/prompt/Directives.java
similarity index 67%
rename from src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/prompt/Directives.java
rename to src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/client/prompt/Directives.java
index 4eb3e0b..e58bb6a 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/prompt/Directives.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/client/prompt/Directives.java
@@ -1,7 +1,7 @@
-package com.googlesource.gerrit.plugins.chatgpt.client.prompt;
+package com.googlesource.gerrit.plugins.chatgpt.mode.common.client.prompt;
 
-import com.googlesource.gerrit.plugins.chatgpt.client.api.gerrit.GerritChange;
-import com.googlesource.gerrit.plugins.chatgpt.model.settings.Settings;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.client.api.gerrit.GerritChange;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.model.settings.Settings;
 import com.googlesource.gerrit.plugins.chatgpt.settings.DynamicSettings;
 
 public class Directives {
diff --git a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/prompt/MessageSanitizer.java b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/client/prompt/MessageSanitizer.java
similarity index 96%
rename from src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/prompt/MessageSanitizer.java
rename to src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/client/prompt/MessageSanitizer.java
index fe20cef..d7ad0c7 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/prompt/MessageSanitizer.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/client/prompt/MessageSanitizer.java
@@ -1,4 +1,4 @@
-package com.googlesource.gerrit.plugins.chatgpt.client.prompt;
+package com.googlesource.gerrit.plugins.chatgpt.mode.common.client.prompt;
 
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
diff --git a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/model/api/chatgpt/ChatGptDialogueItem.java b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/model/api/chatgpt/ChatGptDialogueItem.java
similarity index 71%
rename from src/main/java/com/googlesource/gerrit/plugins/chatgpt/model/api/chatgpt/ChatGptDialogueItem.java
rename to src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/model/api/chatgpt/ChatGptDialogueItem.java
index b48df46..e4e75fe 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/model/api/chatgpt/ChatGptDialogueItem.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/model/api/chatgpt/ChatGptDialogueItem.java
@@ -1,4 +1,4 @@
-package com.googlesource.gerrit.plugins.chatgpt.model.api.chatgpt;
+package com.googlesource.gerrit.plugins.chatgpt.mode.common.model.api.chatgpt;
 
 import lombok.Data;
 
diff --git a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/model/api/chatgpt/ChatGptMessageItem.java b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/model/api/chatgpt/ChatGptMessageItem.java
similarity index 76%
rename from src/main/java/com/googlesource/gerrit/plugins/chatgpt/model/api/chatgpt/ChatGptMessageItem.java
rename to src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/model/api/chatgpt/ChatGptMessageItem.java
index ca3b1d3..2307ce1 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/model/api/chatgpt/ChatGptMessageItem.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/model/api/chatgpt/ChatGptMessageItem.java
@@ -1,4 +1,4 @@
-package com.googlesource.gerrit.plugins.chatgpt.model.api.chatgpt;
+package com.googlesource.gerrit.plugins.chatgpt.mode.common.model.api.chatgpt;
 
 import lombok.Data;
 import lombok.EqualsAndHashCode;
diff --git a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/model/api/chatgpt/ChatGptReplyItem.java b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/model/api/chatgpt/ChatGptReplyItem.java
similarity index 79%
rename from src/main/java/com/googlesource/gerrit/plugins/chatgpt/model/api/chatgpt/ChatGptReplyItem.java
rename to src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/model/api/chatgpt/ChatGptReplyItem.java
index 1589b47..bb91382 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/model/api/chatgpt/ChatGptReplyItem.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/model/api/chatgpt/ChatGptReplyItem.java
@@ -1,4 +1,4 @@
-package com.googlesource.gerrit.plugins.chatgpt.model.api.chatgpt;
+package com.googlesource.gerrit.plugins.chatgpt.mode.common.model.api.chatgpt;
 
 import lombok.Data;
 import lombok.EqualsAndHashCode;
diff --git a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/model/api/chatgpt/ChatGptRequest.java b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/model/api/chatgpt/ChatGptRequest.java
similarity index 96%
rename from src/main/java/com/googlesource/gerrit/plugins/chatgpt/model/api/chatgpt/ChatGptRequest.java
rename to src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/model/api/chatgpt/ChatGptRequest.java
index 926d52c..9705ad0 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/model/api/chatgpt/ChatGptRequest.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/model/api/chatgpt/ChatGptRequest.java
@@ -1,4 +1,4 @@
-package com.googlesource.gerrit.plugins.chatgpt.model.api.chatgpt;
+package com.googlesource.gerrit.plugins.chatgpt.mode.common.model.api.chatgpt;
 
 import com.google.gson.annotations.SerializedName;
 import lombok.Builder;
diff --git a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/model/api/chatgpt/ChatGptRequestMessage.java b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/model/api/chatgpt/ChatGptRequestMessage.java
similarity index 74%
rename from src/main/java/com/googlesource/gerrit/plugins/chatgpt/model/api/chatgpt/ChatGptRequestMessage.java
rename to src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/model/api/chatgpt/ChatGptRequestMessage.java
index 031d90d..1e20263 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/model/api/chatgpt/ChatGptRequestMessage.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/model/api/chatgpt/ChatGptRequestMessage.java
@@ -1,4 +1,4 @@
-package com.googlesource.gerrit.plugins.chatgpt.model.api.chatgpt;
+package com.googlesource.gerrit.plugins.chatgpt.mode.common.model.api.chatgpt;
 
 import lombok.Builder;
 import lombok.Data;
diff --git a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/model/api/chatgpt/ChatGptResponseContent.java b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/model/api/chatgpt/ChatGptResponseContent.java
similarity index 67%
rename from src/main/java/com/googlesource/gerrit/plugins/chatgpt/model/api/chatgpt/ChatGptResponseContent.java
rename to src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/model/api/chatgpt/ChatGptResponseContent.java
index 1401d61..892d50f 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/model/api/chatgpt/ChatGptResponseContent.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/model/api/chatgpt/ChatGptResponseContent.java
@@ -1,4 +1,4 @@
-package com.googlesource.gerrit.plugins.chatgpt.model.api.chatgpt;
+package com.googlesource.gerrit.plugins.chatgpt.mode.common.model.api.chatgpt;
 
 import lombok.Data;
 
diff --git a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/model/api/chatgpt/ChatGptResponseMessage.java b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/model/api/chatgpt/ChatGptResponseMessage.java
similarity index 75%
rename from src/main/java/com/googlesource/gerrit/plugins/chatgpt/model/api/chatgpt/ChatGptResponseMessage.java
rename to src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/model/api/chatgpt/ChatGptResponseMessage.java
index 5426fe7..37c1e63 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/model/api/chatgpt/ChatGptResponseMessage.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/model/api/chatgpt/ChatGptResponseMessage.java
@@ -1,4 +1,4 @@
-package com.googlesource.gerrit.plugins.chatgpt.model.api.chatgpt;
+package com.googlesource.gerrit.plugins.chatgpt.mode.common.model.api.chatgpt;
 
 import com.google.gson.annotations.SerializedName;
 import lombok.Data;
diff --git a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/model/api/chatgpt/ChatGptResponseStreamed.java b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/model/api/chatgpt/ChatGptResponseStreamed.java
similarity index 82%
rename from src/main/java/com/googlesource/gerrit/plugins/chatgpt/model/api/chatgpt/ChatGptResponseStreamed.java
rename to src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/model/api/chatgpt/ChatGptResponseStreamed.java
index 2e0ad25..37076ea 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/model/api/chatgpt/ChatGptResponseStreamed.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/model/api/chatgpt/ChatGptResponseStreamed.java
@@ -1,4 +1,4 @@
-package com.googlesource.gerrit.plugins.chatgpt.model.api.chatgpt;
+package com.googlesource.gerrit.plugins.chatgpt.mode.common.model.api.chatgpt;
 
 import com.google.gson.annotations.SerializedName;
 import lombok.Data;
diff --git a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/model/api/chatgpt/ChatGptResponseUnstreamed.java b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/model/api/chatgpt/ChatGptResponseUnstreamed.java
similarity index 75%
rename from src/main/java/com/googlesource/gerrit/plugins/chatgpt/model/api/chatgpt/ChatGptResponseUnstreamed.java
rename to src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/model/api/chatgpt/ChatGptResponseUnstreamed.java
index 5d050a0..07ed0f6 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/model/api/chatgpt/ChatGptResponseUnstreamed.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/model/api/chatgpt/ChatGptResponseUnstreamed.java
@@ -1,4 +1,4 @@
-package com.googlesource.gerrit.plugins.chatgpt.model.api.chatgpt;
+package com.googlesource.gerrit.plugins.chatgpt.mode.common.model.api.chatgpt;
 
 import lombok.Data;
 
diff --git a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/model/api/chatgpt/ChatGptToolCall.java b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/model/api/chatgpt/ChatGptToolCall.java
similarity index 76%
rename from src/main/java/com/googlesource/gerrit/plugins/chatgpt/model/api/chatgpt/ChatGptToolCall.java
rename to src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/model/api/chatgpt/ChatGptToolCall.java
index 5651c82..028b88f 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/model/api/chatgpt/ChatGptToolCall.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/model/api/chatgpt/ChatGptToolCall.java
@@ -1,4 +1,4 @@
-package com.googlesource.gerrit.plugins.chatgpt.model.api.chatgpt;
+package com.googlesource.gerrit.plugins.chatgpt.mode.common.model.api.chatgpt;
 
 import lombok.Data;
 
diff --git a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/model/api/gerrit/GerritCodeRange.java b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/model/api/gerrit/GerritCodeRange.java
similarity index 84%
rename from src/main/java/com/googlesource/gerrit/plugins/chatgpt/model/api/gerrit/GerritCodeRange.java
rename to src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/model/api/gerrit/GerritCodeRange.java
index 01c93a4..ca6d6b8 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/model/api/gerrit/GerritCodeRange.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/model/api/gerrit/GerritCodeRange.java
@@ -1,4 +1,4 @@
-package com.googlesource.gerrit.plugins.chatgpt.model.api.gerrit;
+package com.googlesource.gerrit.plugins.chatgpt.mode.common.model.api.gerrit;
 
 import com.google.gson.annotations.SerializedName;
 import lombok.Builder;
diff --git a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/model/api/gerrit/GerritComment.java b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/model/api/gerrit/GerritComment.java
similarity index 95%
rename from src/main/java/com/googlesource/gerrit/plugins/chatgpt/model/api/gerrit/GerritComment.java
rename to src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/model/api/gerrit/GerritComment.java
index c92a98f..c684e85 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/model/api/gerrit/GerritComment.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/model/api/gerrit/GerritComment.java
@@ -1,4 +1,4 @@
-package com.googlesource.gerrit.plugins.chatgpt.model.api.gerrit;
+package com.googlesource.gerrit.plugins.chatgpt.mode.common.model.api.gerrit;
 
 import com.google.gson.annotations.SerializedName;
 import com.googlesource.gerrit.plugins.chatgpt.settings.StaticSettings;
diff --git a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/model/api/gerrit/GerritFileDiff.java b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/model/api/gerrit/GerritFileDiff.java
similarity index 82%
rename from src/main/java/com/googlesource/gerrit/plugins/chatgpt/model/api/gerrit/GerritFileDiff.java
rename to src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/model/api/gerrit/GerritFileDiff.java
index 89144c1..6d8108d 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/model/api/gerrit/GerritFileDiff.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/model/api/gerrit/GerritFileDiff.java
@@ -1,4 +1,4 @@
-package com.googlesource.gerrit.plugins.chatgpt.model.api.gerrit;
+package com.googlesource.gerrit.plugins.chatgpt.mode.common.model.api.gerrit;
 
 import com.google.gson.annotations.SerializedName;
 import lombok.Data;
diff --git a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/model/api/gerrit/GerritPatchSetDetail.java b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/model/api/gerrit/GerritPatchSetDetail.java
similarity index 90%
rename from src/main/java/com/googlesource/gerrit/plugins/chatgpt/model/api/gerrit/GerritPatchSetDetail.java
rename to src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/model/api/gerrit/GerritPatchSetDetail.java
index f420b23..0ada543 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/model/api/gerrit/GerritPatchSetDetail.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/model/api/gerrit/GerritPatchSetDetail.java
@@ -1,4 +1,4 @@
-package com.googlesource.gerrit.plugins.chatgpt.model.api.gerrit;
+package com.googlesource.gerrit.plugins.chatgpt.mode.common.model.api.gerrit;
 
 import com.google.gson.annotations.SerializedName;
 import lombok.Data;
diff --git a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/model/api/gerrit/GerritPatchSetFileDiff.java b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/model/api/gerrit/GerritPatchSetFileDiff.java
similarity index 82%
rename from src/main/java/com/googlesource/gerrit/plugins/chatgpt/model/api/gerrit/GerritPatchSetFileDiff.java
rename to src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/model/api/gerrit/GerritPatchSetFileDiff.java
index c8fb714..4f75ba6 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/model/api/gerrit/GerritPatchSetFileDiff.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/model/api/gerrit/GerritPatchSetFileDiff.java
@@ -1,4 +1,4 @@
-package com.googlesource.gerrit.plugins.chatgpt.model.api.gerrit;
+package com.googlesource.gerrit.plugins.chatgpt.mode.common.model.api.gerrit;
 
 import lombok.Data;
 import lombok.EqualsAndHashCode;
diff --git a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/model/api/gerrit/GerritPermittedVotingRange.java b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/model/api/gerrit/GerritPermittedVotingRange.java
new file mode 100644
index 0000000..f617d3e
--- /dev/null
+++ b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/model/api/gerrit/GerritPermittedVotingRange.java
@@ -0,0 +1,9 @@
+package com.googlesource.gerrit.plugins.chatgpt.mode.common.model.api.gerrit;
+
+import lombok.Data;
+
+@Data
+public class GerritPermittedVotingRange {
+    private int min;
+    private int max;
+}
diff --git a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/model/api/gerrit/GerritReview.java b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/model/api/gerrit/GerritReview.java
similarity index 84%
rename from src/main/java/com/googlesource/gerrit/plugins/chatgpt/model/api/gerrit/GerritReview.java
rename to src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/model/api/gerrit/GerritReview.java
index cd42609..6229c5f 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/model/api/gerrit/GerritReview.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/model/api/gerrit/GerritReview.java
@@ -1,4 +1,4 @@
-package com.googlesource.gerrit.plugins.chatgpt.model.api.gerrit;
+package com.googlesource.gerrit.plugins.chatgpt.mode.common.model.api.gerrit;
 
 import com.google.gson.annotations.SerializedName;
 import lombok.AllArgsConstructor;
diff --git a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/model/api/gerrit/GerritReviewFileDiff.java b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/model/api/gerrit/GerritReviewFileDiff.java
similarity index 67%
rename from src/main/java/com/googlesource/gerrit/plugins/chatgpt/model/api/gerrit/GerritReviewFileDiff.java
rename to src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/model/api/gerrit/GerritReviewFileDiff.java
index 186c30a..4e2debd 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/model/api/gerrit/GerritReviewFileDiff.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/model/api/gerrit/GerritReviewFileDiff.java
@@ -1,6 +1,6 @@
-package com.googlesource.gerrit.plugins.chatgpt.model.api.gerrit;
+package com.googlesource.gerrit.plugins.chatgpt.mode.common.model.api.gerrit;
 
-import com.googlesource.gerrit.plugins.chatgpt.model.patch.diff.DiffContent;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.model.patch.diff.DiffContent;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 
diff --git a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/model/data/CommentData.java b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/model/data/CommentData.java
similarity index 66%
rename from src/main/java/com/googlesource/gerrit/plugins/chatgpt/model/data/CommentData.java
rename to src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/model/data/CommentData.java
index e4ce66e..a43d8b9 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/model/data/CommentData.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/model/data/CommentData.java
@@ -1,6 +1,6 @@
-package com.googlesource.gerrit.plugins.chatgpt.model.data;
+package com.googlesource.gerrit.plugins.chatgpt.mode.common.model.data;
 
-import com.googlesource.gerrit.plugins.chatgpt.model.api.gerrit.GerritComment;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.model.api.gerrit.GerritComment;
 import lombok.AllArgsConstructor;
 import lombok.Data;
 
diff --git a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/model/data/GerritClientData.java b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/model/data/GerritClientData.java
similarity index 67%
rename from src/main/java/com/googlesource/gerrit/plugins/chatgpt/model/data/GerritClientData.java
rename to src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/model/data/GerritClientData.java
index aa2ea98..3cb5610 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/model/data/GerritClientData.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/model/data/GerritClientData.java
@@ -1,7 +1,7 @@
-package com.googlesource.gerrit.plugins.chatgpt.model.data;
+package com.googlesource.gerrit.plugins.chatgpt.mode.common.model.data;
 
-import com.googlesource.gerrit.plugins.chatgpt.client.patch.diff.FileDiffProcessed;
-import com.googlesource.gerrit.plugins.chatgpt.model.api.gerrit.GerritComment;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.client.patch.diff.FileDiffProcessed;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.model.api.gerrit.GerritComment;
 import lombok.AllArgsConstructor;
 import lombok.Data;
 
diff --git a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/model/patch/code/CodeFinderDiff.java b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/model/patch/code/CodeFinderDiff.java
new file mode 100644
index 0000000..089f5f8
--- /dev/null
+++ b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/model/patch/code/CodeFinderDiff.java
@@ -0,0 +1,14 @@
+package com.googlesource.gerrit.plugins.chatgpt.mode.common.model.patch.code;
+
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.model.patch.diff.DiffContent;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+
+import java.util.TreeMap;
+
+@AllArgsConstructor
+@Data
+public class CodeFinderDiff {
+    private DiffContent content;
+    private TreeMap<Integer, Integer> charToLineMap;
+}
diff --git a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/model/patch/diff/DiffContent.java b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/model/patch/diff/DiffContent.java
similarity index 60%
rename from src/main/java/com/googlesource/gerrit/plugins/chatgpt/model/patch/diff/DiffContent.java
rename to src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/model/patch/diff/DiffContent.java
index 56662f4..db30603 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/model/patch/diff/DiffContent.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/model/patch/diff/DiffContent.java
@@ -1,4 +1,4 @@
-package com.googlesource.gerrit.plugins.chatgpt.model.patch.diff;
+package com.googlesource.gerrit.plugins.chatgpt.mode.common.model.patch.diff;
 
 import lombok.Data;
 
diff --git a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/model/review/ReviewBatch.java b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/model/review/ReviewBatch.java
similarity index 71%
rename from src/main/java/com/googlesource/gerrit/plugins/chatgpt/model/review/ReviewBatch.java
rename to src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/model/review/ReviewBatch.java
index 324ec7f..cb0362b 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/model/review/ReviewBatch.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/model/review/ReviewBatch.java
@@ -1,6 +1,6 @@
-package com.googlesource.gerrit.plugins.chatgpt.model.review;
+package com.googlesource.gerrit.plugins.chatgpt.mode.common.model.review;
 
-import com.googlesource.gerrit.plugins.chatgpt.model.api.gerrit.GerritCodeRange;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.model.api.gerrit.GerritCodeRange;
 import lombok.Data;
 
 import static com.googlesource.gerrit.plugins.chatgpt.settings.StaticSettings.GERRIT_PATCH_SET_FILENAME;
diff --git a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/model/settings/Settings.java b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/model/settings/Settings.java
similarity index 90%
rename from src/main/java/com/googlesource/gerrit/plugins/chatgpt/model/settings/Settings.java
rename to src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/model/settings/Settings.java
index fc774d3..f7f936b 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/model/settings/Settings.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/common/model/settings/Settings.java
@@ -1,4 +1,4 @@
-package com.googlesource.gerrit.plugins.chatgpt.model.settings;
+package com.googlesource.gerrit.plugins.chatgpt.mode.common.model.settings;
 
 import lombok.Data;
 import lombok.NonNull;
diff --git a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/model/api/gerrit/GerritPermittedVotingRange.java b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/model/api/gerrit/GerritPermittedVotingRange.java
deleted file mode 100644
index dd6de9c..0000000
--- a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/model/api/gerrit/GerritPermittedVotingRange.java
+++ /dev/null
@@ -1,9 +0,0 @@
-package com.googlesource.gerrit.plugins.chatgpt.model.api.gerrit;
-
-import lombok.Data;
-
-@Data
-public class GerritPermittedVotingRange {
-    private int min;
-    private int max;
-}
diff --git a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/model/patch/code/CodeFinderDiff.java b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/model/patch/code/CodeFinderDiff.java
deleted file mode 100644
index 76e4d8b..0000000
--- a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/model/patch/code/CodeFinderDiff.java
+++ /dev/null
@@ -1,14 +0,0 @@
-package com.googlesource.gerrit.plugins.chatgpt.model.patch.code;
-
-import com.googlesource.gerrit.plugins.chatgpt.model.patch.diff.DiffContent;
-import lombok.AllArgsConstructor;
-import lombok.Data;
-
-import java.util.TreeMap;
-
-@AllArgsConstructor
-@Data
-public class CodeFinderDiff {
-    private DiffContent content;
-    private TreeMap<Integer, Integer> charToLineMap;
-}
diff --git a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/settings/DynamicSettings.java b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/settings/DynamicSettings.java
index 3b0ce66..afe82c8 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/settings/DynamicSettings.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/settings/DynamicSettings.java
@@ -1,12 +1,12 @@
 package com.googlesource.gerrit.plugins.chatgpt.settings;
 
-import com.googlesource.gerrit.plugins.chatgpt.client.api.gerrit.GerritChange;
-import com.googlesource.gerrit.plugins.chatgpt.client.api.gerrit.GerritClient;
-import com.googlesource.gerrit.plugins.chatgpt.client.prompt.ChatGptUserPrompt;
 import com.googlesource.gerrit.plugins.chatgpt.config.Configuration;
-import com.googlesource.gerrit.plugins.chatgpt.model.api.gerrit.GerritPermittedVotingRange;
-import com.googlesource.gerrit.plugins.chatgpt.model.data.GerritClientData;
-import com.googlesource.gerrit.plugins.chatgpt.model.settings.Settings;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.client.api.gerrit.GerritChange;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.client.api.gerrit.GerritClient;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.client.prompt.ChatGptUserPrompt;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.model.api.gerrit.GerritPermittedVotingRange;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.model.data.GerritClientData;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.model.settings.Settings;
 import com.googlesource.gerrit.plugins.chatgpt.utils.SingletonManager;
 import lombok.extern.slf4j.Slf4j;
 
diff --git a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/utils/SingletonManager.java b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/utils/SingletonManager.java
index cef0b7f..db92f33 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/utils/SingletonManager.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/utils/SingletonManager.java
@@ -1,6 +1,6 @@
 package com.googlesource.gerrit.plugins.chatgpt.utils;
 
-import com.googlesource.gerrit.plugins.chatgpt.client.api.gerrit.GerritChange;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.client.api.gerrit.GerritChange;
 
 import java.util.HashMap;
 import java.util.Map;
diff --git a/src/test/java/com/googlesource/gerrit/plugins/chatgpt/ChatGptReviewTest.java b/src/test/java/com/googlesource/gerrit/plugins/chatgpt/ChatGptReviewTest.java
index 99156c5..12d69a7 100644
--- a/src/test/java/com/googlesource/gerrit/plugins/chatgpt/ChatGptReviewTest.java
+++ b/src/test/java/com/googlesource/gerrit/plugins/chatgpt/ChatGptReviewTest.java
@@ -17,15 +17,15 @@
 import com.google.gson.JsonArray;
 import com.google.gson.Gson;
 import com.google.gson.JsonObject;
-import com.googlesource.gerrit.plugins.chatgpt.client.UriResourceLocator;
-import com.googlesource.gerrit.plugins.chatgpt.client.api.gerrit.GerritChange;
-import com.googlesource.gerrit.plugins.chatgpt.client.api.gerrit.GerritClient;
-import com.googlesource.gerrit.plugins.chatgpt.client.api.chatgpt.ChatGptClient;
-import com.googlesource.gerrit.plugins.chatgpt.client.prompt.ChatGptPrompt;
 import com.googlesource.gerrit.plugins.chatgpt.config.ConfigCreator;
 import com.googlesource.gerrit.plugins.chatgpt.config.Configuration;
 import com.googlesource.gerrit.plugins.chatgpt.listener.EventListenerHandler;
 import com.googlesource.gerrit.plugins.chatgpt.listener.GerritListener;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.client.UriResourceLocator;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.client.api.gerrit.GerritChange;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.client.api.gerrit.GerritClient;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.client.api.chatgpt.ChatGptClient;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.client.prompt.ChatGptPrompt;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.http.entity.ContentType;
 import org.junit.Assert;
@@ -49,7 +49,7 @@
 import java.util.concurrent.ExecutionException;
 
 import static com.google.gerrit.extensions.client.ChangeKind.REWORK;
-import static com.googlesource.gerrit.plugins.chatgpt.client.UriResourceLocator.*;
+import static com.googlesource.gerrit.plugins.chatgpt.mode.common.client.UriResourceLocator.*;
 import static com.googlesource.gerrit.plugins.chatgpt.utils.TextUtils.joinWithNewLine;
 import static java.net.HttpURLConnection.HTTP_OK;
 import static org.mockito.Mockito.mock;
diff --git a/src/test/java/com/googlesource/gerrit/plugins/chatgpt/integration/CodeReviewPluginIT.java b/src/test/java/com/googlesource/gerrit/plugins/chatgpt/integration/CodeReviewPluginIT.java
index f58aee1..c6bfcf9 100644
--- a/src/test/java/com/googlesource/gerrit/plugins/chatgpt/integration/CodeReviewPluginIT.java
+++ b/src/test/java/com/googlesource/gerrit/plugins/chatgpt/integration/CodeReviewPluginIT.java
@@ -1,11 +1,11 @@
 package com.googlesource.gerrit.plugins.chatgpt.integration;
 
-import com.googlesource.gerrit.plugins.chatgpt.client.api.chatgpt.ChatGptClient;
-import com.googlesource.gerrit.plugins.chatgpt.client.api.gerrit.GerritClient;
-import com.googlesource.gerrit.plugins.chatgpt.client.api.gerrit.GerritClientReview;
-import com.googlesource.gerrit.plugins.chatgpt.client.prompt.ChatGptPrompt;
 import com.googlesource.gerrit.plugins.chatgpt.config.Configuration;
-import com.googlesource.gerrit.plugins.chatgpt.model.review.ReviewBatch;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.client.api.chatgpt.ChatGptClient;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.client.api.gerrit.GerritClient;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.client.api.gerrit.GerritClientReview;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.client.prompt.ChatGptPrompt;
+import com.googlesource.gerrit.plugins.chatgpt.mode.common.model.review.ReviewBatch;
 import lombok.extern.slf4j.Slf4j;
 import org.junit.Ignore;
 import org.junit.Test;