Skip to content

Commit e1cd11a

Browse files
committed
refactor: enhance project configuration and refine query logic
- Update the project configuration to include additional descriptive comments for exclusions and inclusions. - Add new options for symbol information budget, language backend, line ending conventions, read-only memory patterns, ignored memory patterns, and language server-specific settings in the project configuration. - Modify the GinsQueryInt64 function to change its logic to GinsQueryBool, parsing boolean values instead of integers from the query string. Signed-off-by: ysicing <i@ysicing.me>
1 parent 2149324 commit e1cd11a

2 files changed

Lines changed: 43 additions & 4 deletions

File tree

.serena/project.yml

Lines changed: 41 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@ ignored_paths: []
4545
# Added on 2025-04-18
4646
read_only: false
4747

48-
# list of tool names to exclude. We recommend not excluding any tools, see the readme for more details.
48+
# list of tool names to exclude.
49+
# This extends the existing exclusions (e.g. from the global configuration)
50+
#
4951
# Below is the complete list of tools for convenience.
5052
# To make sure you have the latest list of tools, and to view their descriptions,
5153
# execute `uv run scripts/print_tool_overview.py`.
@@ -86,7 +88,8 @@ read_only: false
8688
# * `write_memory`: Writes a named memory (for future reference) to Serena's project-specific memory store.
8789
excluded_tools: []
8890

89-
# list of tools to include that would otherwise be disabled (particularly optional tools that are disabled by default)
91+
# list of tools to include that would otherwise be disabled (particularly optional tools that are disabled by default).
92+
# This extends the existing inclusions (e.g. from the global configuration).
9093
included_optional_tools: []
9194

9295
# fixed set of tools to use as the base tool set (if non-empty), replacing Serena's default set of tools.
@@ -111,3 +114,39 @@ default_modes:
111114
# initial prompt for the project. It will always be given to the LLM upon activating the project
112115
# (contrary to the memories, which are loaded on demand).
113116
initial_prompt: ""
117+
118+
# time budget (seconds) per tool call for the retrieval of additional symbol information
119+
# such as docstrings or parameter information.
120+
# This overrides the corresponding setting in the global configuration; see the documentation there.
121+
# If null or missing, use the setting from the global configuration.
122+
symbol_info_budget:
123+
124+
# The language backend to use for this project.
125+
# If not set, the global setting from serena_config.yml is used.
126+
# Valid values: LSP, JetBrains
127+
# Note: the backend is fixed at startup. If a project with a different backend
128+
# is activated post-init, an error will be returned.
129+
language_backend:
130+
131+
# line ending convention to use when writing source files.
132+
# Possible values: unset (use global setting), "lf", "crlf", or "native" (platform default)
133+
# This does not affect Serena's own files (e.g. memories and configuration files), which always use native line endings.
134+
line_ending:
135+
136+
# list of regex patterns which, when matched, mark a memory entry as read‑only.
137+
# Extends the list from the global configuration, merging the two lists.
138+
read_only_memory_patterns: []
139+
140+
# list of regex patterns for memories to completely ignore.
141+
# Matching memories will not appear in list_memories or activate_project output
142+
# and cannot be accessed via read_memory or write_memory.
143+
# To access ignored memory files, use the read_file tool on the raw file path.
144+
# Extends the list from the global configuration, merging the two lists.
145+
# Example: ["_archive/.*", "_episodes/.*"]
146+
ignored_memory_patterns: []
147+
148+
# advanced configuration option allowing to configure language server-specific options.
149+
# Maps the language key to the options.
150+
# Have a look at the docstring of the constructors of the LS implementations within solidlsp (e.g., for C# or PHP) to see which options are available.
151+
# No documentation on options means no options are available.
152+
ls_specific_settings: {}

exgin/req.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,11 @@ func GinsQueryInt64(c *gin.Context, key string, defaultVal ...int64) int64 {
7575
func GinsQueryBool(c *gin.Context, key string, defaultVal ...bool) bool {
7676
strv := c.Query(key)
7777
if strv != "" {
78-
intv, err := strconv.Atoi(strv)
78+
boolv, err := strconv.ParseBool(strv)
7979
if err != nil {
8080
return false
8181
}
82-
return intv == 1
82+
return boolv
8383
}
8484

8585
if len(defaultVal) == 0 {

0 commit comments

Comments
 (0)