chocomint 1.0.3 → 1.1.1

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.
data/lib/chocomint.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Chocomint
4
- VERSION = "1.0.3"
4
+ VERSION = "1.1.1"
5
5
  end
6
6
 
7
7
  require_relative "chocomint/errors"
data/public/edit/edit.css CHANGED
@@ -102,8 +102,11 @@ html, body { margin: 0; height: 100%;
102
102
  #files-actions .menu-icon-btn:hover { background: #dcecee; }
103
103
  #file-list { overflow: auto; flex: 1 1 auto; min-height: 3rem; }
104
104
  #files ul { list-style: none; margin: 0; padding: 0; }
105
- #files ul ul { display: none; padding-left: 0.9rem; } /* 折りたたみ + 階層インデント */
106
- #files li.dir.open > ul { display: block; }
105
+ /* 子ディレクトリの <ul> class="children"。ルートは #file-list (div) 直下に
106
+ <li> を直接並べる (renderRoot が ul 自体を作らない) ため、入れ子 "ul ul" では
107
+ マッチしない。children クラスを直接ターゲットにして折りたたみ + 階層インデントを効かせる。 */
108
+ #files ul.children { display: none; padding-left: 0.9rem; }
109
+ #files li.dir.open > ul.children { display: block; }
107
110
  #files .row { display: flex; align-items: center; gap: 0.2rem;
108
111
  padding: 0.25rem 0.7rem; font-size: 0.83rem; cursor: pointer;
109
112
  min-width: 0; white-space: nowrap; overflow: hidden; }
@@ -173,6 +176,19 @@ html, body { margin: 0; height: 100%;
173
176
  cursor: pointer; border-radius: 4px; }
174
177
  #statusbar-branch:hover { background: rgba(255,255,255,0.15); }
175
178
  .statusbar-branch-icon { font-size: 0.85rem; }
179
+ /* ブランチ (左) と改行コード (右) を両端に寄せるための伸縮スペーサー。 */
180
+ .statusbar-spacer { flex: 1; }
181
+ #statusbar-eol { background: transparent; border: none; color: inherit; font-size: inherit;
182
+ padding: 0.2rem 0.6rem; cursor: pointer; border-radius: 4px; }
183
+ #statusbar-eol[hidden] { display: none; }
184
+ #statusbar-eol:hover { background: rgba(255,255,255,0.15); }
185
+ /* モデル選択ボタン (改行コードの右)。現在の LLM モデル名を表示する。 */
186
+ #statusbar-model { display: flex; align-items: center; gap: 0.3rem; background: transparent;
187
+ border: none; color: inherit; font-size: inherit; padding: 0.2rem 0.6rem;
188
+ cursor: pointer; border-radius: 4px; max-width: 16rem; }
189
+ #statusbar-model:hover { background: rgba(255,255,255,0.15); }
190
+ .statusbar-model-icon { font-size: 0.8rem; }
191
+ #statusbar-model-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
176
192
  /* ブランチ切り替えダイアログの一覧。 */
