-
Notifications
You must be signed in to change notification settings - Fork 9
Add AI endpoint response modal for companies admin page #95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-authored-by: maximgorbatyuk <13348685+maximgorbatyuk@users.noreply.github.com>
Co-authored-by: maximgorbatyuk <13348685+maximgorbatyuk@users.noreply.github.com>
karma.conf.js
Outdated
|
|
||
| const process = require('process'); | ||
| process.env.CHROME_BIN = require('puppeteer').executablePath(); | ||
| process.env.CHROME_BIN = process.env.CHROME_BIN || '/usr/bin/google-chrome'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it necessary for this feature?
|
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Join our Discord community for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
This PR implements a new feature to display AI analysis results for companies in the admin interface. The changes include:
Changes Made
Backend Integration
OpenAiChatResultinterface tomodels/open-ai.model.tswith properties for content, role, finishReason, and usage statisticsgetOpenAiAnalysis(companyIdentifier: string)method toCompaniesServicethat calls the new/api/companies/{companyIdentifier}/open-ai-analysisendpointUI Implementation
app-dialogcomponent to display JSON response in a formatted textareaComponent Updates
CompaniesAdminPageComponentwith:showAiAnalysis(company: Company)method to fetch and display AI analysisonAiAnalysisModalClose()method to close the modal and reset statecopyAiAnalysis(inputElement: any)method to copy JSON content to clipboardTesting
Usage
Admins can now click the "AI Анализ" button in the companies table to view the AI analysis response as formatted JSON in a modal dialog. The content can be copied to clipboard using the copy button.
Fixes #94.
Warning
Firewall rules blocked me from connecting to one or more addresses
I tried to connect to the following addresses, but was blocked by firewall rules:
accounts.google.com/opt/google/chrome/chrome --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --use-angle=swiftshader-webgl --crashpad-handler-pid=3849 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/karma-27912355 --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,12018283405315501566,6501983848088692661,262144 --disable-features=PaintHolding --variations-seed-version(dns block)/opt/google/chrome/chrome --user-data-dir=/tmp/karma-27912355 --enable-automation --no-default-browser-check --no-first-run --disable-default-apps --disable-popup-blocking --disable-translate --disable-REDACTED-timer-throttling --disable-renderer-REDACTEDing --disable-device-discovery-notifications --no-sandbox --headless --disable-gpu --disable-translate --disable-extensions --headless --disable-gpu --disable-dev-shm-usage --remote-debugging-port=9222 --noerrdialogs --ozone-platform=headless --ozone-override-screen-size=800,600 --use-angle=swiftshader-webgl http://localhost:9876/?id=27912355(dns block)/opt/google/chrome/chrome --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --use-angle=swiftshader-webgl --crashpad-handler-pid=4137 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/karma-24809401 --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,12652026396216383149,2172420434156531474,262144 --disable-features=PaintHolding --variations-seed-version(dns block)clients2.google.com/opt/google/chrome/chrome --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --use-angle=swiftshader-webgl --crashpad-handler-pid=3849 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/karma-27912355 --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,12018283405315501566,6501983848088692661,262144 --disable-features=PaintHolding --variations-seed-version(dns block)/opt/google/chrome/chrome --user-data-dir=/tmp/karma-27912355 --enable-automation --no-default-browser-check --no-first-run --disable-default-apps --disable-popup-blocking --disable-translate --disable-REDACTED-timer-throttling --disable-renderer-REDACTEDing --disable-device-discovery-notifications --no-sandbox --headless --disable-gpu --disable-translate --disable-extensions --headless --disable-gpu --disable-dev-shm-usage --remote-debugging-port=9222 --noerrdialogs --ozone-platform=headless --ozone-override-screen-size=800,600 --use-angle=swiftshader-webgl http://localhost:9876/?id=27912355(dns block)/opt/google/chrome/chrome --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --use-angle=swiftshader-webgl --crashpad-handler-pid=4137 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/karma-24809401 --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,12652026396216383149,2172420434156531474,262144 --disable-features=PaintHolding --variations-seed-version(dns block)clientservices.googleapis.com/opt/google/chrome/chrome --user-data-dir=/tmp/karma-27912355 --enable-automation --no-default-browser-check --no-first-run --disable-default-apps --disable-popup-blocking --disable-translate --disable-REDACTED-timer-throttling --disable-renderer-REDACTEDing --disable-device-discovery-notifications --no-sandbox --headless --disable-gpu --disable-translate --disable-extensions --headless --disable-gpu --disable-dev-shm-usage --remote-debugging-port=9222 --noerrdialogs --ozone-platform=headless --ozone-override-screen-size=800,600 --use-angle=swiftshader-webgl http://localhost:9876/?id=27912355(dns block)/opt/google/chrome/chrome --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --use-angle=swiftshader-webgl --crashpad-handler-pid=3849 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/karma-27912355 --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,12018283405315501566,6501983848088692661,262144 --disable-features=PaintHolding --variations-seed-version(dns block)/opt/google/chrome/chrome --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --use-angle=swiftshader-webgl --crashpad-handler-pid=4137 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/karma-24809401 --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,12652026396216383149,2172420434156531474,262144 --disable-features=PaintHolding --variations-seed-version(dns block)googlechromelabs.github.ionode install.mjs(dns block)https://storage.googleapis.com/chrome-for-testing-public/133.0.6943.53/linux64/chrome-headless-shell-linux64.zipnode install.mjs(http block)https://storage.googleapis.com/chrome-for-testing-public/133.0.6943.53/linux64/chrome-linux64.zipnode install.mjs(http block)redirector.gvt1.com/opt/google/chrome/chrome --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --use-angle=swiftshader-webgl --crashpad-handler-pid=3849 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/karma-27912355 --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,12018283405315501566,6501983848088692661,262144 --disable-features=PaintHolding --variations-seed-version(dns block)/opt/google/chrome/chrome --user-data-dir=/tmp/karma-27912355 --enable-automation --no-default-browser-check --no-first-run --disable-default-apps --disable-popup-blocking --disable-translate --disable-REDACTED-timer-throttling --disable-renderer-REDACTEDing --disable-device-discovery-notifications --no-sandbox --headless --disable-gpu --disable-translate --disable-extensions --headless --disable-gpu --disable-dev-shm-usage --remote-debugging-port=9222 --noerrdialogs --ozone-platform=headless --ozone-override-screen-size=800,600 --use-angle=swiftshader-webgl http://localhost:9876/?id=27912355(dns block)/opt/google/chrome/chrome --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --use-angle=swiftshader-webgl --crashpad-handler-pid=4137 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/karma-24809401 --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,12652026396216383149,2172420434156531474,262144 --disable-features=PaintHolding --variations-seed-version(dns block)safebrowsingohttpgateway.googleapis.com/opt/google/chrome/chrome --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --use-angle=swiftshader-webgl --crashpad-handler-pid=3849 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/karma-27912355 --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,12018283405315501566,6501983848088692661,262144 --disable-features=PaintHolding --variations-seed-version(dns block)/home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js(dns block)/opt/google/chrome/chrome --user-data-dir=/tmp/karma-27912355 --enable-automation --no-default-browser-check --no-first-run --disable-default-apps --disable-popup-blocking --disable-translate --disable-REDACTED-timer-throttling --disable-renderer-REDACTEDing --disable-device-discovery-notifications --no-sandbox --headless --disable-gpu --disable-translate --disable-extensions --headless --disable-gpu --disable-dev-shm-usage --remote-debugging-port=9222 --noerrdialogs --ozone-platform=headless --ozone-override-screen-size=800,600 --use-angle=swiftshader-webgl http://localhost:9876/?id=27912355(dns block)techinterview.fra1.cdn.digitaloceanspaces.com/opt/google/chrome/chrome --user-data-dir=/tmp/karma-27912355 --enable-automation --no-default-browser-check --no-first-run --disable-default-apps --disable-popup-blocking --disable-translate --disable-REDACTED-timer-throttling --disable-renderer-REDACTEDing --disable-device-discovery-notifications --no-sandbox --headless --disable-gpu --disable-translate --disable-extensions --headless --disable-gpu --disable-dev-shm-usage --remote-debugging-port=9222 --noerrdialogs --ozone-platform=headless --ozone-override-screen-size=800,600 --use-angle=swiftshader-webgl http://localhost:9876/?id=27912355(dns block)/opt/google/chrome/chrome --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --use-angle=swiftshader-webgl --crashpad-handler-pid=3849 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/karma-27912355 --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,12018283405315501566,6501983848088692661,262144 --disable-features=PaintHolding --variations-seed-version(dns block)/opt/google/chrome/chrome --user-data-dir=/tmp/karma-24809401 --enable-automation --no-default-browser-check --no-first-run --disable-default-apps --disable-popup-blocking --disable-translate --disable-REDACTED-timer-throttling --disable-renderer-REDACTEDing --disable-device-discovery-notifications --no-sandbox --headless --disable-gpu --disable-translate --disable-extensions --headless --disable-gpu --disable-dev-shm-usage --remote-debugging-port=9222 --noerrdialogs --ozone-platform=headless --ozone-override-screen-size=800,600 --use-angle=swiftshader-webgl http://localhost:9876/?id=24809401(dns block)www.google.com/opt/google/chrome/chrome --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --use-angle=swiftshader-webgl --crashpad-handler-pid=3849 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/karma-27912355 --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,12018283405315501566,6501983848088692661,262144 --disable-features=PaintHolding --variations-seed-version(dns block)/opt/google/chrome/chrome --user-data-dir=/tmp/karma-27912355 --enable-automation --no-default-browser-check --no-first-run --disable-default-apps --disable-popup-blocking --disable-translate --disable-REDACTED-timer-throttling --disable-renderer-REDACTEDing --disable-device-discovery-notifications --no-sandbox --headless --disable-gpu --disable-translate --disable-extensions --headless --disable-gpu --disable-dev-shm-usage --remote-debugging-port=9222 --noerrdialogs --ozone-platform=headless --ozone-override-screen-size=800,600 --use-angle=swiftshader-webgl http://localhost:9876/?id=27912355(dns block)If you need me to access, download, or install something from one of these locations, you can either:
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.