From 3111ab323403077668db7d0ea7b1a5e75d4384b2 Mon Sep 17 00:00:00 2001 From: Yasumichi Akahoshi Date: Wed, 4 Mar 2026 02:24:37 +0900 Subject: [PATCH] Add text completion (use SuggestionProvider) (#3974) --- .../core/helper/completion.scala.html | 57 +++++++++++++++++++ .../gitbucket/core/repo/editor.scala.html | 7 +++ .../twirl/gitbucket/core/wiki/edit.scala.html | 7 +++ src/main/webapp/assets/common/js/editor.js | 13 +++++ 4 files changed, 84 insertions(+) create mode 100644 src/main/twirl/gitbucket/core/helper/completion.scala.html diff --git a/src/main/twirl/gitbucket/core/helper/completion.scala.html b/src/main/twirl/gitbucket/core/helper/completion.scala.html new file mode 100644 index 000000000..4fe3a298f --- /dev/null +++ b/src/main/twirl/gitbucket/core/helper/completion.scala.html @@ -0,0 +1,57 @@ +@(repository: gitbucket.core.service.RepositoryService.RepositoryInfo, + completionContext: String, generateScript: Boolean = true)(implicit context: gitbucket.core.controller.Context) +@import gitbucket.core.view.helpers + + \ No newline at end of file diff --git a/src/main/twirl/gitbucket/core/repo/editor.scala.html b/src/main/twirl/gitbucket/core/repo/editor.scala.html index b5868ef3d..048b79f1a 100644 --- a/src/main/twirl/gitbucket/core/repo/editor.scala.html +++ b/src/main/twirl/gitbucket/core/repo/editor.scala.html @@ -74,12 +74,19 @@ + + @gitbucket.core.helper.html.completion( + repository = repository, + completionContext = "wiki", + generateScript = false + ) + + @gitbucket.core.helper.html.completion( + repository = repository, + completionContext = "wiki", + generateScript = false + )