Petr Tsvetkov
commited on
Commit
•
68731ca
0
Parent(s):
Commit rewriting application
Browse files- .gitignore +282 -0
- README.md +6 -0
- app.py +201 -0
- data_loader.py +22 -0
- head.html +31 -0
- requirements.txt +79 -0
- style_overrides.css +905 -0
- survey_guide.md +19 -0
.gitignore
ADDED
@@ -0,0 +1,282 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Created by https://www.toptal.com/developers/gitignore/api/pycharm+all,venv,python
|
2 |
+
# Edit at https://www.toptal.com/developers/gitignore?templates=pycharm+all,venv,python
|
3 |
+
|
4 |
+
### PyCharm+all ###
|
5 |
+
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
|
6 |
+
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
|
7 |
+
|
8 |
+
# User-specific stuff
|
9 |
+
.idea/**/workspace.xml
|
10 |
+
.idea/**/tasks.xml
|
11 |
+
.idea/**/usage.statistics.xml
|
12 |
+
.idea/**/dictionaries
|
13 |
+
.idea/**/shelf
|
14 |
+
|
15 |
+
# AWS User-specific
|
16 |
+
.idea/**/aws.xml
|
17 |
+
|
18 |
+
# Generated files
|
19 |
+
.idea/**/contentModel.xml
|
20 |
+
|
21 |
+
# Sensitive or high-churn files
|
22 |
+
.idea/**/dataSources/
|
23 |
+
.idea/**/dataSources.ids
|
24 |
+
.idea/**/dataSources.local.xml
|
25 |
+
.idea/**/sqlDataSources.xml
|
26 |
+
.idea/**/dynamic.xml
|
27 |
+
.idea/**/uiDesigner.xml
|
28 |
+
.idea/**/dbnavigator.xml
|
29 |
+
|
30 |
+
# Gradle
|
31 |
+
.idea/**/gradle.xml
|
32 |
+
.idea/**/libraries
|
33 |
+
|
34 |
+
# Gradle and Maven with auto-import
|
35 |
+
# When using Gradle or Maven with auto-import, you should exclude module files,
|
36 |
+
# since they will be recreated, and may cause churn. Uncomment if using
|
37 |
+
# auto-import.
|
38 |
+
# .idea/artifacts
|
39 |
+
# .idea/compiler.xml
|
40 |
+
# .idea/jarRepositories.xml
|
41 |
+
# .idea/modules.xml
|
42 |
+
# .idea/*.iml
|
43 |
+
# .idea/modules
|
44 |
+
# *.iml
|
45 |
+
# *.ipr
|
46 |
+
|
47 |
+
# CMake
|
48 |
+
cmake-build-*/
|
49 |
+
|
50 |
+
# Mongo Explorer plugin
|
51 |
+
.idea/**/mongoSettings.xml
|
52 |
+
|
53 |
+
# File-based project format
|
54 |
+
*.iws
|
55 |
+
|
56 |
+
# IntelliJ
|
57 |
+
out/
|
58 |
+
|
59 |
+
# mpeltonen/sbt-idea plugin
|
60 |
+
.idea_modules/
|
61 |
+
|
62 |
+
# JIRA plugin
|
63 |
+
atlassian-ide-plugin.xml
|
64 |
+
|
65 |
+
# Cursive Clojure plugin
|
66 |
+
.idea/replstate.xml
|
67 |
+
|
68 |
+
# SonarLint plugin
|
69 |
+
.idea/sonarlint/
|
70 |
+
|
71 |
+
# Crashlytics plugin (for Android Studio and IntelliJ)
|
72 |
+
com_crashlytics_export_strings.xml
|
73 |
+
crashlytics.properties
|
74 |
+
crashlytics-build.properties
|
75 |
+
fabric.properties
|
76 |
+
|
77 |
+
# Editor-based Rest Client
|
78 |
+
.idea/httpRequests
|
79 |
+
|
80 |
+
# Android studio 3.1+ serialized cache file
|
81 |
+
.idea/caches/build_file_checksums.ser
|
82 |
+
|
83 |
+
### PyCharm+all Patch ###
|
84 |
+
# Ignore everything but code style settings and run configurations
|
85 |
+
# that are supposed to be shared within teams.
|
86 |
+
|
87 |
+
.idea/*
|
88 |
+
|
89 |
+
!.idea/codeStyles
|
90 |
+
!.idea/runConfigurations
|
91 |
+
|
92 |
+
### Python ###
|
93 |
+
# Byte-compiled / optimized / DLL files
|
94 |
+
__pycache__/
|
95 |
+
*.py[cod]
|
96 |
+
*$py.class
|
97 |
+
|
98 |
+
# C extensions
|
99 |
+
*.so
|
100 |
+
|
101 |
+
# Distribution / packaging
|
102 |
+
.Python
|
103 |
+
build/
|
104 |
+
develop-eggs/
|
105 |
+
dist/
|
106 |
+
downloads/
|
107 |
+
eggs/
|
108 |
+
.eggs/
|
109 |
+
lib/
|
110 |
+
lib64/
|
111 |
+
parts/
|
112 |
+
sdist/
|
113 |
+
var/
|
114 |
+
wheels/
|
115 |
+
share/python-wheels/
|
116 |
+
*.egg-info/
|
117 |
+
.installed.cfg
|
118 |
+
*.egg
|
119 |
+
MANIFEST
|
120 |
+
|
121 |
+
# PyInstaller
|
122 |
+
# Usually these files are written by a python script from a template
|
123 |
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
124 |
+
*.manifest
|
125 |
+
*.spec
|
126 |
+
|
127 |
+
# Installer logs
|
128 |
+
pip-log.txt
|
129 |
+
pip-delete-this-directory.txt
|
130 |
+
|
131 |
+
# Unit test / coverage reports
|
132 |
+
htmlcov/
|
133 |
+
.tox/
|
134 |
+
.nox/
|
135 |
+
.coverage
|
136 |
+
.coverage.*
|
137 |
+
.cache
|
138 |
+
nosetests.xml
|
139 |
+
coverage.xml
|
140 |
+
*.cover
|
141 |
+
*.py,cover
|
142 |
+
.hypothesis/
|
143 |
+
.pytest_cache/
|
144 |
+
cover/
|
145 |
+
|
146 |
+
# Translations
|
147 |
+
*.mo
|
148 |
+
*.pot
|
149 |
+
|
150 |
+
# Django stuff:
|
151 |
+
*.log
|
152 |
+
local_settings.py
|
153 |
+
db.sqlite3
|
154 |
+
db.sqlite3-journal
|
155 |
+
|
156 |
+
# Flask stuff:
|
157 |
+
instance/
|
158 |
+
.webassets-cache
|
159 |
+
|
160 |
+
# Scrapy stuff:
|
161 |
+
.scrapy
|
162 |
+
|
163 |
+
# Sphinx documentation
|
164 |
+
docs/_build/
|
165 |
+
|
166 |
+
# PyBuilder
|
167 |
+
.pybuilder/
|
168 |
+
target/
|
169 |
+
|
170 |
+
# Jupyter Notebook
|
171 |
+
.ipynb_checkpoints
|
172 |
+
|
173 |
+
# IPython
|
174 |
+
profile_default/
|
175 |
+
ipython_config.py
|
176 |
+
|
177 |
+
# pyenv
|
178 |
+
# For a library or package, you might want to ignore these files since the code is
|
179 |
+
# intended to run in multiple environments; otherwise, check them in:
|
180 |
+
# .python-version
|
181 |
+
|
182 |
+
# pipenv
|
183 |
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
184 |
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
185 |
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
186 |
+
# install all needed dependencies.
|
187 |
+
#Pipfile.lock
|
188 |
+
|
189 |
+
# poetry
|
190 |
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
191 |
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
192 |
+
# commonly ignored for libraries.
|
193 |
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
194 |
+
#poetry.lock
|
195 |
+
|
196 |
+
# pdm
|
197 |
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
198 |
+
#pdm.lock
|
199 |
+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
|
200 |
+
# in version control.
|
201 |
+
# https://pdm.fming.dev/#use-with-ide
|
202 |
+
.pdm.toml
|
203 |
+
|
204 |
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
205 |
+
__pypackages__/
|
206 |
+
|
207 |
+
# Celery stuff
|
208 |
+
celerybeat-schedule
|
209 |
+
celerybeat.pid
|
210 |
+
|
211 |
+
# SageMath parsed files
|
212 |
+
*.sage.py
|
213 |
+
|
214 |
+
# Environments
|
215 |
+
.env
|
216 |
+
.venv
|
217 |
+
env/
|
218 |
+
venv/
|
219 |
+
ENV/
|
220 |
+
env.bak/
|
221 |
+
venv.bak/
|
222 |
+
|
223 |
+
# Spyder project settings
|
224 |
+
.spyderproject
|
225 |
+
.spyproject
|
226 |
+
|
227 |
+
# Rope project settings
|
228 |
+
.ropeproject
|
229 |
+
|
230 |
+
# mkdocs documentation
|
231 |
+
/site
|
232 |
+
|
233 |
+
# mypy
|
234 |
+
.mypy_cache/
|
235 |
+
.dmypy.json
|
236 |
+
dmypy.json
|
237 |
+
|
238 |
+
# Pyre type checker
|
239 |
+
.pyre/
|
240 |
+
|
241 |
+
# pytype static type analyzer
|
242 |
+
.pytype/
|
243 |
+
|
244 |
+
# Cython debug symbols
|
245 |
+
cython_debug/
|
246 |
+
|
247 |
+
# PyCharm
|
248 |
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
249 |
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
250 |
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
251 |
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
252 |
+
#.idea/
|
253 |
+
|
254 |
+
### Python Patch ###
|
255 |
+
# Poetry local configuration file - https://python-poetry.org/docs/configuration/#local-configuration
|
256 |
+
poetry.toml
|
257 |
+
|
258 |
+
# ruff
|
259 |
+
.ruff_cache/
|
260 |
+
|
261 |
+
# LSP config files
|
262 |
+
pyrightconfig.json
|
263 |
+
|
264 |
+
### venv ###
|
265 |
+
# Virtualenv
|
266 |
+
# http://iamzed.com/2009/05/07/a-primer-on-virtualenv/
|
267 |
+
[Bb]in
|
268 |
+
[Ii]nclude
|
269 |
+
[Ll]ib
|
270 |
+
[Ll]ib64
|
271 |
+
[Ll]ocal
|
272 |
+
[Ss]cripts
|
273 |
+
pyvenv.cfg
|
274 |
+
pip-selfcheck.json
|
275 |
+
|
276 |
+
# End of https://www.toptal.com/developers/gitignore/api/pycharm+all,venv,python
|
277 |
+
|
278 |
+
.idea
|
279 |
+
|
280 |
+
cache
|
281 |
+
feedback
|
282 |
+
flagged
|
README.md
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
title: commit-rewriting
|
3 |
+
app_file: app.py
|
4 |
+
sdk: gradio
|
5 |
+
sdk_version: 4.15.0
|
6 |
+
---
|
app.py
ADDED
@@ -0,0 +1,201 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import os
|
2 |
+
import random
|
3 |
+
import uuid
|
4 |
+
from datetime import datetime
|
5 |
+
from difflib import ndiff
|
6 |
+
|
7 |
+
import gradio as gr
|
8 |
+
|
9 |
+
from data_loader import load_data
|
10 |
+
|
11 |
+
HF_TOKEN = os.environ.get('HF_REWRITING_TOKEN')
|
12 |
+
HF_DATASET = os.environ.get('HF_REWRITING_DATASET')
|
13 |
+
N_QUESTIONS = 5
|
14 |
+
|
15 |
+
data = load_data()
|
16 |
+
|
17 |
+
n_samples = len(data)
|
18 |
+
|
19 |
+
saver = gr.HuggingFaceDatasetSaver(HF_TOKEN, HF_DATASET, private=True)
|
20 |
+
|
21 |
+
|
22 |
+
def convert_diff_to_unified(diff):
|
23 |
+
result = "\n".join(
|
24 |
+
[
|
25 |
+
f'--- {modified_file["old_path"]}\n'
|
26 |
+
f'+++ {modified_file["new_path"]}\n'
|
27 |
+
f'{modified_file["diff"]}'
|
28 |
+
for modified_file in diff
|
29 |
+
]
|
30 |
+
)
|
31 |
+
|
32 |
+
return result
|
33 |
+
|
34 |
+
|
35 |
+
def get_diff2html_view(raw_diff):
|
36 |
+
html = f"""
|
37 |
+
<div style='width:100%; height:1400px; overflow:auto; position: relative'>
|
38 |
+
<div id='diff-raw' hidden>{raw_diff}</div>
|
39 |
+
<div class="d2h-view-wrapper">
|
40 |
+
<div id='diff-view'></div>
|
41 |
+
</div>
|
42 |
+
</div>
|
43 |
+
"""
|
44 |
+
|
45 |
+
return html
|
46 |
+
|
47 |
+
|
48 |
+
def get_github_link_md(repo, hash):
|
49 |
+
return f'[See the commit on Github](https://github.com/{repo}/commit/{hash})'
|
50 |
+
|
51 |
+
|
52 |
+
def char_diff_obj(change_type, pos, character, timestamp):
|
53 |
+
return {"type": change_type, "pos": pos, "char": character, "timestamp": timestamp}
|
54 |
+
|
55 |
+
|
56 |
+
def update_commit_view(sample_ind):
|
57 |
+
if sample_ind >= n_samples:
|
58 |
+
return None
|
59 |
+
|
60 |
+
record = data[sample_ind]
|
61 |
+
|
62 |
+
diff_view = get_diff2html_view(convert_diff_to_unified(record['mods']))
|
63 |
+
|
64 |
+
repo_val = record['repo']
|
65 |
+
hash_val = record['hash']
|
66 |
+
github_link_md = get_github_link_md(repo_val, hash_val)
|
67 |
+
|
68 |
+
diff_loaded_timestamp = datetime.now().isoformat()
|
69 |
+
|
70 |
+
commit_message = record['prediction']
|
71 |
+
commit_message_start = commit_message
|
72 |
+
commit_message_prev = commit_message
|
73 |
+
commit_message_history = []
|
74 |
+
|
75 |
+
return (
|
76 |
+
github_link_md, diff_view, repo_val, hash_val, diff_loaded_timestamp,
|
77 |
+
commit_message_start, commit_message, commit_message_prev, commit_message_history)
|
78 |
+
|
79 |
+
|
80 |
+
def next_sample(current_sample_ind, shuffled_idx):
|
81 |
+
if current_sample_ind == n_samples:
|
82 |
+
return None
|
83 |
+
|
84 |
+
current_sample_ind += 1
|
85 |
+
updated_view = update_commit_view(shuffled_idx[current_sample_ind])
|
86 |
+
return (current_sample_ind,) + updated_view
|
87 |
+
|
88 |
+
|
89 |
+
with open("head.html") as head_file:
|
90 |
+
head_html = head_file.read()
|
91 |
+
|
92 |
+
with gr.Blocks(theme=gr.themes.Soft(), head=head_html, css="style_overrides.css") as application:
|
93 |
+
repo_val = gr.Textbox(interactive=False, label='repo', visible=False)
|
94 |
+
hash_val = gr.Textbox(interactive=False, label='hash', visible=False)
|
95 |
+
shuffled_idx_val = gr.JSON(visible=False)
|
96 |
+
|
97 |
+
with gr.Row():
|
98 |
+
with gr.Accordion("Help"):
|
99 |
+
with open("survey_guide.md") as content_file:
|
100 |
+
gr.Markdown(content_file.read())
|
101 |
+
|
102 |
+
with gr.Row():
|
103 |
+
current_sample_sld = gr.Slider(minimum=0, maximum=n_samples, step=1,
|
104 |
+
value=0,
|
105 |
+
interactive=False,
|
106 |
+
label='sample_ind',
|
107 |
+
info=f"Samples labeled/skipped (out of {n_samples})",
|
108 |
+
show_label=False,
|
109 |
+
container=False,
|
110 |
+
scale=5)
|
111 |
+
with gr.Column(scale=1):
|
112 |
+
skip_btn = gr.Button("Skip the current sample")
|
113 |
+
with gr.Row():
|
114 |
+
with gr.Column(scale=2):
|
115 |
+
github_link = gr.Markdown()
|
116 |
+
diff_view = gr.HTML()
|
117 |
+
with gr.Column(scale=1):
|
118 |
+
commit_msg_start = gr.TextArea(label="commit_msg_start", visible=False)
|
119 |
+
commit_msg = gr.TextArea(label="commit_msg_end", show_label=False,
|
120 |
+
info="Commit message (can be scrollable)")
|
121 |
+
commit_msg_prev = gr.TextArea(visible=False)
|
122 |
+
commit_msg_history = gr.JSON(label="commit_msg_history", visible=False)
|
123 |
+
|
124 |
+
submit_btn = gr.Button("Submit")
|
125 |
+
|
126 |
+
session_val = gr.Textbox(info='Session', interactive=False, container=True, show_label=False,
|
127 |
+
label='session')
|
128 |
+
|
129 |
+
with gr.Row(visible=False):
|
130 |
+
sample_loaded_timestamp = gr.Textbox(info="Sample loaded", label='loaded_ts', interactive=False,
|
131 |
+
container=True, show_label=False)
|
132 |
+
now_timestamp = gr.Textbox(info="Current time",
|
133 |
+
interactive=False, container=True, show_label=False,
|
134 |
+
value=lambda: datetime.now().isoformat(), every=1.0,
|
135 |
+
label='submitted_ts')
|
136 |
+
|
137 |
+
commit_view = [
|
138 |
+
github_link,
|
139 |
+
diff_view,
|
140 |
+
repo_val,
|
141 |
+
hash_val,
|
142 |
+
sample_loaded_timestamp,
|
143 |
+
commit_msg_start,
|
144 |
+
commit_msg,
|
145 |
+
commit_msg_prev,
|
146 |
+
commit_msg_history
|
147 |
+
]
|
148 |
+
|
149 |
+
feedback_metadata = [
|
150 |
+
session_val,
|
151 |
+
repo_val,
|
152 |
+
hash_val,
|
153 |
+
sample_loaded_timestamp,
|
154 |
+
now_timestamp
|
155 |
+
]
|
156 |
+
|
157 |
+
feedback_form = [commit_msg_start, commit_msg, commit_msg_history]
|
158 |
+
|
159 |
+
saver.setup([current_sample_sld] + feedback_metadata + feedback_form, "feedback")
|
160 |
+
|
161 |
+
skip_btn.click(next_sample, inputs=[current_sample_sld, shuffled_idx_val],
|
162 |
+
outputs=[current_sample_sld] + commit_view)
|
163 |
+
|
164 |
+
|
165 |
+
def submit(current_sample, shuffled_idx, *args):
|
166 |
+
saver.flag((current_sample,) + args)
|
167 |
+
return next_sample(current_sample, shuffled_idx)
|
168 |
+
|
169 |
+
|
170 |
+
submit_btn.click(
|
171 |
+
submit,
|
172 |
+
inputs=[current_sample_sld, shuffled_idx_val] + feedback_metadata + feedback_form,
|
173 |
+
outputs=[current_sample_sld] + commit_view
|
174 |
+
)
|
175 |
+
|
176 |
+
|
177 |
+
def on_commit_msg_changed(message, prev_message, history, timestamp):
|
178 |
+
for i, s in enumerate(ndiff(prev_message, message)):
|
179 |
+
diff = char_diff_obj(s[0], i, s[-1], timestamp)
|
180 |
+
if diff['type'] in ('+', '-'):
|
181 |
+
history.append(diff)
|
182 |
+
return message, history
|
183 |
+
|
184 |
+
|
185 |
+
commit_msg.change(on_commit_msg_changed, inputs=[commit_msg, commit_msg_prev, commit_msg_history,
|
186 |
+
now_timestamp],
|
187 |
+
outputs=[commit_msg_prev, commit_msg_history])
|
188 |
+
|
189 |
+
|
190 |
+
def init_session(current_sample):
|
191 |
+
session = str(uuid.uuid4())
|
192 |
+
shuffled_idx = list(range(n_samples))
|
193 |
+
random.shuffle(shuffled_idx)
|
194 |
+
return (session, shuffled_idx) + update_commit_view(shuffled_idx[current_sample])
|
195 |
+
|
196 |
+
|
197 |
+
application.load(init_session,
|
198 |
+
inputs=[current_sample_sld],
|
199 |
+
outputs=[session_val, shuffled_idx_val] + commit_view, )
|
200 |
+
|
201 |
+
application.launch()
|
data_loader.py
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from datasets import load_dataset
|
2 |
+
|
3 |
+
MODEL = 'cmg_gpt_4_0613'
|
4 |
+
CACHE_DIR = 'cache'
|
5 |
+
|
6 |
+
|
7 |
+
def load_data():
|
8 |
+
dataset = load_dataset("JetBrains-Research/lca-cmg",
|
9 |
+
"commitchronicle-py-long",
|
10 |
+
split="test",
|
11 |
+
cache_dir=CACHE_DIR).to_pandas().set_index(['hash', 'repo']).rename(
|
12 |
+
columns={'message': 'reference'})
|
13 |
+
|
14 |
+
model_dataset = load_dataset("JetBrains-Research/lca-results",
|
15 |
+
MODEL,
|
16 |
+
split="test",
|
17 |
+
cache_dir=CACHE_DIR).to_pandas().set_index(['hash', 'repo'])[["prediction"]]
|
18 |
+
|
19 |
+
model_dataset = model_dataset[~model_dataset.index.duplicated(keep='first')]
|
20 |
+
dataset = dataset.join(other=model_dataset)
|
21 |
+
|
22 |
+
return dataset.reset_index().to_dict('records')
|
head.html
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!-- Javascripts -->
|
2 |
+
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/diff2html/bundles/js/diff2html-ui.min.js"></script>
|
3 |
+
|
4 |
+
<script>
|
5 |
+
var oldDiff = "";
|
6 |
+
|
7 |
+
function updateDiffView() {
|
8 |
+
try {
|
9 |
+
var diff = document.getElementById('diff-raw').innerHTML;
|
10 |
+
if (!diff || diff === oldDiff) {
|
11 |
+
return;
|
12 |
+
}
|
13 |
+
oldDiff = diff;
|
14 |
+
var targetElement = document.getElementById('diff-view');
|
15 |
+
var configuration = {
|
16 |
+
drawFileList: true,
|
17 |
+
matching: 'lines',
|
18 |
+
highlight: true,
|
19 |
+
colorScheme: 'light'
|
20 |
+
};
|
21 |
+
var diff2htmlUi = new Diff2HtmlUI(targetElement, diff, configuration);
|
22 |
+
diff2htmlUi.draw();
|
23 |
+
} catch (error) {
|
24 |
+
|
25 |
+
}
|
26 |
+
}
|
27 |
+
|
28 |
+
setInterval(function () {
|
29 |
+
updateDiffView();
|
30 |
+
}, 500);
|
31 |
+
</script>
|
requirements.txt
ADDED
@@ -0,0 +1,79 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
aiofiles==23.2.1
|
2 |
+
aiohttp==3.9.1
|
3 |
+
aiosignal==1.3.1
|
4 |
+
altair==5.2.0
|
5 |
+
annotated-types==0.6.0
|
6 |
+
anyio==4.2.0
|
7 |
+
async-timeout==4.0.3
|
8 |
+
attrs==23.2.0
|
9 |
+
certifi==2023.11.17
|
10 |
+
charset-normalizer==3.3.2
|
11 |
+
click==8.1.7
|
12 |
+
colorama==0.4.6
|
13 |
+
contourpy==1.2.0
|
14 |
+
cycler==0.12.1
|
15 |
+
datasets==2.16.1
|
16 |
+
dill==0.3.7
|
17 |
+
exceptiongroup==1.2.0
|
18 |
+
fastapi==0.109.0
|
19 |
+
ffmpy==0.3.1
|
20 |
+
filelock==3.13.1
|
21 |
+
fonttools==4.47.2
|
22 |
+
frozenlist==1.4.1
|
23 |
+
fsspec==2023.10.0
|
24 |
+
gradio==4.15.0
|
25 |
+
gradio_client==0.8.1
|
26 |
+
h11==0.14.0
|
27 |
+
httpcore==1.0.2
|
28 |
+
httpx==0.26.0
|
29 |
+
huggingface-hub==0.20.3
|
30 |
+
idna==3.6
|
31 |
+
importlib-resources==6.1.1
|
32 |
+
Jinja2==3.1.3
|
33 |
+
jsonschema==4.21.1
|
34 |
+
jsonschema-specifications==2023.12.1
|
35 |
+
kiwisolver==1.4.5
|
36 |
+
markdown-it-py==3.0.0
|
37 |
+
MarkupSafe==2.1.4
|
38 |
+
matplotlib==3.8.2
|
39 |
+
mdurl==0.1.2
|
40 |
+
multidict==6.0.4
|
41 |
+
multiprocess==0.70.15
|
42 |
+
numpy==1.26.3
|
43 |
+
orjson==3.9.12
|
44 |
+
packaging==23.2
|
45 |
+
pandas==2.2.0
|
46 |
+
pillow==10.2.0
|
47 |
+
pyarrow==15.0.0
|
48 |
+
pyarrow-hotfix==0.6
|
49 |
+
pydantic==2.5.3
|
50 |
+
pydantic_core==2.14.6
|
51 |
+
pydub==0.25.1
|
52 |
+
Pygments==2.17.2
|
53 |
+
pyparsing==3.1.1
|
54 |
+
python-dateutil==2.8.2
|
55 |
+
python-multipart==0.0.6
|
56 |
+
pytz==2023.3.post1
|
57 |
+
PyYAML==6.0.1
|
58 |
+
referencing==0.32.1
|
59 |
+
requests==2.31.0
|
60 |
+
rich==13.7.0
|
61 |
+
rpds-py==0.17.1
|
62 |
+
ruff==0.1.14
|
63 |
+
semantic-version==2.10.0
|
64 |
+
shellingham==1.5.4
|
65 |
+
six==1.16.0
|
66 |
+
sniffio==1.3.0
|
67 |
+
starlette==0.35.1
|
68 |
+
tomlkit==0.12.0
|
69 |
+
toolz==0.12.0
|
70 |
+
tqdm==4.66.1
|
71 |
+
typer==0.9.0
|
72 |
+
typing_extensions==4.9.0
|
73 |
+
tzdata==2023.4
|
74 |
+
urllib3==2.1.0
|
75 |
+
uvicorn==0.27.0
|
76 |
+
websockets==11.0.3
|
77 |
+
xxhash==3.4.1
|
78 |
+
yarl==1.9.4
|
79 |
+
zipp==3.17.0
|
style_overrides.css
ADDED
@@ -0,0 +1,905 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
:host, :root {
|
2 |
+
--d2h-bg-color: #fff;
|
3 |
+
--d2h-border-color: #ddd;
|
4 |
+
--d2h-dim-color: rgba(0, 0, 0, .3);
|
5 |
+
--d2h-line-border-color: #eee;
|
6 |
+
--d2h-file-header-bg-color: #f7f7f7;
|
7 |
+
--d2h-file-header-border-color: #d8d8d8;
|
8 |
+
--d2h-empty-placeholder-bg-color: #f1f1f1;
|
9 |
+
--d2h-empty-placeholder-border-color: #e1e1e1;
|
10 |
+
--d2h-selected-color: #c8e1ff;
|
11 |
+
--d2h-ins-bg-color: #dfd;
|
12 |
+
--d2h-ins-border-color: #b4e2b4;
|
13 |
+
--d2h-ins-highlight-bg-color: #97f295;
|
14 |
+
--d2h-ins-label-color: #399839;
|
15 |
+
--d2h-del-bg-color: #fee8e9;
|
16 |
+
--d2h-del-border-color: #e9aeae;
|
17 |
+
--d2h-del-highlight-bg-color: #ffb6ba;
|
18 |
+
--d2h-del-label-color: #c33;
|
19 |
+
--d2h-change-del-color: #fdf2d0;
|
20 |
+
--d2h-change-ins-color: #ded;
|
21 |
+
--d2h-info-bg-color: #f8fafd;
|
22 |
+
--d2h-info-border-color: #d5e4f2;
|
23 |
+
--d2h-change-label-color: #d0b44c;
|
24 |
+
--d2h-moved-label-color: #3572b0;
|
25 |
+
--d2h-dark-color: #e6edf3;
|
26 |
+
--d2h-dark-bg-color: #0d1117;
|
27 |
+
--d2h-dark-border-color: #30363d;
|
28 |
+
--d2h-dark-dim-color: #6e7681;
|
29 |
+
--d2h-dark-line-border-color: #21262d;
|
30 |
+
--d2h-dark-file-header-bg-color: #161b22;
|
31 |
+
--d2h-dark-file-header-border-color: #30363d;
|
32 |
+
--d2h-dark-empty-placeholder-bg-color: hsla(215, 8%, 47%, .1);
|
33 |
+
--d2h-dark-empty-placeholder-border-color: #30363d;
|
34 |
+
--d2h-dark-selected-color: rgba(56, 139, 253, .1);
|
35 |
+
--d2h-dark-ins-bg-color: rgba(46, 160, 67, .15);
|
36 |
+
--d2h-dark-ins-border-color: rgba(46, 160, 67, .4);
|
37 |
+
--d2h-dark-ins-highlight-bg-color: rgba(46, 160, 67, .4);
|
38 |
+
--d2h-dark-ins-label-color: #3fb950;
|
39 |
+
--d2h-dark-del-bg-color: rgba(248, 81, 73, .1);
|
40 |
+
--d2h-dark-del-border-color: rgba(248, 81, 73, .4);
|
41 |
+
--d2h-dark-del-highlight-bg-color: rgba(248, 81, 73, .4);
|
42 |
+
--d2h-dark-del-label-color: #f85149;
|
43 |
+
--d2h-dark-change-del-color: rgba(210, 153, 34, .2);
|
44 |
+
--d2h-dark-change-ins-color: rgba(46, 160, 67, .25);
|
45 |
+
--d2h-dark-info-bg-color: rgba(56, 139, 253, .1);
|
46 |
+
--d2h-dark-info-border-color: rgba(56, 139, 253, .4);
|
47 |
+
--d2h-dark-change-label-color: #d29922;
|
48 |
+
--d2h-dark-moved-label-color: #3572b0
|
49 |
+
}
|
50 |
+
|
51 |
+
.gradio-container .main .d2h-view-wrapper {
|
52 |
+
* {
|
53 |
+
all: revert;
|
54 |
+
}
|
55 |
+
|
56 |
+
#diff-view {
|
57 |
+
pre code.hljs {
|
58 |
+
display: block;
|
59 |
+
overflow-x: auto;
|
60 |
+
padding: 1em
|
61 |
+
}
|
62 |
+
|
63 |
+
code.hljs {
|
64 |
+
padding: 3px 5px
|
65 |
+
}
|
66 |
+
|
67 |
+
|
68 |
+
/*!
|
69 |
+
Theme: GitHub
|
70 |
+
Description: Light theme as seen on github.com
|
71 |
+
Author: github.com
|
72 |
+
Maintainer: @Hirse
|
73 |
+
Updated: 2021-05-15
|
74 |
+
|
75 |
+
Outdated base version: https://github.com/primer/github-syntax-light
|
76 |
+
Current colors taken from GitHub's CSS
|
77 |
+
*/
|
78 |
+
|
79 |
+
.hljs {
|
80 |
+
color: #24292e;
|
81 |
+
background: #fff
|
82 |
+
}
|
83 |
+
|
84 |
+
.hljs-doctag, .hljs-keyword, .hljs-meta .hljs-keyword, .hljs-template-tag, .hljs-template-variable, .hljs-type, .hljs-variable.language_ {
|
85 |
+
color: #d73a49
|
86 |
+
}
|
87 |
+
|
88 |
+
.hljs-title, .hljs-title.class_, .hljs-title.class_.inherited__, .hljs-title.function_ {
|
89 |
+
color: #6f42c1
|
90 |
+
}
|
91 |
+
|
92 |
+
.hljs-attr, .hljs-attribute, .hljs-literal, .hljs-meta, .hljs-number, .hljs-operator, .hljs-selector-attr, .hljs-selector-class, .hljs-selector-id, .hljs-variable {
|
93 |
+
color: #005cc5
|
94 |
+
}
|
95 |
+
|
96 |
+
.hljs-meta .hljs-string, .hljs-regexp, .hljs-string {
|
97 |
+
color: #032f62
|
98 |
+
}
|
99 |
+
|
100 |
+
.hljs-built_in, .hljs-symbol {
|
101 |
+
color: #e36209
|
102 |
+
}
|
103 |
+
|
104 |
+
.hljs-code, .hljs-comment, .hljs-formula {
|
105 |
+
color: #6a737d
|
106 |
+
}
|
107 |
+
|
108 |
+
.hljs-name, .hljs-quote, .hljs-selector-pseudo, .hljs-selector-tag {
|
109 |
+
color: #22863a
|
110 |
+
}
|
111 |
+
|
112 |
+
.hljs-subst {
|
113 |
+
color: #24292e
|
114 |
+
}
|
115 |
+
|
116 |
+
.hljs-section {
|
117 |
+
color: #005cc5;
|
118 |
+
font-weight: 700
|
119 |
+
}
|
120 |
+
|
121 |
+
.hljs-bullet {
|
122 |
+
color: #735c0f
|
123 |
+
}
|
124 |
+
|
125 |
+
.hljs-emphasis {
|
126 |
+
color: #24292e;
|
127 |
+
font-style: italic
|
128 |
+
}
|
129 |
+
|
130 |
+
.hljs-strong {
|
131 |
+
color: #24292e;
|
132 |
+
font-weight: 700
|
133 |
+
}
|
134 |
+
|
135 |
+
.hljs-addition {
|
136 |
+
color: #22863a;
|
137 |
+
background-color: #f0fff4
|
138 |
+
}
|
139 |
+
|
140 |
+
.hljs-deletion {
|
141 |
+
color: #b31d28;
|
142 |
+
background-color: #ffeef0
|
143 |
+
}
|
144 |
+
|
145 |
+
|
146 |
+
.d2h-wrapper {
|
147 |
+
text-align: left
|
148 |
+
}
|
149 |
+
|
150 |
+
.d2h-file-header {
|
151 |
+
background-color: #f7f7f7;
|
152 |
+
background-color: var(--d2h-file-header-bg-color);
|
153 |
+
border-bottom: 1px solid #d8d8d8;
|
154 |
+
border-bottom: 1px solid var(--d2h-file-header-border-color);
|
155 |
+
display: -webkit-box;
|
156 |
+
display: -ms-flexbox;
|
157 |
+
display: flex;
|
158 |
+
font-family: Source Sans Pro, Helvetica Neue, Helvetica, Arial, sans-serif;
|
159 |
+
height: 35px;
|
160 |
+
padding: 5px 10px
|
161 |
+
}
|
162 |
+
|
163 |
+
.d2h-file-header.d2h-sticky-header {
|
164 |
+
position: sticky;
|
165 |
+
top: 0;
|
166 |
+
z-index: 1
|
167 |
+
}
|
168 |
+
|
169 |
+
.d2h-file-stats {
|
170 |
+
display: -webkit-box;
|
171 |
+
display: -ms-flexbox;
|
172 |
+
display: flex;
|
173 |
+
font-size: 14px;
|
174 |
+
margin-left: auto
|
175 |
+
}
|
176 |
+
|
177 |
+
.d2h-lines-added {
|
178 |
+
border: 1px solid #b4e2b4;
|
179 |
+
border: 1px solid var(--d2h-ins-border-color);
|
180 |
+
border-radius: 5px 0 0 5px;
|
181 |
+
color: #399839;
|
182 |
+
color: var(--d2h-ins-label-color);
|
183 |
+
padding: 2px;
|
184 |
+
text-align: right;
|
185 |
+
vertical-align: middle
|
186 |
+
}
|
187 |
+
|
188 |
+
.d2h-lines-deleted {
|
189 |
+
border: 1px solid #e9aeae;
|
190 |
+
border: 1px solid var(--d2h-del-border-color);
|
191 |
+
border-radius: 0 5px 5px 0;
|
192 |
+
color: #c33;
|
193 |
+
color: var(--d2h-del-label-color);
|
194 |
+
margin-left: 1px;
|
195 |
+
padding: 2px;
|
196 |
+
text-align: left;
|
197 |
+
vertical-align: middle
|
198 |
+
}
|
199 |
+
|
200 |
+
.d2h-file-name-wrapper {
|
201 |
+
display: -webkit-box;
|
202 |
+
display: -ms-flexbox;
|
203 |
+
display: flex;
|
204 |
+
-webkit-box-align: center;
|
205 |
+
-ms-flex-align: center;
|
206 |
+
align-items: center;
|
207 |
+
font-size: 15px;
|
208 |
+
width: 100%
|
209 |
+
}
|
210 |
+
|
211 |
+
.d2h-file-name {
|
212 |
+
overflow-x: hidden;
|
213 |
+
text-overflow: ellipsis;
|
214 |
+
white-space: nowrap
|
215 |
+
}
|
216 |
+
|
217 |
+
.d2h-file-wrapper {
|
218 |
+
border: 1px solid #ddd;
|
219 |
+
border: 1px solid var(--d2h-border-color);
|
220 |
+
border-radius: 3px;
|
221 |
+
margin-bottom: 1em
|
222 |
+
}
|
223 |
+
|
224 |
+
.d2h-file-collapse {
|
225 |
+
-webkit-box-pack: end;
|
226 |
+
-ms-flex-pack: end;
|
227 |
+
cursor: pointer;
|
228 |
+
display: none;
|
229 |
+
font-size: 12px;
|
230 |
+
justify-content: flex-end;
|
231 |
+
-webkit-box-align: center;
|
232 |
+
-ms-flex-align: center;
|
233 |
+
align-items: center;
|
234 |
+
border: 1px solid #ddd;
|
235 |
+
border: 1px solid var(--d2h-border-color);
|
236 |
+
border-radius: 3px;
|
237 |
+
padding: 4px 8px
|
238 |
+
}
|
239 |
+
|
240 |
+
.d2h-file-collapse.d2h-selected {
|
241 |
+
background-color: #c8e1ff;
|
242 |
+
background-color: var(--d2h-selected-color)
|
243 |
+
}
|
244 |
+
|
245 |
+
.d2h-file-collapse-input {
|
246 |
+
margin: 0 4px 0 0
|
247 |
+
}
|
248 |
+
|
249 |
+
.d2h-diff-table {
|
250 |
+
border-collapse: collapse;
|
251 |
+
font-family: Menlo, Consolas, monospace;
|
252 |
+
font-size: 13px;
|
253 |
+
width: 100%
|
254 |
+
}
|
255 |
+
|
256 |
+
.d2h-files-diff {
|
257 |
+
display: -webkit-box;
|
258 |
+
display: -ms-flexbox;
|
259 |
+
display: flex;
|
260 |
+
width: 100%
|
261 |
+
}
|
262 |
+
|
263 |
+
.d2h-file-diff {
|
264 |
+
overflow-y: hidden
|
265 |
+
}
|
266 |
+
|
267 |
+
.d2h-file-diff.d2h-d-none, .d2h-files-diff.d2h-d-none {
|
268 |
+
display: none
|
269 |
+
}
|
270 |
+
|
271 |
+
.d2h-file-side-diff {
|
272 |
+
display: inline-block;
|
273 |
+
overflow-x: scroll;
|
274 |
+
overflow-y: hidden;
|
275 |
+
width: 50%
|
276 |
+
}
|
277 |
+
|
278 |
+
.d2h-code-line {
|
279 |
+
padding: 0 8em;
|
280 |
+
width: calc(100% - 16em)
|
281 |
+
}
|
282 |
+
|
283 |
+
.d2h-code-line, .d2h-code-side-line {
|
284 |
+
display: inline-block;
|
285 |
+
-webkit-user-select: none;
|
286 |
+
-moz-user-select: none;
|
287 |
+
-ms-user-select: none;
|
288 |
+
user-select: none;
|
289 |
+
white-space: nowrap
|
290 |
+
}
|
291 |
+
|
292 |
+
.d2h-code-side-line {
|
293 |
+
padding: 0 4.5em;
|
294 |
+
width: calc(100% - 9em)
|
295 |
+
}
|
296 |
+
|
297 |
+
.d2h-code-line-ctn {
|
298 |
+
background: none;
|
299 |
+
display: inline-block;
|
300 |
+
padding: 0;
|
301 |
+
word-wrap: normal;
|
302 |
+
-webkit-user-select: text;
|
303 |
+
-moz-user-select: text;
|
304 |
+
-ms-user-select: text;
|
305 |
+
user-select: text;
|
306 |
+
vertical-align: middle;
|
307 |
+
white-space: pre;
|
308 |
+
width: 100%
|
309 |
+
}
|
310 |
+
|
311 |
+
.d2h-code-line del, .d2h-code-side-line del {
|
312 |
+
background-color: #ffb6ba;
|
313 |
+
background-color: var(--d2h-del-highlight-bg-color)
|
314 |
+
}
|
315 |
+
|
316 |
+
.d2h-code-line del, .d2h-code-line ins, .d2h-code-side-line del, .d2h-code-side-line ins {
|
317 |
+
border-radius: .2em;
|
318 |
+
display: inline-block;
|
319 |
+
margin-top: -1px;
|
320 |
+
-webkit-text-decoration: none;
|
321 |
+
text-decoration: none
|
322 |
+
}
|
323 |
+
|
324 |
+
.d2h-code-line ins, .d2h-code-side-line ins {
|
325 |
+
background-color: #97f295;
|
326 |
+
background-color: var(--d2h-ins-highlight-bg-color);
|
327 |
+
text-align: left
|
328 |
+
}
|
329 |
+
|
330 |
+
.d2h-code-line-prefix {
|
331 |
+
background: none;
|
332 |
+
display: inline;
|
333 |
+
padding: 0;
|
334 |
+
word-wrap: normal;
|
335 |
+
white-space: pre
|
336 |
+
}
|
337 |
+
|
338 |
+
.line-num1 {
|
339 |
+
float: left
|
340 |
+
}
|
341 |
+
|
342 |
+
.line-num1, .line-num2 {
|
343 |
+
-webkit-box-sizing: border-box;
|
344 |
+
box-sizing: border-box;
|
345 |
+
overflow: hidden;
|
346 |
+
padding: 0 .5em;
|
347 |
+
text-overflow: ellipsis;
|
348 |
+
width: 3.5em
|
349 |
+
}
|
350 |
+
|
351 |
+
.line-num2 {
|
352 |
+
float: right
|
353 |
+
}
|
354 |
+
|
355 |
+
.d2h-code-linenumber {
|
356 |
+
background-color: #fff;
|
357 |
+
background-color: var(--d2h-bg-color);
|
358 |
+
border: solid #eee;
|
359 |
+
border: solid var(--d2h-line-border-color);
|
360 |
+
border-width: 0 1px;
|
361 |
+
-webkit-box-sizing: border-box;
|
362 |
+
box-sizing: border-box;
|
363 |
+
color: rgba(0, 0, 0, .3);
|
364 |
+
color: var(--d2h-dim-color);
|
365 |
+
cursor: pointer;
|
366 |
+
display: inline-block;
|
367 |
+
position: absolute;
|
368 |
+
text-align: right;
|
369 |
+
width: 7.5em
|
370 |
+
}
|
371 |
+
|
372 |
+
.d2h-code-linenumber:after {
|
373 |
+
content: "\200b"
|
374 |
+
}
|
375 |
+
|
376 |
+
.d2h-code-side-linenumber {
|
377 |
+
background-color: #fff;
|
378 |
+
background-color: var(--d2h-bg-color);
|
379 |
+
border: solid #eee;
|
380 |
+
border: solid var(--d2h-line-border-color);
|
381 |
+
border-width: 0 1px;
|
382 |
+
-webkit-box-sizing: border-box;
|
383 |
+
box-sizing: border-box;
|
384 |
+
color: rgba(0, 0, 0, .3);
|
385 |
+
color: var(--d2h-dim-color);
|
386 |
+
cursor: pointer;
|
387 |
+
display: inline-block;
|
388 |
+
overflow: hidden;
|
389 |
+
padding: 0 .5em;
|
390 |
+
position: absolute;
|
391 |
+
text-align: right;
|
392 |
+
text-overflow: ellipsis;
|
393 |
+
width: 4em
|
394 |
+
}
|
395 |
+
|
396 |
+
.d2h-code-side-linenumber:after {
|
397 |
+
content: "\200b"
|
398 |
+
}
|
399 |
+
|
400 |
+
.d2h-code-side-emptyplaceholder, .d2h-emptyplaceholder {
|
401 |
+
background-color: #f1f1f1;
|
402 |
+
background-color: var(--d2h-empty-placeholder-bg-color);
|
403 |
+
border-color: #e1e1e1;
|
404 |
+
border-color: var(--d2h-empty-placeholder-border-color)
|
405 |
+
}
|
406 |
+
|
407 |
+
.d2h-code-line-prefix, .d2h-code-linenumber, .d2h-code-side-linenumber, .d2h-emptyplaceholder {
|
408 |
+
-webkit-user-select: none;
|
409 |
+
-moz-user-select: none;
|
410 |
+
-ms-user-select: none;
|
411 |
+
user-select: none
|
412 |
+
}
|
413 |
+
|
414 |
+
.d2h-code-linenumber, .d2h-code-side-linenumber {
|
415 |
+
direction: rtl
|
416 |
+
}
|
417 |
+
|
418 |
+
.d2h-del {
|
419 |
+
background-color: #fee8e9;
|
420 |
+
background-color: var(--d2h-del-bg-color);
|
421 |
+
border-color: #e9aeae;
|
422 |
+
border-color: var(--d2h-del-border-color)
|
423 |
+
}
|
424 |
+
|
425 |
+
.d2h-ins {
|
426 |
+
background-color: #dfd;
|
427 |
+
background-color: var(--d2h-ins-bg-color);
|
428 |
+
border-color: #b4e2b4;
|
429 |
+
border-color: var(--d2h-ins-border-color)
|
430 |
+
}
|
431 |
+
|
432 |
+
.d2h-info {
|
433 |
+
background-color: #f8fafd;
|
434 |
+
background-color: var(--d2h-info-bg-color);
|
435 |
+
border-color: #d5e4f2;
|
436 |
+
border-color: var(--d2h-info-border-color);
|
437 |
+
color: rgba(0, 0, 0, .3);
|
438 |
+
color: var(--d2h-dim-color)
|
439 |
+
}
|
440 |
+
|
441 |
+
.d2h-file-diff .d2h-del.d2h-change {
|
442 |
+
background-color: #fdf2d0;
|
443 |
+
background-color: var(--d2h-change-del-color)
|
444 |
+
}
|
445 |
+
|
446 |
+
.d2h-file-diff .d2h-ins.d2h-change {
|
447 |
+
background-color: #ded;
|
448 |
+
background-color: var(--d2h-change-ins-color)
|
449 |
+
}
|
450 |
+
|
451 |
+
.d2h-file-list-wrapper {
|
452 |
+
margin-bottom: 10px
|
453 |
+
}
|
454 |
+
|
455 |
+
.d2h-file-list-wrapper a {
|
456 |
+
-webkit-text-decoration: none;
|
457 |
+
text-decoration: none
|
458 |
+
}
|
459 |
+
|
460 |
+
.d2h-file-list-wrapper a, .d2h-file-list-wrapper a:visited {
|
461 |
+
color: #3572b0;
|
462 |
+
color: var(--d2h-moved-label-color)
|
463 |
+
}
|
464 |
+
|
465 |
+
.d2h-file-list-header {
|
466 |
+
text-align: left
|
467 |
+
}
|
468 |
+
|
469 |
+
.d2h-file-list-title {
|
470 |
+
font-weight: 700
|
471 |
+
}
|
472 |
+
|
473 |
+
.d2h-file-list-line {
|
474 |
+
display: -webkit-box;
|
475 |
+
display: -ms-flexbox;
|
476 |
+
display: flex;
|
477 |
+
text-align: left
|
478 |
+
}
|
479 |
+
|
480 |
+
.d2h-file-list {
|
481 |
+
display: block;
|
482 |
+
list-style: none;
|
483 |
+
margin: 0;
|
484 |
+
padding: 0
|
485 |
+
}
|
486 |
+
|
487 |
+
.d2h-file-list > li {
|
488 |
+
border-bottom: 1px solid #ddd;
|
489 |
+
border-bottom: 1px solid var(--d2h-border-color);
|
490 |
+
margin: 0;
|
491 |
+
padding: 5px 10px
|
492 |
+
}
|
493 |
+
|
494 |
+
.d2h-file-list > li:last-child {
|
495 |
+
border-bottom: none
|
496 |
+
}
|
497 |
+
|
498 |
+
.d2h-file-switch {
|
499 |
+
cursor: pointer;
|
500 |
+
display: none;
|
501 |
+
font-size: 10px
|
502 |
+
}
|
503 |
+
|
504 |
+
.d2h-icon {
|
505 |
+
margin-right: 10px;
|
506 |
+
vertical-align: middle;
|
507 |
+
fill: currentColor
|
508 |
+
}
|
509 |
+
|
510 |
+
.d2h-deleted {
|
511 |
+
color: #c33;
|
512 |
+
color: var(--d2h-del-label-color)
|
513 |
+
}
|
514 |
+
|
515 |
+
.d2h-added {
|
516 |
+
color: #399839;
|
517 |
+
color: var(--d2h-ins-label-color)
|
518 |
+
}
|
519 |
+
|
520 |
+
.d2h-changed {
|
521 |
+
color: #d0b44c;
|
522 |
+
color: var(--d2h-change-label-color)
|
523 |
+
}
|
524 |
+
|
525 |
+
.d2h-moved {
|
526 |
+
color: #3572b0;
|
527 |
+
color: var(--d2h-moved-label-color)
|
528 |
+
}
|
529 |
+
|
530 |
+
.d2h-tag {
|
531 |
+
background-color: #fff;
|
532 |
+
background-color: var(--d2h-bg-color);
|
533 |
+
display: -webkit-box;
|
534 |
+
display: -ms-flexbox;
|
535 |
+
display: flex;
|
536 |
+
font-size: 10px;
|
537 |
+
margin-left: 5px;
|
538 |
+
padding: 0 2px
|
539 |
+
}
|
540 |
+
|
541 |
+
.d2h-deleted-tag {
|
542 |
+
border: 1px solid #c33;
|
543 |
+
border: 1px solid var(--d2h-del-label-color)
|
544 |
+
}
|
545 |
+
|
546 |
+
.d2h-added-tag {
|
547 |
+
border: 1px solid #399839;
|
548 |
+
border: 1px solid var(--d2h-ins-label-color)
|
549 |
+
}
|
550 |
+
|
551 |
+
.d2h-changed-tag {
|
552 |
+
border: 1px solid #d0b44c;
|
553 |
+
border: 1px solid var(--d2h-change-label-color)
|
554 |
+
}
|
555 |
+
|
556 |
+
.d2h-moved-tag {
|
557 |
+
border: 1px solid #3572b0;
|
558 |
+
border: 1px solid var(--d2h-moved-label-color)
|
559 |
+
}
|
560 |
+
|
561 |
+
.d2h-dark-color-scheme {
|
562 |
+
background-color: #0d1117;
|
563 |
+
background-color: var(--d2h-dark-bg-color);
|
564 |
+
color: #e6edf3;
|
565 |
+
color: var(--d2h-dark-color)
|
566 |
+
}
|
567 |
+
|
568 |
+
.d2h-dark-color-scheme .d2h-file-header {
|
569 |
+
background-color: #161b22;
|
570 |
+
background-color: var(--d2h-dark-file-header-bg-color);
|
571 |
+
border-bottom: #30363d;
|
572 |
+
border-bottom: var(--d2h-dark-file-header-border-color)
|
573 |
+
}
|
574 |
+
|
575 |
+
.d2h-dark-color-scheme .d2h-lines-added {
|
576 |
+
border: 1px solid rgba(46, 160, 67, .4);
|
577 |
+
border: 1px solid var(--d2h-dark-ins-border-color);
|
578 |
+
color: #3fb950;
|
579 |
+
color: var(--d2h-dark-ins-label-color)
|
580 |
+
}
|
581 |
+
|
582 |
+
.d2h-dark-color-scheme .d2h-lines-deleted {
|
583 |
+
border: 1px solid rgba(248, 81, 73, .4);
|
584 |
+
border: 1px solid var(--d2h-dark-del-border-color);
|
585 |
+
color: #f85149;
|
586 |
+
color: var(--d2h-dark-del-label-color)
|
587 |
+
}
|
588 |
+
|
589 |
+
.d2h-dark-color-scheme .d2h-code-line del, .d2h-dark-color-scheme .d2h-code-side-line del {
|
590 |
+
background-color: rgba(248, 81, 73, .4);
|
591 |
+
background-color: var(--d2h-dark-del-highlight-bg-color)
|
592 |
+
}
|
593 |
+
|
594 |
+
.d2h-dark-color-scheme .d2h-code-line ins, .d2h-dark-color-scheme .d2h-code-side-line ins {
|
595 |
+
background-color: rgba(46, 160, 67, .4);
|
596 |
+
background-color: var(--d2h-dark-ins-highlight-bg-color)
|
597 |
+
}
|
598 |
+
|
599 |
+
.d2h-dark-color-scheme .d2h-diff-tbody {
|
600 |
+
border-color: #30363d;
|
601 |
+
border-color: var(--d2h-dark-border-color)
|
602 |
+
}
|
603 |
+
|
604 |
+
.d2h-dark-color-scheme .d2h-code-side-linenumber {
|
605 |
+
background-color: #0d1117;
|
606 |
+
background-color: var(--d2h-dark-bg-color);
|
607 |
+
border-color: #21262d;
|
608 |
+
border-color: var(--d2h-dark-line-border-color);
|
609 |
+
color: #6e7681;
|
610 |
+
color: var(--d2h-dark-dim-color)
|
611 |
+
}
|
612 |
+
|
613 |
+
.d2h-dark-color-scheme .d2h-files-diff .d2h-code-side-emptyplaceholder, .d2h-dark-color-scheme .d2h-files-diff .d2h-emptyplaceholder {
|
614 |
+
background-color: hsla(215, 8%, 47%, .1);
|
615 |
+
background-color: var(--d2h-dark-empty-placeholder-bg-color);
|
616 |
+
border-color: #30363d;
|
617 |
+
border-color: var(--d2h-dark-empty-placeholder-border-color)
|
618 |
+
}
|
619 |
+
|
620 |
+
.d2h-dark-color-scheme .d2h-code-linenumber {
|
621 |
+
background-color: #0d1117;
|
622 |
+
background-color: var(--d2h-dark-bg-color);
|
623 |
+
border-color: #21262d;
|
624 |
+
border-color: var(--d2h-dark-line-border-color);
|
625 |
+
color: #6e7681;
|
626 |
+
color: var(--d2h-dark-dim-color)
|
627 |
+
}
|
628 |
+
|
629 |
+
.d2h-dark-color-scheme .d2h-del {
|
630 |
+
background-color: rgba(248, 81, 73, .1);
|
631 |
+
background-color: var(--d2h-dark-del-bg-color);
|
632 |
+
border-color: rgba(248, 81, 73, .4);
|
633 |
+
border-color: var(--d2h-dark-del-border-color)
|
634 |
+
}
|
635 |
+
|
636 |
+
.d2h-dark-color-scheme .d2h-ins {
|
637 |
+
background-color: rgba(46, 160, 67, .15);
|
638 |
+
background-color: var(--d2h-dark-ins-bg-color);
|
639 |
+
border-color: rgba(46, 160, 67, .4);
|
640 |
+
border-color: var(--d2h-dark-ins-border-color)
|
641 |
+
}
|
642 |
+
|
643 |
+
.d2h-dark-color-scheme .d2h-info {
|
644 |
+
background-color: rgba(56, 139, 253, .1);
|
645 |
+
background-color: var(--d2h-dark-info-bg-color);
|
646 |
+
border-color: rgba(56, 139, 253, .4);
|
647 |
+
border-color: var(--d2h-dark-info-border-color);
|
648 |
+
color: #6e7681;
|
649 |
+
color: var(--d2h-dark-dim-color)
|
650 |
+
}
|
651 |
+
|
652 |
+
.d2h-dark-color-scheme .d2h-file-diff .d2h-del.d2h-change {
|
653 |
+
background-color: rgba(210, 153, 34, .2);
|
654 |
+
background-color: var(--d2h-dark-change-del-color)
|
655 |
+
}
|
656 |
+
|
657 |
+
.d2h-dark-color-scheme .d2h-file-diff .d2h-ins.d2h-change {
|
658 |
+
background-color: rgba(46, 160, 67, .25);
|
659 |
+
background-color: var(--d2h-dark-change-ins-color)
|
660 |
+
}
|
661 |
+
|
662 |
+
.d2h-dark-color-scheme .d2h-file-wrapper {
|
663 |
+
border: 1px solid #30363d;
|
664 |
+
border: 1px solid var(--d2h-dark-border-color)
|
665 |
+
}
|
666 |
+
|
667 |
+
.d2h-dark-color-scheme .d2h-file-collapse {
|
668 |
+
border: 1px solid #0d1117;
|
669 |
+
border: 1px solid var(--d2h-dark-bg-color)
|
670 |
+
}
|
671 |
+
|
672 |
+
.d2h-dark-color-scheme .d2h-file-collapse.d2h-selected {
|
673 |
+
background-color: rgba(56, 139, 253, .1);
|
674 |
+
background-color: var(--d2h-dark-selected-color)
|
675 |
+
}
|
676 |
+
|
677 |
+
.d2h-dark-color-scheme .d2h-file-list-wrapper a, .d2h-dark-color-scheme .d2h-file-list-wrapper a:visited {
|
678 |
+
color: #3572b0;
|
679 |
+
color: var(--d2h-dark-moved-label-color)
|
680 |
+
}
|
681 |
+
|
682 |
+
.d2h-dark-color-scheme .d2h-file-list > li {
|
683 |
+
border-bottom: 1px solid #0d1117;
|
684 |
+
border-bottom: 1px solid var(--d2h-dark-bg-color)
|
685 |
+
}
|
686 |
+
|
687 |
+
.d2h-dark-color-scheme .d2h-deleted {
|
688 |
+
color: #f85149;
|
689 |
+
color: var(--d2h-dark-del-label-color)
|
690 |
+
}
|
691 |
+
|
692 |
+
.d2h-dark-color-scheme .d2h-added {
|
693 |
+
color: #3fb950;
|
694 |
+
color: var(--d2h-dark-ins-label-color)
|
695 |
+
}
|
696 |
+
|
697 |
+
.d2h-dark-color-scheme .d2h-changed {
|
698 |
+
color: #d29922;
|
699 |
+
color: var(--d2h-dark-change-label-color)
|
700 |
+
}
|
701 |
+
|
702 |
+
.d2h-dark-color-scheme .d2h-moved {
|
703 |
+
color: #3572b0;
|
704 |
+
color: var(--d2h-dark-moved-label-color)
|
705 |
+
}
|
706 |
+
|
707 |
+
.d2h-dark-color-scheme .d2h-tag {
|
708 |
+
background-color: #0d1117;
|
709 |
+
background-color: var(--d2h-dark-bg-color)
|
710 |
+
}
|
711 |
+
|
712 |
+
.d2h-dark-color-scheme .d2h-deleted-tag {
|
713 |
+
border: 1px solid #f85149;
|
714 |
+
border: 1px solid var(--d2h-dark-del-label-color)
|
715 |
+
}
|
716 |
+
|
717 |
+
.d2h-dark-color-scheme .d2h-added-tag {
|
718 |
+
border: 1px solid #3fb950;
|
719 |
+
border: 1px solid var(--d2h-dark-ins-label-color)
|
720 |
+
}
|
721 |
+
|
722 |
+
.d2h-dark-color-scheme .d2h-changed-tag {
|
723 |
+
border: 1px solid #d29922;
|
724 |
+
border: 1px solid var(--d2h-dark-change-label-color)
|
725 |
+
}
|
726 |
+
|
727 |
+
.d2h-dark-color-scheme .d2h-moved-tag {
|
728 |
+
border: 1px solid #3572b0;
|
729 |
+
border: 1px solid var(--d2h-dark-moved-label-color)
|
730 |
+
}
|
731 |
+
|
732 |
+
@media (prefers-color-scheme: dark) {
|
733 |
+
.d2h-auto-color-scheme {
|
734 |
+
background-color: #0d1117;
|
735 |
+
background-color: var(--d2h-dark-bg-color);
|
736 |
+
color: #e6edf3;
|
737 |
+
color: var(--d2h-dark-color)
|
738 |
+
}
|
739 |
+
|
740 |
+
.d2h-auto-color-scheme .d2h-file-header {
|
741 |
+
background-color: #161b22;
|
742 |
+
background-color: var(--d2h-dark-file-header-bg-color);
|
743 |
+
border-bottom: #30363d;
|
744 |
+
border-bottom: var(--d2h-dark-file-header-border-color)
|
745 |
+
}
|
746 |
+
|
747 |
+
.d2h-auto-color-scheme .d2h-lines-added {
|
748 |
+
border: 1px solid rgba(46, 160, 67, .4);
|
749 |
+
border: 1px solid var(--d2h-dark-ins-border-color);
|
750 |
+
color: #3fb950;
|
751 |
+
color: var(--d2h-dark-ins-label-color)
|
752 |
+
}
|
753 |
+
|
754 |
+
.d2h-auto-color-scheme .d2h-lines-deleted {
|
755 |
+
border: 1px solid rgba(248, 81, 73, .4);
|
756 |
+
border: 1px solid var(--d2h-dark-del-border-color);
|
757 |
+
color: #f85149;
|
758 |
+
color: var(--d2h-dark-del-label-color)
|
759 |
+
}
|
760 |
+
|
761 |
+
.d2h-auto-color-scheme .d2h-code-line del, .d2h-auto-color-scheme .d2h-code-side-line del {
|
762 |
+
background-color: rgba(248, 81, 73, .4);
|
763 |
+
background-color: var(--d2h-dark-del-highlight-bg-color)
|
764 |
+
}
|
765 |
+
|
766 |
+
.d2h-auto-color-scheme .d2h-code-line ins, .d2h-auto-color-scheme .d2h-code-side-line ins {
|
767 |
+
background-color: rgba(46, 160, 67, .4);
|
768 |
+
background-color: var(--d2h-dark-ins-highlight-bg-color)
|
769 |
+
}
|
770 |
+
|
771 |
+
.d2h-auto-color-scheme .d2h-diff-tbody {
|
772 |
+
border-color: #30363d;
|
773 |
+
border-color: var(--d2h-dark-border-color)
|
774 |
+
}
|
775 |
+
|
776 |
+
.d2h-auto-color-scheme .d2h-code-side-linenumber {
|
777 |
+
background-color: #0d1117;
|
778 |
+
background-color: var(--d2h-dark-bg-color);
|
779 |
+
border-color: #21262d;
|
780 |
+
border-color: var(--d2h-dark-line-border-color);
|
781 |
+
color: #6e7681;
|
782 |
+
color: var(--d2h-dark-dim-color)
|
783 |
+
}
|
784 |
+
|
785 |
+
.d2h-auto-color-scheme .d2h-files-diff .d2h-code-side-emptyplaceholder, .d2h-auto-color-scheme .d2h-files-diff .d2h-emptyplaceholder {
|
786 |
+
background-color: hsla(215, 8%, 47%, .1);
|
787 |
+
background-color: var(--d2h-dark-empty-placeholder-bg-color);
|
788 |
+
border-color: #30363d;
|
789 |
+
border-color: var(--d2h-dark-empty-placeholder-border-color)
|
790 |
+
}
|
791 |
+
|
792 |
+
.d2h-auto-color-scheme .d2h-code-linenumber {
|
793 |
+
background-color: #0d1117;
|
794 |
+
background-color: var(--d2h-dark-bg-color);
|
795 |
+
border-color: #21262d;
|
796 |
+
border-color: var(--d2h-dark-line-border-color);
|
797 |
+
color: #6e7681;
|
798 |
+
color: var(--d2h-dark-dim-color)
|
799 |
+
}
|
800 |
+
|
801 |
+
.d2h-auto-color-scheme .d2h-del {
|
802 |
+
background-color: rgba(248, 81, 73, .1);
|
803 |
+
background-color: var(--d2h-dark-del-bg-color);
|
804 |
+
border-color: rgba(248, 81, 73, .4);
|
805 |
+
border-color: var(--d2h-dark-del-border-color)
|
806 |
+
}
|
807 |
+
|
808 |
+
.d2h-auto-color-scheme .d2h-ins {
|
809 |
+
background-color: rgba(46, 160, 67, .15);
|
810 |
+
background-color: var(--d2h-dark-ins-bg-color);
|
811 |
+
border-color: rgba(46, 160, 67, .4);
|
812 |
+
border-color: var(--d2h-dark-ins-border-color)
|
813 |
+
}
|
814 |
+
|
815 |
+
.d2h-auto-color-scheme .d2h-info {
|
816 |
+
background-color: rgba(56, 139, 253, .1);
|
817 |
+
background-color: var(--d2h-dark-info-bg-color);
|
818 |
+
border-color: rgba(56, 139, 253, .4);
|
819 |
+
border-color: var(--d2h-dark-info-border-color);
|
820 |
+
color: #6e7681;
|
821 |
+
color: var(--d2h-dark-dim-color)
|
822 |
+
}
|
823 |
+
|
824 |
+
.d2h-auto-color-scheme .d2h-file-diff .d2h-del.d2h-change {
|
825 |
+
background-color: rgba(210, 153, 34, .2);
|
826 |
+
background-color: var(--d2h-dark-change-del-color)
|
827 |
+
}
|
828 |
+
|
829 |
+
.d2h-auto-color-scheme .d2h-file-diff .d2h-ins.d2h-change {
|
830 |
+
background-color: rgba(46, 160, 67, .25);
|
831 |
+
background-color: var(--d2h-dark-change-ins-color)
|
832 |
+
}
|
833 |
+
|
834 |
+
.d2h-auto-color-scheme .d2h-file-wrapper {
|
835 |
+
border: 1px solid #30363d;
|
836 |
+
border: 1px solid var(--d2h-dark-border-color)
|
837 |
+
}
|
838 |
+
|
839 |
+
.d2h-auto-color-scheme .d2h-file-collapse {
|
840 |
+
border: 1px solid #0d1117;
|
841 |
+
border: 1px solid var(--d2h-dark-bg-color)
|
842 |
+
}
|
843 |
+
|
844 |
+
.d2h-auto-color-scheme .d2h-file-collapse.d2h-selected {
|
845 |
+
background-color: rgba(56, 139, 253, .1);
|
846 |
+
background-color: var(--d2h-dark-selected-color)
|
847 |
+
}
|
848 |
+
|
849 |
+
.d2h-auto-color-scheme .d2h-file-list-wrapper a, .d2h-auto-color-scheme .d2h-file-list-wrapper a:visited {
|
850 |
+
color: #3572b0;
|
851 |
+
color: var(--d2h-dark-moved-label-color)
|
852 |
+
}
|
853 |
+
|
854 |
+
.d2h-auto-color-scheme .d2h-file-list > li {
|
855 |
+
border-bottom: 1px solid #0d1117;
|
856 |
+
border-bottom: 1px solid var(--d2h-dark-bg-color)
|
857 |
+
}
|
858 |
+
|
859 |
+
.d2h-dark-color-scheme .d2h-deleted {
|
860 |
+
color: #f85149;
|
861 |
+
color: var(--d2h-dark-del-label-color)
|
862 |
+
}
|
863 |
+
|
864 |
+
.d2h-auto-color-scheme .d2h-added {
|
865 |
+
color: #3fb950;
|
866 |
+
color: var(--d2h-dark-ins-label-color)
|
867 |
+
}
|
868 |
+
|
869 |
+
.d2h-auto-color-scheme .d2h-changed {
|
870 |
+
color: #d29922;
|
871 |
+
color: var(--d2h-dark-change-label-color)
|
872 |
+
}
|
873 |
+
|
874 |
+
.d2h-auto-color-scheme .d2h-moved {
|
875 |
+
color: #3572b0;
|
876 |
+
color: var(--d2h-dark-moved-label-color)
|
877 |
+
}
|
878 |
+
|
879 |
+
.d2h-auto-color-scheme .d2h-tag {
|
880 |
+
background-color: #0d1117;
|
881 |
+
background-color: var(--d2h-dark-bg-color)
|
882 |
+
}
|
883 |
+
|
884 |
+
.d2h-auto-color-scheme .d2h-deleted-tag {
|
885 |
+
border: 1px solid #f85149;
|
886 |
+
border: 1px solid var(--d2h-dark-del-label-color)
|
887 |
+
}
|
888 |
+
|
889 |
+
.d2h-auto-color-scheme .d2h-added-tag {
|
890 |
+
border: 1px solid #3fb950;
|
891 |
+
border: 1px solid var(--d2h-dark-ins-label-color)
|
892 |
+
}
|
893 |
+
|
894 |
+
.d2h-auto-color-scheme .d2h-changed-tag {
|
895 |
+
border: 1px solid #d29922;
|
896 |
+
border: 1px solid var(--d2h-dark-change-label-color)
|
897 |
+
}
|
898 |
+
|
899 |
+
.d2h-auto-color-scheme .d2h-moved-tag {
|
900 |
+
border: 1px solid #3572b0;
|
901 |
+
border: 1px solid var(--d2h-dark-moved-label-color)
|
902 |
+
}
|
903 |
+
}
|
904 |
+
}
|
905 |
+
}
|
survey_guide.md
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
**Thank you for agreeing to take part!**
|
2 |
+
|
3 |
+
In this study, we study how developers interact with
|
4 |
+
commit message text generated by AI Assistant. Imagine
|
5 |
+
that you are in one of the JetBrains IDEs and writing a
|
6 |
+
commit message (the changes to the code are shown on the
|
7 |
+
left). You have generated a message using AI Assistant.
|
8 |
+
You can see this generated message on the top right.
|
9 |
+
However, the message will not necessarily be perfect!
|
10 |
+
|
11 |
+
Now, _you need to edit the commit message_ so that it is good enough
|
12 |
+
to publish to VCS. Please do this directly in the text
|
13 |
+
box. When you're done, press the "Submit" button: you
|
14 |
+
will proceed to the next commit and the next generated
|
15 |
+
message. Please, repeat the process for as many commits
|
16 |
+
as you can.
|
17 |
+
|
18 |
+
During the study, we collect all keystrokes made _in a
|
19 |
+
text window_, as well as the resulting message,
|