177
193
  .branch-list { list-style: none; margin: 0 0 0.7rem; padding: 0; max-height: 12rem;
178
194
  overflow: auto; border: 1px solid #eee; border-radius: 6px; }
@@ -188,6 +204,63 @@ html, body { margin: 0; height: 100%;
188
204
  #editor { flex: 1; min-height: 0; min-width: 0; }
189
205
  /* 開いているタブが無いときは Monaco を隠し、代わりにプレースホルダーを見せる。 */
190
206
  #app.no-tabs #editor { display: none; }
207
+ /* メディアプレビュー領域: 画像 / PDF / 動画 / 音声を表示する。
208
+ .show-media のときだけ表示し、その間は Monaco (#editor) を隠す。 */
209
+ #media-view { display: none; flex: 1; min-height: 0; min-width: 0;
210
+ overflow: auto; background: #f6f6f6;
211
+ align-items: center; justify-content: center; padding: 1rem; }
212
+ #app.show-media #editor { display: none; }
213
+ #app.show-media #media-view { display: flex; }
214
+ /* 画像: 領域に収まるよう縮小しつつ、原寸以上には拡大しない。市松模様で透過を分かりやすく。 */
215
+ #media-view img.media-image { max-width: 100%; max-height: 100%; object-fit: contain;
216
+ background-image:
217
+ linear-gradient(45deg, #e0e0e0 25%, transparent 25%),
218
+ linear-gradient(-45deg, #e0e0e0 25%, transparent 25%),
219
+ linear-gradient(45deg, transparent 75%, #e0e0e0 75%),
220
+ linear-gradient(-45deg, transparent 75%, #e0e0e0 75%);
221
+ background-size: 20px 20px;
222
+ background-position: 0 0, 0 10px, 10px -10px, -10px 0;
223
+ box-shadow: 0 1px 6px rgba(0,0,0,0.2); }
224
+ /* PDF: iframe を領域いっぱいに広げる (padding 無しで縁まで使う)。 */
225
+ #app.show-media.media-pdf #media-view { padding: 0; align-items: stretch; }
226
+ #media-view iframe.media-pdf { flex: 1; width: 100%; height: 100%; border: none; }
227
+ /* 動画: 領域に収める。 */
228
+ #media-view video.media-video { max-width: 100%; max-height: 100%;
229
+ background: #000; box-shadow: 0 1px 6px rgba(0,0,0,0.2); }
230
+ /* 音声: プレイヤーはファイル名の下に配置する縦積みカード。 */
231
+ #media-view .media-audio-card { display: flex; flex-direction: column; gap: 0.75rem;
232
+ align-items: center; color: #555; }
233
+ #media-view .media-audio-card .media-audio-name { font-size: 0.9rem; word-break: break-all; }
234
+ #media-view audio.media-audio { width: min(28rem, 80vw); }
235
+ /* 読み込み失敗時のメッセージ。 */
236
+ #media-view .media-error { color: #a33; font-size: 0.9rem; text-align: center; }
237
+ /* アーカイブ (zip/tar 等) の第一階層 + メタデータ表示。 */
238
+ #archive-view { display: none; flex: 1; min-height: 0; min-width: 0;
239
+ overflow: auto; background: #fafafa; padding: 1rem 1.25rem; }
240
+ #app.show-archive #editor { display: none; }
241
+ #app.show-archive #archive-view { display: block; }
242
+ .archive-head { display: flex; align-items: baseline; gap: 0.6rem;
243
+ padding-bottom: 0.6rem; margin-bottom: 0.5rem;
244
+ border-bottom: 1px solid #e0e0e0; }
245
+ .archive-head .archive-name { font-size: 1.05rem; font-weight: 600; color: #16393d;
246
+ word-break: break-all; }
247
+ .archive-head .archive-kind { font-size: 0.72rem; font-weight: 600; color: #16393d;
248
+ background: #cdeff3; border-radius: 3px; padding: 0.1rem 0.4rem; }
249
+ .archive-meta { color: #666; font-size: 0.8rem; margin-bottom: 0.75rem;
250
+ display: flex; flex-wrap: wrap; gap: 0.3rem 1rem; }
251
+ .archive-meta .archive-capped { color: #a35; }
252
+ /* エントリ一覧: アイコン + 名前 + 補足 (件数/サイズ) の行。 */
253
+ .archive-list { list-style: none; margin: 0; padding: 0; }
254
+ .archive-list li { display: flex; align-items: center; gap: 0.5rem;
255
+ padding: 0.28rem 0.4rem; border-radius: 4px; font-size: 0.85rem; }
256
+ .archive-list li:hover { background: #eef6f7; }
257
+ .archive-list .a-icon { width: 1.3em; text-align: center; flex-shrink: 0; }
258
+ .archive-list .a-name { flex: 1; min-width: 0; overflow: hidden;
259
+ text-overflow: ellipsis; white-space: nowrap; color: #222; }
260
+ .archive-list .a-sub { flex-shrink: 0; color: #999; font-size: 0.78rem;
261
+ font-variant-numeric: tabular-nums; }
262
+ .archive-empty { color: #999; font-size: 0.85rem; padding: 0.5rem 0; }
263
+ .archive-error { color: #a33; font-size: 0.9rem; padding: 0.5rem 0; }
191
264
  #editor-empty { display: none; flex: 1; align-items: center; justify-content: center;
192
265
  color: #999; font-size: 0.9rem; user-select: none; }
193
266
  #app.no-tabs #editor-empty { display: flex; }
@@ -350,6 +423,12 @@ html, body { margin: 0; height: 100%;
350
423
  width: 1em; text-align: center; }
351
424
  /* AI 実行中のツール進捗行 (SSE)。実行中は点字スピナー、完了で ✓ / ✕ に変わる。 */
352
425
  .pending-head { color: #555; }
426
+ /* 実行中の経過時間 (例: 30s)。1 秒ごとに更新される。 */
427
+ .pending-elapsed { margin-left: 0.4rem; font-size: 0.78rem; color: #888;
428
+ font-variant-numeric: tabular-nums; }
429
+ /* 会話応答 (ツール実行なし) の下に添える実行時間。 */
430
+ .msg-elapsed { margin-top: 0.3rem; font-size: 0.72rem; color: #999;
431
+ font-variant-numeric: tabular-nums; }
353
432
  .pending-tools { display: flex; flex-direction: column; gap: 0.3rem;
354
433
  margin-top: 0.4rem; }
355
434
  .ptool { display: flex; align-items: center; gap: 0.4rem; font-size: 0.78rem;
@@ -358,6 +437,9 @@ html, body { margin: 0; height: 100%;
358
437
  .ptool-mark.ok { color: #137333; }
359
438
  .ptool-mark.ng { color: #c5221f; }
360
439
  .ptool-label { font-weight: 600; color: #333; }
440
+ /* 完了マーク / ツール名を監査ログへのリンクにしたとき (クリック可能を示す)。 */
441
+ .log-link { cursor: pointer; }
442
+ .log-link:hover { text-decoration: underline; }
361
443
  .ptool-target { font-family: "Cascadia Code", "Noto Sans JP", monospace;
362
444
  font-size: 0.72rem; background: #eef; color: #33407a;
363
445
  padding: 0.05rem 0.35rem; border-radius: 4px;
@@ -415,3 +497,19 @@ html, body { margin: 0; height: 100%;
415
497
  .vwin-btn.primary:hover { background: #82c3cb; }
416
498
  .vwin-btn.danger { background: #fce8e6; border-color: #f3c9c6; color: #c5221f; font-weight: 600; }
417
499
  .vwin-btn.danger:hover { background: #f8d7d4; }
500
+
501
+ /* モデル設定ダイアログ: provider タブ + 各 provider のペイン。 */
502
+ #model-dialog .vwin-body select {
503
+ width: 100%; box-sizing: border-box; padding: 0.4rem 0.5rem;
504
+ border: 1px solid #ccc; border-radius: 6px; font-size: 0.85rem;
505
+ font-family: "Cascadia Code", "Noto Sans JP", monospace; }
506
+ .model-tabs { display: flex; gap: 0.3rem; margin-bottom: 0.8rem; }
507
+ .model-tab { flex: 1; padding: 0.4rem 0.6rem; border: 1px solid #ccc; border-radius: 6px;
508
+ background: #f5f5f5; color: #555; font-size: 0.85rem; cursor: pointer; }
509
+ .model-tab:hover { background: #ececec; }
510
+ .model-tab.active { background: #a2d7dd; border-color: #82c3cb; color: #16393d; font-weight: 600; }
511
+ .model-pane[hidden] { display: none; }
512
+ .model-hint { font-size: 0.78rem; color: #666; margin: 0.5rem 0 0; line-height: 1.5; }
513
+ .model-hint a { color: #1155cc; }
514
+ .model-hint code { background: #eef; padding: 0.05rem 0.3rem; border-radius: 3px; }
515
+ .model-warn { color: #b06000; }