@in-the-loop-labs/pair-review 1.6.1 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +77 -4
- package/package.json +1 -1
- package/plugin/.claude-plugin/plugin.json +1 -1
- package/plugin/skills/review-requests/SKILL.md +4 -1
- package/plugin-code-critic/.claude-plugin/plugin.json +1 -1
- package/plugin-code-critic/skills/analyze/SKILL.md +4 -3
- package/public/css/pr.css +1875 -144
- package/public/js/CONVENTIONS.md +16 -0
- package/public/js/components/AIPanel.js +66 -0
- package/public/js/components/AnalysisConfigModal.js +2 -2
- package/public/js/components/ChatPanel.js +2952 -0
- package/public/js/components/CouncilProgressModal.js +28 -18
- package/public/js/components/KeyboardShortcuts.js +3 -0
- package/public/js/components/PanelGroup.js +723 -0
- package/public/js/components/PreviewModal.js +3 -8
- package/public/js/components/StatusIndicator.js +2 -2
- package/public/js/components/Toast.js +22 -1
- package/public/js/components/VoiceCentricConfigTab.js +2 -2
- package/public/js/index.js +8 -0
- package/public/js/local.js +25 -682
- package/public/js/modules/analysis-history.js +19 -66
- package/public/js/modules/comment-manager.js +57 -19
- package/public/js/modules/diff-context.js +176 -0
- package/public/js/modules/diff-renderer.js +30 -0
- package/public/js/modules/file-comment-manager.js +126 -105
- package/public/js/modules/file-list-merger.js +64 -0
- package/public/js/modules/panel-resizer.js +25 -6
- package/public/js/modules/suggestion-manager.js +40 -125
- package/public/js/pr.js +974 -178
- package/public/js/repo-settings.js +36 -6
- package/public/js/utils/category-emoji.js +44 -0
- package/public/js/utils/time.js +32 -0
- package/public/local.html +107 -71
- package/public/pr.html +107 -71
- package/public/repo-settings.html +32 -0
- package/src/ai/analyzer.js +8 -4
- package/src/ai/claude-provider.js +22 -11
- package/src/ai/copilot-provider.js +39 -9
- package/src/ai/cursor-agent-provider.js +36 -7
- package/src/ai/gemini-provider.js +17 -4
- package/src/ai/prompts/config.js +7 -1
- package/src/ai/provider-availability.js +1 -1
- package/src/ai/provider.js +25 -37
- package/src/ai/stream-parser.js +1 -1
- package/src/chat/CONVENTIONS.md +18 -0
- package/src/chat/pi-bridge.js +491 -0
- package/src/chat/prompt-builder.js +262 -0
- package/src/chat/session-manager.js +619 -0
- package/src/config.js +14 -0
- package/src/database.js +322 -15
- package/src/main.js +4 -17
- package/src/routes/analyses.js +721 -0
- package/src/routes/chat.js +655 -0
- package/src/routes/config.js +29 -8
- package/src/routes/context-files.js +223 -0
- package/src/routes/local.js +225 -1133
- package/src/routes/mcp.js +39 -30
- package/src/routes/pr.js +410 -52
- package/src/routes/reviews.js +1035 -0
- package/src/routes/shared.js +5 -30
- package/src/server.js +34 -12
- package/src/sse/review-events.js +46 -0
- package/src/utils/auto-context.js +88 -0
- package/src/utils/category-emoji.js +33 -0
- package/src/utils/diff-file-list.js +57 -0
- package/public/js/components/ProgressModal.js +0 -705
- package/src/routes/analysis.js +0 -1600
- package/src/routes/comments.js +0 -534
|
@@ -154,15 +154,10 @@ class PreviewModal {
|
|
|
154
154
|
return;
|
|
155
155
|
}
|
|
156
156
|
|
|
157
|
-
//
|
|
157
|
+
// Use unified review comments API (works for both PR and local mode)
|
|
158
|
+
const reviewId = pr.id;
|
|
158
159
|
let response;
|
|
159
|
-
|
|
160
|
-
// Local mode - use local API endpoint
|
|
161
|
-
response = await fetch(`/api/local/${window.localManager.reviewId}/user-comments`);
|
|
162
|
-
} else {
|
|
163
|
-
// PR mode - use PR API endpoint
|
|
164
|
-
response = await fetch(`/api/pr/${pr.owner}/${pr.repo}/${pr.number}/user-comments`);
|
|
165
|
-
}
|
|
160
|
+
response = await fetch(`/api/reviews/${reviewId}/comments`);
|
|
166
161
|
|
|
167
162
|
if (!response.ok) {
|
|
168
163
|
throw new Error('Failed to load comments');
|
|
@@ -235,8 +235,8 @@ class StatusIndicator {
|
|
|
235
235
|
* Reopen modal from status indicator
|
|
236
236
|
*/
|
|
237
237
|
reopenModal() {
|
|
238
|
-
if (this.currentAnalysisId && window.
|
|
239
|
-
window.
|
|
238
|
+
if (this.currentAnalysisId && window.councilProgressModal) {
|
|
239
|
+
window.councilProgressModal.reopenFromBackground();
|
|
240
240
|
}
|
|
241
241
|
}
|
|
242
242
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
2
|
/**
|
|
3
3
|
* Toast Notification Component
|
|
4
|
-
* Shows temporary success/error messages at the top of the page
|
|
4
|
+
* Shows temporary success/error/warning/info messages at the top of the page
|
|
5
5
|
*/
|
|
6
6
|
class Toast {
|
|
7
7
|
constructor() {
|
|
@@ -101,6 +101,27 @@ class Toast {
|
|
|
101
101
|
this.showToast(toast, duration);
|
|
102
102
|
}
|
|
103
103
|
|
|
104
|
+
/**
|
|
105
|
+
* Show an info toast
|
|
106
|
+
* @param {string} message - The message to display
|
|
107
|
+
* @param {number} duration - Duration in ms (default: 5000)
|
|
108
|
+
*/
|
|
109
|
+
showInfo(message, duration = 5000) {
|
|
110
|
+
const toast = document.createElement('div');
|
|
111
|
+
toast.className = 'toast toast-info';
|
|
112
|
+
|
|
113
|
+
toast.innerHTML = `
|
|
114
|
+
<div class="toast-content">
|
|
115
|
+
<svg width="16" height="16" viewBox="0 0 16 16" fill="currentColor" class="toast-icon">
|
|
116
|
+
<path d="M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8Zm8-6.5a6.5 6.5 0 1 0 0 13 6.5 6.5 0 0 0 0-13ZM6.5 7.75A.75.75 0 0 1 7.25 7h1a.75.75 0 0 1 .75.75v2.75h.25a.75.75 0 0 1 0 1.5h-2a.75.75 0 0 1 0-1.5h.25v-2h-.25a.75.75 0 0 1-.75-.75ZM8 6a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z"></path>
|
|
117
|
+
</svg>
|
|
118
|
+
<span class="toast-message">${message}</span>
|
|
119
|
+
</div>
|
|
120
|
+
`;
|
|
121
|
+
|
|
122
|
+
this.showToast(toast, duration);
|
|
123
|
+
}
|
|
124
|
+
|
|
104
125
|
/**
|
|
105
126
|
* Show a toast element
|
|
106
127
|
* @param {HTMLElement} toast - The toast element
|
|
@@ -860,11 +860,11 @@ class VoiceCentricConfigTab {
|
|
|
860
860
|
const orchCustomInstructions = orchInstrInput?.value?.trim() || undefined;
|
|
861
861
|
const consolidation = orchRow ? {
|
|
862
862
|
provider: orchRow.querySelector('.voice-provider')?.value || 'claude',
|
|
863
|
-
model: orchRow.querySelector('.voice-model')?.value || 'sonnet',
|
|
863
|
+
model: orchRow.querySelector('.voice-model')?.value || 'sonnet-4.6',
|
|
864
864
|
tier: orchRow.querySelector('.voice-tier')?.value || 'balanced',
|
|
865
865
|
timeout: orchTimeout,
|
|
866
866
|
...(orchCustomInstructions ? { customInstructions: orchCustomInstructions } : {})
|
|
867
|
-
} : { provider: 'claude', model: 'sonnet', tier: 'balanced', timeout: VoiceCentricConfigTab.DEFAULT_TIMEOUT };
|
|
867
|
+
} : { provider: 'claude', model: 'sonnet-4.6', tier: 'balanced', timeout: VoiceCentricConfigTab.DEFAULT_TIMEOUT };
|
|
868
868
|
|
|
869
869
|
return { voices, levels, consolidation };
|
|
870
870
|
}
|
package/public/js/index.js
CHANGED
|
@@ -895,6 +895,14 @@
|
|
|
895
895
|
if (response.ok) {
|
|
896
896
|
const config = await response.json();
|
|
897
897
|
updateCommandExamples(config.is_running_via_npx);
|
|
898
|
+
|
|
899
|
+
// Set chat feature state based on config and Pi availability
|
|
900
|
+
let chatState = 'disabled';
|
|
901
|
+
if (config.enable_chat) {
|
|
902
|
+
chatState = config.pi_available ? 'available' : 'unavailable';
|
|
903
|
+
}
|
|
904
|
+
document.documentElement.setAttribute('data-chat', chatState);
|
|
905
|
+
window.dispatchEvent(new CustomEvent('chat-state-changed', { detail: { state: chatState } }));
|
|
898
906
|
} else {
|
|
899
907
|
// Fallback: assume installed (shorter command)
|
|
900
908
|
updateCommandExamples(false);
|