@@ -52,32 +52,31 @@ export function activate(): void {
52
52
thread . createdAt
53
53
) } ago`
54
54
55
- // TODO(slimsag): color scheme detection was impossible when this was written, see https://github.com/sourcegraph/sourcegraph/issues/732
56
- const color = window . location . host === 'github.com' ? 'black' : '#0366d6' // #3b4d6e
57
- const backgroundColor = window . location . host === 'github.com' ? 'white' : 'rgba(28, 126, 214, 0.3)' // #151c28
58
-
59
55
decorations . push ( {
60
56
range : new sourcegraph . Range (
61
57
new sourcegraph . Position (
62
- target . relativeSelection . startLine - 1 ,
58
+ target . relativeSelection . startLine ,
63
59
target . relativeSelection . startCharacter
64
60
) ,
65
- new sourcegraph . Position (
66
- target . relativeSelection . endLine - 1 ,
67
- target . relativeSelection . endCharacter
68
- )
61
+ new sourcegraph . Position ( target . relativeSelection . endLine , target . relativeSelection . endCharacter )
69
62
) ,
70
63
after : {
71
64
contentText : ' 💬 ' + describeThread ( shortTitle ) ,
72
65
linkURL : thread . inlineURL
73
- ? window . location . host
66
+ ? sourcegraph . internal . clientApplication === 'sourcegraph'
74
67
? thread . inlineURL . slice ( thread . inlineURL . lastIndexOf ( '#' ) )
75
68
: thread . inlineURL
76
69
: undefined ,
77
70
hoverMessage : ' ' + describeThread ( thread . title ) ,
78
- color,
71
+ dark : {
72
+ color : '#0d70e0' ,
73
+ backgroundColor : 'rgba(28, 126, 214, 0.15)' ,
74
+ } ,
75
+ light : {
76
+ color : 'black' ,
77
+ backgroundColor : 'white' ,
78
+ } ,
79
79
} ,
80
- backgroundColor,
81
80
} )
82
81
}
83
82
0 commit comments