Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .claude/settings.local.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,12 @@
"mcp__serena__think_about_whether_you_are_done",
"mcp__serena__write_memory",
"Bash(yarn build:*)",
"mcp__serena__initial_instructions"
"mcp__serena__initial_instructions",
"WebFetch(domain:raw.githubusercontent.com)",
"WebFetch(domain:api.github.com)",
"Bash(curl:*)",
"Bash(python3:*)",
"Bash(yarn list:*)"
],
"deny": []
}
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
.env.development.local
.env.test.local
.env.production.local
.git

npm-debug.log*
yarn-debug.log*
Expand Down
61 changes: 53 additions & 8 deletions .serena/project.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
# language of the project (csharp, python, rust, java, typescript, go, cpp, or ruby)
# * For C, use cpp
# * For JavaScript, use typescript
# Special requirements:
# * csharp: Requires the presence of a .sln file in the project folder.
language: typescript

# whether to use the project's gitignore file to ignore files
# Added on 2025-04-07
ignore_all_files_in_gitignore: true
Expand Down Expand Up @@ -63,5 +56,57 @@ excluded_tools: []
# initial prompt for the project. It will always be given to the LLM upon activating the project
# (contrary to the memories, which are loaded on demand).
initial_prompt: ""

# the name by which the project can be referenced within Serena
project_name: "selection-command"

# list of mode names to that are always to be included in the set of active modes
# The full set of modes to be activated is base_modes + default_modes.
# If the setting is undefined, the base_modes from the global configuration (serena_config.yml) apply.
# Otherwise, this setting overrides the global configuration.
# Set this to [] to disable base modes for this project.
# Set this to a list of mode names to always include the respective modes for this project.
base_modes:

# list of mode names that are to be activated by default.
# The full set of modes to be activated is base_modes + default_modes.
# If the setting is undefined, the default_modes from the global configuration (serena_config.yml) apply.
# Otherwise, this overrides the setting from the global configuration (serena_config.yml).
# This setting can, in turn, be overridden by CLI parameters (--mode).
default_modes:

# list of tools to include that would otherwise be disabled (particularly optional tools that are disabled by default)
included_optional_tools: []

# fixed set of tools to use as the base tool set (if non-empty), replacing Serena's default set of tools.
# This cannot be combined with non-empty excluded_tools or included_optional_tools.
fixed_tools: []

# the encoding used by text files in the project
# For a list of possible encodings, see https://docs.python.org/3.11/library/codecs.html#standard-encodings
encoding: utf-8

# list of languages for which language servers are started; choose from:
# al bash clojure cpp csharp
# csharp_omnisharp dart elixir elm erlang
# fortran fsharp go groovy haskell
# java julia kotlin lua markdown
# matlab nix pascal perl php
# powershell python python_jedi r rego
# ruby ruby_solargraph rust scala swift
# terraform toml typescript typescript_vts vue
# yaml zig
# (This list may be outdated. For the current list, see values of Language enum here:
# https://github.com/oraios/serena/blob/main/src/solidlsp/ls_config.py
# For some languages, there are alternative language servers, e.g. csharp_omnisharp, ruby_solargraph.)
# Note:
# - For C, use cpp
# - For JavaScript, use typescript
# - For Free Pascal/Lazarus, use pascal
# Special requirements:
# Some languages require additional setup/installations.
# See here for details: https://oraios.github.io/serena/01-about/020_programming-languages.html#language-servers
# When using multiple languages, the first language server that supports a given file will be used for that file.
# The first language is the default language and the respective language server will be used as a fallback.
# Note that when using the JetBrains backend, language servers are not used and this list is correspondingly ignored.
languages:
- typescript
52 changes: 52 additions & 0 deletions docs/design/side-pane-link.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
## 1. 対象範囲

- selection command から開かれた **side panel 内の画面遷移** を、実際のブラウザナビゲーションではなく「side panel の URL 差し替え」として扱う。
- 実装対象:
- side panel 内で動作する content script
- service worker(background)
- side panel 表示状態を持つ BgData(状態管理層)

---

## 2. side panel 上かどうかの判定要件

- 「この content script が side panel 上で動いているか」を判定するための条件:
- BgData が保持する「side panel を表示中の tabId リスト」に、現在のタブ ID が含まれていること。
- かつ、以下のいずれかを満たすこと:
- 現在の URL が「side panel 用 URL」であると判定できる。
- side panel とメインコンテンツが同じ URL を表示している場合は、ウィンドウ位置やレイアウト情報から「side panel 側」であることを判定すること。

---

## 3. side panel 内でのページ遷移フック要件(content script)

- side panel 上で動作していると判定できた場合のみ、遷移フックを有効化する。
- フック対象:
- ユーザーのリンククリックなど、ページ遷移を引き起こす操作。
- ただし、`target="_blank"` など、意図的に別タブ・ウィンドウで開くことを指定されている場合はフックを無効化する
- フック時の挙動:
- ブラウザ標準のページ遷移は発生させない(キャンセルする)。
- 遷移先 URL を取得し、service worker に「side panel の URL 更新要求」として通知する。

