Skip to content
Open
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
1 change: 1 addition & 0 deletions form.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ form:
attributes:
auto_modules_app_code_server:
default: false
help: "GitHub Copilot is available in newer versions of Code Server. You are responsible for ensuring your use complies with your institution's AI data policies."
working_dir:
widget: "path_selector"
label: "Working Directory"
Expand Down
35 changes: 35 additions & 0 deletions template/script.sh.erb
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,41 @@ if [[ -f "$CPP_FILE" ]]; then
mv "$CPP_FILE".new "$CPP_FILE"
fi

# Create an empty settings file if one doesn't exist
USER_SETTINGS_DIR="$CODE_SERVER_DATAROOT/User"
USER_SETTINGS_FILE="$USER_SETTINGS_DIR/settings.json"

mkdir -p "$USER_SETTINGS_DIR"

if [[ ! -f "$USER_SETTINGS_FILE" ]]; then
echo '{}' > "$USER_SETTINGS_FILE"
fi

# Merge default settings into the user's settings
# User settings take precedence
jq -s '.[0] * .[1]' \
<(cat <<'EOF'
{
"search.followSymlinks": false,
"search.exclude": {
"**/.git": true,
"**/node_modules": true,
"**/scratch": true
},
"telemetry.telemetryLevel": "off",
"chat.disableAIFeatures": true,
"chat.agent.enabled": false,
"chat.commandCenter.enabled": false,
"workbench.settings.showAISearchToggle": false,
"terminal.integrated.initialHint": false
}
EOF
) \
"$USER_SETTINGS_FILE" \
> "$USER_SETTINGS_FILE.new"

mv "$USER_SETTINGS_FILE.new" "$USER_SETTINGS_FILE"

#
# Start Code Server.
#
Expand Down
2 changes: 1 addition & 1 deletion view.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
})();
</script>

<% if code_server_version == '4.8.3' %>
<% if Gem::Version.new(code_server_version) >= Gem::Version.new('4.8.3') %>
<form id="<%= form_id %>" action="/rnode/<%= host %>/<%= port %>/login?to=" method="post" target="_blank">
<input type="hidden" name="password" value="<%= password %>">
<% else %>
Expand Down