---

## 4. service worker による side panel URL 更新要件

- content script からの「side panel の URL 更新要求」を受け取ったら、以下を行う:
- 対象 tabId が「side panel 表示中タブリスト」に含まれていることを確認する。
- 対象の side panel の URL を更新するための API を呼び出し、side panel の表示内容を遷移先 URL に切り替える。
- URL 更新後の状態管理:
- BgData 上で、その tabId の side panel に紐づく「現在 URL」を更新する。
- 必要に応じて、履歴やその他の管理情報も更新できるようにしておく。

---

## 5. 状態管理要件(BgData)

- 少なくとも以下の情報を持つ:
- side panel を表示中の tabId の集合(リストまたはセット)。
- 各 tabId ごとの side panel の現在 URL(+必要に応じて追加情報)。
- 更新タイミング(例):
- side panel オープン/クローズ時。
- service worker が URL 更新 API を呼び出したタイミング。
- タブクローズ時など、不要になった状態のクリア。
3 changes: 2 additions & 1 deletion packages/extension/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
"contextMenus",
"declarativeNetRequest",
"clipboardRead",
"system.display"
"system.display",
"sidePanel"
],
"host_permissions": ["http://*/*", "https://*/*"],
"web_accessible_resources": [
Expand Down
2 changes: 1 addition & 1 deletion packages/extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"devDependencies": {
"@crxjs/vite-plugin": "^2.0.0-beta.30",
"@testing-library/dom": "^10.4.0",
"@types/chrome": "^0.0.293",
"@types/chrome": "^0.1.36",
"@types/jest": "^29.5.11",
"@types/platform": "^1.3.6",
"@types/react-transition-group": "^4.4.10",
Expand Down
12 changes: 12 additions & 0 deletions packages/extension/public/_locales/de/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,9 @@
"Option_openMode_api": {
"message": "API"
},
"Option_openMode_sidePanel": {
"message": "Seitenpanel"
},
"Option_openMode_linkPopup": {
"message": "Link-Popup"
},
Expand Down Expand Up @@ -545,9 +548,15 @@
"Option_userStyles_option_border_color": {
"message": "Rahmenfarbe"
},
"Option_userStyles_option_font_color": {
"message": "Schriftfarbe"
},
"Option_userStyles_desc_border_color": {
"message": "Geben Sie die Rahmenfarbe des Menüs an. Standard: #F3F4F6"
},
"Option_userStyles_desc_font_color": {
"message": "Geben Sie die Schriftfarbe an. Standard: #0F172A"
},
"Option_userStyles_option_font_scale": {
"message": "Schriftgrößen-Skalierung"
},
Expand Down Expand Up @@ -905,6 +914,9 @@
"Option_openMode_backgroundTab_desc": {
"message": "Tab im Hintergrund öffnen.<wbr>Rechts vom aktuellen Tab anzeigen."
},
"Option_openMode_sidePanel_desc": {
"message": "Im Seitenpanel öffnen."
},
"Option_title_desc": {
"message": "Wird als Befehlstitel angezeigt."
},
Expand Down
12 changes: 12 additions & 0 deletions packages/extension/public/_locales/en/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,9 @@
"Option_openMode_backgroundTab": {
"message": "Background Tab"
},
"Option_openMode_sidePanel": {
"message": "Side Panel"
},
"Option_openMode_api": {
"message": "API"
},
Expand Down Expand Up @@ -587,9 +590,15 @@
"Option_userStyles_option_border_color": {
"message": "Border Color"
},
"Option_userStyles_option_font_color": {
"message": "Font color"
},
"Option_userStyles_desc_border_color": {
"message": "Specify the border color of the menu. Default: #F3F4F6"
},
"Option_userStyles_desc_font_color": {
"message": "Specify font color. Default: #0F172A"
},
"Option_userStyles_option_font_scale": {
"message": "Font size scaling"
},
Expand Down Expand Up @@ -953,6 +962,9 @@
"Option_openMode_backgroundTab_desc": {
"message": "Open tab in background.<wbr>Show to the right of current tab."
},
"Option_openMode_sidePanel_desc": {
"message": "Open in side panel."
},
"Option_title_desc": {
"message": "Displayed as the command title."
},
Expand Down
12 changes: 12 additions & 0 deletions packages/extension/public/_locales/es/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,9 @@
"Option_openMode_api": {
"message": "API"
},
"Option_openMode_sidePanel": {
"message": "Panel lateral"
},
"Option_openMode_linkPopup": {
"message": "Emergente de Enlace"
},
Expand Down Expand Up @@ -545,9 +548,15 @@
"Option_userStyles_option_border_color": {
"message": "Color del Borde"
},
"Option_userStyles_option_font_color": {
"message": "Color de fuente"
},
"Option_userStyles_desc_border_color": {
"message": "Especifique el color del borde del menú. Predeterminado: #F3F4F6"
},
"Option_userStyles_desc_font_color": {
"message": "Especificar el color de fuente. Predeterminado: #0F172A"
},
"Option_userStyles_option_font_scale": {
"message": "Escala de tamaño de fuente"
},
Expand Down Expand Up @@ -905,6 +914,9 @@
"Option_openMode_backgroundTab_desc": {
"message": "Abrir pestaña en segundo plano.<wbr>Mostrar a la derecha de la pestaña actual."
},
"Option_openMode_sidePanel_desc": {
"message": "Abrir en panel lateral."
},
"Option_title_desc": {
"message": "Se muestra como el título del comando."
},
Expand Down
12 changes: 12 additions & 0 deletions packages/extension/public/_locales/fr/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,9 @@
"Option_openMode_api": {
"message": "API"
},
"Option_openMode_sidePanel": {
"message": "Panneau latéral"
},
"Option_openMode_linkPopup": {
"message": "Pop-up de Lien"
},
Expand Down Expand Up @@ -545,9 +548,15 @@
"Option_userStyles_option_border_color": {
"message": "Couleur de la Bordure"
},
"Option_userStyles_option_font_color": {
"message": "Couleur de police"
},
"Option_userStyles_desc_border_color": {
"message": "Spécifiez la couleur de la bordure du menu. Par défaut : #F3F4F6"
},
"Option_userStyles_desc_font_color": {
"message": "Spécifier la couleur de police. Par défaut: #0F172A"
},
"Option_userStyles_option_font_scale": {
"message": "Échelle de taille de police"
},
Expand Down Expand Up @@ -905,6 +914,9 @@
"Option_openMode_backgroundTab_desc": {
"message": "Ouvrir l'onglet en arrière-plan.<wbr>Afficher à droite de l'onglet actuel."
},
"Option_openMode_sidePanel_desc": {
"message": "Ouvrir dans le panneau latéral."
},
"Option_title_desc": {
"message": "Affiché comme titre de commande."
},
Expand Down
12 changes: 12 additions & 0 deletions packages/extension/public/_locales/hi/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,9 @@
"Option_openMode_api": {
"message": "API"
},
"Option_openMode_sidePanel": {
"message": "साइड पैनल"
},
"Option_openMode_linkPopup": {
"message": "लिंक पॉपअप"
},
Expand Down Expand Up @@ -545,9 +548,15 @@
"Option_userStyles_option_border_color": {
"message": "बॉर्डर रंग"
},
"Option_userStyles_option_font_color": {
"message": "फ़ॉन्ट का रंग"
},
"Option_userStyles_desc_border_color": {
"message": "मेनू का बॉर्डर रंग निर्दिष्ट करें। डिफ़ॉल्ट: #F3F4F6"
},
"Option_userStyles_desc_font_color": {
"message": "फ़ॉन्ट का रंग निर्दिष्ट करें। डिफ़ॉल्ट: #0F172A"
},
"Option_userStyles_option_font_scale": {
"message": "फ़ॉन्ट साइज़ स्केल"
},
Expand Down Expand Up @@ -905,6 +914,9 @@
"Option_openMode_backgroundTab_desc": {
"message": "बैकग्राउंड में टैब खोलें।<wbr>वर्तमान टैब के दाईं ओर दिखाएँ।"
},
"Option_openMode_sidePanel_desc": {
"message": "साइड पैनल में खोलें।"
},
"Option_title_desc": {
"message": "कमांड शीर्षक के रूप में प्रदर्शित होता है।"
},
Expand Down
12 changes: 12 additions & 0 deletions packages/extension/public/_locales/id/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,9 @@
"Option_openMode_api": {
"message": "API"
},
"Option_openMode_sidePanel": {
"message": "Panel Samping"
},
"Option_openMode_linkPopup": {
"message": "Pop-up Tautan"
},
Expand Down Expand Up @@ -545,9 +548,15 @@
"Option_userStyles_option_border_color": {
"message": "Warna Border"
},
"Option_userStyles_option_font_color": {
"message": "Warna font"
},
"Option_userStyles_desc_border_color": {
"message": "Tentukan warna border menu. Default: #F3F4F6"
},
"Option_userStyles_desc_font_color": {
"message": "Tentukan warna font. Default: #0F172A"
},
"Option_userStyles_option_font_scale": {
"message": "Penskalaan ukuran font"
},
Expand Down Expand Up @@ -908,6 +917,9 @@
"Option_openMode_backgroundTab_desc": {
"message": "Buka tab di latar belakang.<wbr>Tampilkan di sebelah kanan tab saat ini."
},
"Option_openMode_sidePanel_desc": {
"message": "Buka di panel samping."
},
"Option_title_desc": {
"message": "Ditampilkan sebagai judul perintah."
},
Expand Down
Loading
Loading